Jump to content
MakeWebGames

Recommended Posts

Posted

Hello,

Now, every 5mins brave, will, health and energy go up a certain amount. Now I havnt completly thought of all the pros and cons and what am about to suggest but:

How could I change these amounts?

Obviously if I wanted them every 7mins or whatever I'd have to create a new cron. But if I use the normal 5min cron, I have found this:

$query="UPDATE users SET brave=brave+((maxbrave/10)+0.5) WHERE brave<maxbrave ";

$query2="UPDATE users SET brave=maxbrave WHERE brave>maxbrave";

$query3="UPDATE users SET hp=hp+(maxhp/3) WHERE hp<maxhp";

$query4="UPDATE users SET hp=maxhp WHERE hp>maxhp";

This is for the brave update, the bit I have put in bold - Could someone explain the values to me so I can work out a new amount they can be adjusted by.

Now, is this all thats needed to make the adjustment? What about donators? There will be code somewhere because they get twice as much regain per 5mins.

Posted

Re: Brave/Energy regain amount

 

the +0.5 is just to make sure every 50 minutes you get full brave.

Thanks, ive just learned something new :)

Posted

Re: Brave/Energy regain amount

maxbrave/10 would take 50 minutes to gain full brave

maxbrave/5 would take 25 minutes to gain full brave

etc... so on

get it. got it. good

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