Jump to content
MakeWebGames

Question about gym file


hunter

Recommended Posts

Im trying to make so that when people train they gain more stats per a train

$tgain=0;
for($i=1;$i<=$_GET['times'] && $ir['energy'] > 0;$i++)
{
if ($ir['energy'] > 0)
{
$gain=rand(1,4)/rand(600,705)*rand(600,705)*($ir['will']+20/150);
$tgain+=$gain;
if ($_GET['train']=="IQ") { $gain/=100; }
$ir[$_GET['train']]+=$gain;
$egain=$gain/100;
$ts=$ir[$_GET['train']];
$st=$_GET['train'];

mysql_query("UPDATE userstats SET $st=$st+".$gain." WHERE userid=$userid",$c) or die("UPDATE userstats SET $st=$st+$gain,energy=energy-1,exp=exp+$egain WHERE userid=$userid
".mysql_error());
$wu=(int) (rand(1,3));
if ($ir['will'] >= $wu)

 

i was told that this line is where to up the stats

$gain=rand(1,4)/rand(600,705)*rand(600,705)*($ir['will']+20/150);

But stats where about the same can anyone please help thanks

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.

×
×
  • Create New...