Register for your free account! | Forgot your password?

Go Back   elitepvpers > Shooter > WarRock
You last visited: Today at 23:13

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Code Snippet - PHP] Private Server - Experience/Level Displays

Discussion on [Code Snippet - PHP] Private Server - Experience/Level Displays within the WarRock forum part of the Shooter category.

Closed Thread
 
Old   #1
 
InstantBlood's Avatar
 
elite*gold: 30
The Black Market: 105/0/1
Join Date: Jun 2011
Posts: 3,335
Received Thanks: 1,356
[Code Snippet - PHP] Private Server - Experience/Level Displays

Level Icon:
  • Without Premium
  • Level 101 not included
  • You must enter your own path
  • Link:

3D Level Icon:
  • With Premium
  • Level 101 not included
  • Platinum not included
  • You must enter your own path
  • Link:

Experience Percent:
  • Level 101 included
  • Link:

Experience Display:
  • Level 101 included
  • Link:


Finale Code:
  • Link:


Have fun and sorrry for my bad english ^^
InstantBlood is offline  
Thanks
1 User
Old 11/12/2013, 15:32   #2
 
elite*gold: 0
Join Date: Nov 2012
Posts: 592
Received Thanks: 394
Or easy

Quote:
function getLevelforExp($exp)
{
$level = 1;
$exp += 1;
$levelarr = array(1,2250,6750,11250,16650,24750,32850,41625,50 400,59175,
67950,76725,94725,112725,130725,148725,166725,1892 25,211725,234225,
256725,279225,306225,333225,360225,387225,414225,4 41225,497475,553725,
609975,666225,722475,778725,857475,936225,1014975, 1093725,1172475,1251225,
1363725,1476225,1588725,1701225,1813725,1926225,20 38725,2207475,2376225,2544975,
2713725,2882475,3051225,3219975,3444975,3669975,38 94975,4119975,4344975,4569975,
4794975,5132475,5469975,5807475,6144975,6482475,68 19975,7157475,7494975,7944975,
8394975,8844975,9294975,9744975,10194975,10644975, 11094975,11657475,12219975,12782475,
13344975,13907475,14469975,15032475,15932475,17282 475,18632475,19982475,21332475,22682475,
24032475,25382475,26732475,28307475,29882475,31457 475,33032475,34607475,36182475,37757475,
2147483647
);
for($i = 1; $i < 101; $i++)
if($exp > $levelarr[$i]) $level = $i;

return $level +1 ;
}
~iToXiiC is offline  
Thanks
1 User
Old 11/12/2013, 17:00   #3



 
+Yazzn's Avatar
 
elite*gold: 420
Join Date: Jan 2012
Posts: 1,082
Received Thanks: 1,000
@InstantBlood Your code is simply inaccaptable.

@~iToXiiC Your code iterates from 1 to 100 even if $levelarr[$i] is equal or bigger than $exp -> Useless iterations (assuming the redundant statements aren't removed by optimization)
+Yazzn is offline  
Old 11/12/2013, 17:01   #4
 
elite*gold: 0
Join Date: Nov 2012
Posts: 592
Received Thanks: 394
Quote:
Originally Posted by Yazzn (: View Post
@InstantBlood Your code is simply inaccaptable.

@~iToXiiC Your code iterates from 1 to 100 even if $levelarr[$i] is equal or bigger than $exp -> Useless iterations (assuming the redundant statements aren't removed by optimization)
Well its realy old like 1 year old i was learning PHP before ^^
~iToXiiC is offline  
Old 11/12/2013, 17:58   #5
 
Raz9r's Avatar
 
elite*gold: 297
Join Date: Dec 2010
Posts: 1,129
Received Thanks: 1,687
Holy f***ing ****.
Raz9r is offline  
Thanks
1 User
Old 11/12/2013, 18:08   #6
 
InstantBlood's Avatar
 
elite*gold: 30
The Black Market: 105/0/1
Join Date: Jun 2011
Posts: 3,335
Received Thanks: 1,356
Quote:
Originally Posted by Yazzn (: View Post
@InstantBlood Your code is simply inaccaptable.

@~iToXiiC Your code iterates from 1 to 100 even if $levelarr[$i] is equal or bigger than $exp -> Useless iterations (assuming the redundant statements aren't removed by optimization)
Ist ein alter Code der bei mir rumlag.
Natürlich hätte man es leichter machen können, aber wie sagt man so schön "Es führen 1000 Wege nach Rom".
InstantBlood is offline  
Old 11/12/2013, 21:33   #7




 
Omdi's Avatar
 
elite*gold: 1
Join Date: Apr 2010
Posts: 13,772
Received Thanks: 15,036
Kann auch meiner Meinung nach rein

closed
Omdi is offline  
Closed Thread


Similar Threads Similar Threads
[Small Code Snippet] Local Hosting for Private Server Development
06/25/2012 - CO2 PServer Guides & Releases - 2 Replies
Hey everyone. So previously, I was coming up with a few ideas on how to create a dynamic environment for development to simplify network communications (for demonstrations in random locations and such). I came up with a No-IP solution for public connections, but I don't always want my server to be public... so here's a local host solution: // If the server is running on the local machine for development, get the // ip address that the machine would like to use: #region Get Local...
[Code Snippet] Save / Load Lists
03/31/2012 - C/C++ - 18 Replies
Falls ihr vor der selben Problemstellung steht wie ich vor einiger Zeit ^^ Hier ist die Lösung :P //Nur eine Beispiel Struktur die ich für ein Programm genutzt habe typedef struct { char szItem ; float fGewicht; } sItem;
[Code Snippet] getFloatFromString [C++
02/15/2012 - C/C++ - 5 Replies
I wrote a small function for getting a float from a string. I know that this function isn't perfect. It isnt very hard to fix it ;) I belive in you guys :P using namespace std; float getFloatFromString (char *szBuffer);
[Code Snippet]Facing Character to X , Y
10/27/2009 - Aion Hacks, Bots, Cheats & Exploits - 4 Replies
Hey community, i want to share some code snippets to you because NCsoft changed a little bit in Aion and now i want to share a new Facting to X Y method. ;) Thanks to PharmerPhale for some help. :) C# Code private double RotNeeded(float X, float Y) {



All times are GMT +1. The time now is 23:13.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.