boionfire81 Posted July 5, 2016 Share Posted July 5, 2016 Ok, so I located the formula for my gym. for($i=0; $i<$_POST['amnt']; $i++) { $gain+=rand(1,3)/rand(800,1000)*rand(800,1000)*(($ir['will']+20)*(($ir['gymlevel']/rand(3,12))/150)); $ir['will']-=rand(1,3); if($ir['will'] < 0) { $ir['will']=0; } } In the layout I want to put Complete: 1 Set - #### (gain amount) 5 Sets - ### gain 10 Sets - ### gain 25 Sets ### gain Then simply click the button for how many sets. I can figure out the button and design, blah, But I'm not sure how to show the gain amount for the sets?? I'm thinking I can just replace the Post amount, but the $i and $i++ is confusing here. Quote Link to comment Share on other sites More sharing options...
G7470 Posted July 5, 2016 Share Posted July 5, 2016 I'm guessing that in this current gym, the user puts in the number of times they want to train, and that's where the $_POST['amnt'] variable is used. As for using "sets", you can do it that way, but you have to answer a couple of questions for yourself first before you actually start to code it: What exactly does using "sets" solve that the current gym system does not have an answer for? How will you determine the gains based upon sets (i.e. will the gain be the same for each set)? Side note: $i is just a placeholder for a number to go through the for loop. ~G7470 Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted July 5, 2016 Author Share Posted July 5, 2016 How will you determine the gains based upon sets (i.e. will the gain be the same for each set)? That is what I wanted to know. This isn't for a cosmetic thing. It's a use credits to refill your energy and gain ### with 100 energy thing. A sales pitch to buy and use credits. 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.