Jump to content
MakeWebGames

Recommended Posts

Posted

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

Posted

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)

Posted

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; }
Posted

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.

Posted

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]

Posted

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!

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