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
  #31  
Old 12-11-2014, 10:36 AM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 86,968
Kyttias is on a distinguished road
Default

So the end result everyone is wanting is:

normal && female && design A = use image A
alt && female && design A = use image B
normal && male && design A = use image C
alt && male && design A = use image D

But I'm guessing you don't just want one design, but, potentially, many designs? In the case above, if "design A" were "midnight sparkles" then you'd be able to have a pet with this design on both male and female pets, alternate or not.

It's like paintbrushes back on Neopets, only, you also have to take rarer alternate versions of a pet species into consideration, too. If a user is blessed with a rare alternate, they want it to still look just as special when it has its design applied!

I think what's going to need to be done is an entirely new approach. You'll want a new column in the database to hold the design names.

I'll see if I can look into this soon, but it may take a while. ^^ I was actually kind of wanting something similar.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote
  #32  
Old 12-11-2014, 12:09 PM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,091
parayna is on a distinguished road
Default

Oh, OK. XD Yeah, I think that is kind of what people are wanting. So basically I think there would be 4 different images taken for one item... a male and female normal image, and an alt male and female image.. I think that's what it would be..
Reply With Quote
  #33  
Old 12-11-2014, 12:42 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 86,968
Kyttias is on a distinguished road
Default

Because I've got the alternate gender mod working on my site, I don't have two types of females and two types of males, (alts that is), I just have females and males, and those are the alts.

female && design A = use image A
male && design A = use image B

Without the alt gender mod it would be possible, but you'd have to make each gender it's own species again. The alt gender mod just replaces the alt system... So I'd rather focus on this?

So I guess my first post there was misleading.

What it will actually be is just this:

normal && design A = use image A
alt && design A = use image B

In any case, it will work for people using the gender mod and not. But it won't magically make the gender mod have alts again. It'll just make sure the appropriate gender gets the appropriate image, just like it would make alt or not get the appropriate image.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote
  #34  
Old 12-11-2014, 12:57 PM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,091
parayna is on a distinguished road
Default

Oh, alright. Now I understand C: Sounds good! ^_^
Reply With Quote
  #35  
Old 04-24-2015, 05:41 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

Sorry to revive an older thread but I'm still interested in this.

I now use the alt gender mod so my alt images are only for males while females use the normal one.

I want to keep that obviously but it should be a single potion/brush paints the species a different one of two images according to alt/gender status.

With multiple items created this way, one could effectively have a lot of new designs/colours for that single species without needing to actually have a "many alt images" kind of mod.
__________________
Failing at being normal since 1990.
Reply With Quote
  #36  
Old 04-03-2017, 10:17 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,046
kristhasirah
Default

I know this is an old thread but wanted to update the code for a change of skin ^^
Probably not the best way of doing it but it works:

