Thread: Using cronjobs
View Single Post
  #4  
Old 06-30-2017, 09:58 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 65,432
Dinocanid is on a distinguished road
Default

Hmmm, I think that could work if you use both a cronjob and myadopts.php. With the cronjob you lower mood by 10 daily, then on myadoptview (or myadopts) you can check the amount whenever a user manages their pet. So if the pet's mood is below zero, it sets it to zero. Though I suppose that wouldn't work to well if the user decides to use an item on their pet without checking up on them.

Maybe you could use this somehow?
PHP Code:
$mysidia->db->update_decrease("owned_adoptables", array("mood"), 10"mood >= 10"); 
This would only remove 10 mood from a pet who has at least 10...but then 10 would become the minimum
It's late for me too, so I'll have to look at this more when I'm not tired lol.
__________________
Reply With Quote