View Single Post
  #25  
Old 11-10-2014, 08:37 PM
AndromedaKerova's Avatar
AndromedaKerova AndromedaKerova is offline
ChibiFur Queen
 
Join Date: Nov 2014
Location: England
Posts: 83
Gender: Female
Credits: 3,709
AndromedaKerova is on a distinguished road
Default

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/
__________________
Failing at being normal since 1990.

Last edited by AndromedaKerova; 11-10-2014 at 08:39 PM.
Reply With Quote