PHP Code:
function items_Skin($item$adopt){
  
$mysidia Registry::get("mysidia");
  
$type $adopt->type;
  
$currentLevel $adopt->currentlevel;
        if(
stripos($type"Dragon") !== FALSE){
           switch(
$type){
                case 
"Red Fairy Dragon"
        
$note "<h1>{$adopt->name} wont eat the food</h1><script>$(\"h1:contains('Action Completed!')\").remove();</script>{$adopt->name} turns in to ashes the food... Be prepared that look means that is planing to make you fall in a prank."; break;
                case 
"Moon Fairy Dragon"
        
$note "<h1>{$adopt->name} wont eat the food</h1><script>$(\"h1:contains('Action Completed!')\").remove();</script>{$adopt->name} blinds you... When you can once again see clearly {$adopt->name} cant be found..."; break;
                default: 
        
$note "<h1>{$adopt->name} wont eat the food</h1><script>$(\"h1:contains('Action Completed!')\").remove();</script>{$adopt->name} gives you a mean look, and turns in to ashes the food! Only the ponies eat that thing";
        }
        }
        else if(
$currentLevel 10){
            
$note "Your adoptable is not at level 10 yet.";
        }
        else if(
$type == "Fairy Pony"){
            
$note "Your adoptable is not chosen to use this skin.";
        }
else {
$delitem $item->remove();
  
$imageurl $mysidia -> db -> select ("owned_adoptables", array("imageurl"), "aid='{$adopt->aid}' and owner ='{$item->owner}'") -> fetchColumn();
        if(
stripos($type"Pony") !== FALSE){ 
                   switch(
$type){ 
        case 
"Starnight Pony"
        switch(
$gender){
                case 
"f"
                
$num rand(1,2);
                 switch (
$num) { 
                 case 
1$imageurl "http://yoursitegoeshere.com/picuploads/png/cc956394e43c60dc8df3be2e5557fe40.png"; break;
                 case 
2$imageurl "http://yoursitegoeshere.com/picuploads/png/65a41dd82fbcb9a7e269dcbdef7249ec.png"; break;  
                 }
                 break;       
        default: 
                
$num rand(1,2);
                 switch (
$num) { 
                 case 
1$imageurl "http://yoursitegoeshere.com/picuploads/png/cc956394e43c60dc8df3be2e5557fe40.png"; break;
                 case 
2$imageurl "http://yoursitegoeshere.com/picuploads/png/65a41dd82fbcb9a7e269dcbdef7249ec.png"; break;
                 }               
                  
$mysidia->db->update("owned_adoptables", array("imageurl" => $imageurl,), "aid ='{$adopt->aid}' and owner='{$item->owner}'");
$note "Success! The <b>{$item->itemname}</b> has worked its magic. {$adopt->name} now is using a new color.";
return 
$note;
}
//END Case starnight Pony
       
case "Fire Pony"
        switch(
$gender){
                case 
"f"
                
$num rand(1,2);
                 switch (
$num) { 
                 case 
1$imageurl "http://yoursitegoeshere.com/picuploads/png/cc956394e43c60dc8df3be2e5557fe40.png"; break;
                 case 
2$imageurl "http://yoursitegoeshere.com/picuploads/png/65a41dd82fbcb9a7e269dcbdef7249ec.png"; break;  
                 }
                 break;       
        default: 
                
$num rand(1,2);
                 switch (
$num) { 
                 case 
1$imageurl "http://yoursitegoeshere.com/picuploads/png/cc956394e43c60dc8df3be2e5557fe40.png"; break;
                 case 
2$imageurl "http://yoursitegoeshere.com/picuploads/png/65a41dd82fbcb9a7e269dcbdef7249ec.png"; break;
                 }               
                  
$mysidia->db->update("owned_adoptables", array("imageurl" => $imageurl,), "aid ='{$adopt->aid}' and owner='{$item->owner}'");
$note "Success! The <b>{$item->itemname}</b> has worked its magic. {$adopt->name} now is using a new color.";
return 
$note;
}
//END Case Fire Pony

        
default: 
        switch(
$gender){
                case 
"f"
                
$num rand(1,2);
                 switch (
$num) { 
                 case 
1$imageurl "http://yoursitegoeshere.com/picuploads/png/cc956394e43c60dc8df3be2e5557fe40.png"; break;
                 case 
2$imageurl "http://yoursitegoeshere.com/picuploads/png/65a41dd82fbcb9a7e269dcbdef7249ec.png"; break;  
                 }
                 break;       
        default: 
                
$num rand(1,2);
                 switch (
$num) { 
                 case 
1$imageurl "http://yoursitegoeshere.com/picuploads/png/cc956394e43c60dc8df3be2e5557fe40.png"; break;
                 case 
2$imageurl "http://yoursitegoeshere.com/picuploads/png/65a41dd82fbcb9a7e269dcbdef7249ec.png"; break;
                 }               
                  
$mysidia->db->update("owned_adoptables", array("imageurl" => $imageurl,), "aid ='{$adopt->aid}' and owner='{$item->owner}'");
$note "Success! The <b>{$item->itemname}</b> has worked its magic. {$adopt->name} now is using a new color.";
return 
$note;
}
//END Default
return $note;
}
//END Type 
}//END Stripos
}//END ELSE
return $note
}
//END Function 
How this code works? well is kind of simple :
PHP Code:
        if(stripos($type"Dragon") !== FALSE){
           switch(
$type){
                case 
"Red Fairy Dragon"
        
$note "<h1>{$adopt->name} wont eat the food</h1><script>$(\"h1:contains('Action Completed!')\").remove();</script>{$adopt->name} turns in to ashes the food... Be prepared that look means that is planing to make you fall in a prank."; break;
                case 
"Moon Fairy Dragon"
        
$note "<h1>{$adopt->name} wont eat the food</h1><script>$(\"h1:contains('Action Completed!')\").remove();</script>{$adopt->name} blinds you... When you can once again see clearly {$adopt->name} cant be found..."; break;
                default: 
        
$note "<h1>{$adopt->name} wont eat the food</h1><script>$(\"h1:contains('Action Completed!')\").remove();</script>{$adopt->name} gives you a mean look, and turns in to ashes the food! Only the ponies eat that thing";
        }
        }
        else if(
$currentLevel 10){
            
$note "Your adoptable is not at level 10 yet.";
        } 
        else if(
$type == "Fairy Pony"){
            
$note "Your adoptable is not chosen to use this skin.";
        } 
