carlg Posted November 11, 2007 Posted November 11, 2007 i have tryed to add this to gym number_format($gymvalue,2); as i am not pleased that you can gain 40.0000889968 per 1 turn but it is not working is there any clue what i am doing wrong thanks for reading and your help Quote
Godhand Posted November 11, 2007 Posted November 11, 2007 Re: gym help please open up your gym.php then look for the rand(somenumbershere,another)*(rand(yetanother,another)*$userwill/somenumber something like that. Thats ALL you have to do to change gains per train. It should be near $gain= in your gym.php. (Assuming you are using the normal gym) Quote
carlg Posted November 11, 2007 Author Posted November 11, 2007 Re: gym help please so u meen change $gain=0; for($i=0; $i<$_POST['amnt']; $i++) { $gain+=rand(1,3)/rand(800,1000)*rand(800,1000)*(($ir['will']+20)/450); $ir['will']-=rand(1,3); if($ir['will'] < 0) { $ir['will']=0; } to $gain=0; for($i=0; $i<$_POST['amnt']; $i++) { $gain+=rand(1,3)/rand(80,10)*rand(80,10)*(($ir['will']+20)/450); $ir['will']-=rand(1,3); if($ir['will'] < 0) { $ir['will']=0; } Quote
Godhand Posted November 11, 2007 Posted November 11, 2007 Re: gym help please Yup thats right. Although that formula will be very very hard to get good at stats. You might want to make a donator only gym that has a better formula then that. It would be an incentive to be a donator. Quote
carlg Posted November 12, 2007 Author Posted November 12, 2007 Re: gym help please but that does not remove the 40,0000000000 or what ever it is Quote
dementor Posted November 12, 2007 Posted November 12, 2007 Re: gym help please is simple really just figure out your own formula to put there that will never give decimals of as answers Quote
deadlyculprit Posted November 12, 2007 Posted November 12, 2007 Re: gym help please so could u tell me what formula would give a low train and what formula would give u a high train pretty please ? :| Quote
Godhand Posted November 12, 2007 Posted November 12, 2007 Re: gym help please You didn't say you wanted non decimal. I believe you could eliminate the decimals by changing [code] $gain+=rand(1,3)/rand(800,1000)*rand(800,1000)*(($ir['will']+20)/450); into $gain+=round(rand(1,3)/rand(800,1000)*rand(800,1000)*(($ir['will']+20)/450)); I haven't tested so back up before you try. [/code] Quote
carlg Posted November 15, 2007 Author Posted November 15, 2007 Re: gym help please You didn't say you wanted non decimal. I believe you could eliminate the decimals by changing [code] $gain+=rand(1,3)/rand(800,1000)*rand(800,1000)*(($ir['will']+20)/450); into $gain+=round(rand(1,3)/rand(800,1000)*rand(800,1000)*(($ir['will']+20)/450)); I haven't tested so back up before you try. [/code] dude i thank u very much that worked just right! Quote
Godhand Posted November 16, 2007 Posted November 16, 2007 Re: gym help please No problem simple fix. Quote
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.