I've had a go at making an alternate check + alternate setter from the skin changer but it refuses to work.
Not sure what I did wrong. Still learning this stuff.
PHP Code:
function items_Skin($item, $adopt){
$mysidia = Registry:: get("mysidia");
$imageurl = $adopt->imageurl;
$currentLevel = $adopt->currentlevel;
//Let's check if the adoptable is using this custom skin.
if($imageurl == "http://yoursite.com/picuploads/png/nameorcodeoftheimage.png") {
else if($imageurl == "http://yoursite.com/picuploads/png/nameorcodeoftheimageALT.png") {
//The adoptable is already using this custom skin
$note = "Your adoptable is using this custom skin.";
}
//Let's check if the adoptable is below level 10.
else if($currentLevel < 10){
$note = "Your adoptable is not at level 10 yet.";
}
//Adoptable has all the requirements, let's update it
else{
$mysidia -> db -> update("owned_adoptables", array("usealternates" => 'no'), "imageurl" => 'http://yoursite.com/picuploads/png/nameorcodeoftheimage.png'),"aid='{$adopt->aid}' and owner ='{$item->owner}'");
$note = "Your adoptable {$adopt->name} is now using a new custom skin.";
else{
$mysidia -> db -> update("owned_adoptables", array("usealternates" => 'yes'), "imageurl" => 'http://yoursite.com/picuploads/png/nameorcodeoftheimageALT.png'),"aid='{$adopt->aid}' and owner ='{$item->owner}'");
$note = "Your adoptable {$adopt->name} is now using a new custom skin.";
//Update item quantity...
$delitem = $item->remove();
}
return $note;
Thankfully my tests with the reverter have revealed that if the pet was using its alt form, it will return to it. If the pet is not alternate then it returns to that state.
That means it's just the actual skin changer that needs fiddling with to make work. \0/