Advertisement
Guest User

Untitled

a guest
Jul 29th, 2012
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.72 KB | None | 0 0
  1. function expToLevel($experience) {
  2.     $totalexp = 300;
  3.     $dropoff35=floor($totalexp*pow(1.3,34));
  4.     $dropoff80=floor($dropoff35*pow(1.1,45));
  5.     $dropoff150=floor($dropoff80*pow(1.08,70));
  6.     $dropoff180=floor($dropoff150*pow(1.05,30));
  7. $level = ((($experience<$dropoff35)?1:(($experience<$dropoff80)?35:(($experience<$dropoff150)?80:(($experience<$dropoff180)?150:180))))+log(($experience/(($experience<$dropoff35)?300:(($experience<$dropoff80)?$dropoff35:(($experience<$dropoff150)?$dropoff80:(($experience<$dropoff180)?$dropoff150:$dropoff180))))),(($experience<$dropoff35)?(1.3):(($experience<$dropoff80)?(1.1):(($experience<$dropoff150)?(1.08):(($experience<$dropoff180)?(1.05):1.03))))));
  8. return floor($level);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement