Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #19  
Old 09-30-2014, 02:40 PM
kristhasirah's Avatar
kristhasirah kristhasirah is offline
Member
 
Join Date: Jan 2010
Location: In middle of the nothingness
Posts: 196
Gender: Female
Credits: 36,533
kristhasirah
Default

manage to make the reverting code work ^^

here is the finished one:
functions/functions_items.php
PHP Code:
function items_originalS($item$adopt){
          
$mysidia Registry:: get("mysidia"); 
        
        
$imageurl $adopt->imageurl;
        
$currentLevel $adopt->currentlevel;
        
                   
//Let's check if the adoptable is using his/her original color. 
        
if($imageurl == NULL) { 
            
//The adoptable is already using his/her original color
            
$note "Your adoptable is using his/her original color."
        } 
        
//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("imageurl" => NULL),"aid='{$adopt->aid}' and owner ='{$item->owner}'");
            
$note "Your adoptable {$adopt->name} is now using his/her original color."
            
//Update item quantity... 
            
$delitem $item->remove();  
        } 
        return 
$note


class/class_privateitem.php
case
PHP Code:
case "itemsoriginalS":
$message items_originalS($this$owned_adoptable);
break; 
it was so simple... i just had to remove the cotes '' from NULL to make it work o_O it was the only change i made to the code, this will revert back the adopt to his/her original image or alternate image depending which one was using before the change of skin.
by the way you can change what it says in the $note= to anything you want or you think it will go with your site =)
__________________

Last edited by kristhasirah; 10-01-2014 at 12:53 PM.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mys v1.3.4 Item Function: Gender Change Potion Kyttias Mys v1.3.x Mods 21 10-12-2016 07:52 PM
Calling a function in a function from the same class page Hwona Questions and Supports 2 04-25-2015 08:41 AM
Item Function Is Invalid Hwona Questions and Supports 31 09-27-2014 09:27 PM
Item Function Suggestions NobodysHero Suggestions and Feature Requests 5 06-23-2014 03:45 AM


All times are GMT -5. The time now is 02:57 AM.

Currently Active Users: 3188 (0 members and 3188 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636