Jump to content
MakeWebGames

Recommended Posts

Posted
$enperc = min((int) ($ir['energy'] / $ir['maxenergy'] * 100), 100);
       $wiperc = min((int) ($ir['will'] / $ir['maxwill'] * 100), 100);
       $experc = min((int) ($ir['exp'] / $ir['exp_needed'] * 100), 100);
       $brperc = min((int) ($ir['brave'] / $ir['maxbrave'] * 100), 100);
       $hpperc = min((int) ($ir['hp'] / $ir['maxhp'] * 100), 100);
       $enopp = 100 - $enperc;
       $wiopp = 100 - $wiperc;
       $exopp = 100 - $experc;
       $bropp = 100 - $brperc;
       $hpopp = 100 - $hpperc;

 

Seems simple enough. Now that I see where the code is.

But mathematically I'm unsure the * 100), 100);

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.

×
×
  • Create New...