Jump to content
MakeWebGames

gym idea - how to?


Recommended Posts

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.

 

 

 

 

Link to comment
Share on other sites

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:

  1. What exactly does using "sets" solve that the current gym system does not have an answer for?
  2. 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

Link to comment
Share on other sites

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.

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