
07-02-2017, 02:40 PM
|
 |
Member
|
|
Join Date: Apr 2017
Posts: 57
Gender: Female
Credits: 10,791
|
|
Quote:
Originally Posted by Dinocanid
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.
|
Try this instead:
PHP Code:
public function lowerMood() { $mysidia = Registry::get("mysidia"); $mysidia->db->update_decrease("owned_adoptables", array("mood"), 10); $mysidia->db->update("owned_adoptables", array("mood" => 0), "mood<0"); }
__________________

Last edited by KatFennec; 07-02-2017 at 02:45 PM.
|