Mysidia Adoptables Support Forum  

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

Notices

Reply
 
Thread Tools Display Modes
  #21  
Old 11-10-2014, 04:20 AM
AndromedaKerova's Avatar
AndromedaKerova AndromedaKerova is offline
ChibiFur Queen
 
Join Date: Nov 2014
Location: England
Posts: 83
Gender: Female
Credits: 3,685
AndromedaKerova is on a distinguished road
Default

Is it possible to add a check if the pet is using its alt image and if it IS then make it use an alternative of the skin to match?

If it ISN'T then it alters it to the first defined image.

Same for the reverter. It would need to know if its an alt image so it could revert it back to it.

This is just in case people still want alts as well as skins.
__________________
Failing at being normal since 1990.
Reply With Quote
  #22  
Old 11-10-2014, 07:56 AM
kristhasirah's Avatar
kristhasirah kristhasirah is offline
Member
 
Join Date: Jan 2010
Location: In middle of the nothingness
Posts: 196
Gender: Female
Credits: 28,039
kristhasirah
Default

If you want an item to change the adopt to his/her alt version and return back to the normal one, the script already have one function that does that.
But i think is possible to code that opcion... saddly i dont know how code that, the changes i did where based on pure luck and because they where kind of small.
__________________
Reply With Quote
  #23  
Old 11-10-2014, 04:05 PM
AndromedaKerova's Avatar
AndromedaKerova AndromedaKerova is offline
ChibiFur Queen
 
Join Date: Nov 2014
Location: England
Posts: 83
Gender: Female
Credits: 3,685
AndromedaKerova is on a distinguished road
Default

I'll see if I can get the basic image alter and the reverter installed and do a bit of fiddling and see if I can get my idea added. If I can, I'll post the revision. ^_^
__________________
Failing at being normal since 1990.
Reply With Quote
  #24  
Old 11-10-2014, 06:43 PM
AndromedaKerova's Avatar
AndromedaKerova AndromedaKerova is offline
ChibiFur Queen
 
Join Date: Nov 2014
Location: England
Posts: 83
Gender: Female
Credits: 3,685
AndromedaKerova is on a distinguished road
Default

[strike]I have an error with the item. I installed the skin version as directed but when I try and access my items page to use it on my pet, the page appears blank.

I have to manually remove the item using the ACP to be able to get to the inventory page again.[/strike]

*Edit*
Ok, I fixed that issue.

New problem is when I try to use the reverter or the changer on the pet, it now returns this:
The item function is invalid

Happens for both items.
__________________
Failing at being normal since 1990.

Last edited by AndromedaKerova; 11-10-2014 at 07:21 PM.
Reply With Quote
  #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,685
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
  #26  
Old 11-10-2014, 09:07 PM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 19,256
IntoRain is on a distinguished road
Default

Quote:
Originally Posted by AndromedaKerova View Post
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/
I don't think your if's/else's and brackets are closing well. For example you have this else-if

PHP Code:
 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.";  
            } 
inside this if

PHP Code:
 if($imageurl == "http://yoursite.com/picuploads/png/nameorcodeoftheimage.png") { 
which is not making sense because if it passes the first if for the normal image you already know what imageurl is and it is not the ALT image for sure. You also have an else without closing it

Sorry, I'm not sure what you want to do yet, so I can't help more than this :/
__________________


asp.net stole my soul.
Reply With Quote
  #27  
Old 11-10-2014, 09:22 PM
AndromedaKerova's Avatar
AndromedaKerova AndromedaKerova is offline
ChibiFur Queen
 
Join Date: Nov 2014
Location: England
Posts: 83
Gender: Female
Credits: 3,685
AndromedaKerova is on a distinguished road
Default

I'm only a beginner with coding. My aim is to expand on the skin changer. To make it ask if the pet is using an alt image and if it is, instead of painting the regular, it would paint an alternative of the custom skin to match better with the original.

Without that, it makes the alt pet just look like every other pet that has this item used on it. Seems to lose its altness while the database keeps the value.

Examples:
BEFORE
AFTER

Rhiadra is the one using the alt image but after painting it appears not to be.

Next thing I want to attempt is making it check if the pet is male or male/alt then make it set respective images for them too.
__________________
Failing at being normal since 1990.

Last edited by AndromedaKerova; 11-10-2014 at 09:37 PM.
Reply With Quote
  #28  
Old 11-10-2014, 09:54 PM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 19,256
IntoRain is on a distinguished road
Default

So if it's using an alt image, it uses another alt image? And if it's using the common image, use the alt image?
__________________


asp.net stole my soul.
Reply With Quote
  #29  
Old 11-10-2014, 09:57 PM
AndromedaKerova's Avatar
AndromedaKerova AndromedaKerova is offline
ChibiFur Queen
 
Join Date: Nov 2014
Location: England
Posts: 83
Gender: Female
Credits: 3,685
AndromedaKerova is on a distinguished road
Default

The way it works currently is it paints a certain species the new image. It overrides the alt image though the data is still in the DB for the alt pet. I want the image to set a second if the pet is an alt so it "looks" like its still an alt.

Obviously regular users would no longer know if the pet is alt or not in the current way.
__________________
Failing at being normal since 1990.
Reply With Quote
  #30  
Old 12-11-2014, 08:42 AM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,086
parayna is on a distinguished road
Default

Hmm, that's true ... would be cool if that was somehow included ^_^
Reply With Quote
Reply

Thread Tools
Display Modes

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 07:34 AM.

Currently Active Users: 455 (0 members and 455 guests)
Threads: 4,080, Posts: 32,024, 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 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636