hunter Posted February 15, 2007 Share Posted February 15, 2007 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 Quote Link to comment Share on other sites More sharing options...
CraigF Posted February 15, 2007 Share Posted February 15, 2007 Re: Question about gym file i tried to do this, for a donator gym file, but it didnt work either Quote Link to comment Share on other sites More sharing options...
hunter Posted February 15, 2007 Author Share Posted February 15, 2007 Re: Question about gym file Ty king your a saint! --- but really thanks again Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.