Jump to content
MakeWebGames

Energy Gaining Help?


Nicholas

Recommended Posts

hi everyone, im wondering... does anyone know how to make it so no matter what your max energy is, every 5 minutes you only get

5% energy (if non-donator)

8% energy (if donator)

mysql_query("UPDATE users SET energy=energy+(maxenergy/(12.5)) WHERE energy < maxenergy AND donatordays=0");

mysql_query("UPDATE users SET energy=energy+(maxenergy/(6)) WHERE energy < maxenergy AND donatordays>0");

i cant figure it out... im not good with maths lol, i was thinking say you had 12 max energy. (which is level 1 character)

i could get 5% energy every 5 minutes like this for a non-donator

mysql_query("UPDATE users SET energy=energy+(maxenergy/(100*42)) WHERE energy<maxenergy AND donatordays=0");

that make like 5.04% energy... if you can do it like that with the /(100*42)

but... then say you level up and get +1 max energy which be 13 energy and it has that /(100*42), you get 5.46% energy...

can someone help please?

NOTE: ive not tested this yet, dont wanna mess something up lol, so im asking professionals first

Link to comment
Share on other sites

Meh lemme work on a rough idea...

Right:

How about multiplying the number by ten to start.

Then dividing it by 500 for nonD's

And divide it by 200 for Don's

Max energy = 13

*10 = 130

130/500 = 0.26

130/200 = 0.65

*10/500 = nonD's

*10/200 = Don's

Seems releativly evil to me but it will keep training ect down so no one person ahead and others having no chance of catching up.

==TBC==

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