Welcome Guest, Not a member yet? Register   Sign In
How to setup an automatic function?
#5

[eluser]richthegeek[/eluser]
Ah, didn't consider wget - a much more elegant solution for just grabbing a page automatically and executing through the CI stack. Would still have to secure via IP/UA checking of course.

"path to script" is wherever you put the script. If you are unsure, type "pwd" to get the current working directory (ie, where you are such as /home/corey/httpdocs/)

For the maximum stamina, I assume you have two columns in your table along the lines of "current_stamina" and "max_stamina". If so, simply do:
Code:
UPDATE `players` SET `current_stamina` = `max_stamina`

From purely a game theory viewpoint, it'd probably be better to increase the stamina steadily over time rather than maxing it at a set point, so as to avoid people doing massively expensive things just before the tickover and suffering no penalty for it. Something like this every 216 seconds would replenish from 0% to 100% over six hours:
Code:
UPDATE `players` SET `current_stamina` = `current_stamina` + (`max_stamina` / 100);
UPDATE `players` SET `current_stamina` = `max_stamina` WHERE `current_stamina` > `max_stamina`;


Messages In This Thread
How to setup an automatic function? - by El Forum - 07-18-2010, 02:31 PM
How to setup an automatic function? - by El Forum - 07-18-2010, 02:41 PM
How to setup an automatic function? - by El Forum - 07-18-2010, 02:44 PM
How to setup an automatic function? - by El Forum - 07-18-2010, 03:12 PM
How to setup an automatic function? - by El Forum - 07-18-2010, 03:27 PM
How to setup an automatic function? - by El Forum - 07-18-2010, 03:36 PM
How to setup an automatic function? - by El Forum - 07-18-2010, 03:44 PM
How to setup an automatic function? - by El Forum - 07-19-2010, 03:03 AM
How to setup an automatic function? - by El Forum - 07-19-2010, 07:39 AM
How to setup an automatic function? - by El Forum - 07-19-2010, 10:03 AM
How to setup an automatic function? - by El Forum - 07-19-2010, 10:19 AM
How to setup an automatic function? - by El Forum - 07-19-2010, 02:12 PM
How to setup an automatic function? - by El Forum - 07-19-2010, 02:17 PM
How to setup an automatic function? - by El Forum - 07-19-2010, 02:30 PM
How to setup an automatic function? - by El Forum - 07-19-2010, 03:06 PM
How to setup an automatic function? - by El Forum - 07-19-2010, 04:27 PM
How to setup an automatic function? - by El Forum - 07-19-2010, 07:06 PM
How to setup an automatic function? - by El Forum - 07-19-2010, 07:31 PM
How to setup an automatic function? - by El Forum - 07-19-2010, 08:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB