Bikkebakke Posted February 10, 2010 Share Posted February 10, 2010 So yea, I hope this is the right place to ask this: I'm working on a browser-game and I'd want to add a regen/recovery/recuperation system so that i.e. if you run out of money and can't afford to pay "hospital bill", your hp would regenerate overtime. Or if you already used all the "stamina", it would regenerate so you can go run more "errands" to make some cash. You see it everywhere but it's the kind of thing that's hard to search help for, other than asking from people that know, of course! So please, enlighten me and I'll be beholden for you forever! (Or at least untill I encounter the next problem.) Quote Link to comment https://forums.phpfreaks.com/topic/191687-how-to-make-a-certain-value-of-a-table-increase-overtime/ Share on other sites More sharing options...
kickstart Posted February 11, 2010 Share Posted February 11, 2010 Hi Probably most just use CRON jobs. Failing that do it manually in some regularly run code (ie, possibly the code that checks users are stlill logged in when they do anything). Store when the update was last done, and when that is over X ago, update the health and update the time an update was last done. All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/191687-how-to-make-a-certain-value-of-a-table-increase-overtime/#findComment-1010660 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.