Healing potion item function

Forum
Last Post
Threads / Messages

Ittermat

The awesomesauce
Member
Joined
Feb 2, 2016
Messages
304
Points
18
Location
in front of my laptop
Mysidian Dollar
21,294
Im attempting to add healing potions to heal a pet. but I cant figure out the item function, I basically copied the Clicks one and changed it but cant figure out where I went wrong cuz it tells me the item function is invalid when I try to use it.

The item function in the DB is healthpotion1
The health for pets is located in Owned_adoptables ->health

__________________________________________

function items_healthpotion1($item, $adopt){
$mysidia = Registry::get("mysidia");
$newhealth = $item->value;
$mysidia->db->update("owned_adoptables", array("health" => $newhealth), "aid='{$adopt->aid}'and owner='{$item->owner}'");
$note = "By using {$item->itemname}, the adoptable's health is fully restored<br>";
}

NEVERMIND I FIGURED IT OUT I WAS A STUPID <3
 
Last edited:

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,274
Messages
33,114
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top