Does anyone happen know how to get this to work?
I keep getting a
Quote:
The item function is invalid
|
message
PHP Code:
function items_recipe($item, $adopt){
$note = "The item {$item->itemname} is a recipe item, which cannot be used on any adoptable and can only be useful if you are performing alchemy.";
return $note;
}
function items_gender($item, $adopt){
$mysidia = Registry::get("mysidia");
$delitem = $item->remove();
$gender = $adopt->gender;
switch($gender){
case "m":
$newgender = "f";
$newgender_full = "girl";
break;
default:
$newgender = "m";
$newgender_full = "boy";
}
$mysidia->db->update("owned_adoptables", array("gender" => $newgender), "aid ='{$adopt->aid}' and owner='{$item->owner}'");
$note = "Success! The <b>{$item->itemname}</b> has worked its magic. {$adopt->name} is now a {$newgender_full}.";
return $note;
}
function items_background($item, $adopt){
$mysidia = Registry::get("mysidia");
// Update the lastbred info.
$background = $item->backgroundimage;
$mysidia->db->update("owned_adoptables", array("background" => $background), "aid ='{$adopt->aid}' and owner='{$item->owner}'");
$note = "Your adoptable now has a new background!<br>";
//Update item quantity...
$delitem = $item->remove();
return $note;
}