Jump to content
MakeWebGames

Trying to make base EXP calculator..


bloodless2010
 Share

Recommended Posts

OKAY, so on my criminal.php page I want the table to have like the percentage of EXP you will gave for doing that crime,

I currently have:

$EXP = (int) ($r2['crimeSUCCESSMUNY'] / 25); //$1,000 / 25 = 40 EXP

$needexp = (int) (($ir['level'] + 1) * ($ir['level'] + 1) * ($ir['level'] + 1) * 2.2); //6036.8 EXP need to level to level 14

$EXP2 = (int) $needexp / 100 * $EXP; // 2414.72

$EXP = "$EXP2%";

but it returns a crazy amount like 2414.72%, which would level the user up like 24 times. (Whereas it's only meant to be like 2/4%)

Your support is much appreciated thank you

EDIT: Nevermind sorry I have done it myself was using the wrong sum!

Edited by bloodless2010
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...