This part makes the selected adopt unable to get a skin change and also limit the use to pets that are level 10<-- you can change this to the max level you are using.
the second else if($type == "Fairy Pony"){ <-- makes unable that specific type of pony unable to use the potion
The type of my adopts always have "Pony" Or "Dragon" : if(stripos($type, "Dragon") !== FALSE){ <-- stripos is used for searching in type for the word "dragon" and makes those adopts unable to use the potion.
switch($type){
case "Red Fairy Dragon": <-- you can change this part for the full type of your creature if you want to give them a specific message.
default: <--- this is used for the rest of the adopts.

PHP Code:
else {
$delitem $item->remove();
  
$imageurl $mysidia -> db -> select ("owned_adoptables", array("imageurl"), "aid='{$adopt->aid}' and owner ='{$item->owner}'") -> fetchColumn();
        if(
stripos($type"Pony") !== FALSE){ 
                   switch(
$type){ 
        case 
"Starnight Pony"
        switch(
$gender){
                case 
"f"
                
$num rand(1,2);
                 switch (
$num) { 
                 case 
1$imageurl "http://yoursitegoeshere.com/picuploads/png/cc956394e43c60dc8df3be2e5557fe40.png"; break;
                 case 
2$imageurl "http://yoursitegoeshere.com/picuploads/png/65a41dd82fbcb9a7e269dcbdef7249ec.png"; break;  
                 }
                 break;       
        default: 
                
$num rand(1,2);
                 switch (
$num) { 
                 case 
1$imageurl "http://yoursitegoeshere.com/picuploads/png/cc956394e43c60dc8df3be2e5557fe40.png"; break;
                 case 
2$imageurl "http://yoursitegoeshere.com/picuploads/png/65a41dd82fbcb9a7e269dcbdef7249ec.png"; break;
                 }               
                  
$mysidia->db->update("owned_adoptables", array("imageurl" => $imageurl,), "aid ='{$adopt->aid}' and owner='{$item->owner}'");
$note "Success! The <b>{$item->itemname}</b> has worked its magic. {$adopt->name} now is using a new color.";
return 
$note;
}
//END Case starnight Pony
       
case "Fire Pony"
        switch(
$gender){
                case 
"f"
                
$num rand(1,2);
                 switch (
$num) { 
                 case 
1$imageurl "http://yoursitegoeshere.com/picuploads/png/cc956394e43c60dc8df3be2e5557fe40.png"; break;
                 case 
2$imageurl "http://yoursitegoeshere.com/picuploads/png/65a41dd82fbcb9a7e269dcbdef7249ec.png"; break;  
                 }
                 break;       
        default: 
                
$num rand(1,2);
                 switch (
$num) { 
                 case 
1$imageurl "http://yoursitegoeshere.com/picuploads/png/cc956394e43c60dc8df3be2e5557fe40.png"; break;
                 case 
2$imageurl "http://yoursitegoeshere.com/picuploads/png/65a41dd82fbcb9a7e269dcbdef7249ec.png"; break;
                 }               
                  
$mysidia->db->update("owned_adoptables", array("imageurl" => $imageurl,), "aid ='{$adopt->aid}' and owner='{$item->owner}'");
$note "Success! The <b>{$item->itemname}</b> has worked its magic. {$adopt->name} now is using a new color.";
return 
$note;
}
//END Case Fire Pony

        
default: 
        switch(
$gender){
                case 
"f"
                
$num rand(1,2);
                 switch (
$num) { 
                 case 
1$imageurl "http://yoursitegoeshere.com/picuploads/png/cc956394e43c60dc8df3be2e5557fe40.png"; break;
                 case 
2$imageurl "http://yoursitegoeshere.com/picuploads/png/65a41dd82fbcb9a7e269dcbdef7249ec.png"; break;  
                 }
                 break;       
        default: 
                
$num rand(1,2);
                 switch (
$num) { 
                 case 
1$imageurl "http://yoursitegoeshere.com/picuploads/png/cc956394e43c60dc8df3be2e5557fe40.png"; break;
                 case 
2$imageurl "http://yoursitegoeshere.com/picuploads/png/65a41dd82fbcb9a7e269dcbdef7249ec.png"; break;
                 }               
                  
$mysidia->db->update("owned_adoptables", array("imageurl" => $imageurl,), "aid ='{$adopt->aid}' and owner='{$item->owner}'");
$note "Success! The <b>{$item->itemname}</b> has worked its magic. {$adopt->name} now is using a new color.";
return 
$note
and this part is where the the image is changed
same as the first stripos this: if(stripos($type, "Pony") !== FALSE){ allows only the adopts that have pony in their type to use the potion
The switch($gender){
case "f": <-- this is used for checking if the adopt is female and give it the selected image, the default one is used for the male.

I combined parts of the codes that kyttias shared with us (gender change potion and shops items)

This part: $num = rand(1,2);
switch ($num) {
is for randomly chose the image the adopt will be using
and lastly:
case 1: $imageurl = "http://yoursitegoeshere.com/picuploads/png/cc956394e43c60dc8df3be2e5557fe40.png"; break;
case 2: $imageurl = "http://yoursitegoeshere.com/picuploads/png/65a41dd82fbcb9a7e269dcbdef7249ec.png"; break;
is where you add the image used for the adopt ^^

It dont matter if you are using the alternate image for the female. once the NULL is replaced with an url image, the adopt will stop using the alternate image and start using the new one.

For this code to fully work you need to edit the class_privateitem
and add
PHP Code:
         case "Skin":
            
$message items_Skin($this$owned_adoptable);
            break; 
and in your database search for adopts_items_function and copy any of the already there functions and change the name for skin and add a small description telling you what the item does.
in this post is the code for reversing the effect of the skin:
http://mysidiaadoptables.com/forum/s...3&postcount=19

i know the names i use for the items are lame, so change it to one that fit with your tastes ^^
Feel Free to change/edit the code so it can fit with your site, you can add more images by adding more case: and changing the rand.

Hope this can be useful for someone ^^

Last edited by kristhasirah; 04-03-2017 at 10:20 AM.
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 01:09 PM.

Currently Active Users: 448 (0 members and 448 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