Jump to content
MakeWebGames

Recommended Posts

Posted

Hello, i have a problem with attacktake.php file .. more exactly this formula, for getting EXP

qe=$r['level']*$r['level']*$r['level'];
$expgain=rand($qe/32,$qe/16);
$expgain = $expgain > floor($ir['exp_needed'] * 0.5) ? floor($ir['exp_needed'] * 0.5) : $expgain; // that should do it

.. any change i make, is not good.. it gives or to much exp.. or to less.. for example, i`m level 3.. attack a level 5 .. i`m getting 28%exp .. and if i change this values.. to "64" or "32 "$expgain=rand($qe/64,$qe/32 ); i`m getting less exp .. but when i`m at level 5 and attacking a level 5 player, i get just 1 exp, or i`m level 6 .. atack a level 5 .. i got 0.. and so on ~x(

:) sooo.. does somebody, has a good attacktake.php ? with arrays for each level.. i don`t know.. any help appreciated.

Posted

Re: attacking problem

 

$qe = ($r['level']*$ir['level']*5*$r['level'] / ($ir['level']*3));
$expgain = rand(($qe/32),($qe/16));
if($expgain < 0 OR $expain == 1)
{
$expgain = rand(1,10);
}
else
{
$expgain =$expgain > floor($ir['exp_needed'] * 0.5) ? floor($ir['exp_needed'] * 0.5);
}

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...