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
  #1  
Old 11-03-2014, 01:13 PM
ilrak ilrak is offline
Goldfish Fanatic
 
Join Date: Aug 2014
Location: Utah
Posts: 57
Gender: Female
Credits: 13,821
ilrak is on a distinguished road
Default Trying to make a marking changer for adopts.

So, I'm using a mod similar to the gender change one that Wallie made and breed change mod that kristhasirah made to try and make a marking changer and I'm running into problems.

I want to make it so that each adopt has a "hidden" color that can be brought out by the markings, so a fish that has the colors "Gold/Gold/Black" would not have the black show until the marking is added. When I only have one adopt specified, then it works well.

PHP Code:
function items_changecalico($item$adopt){ 
        
$mysidia Registry:: get("mysidia"); 
        
//Let's check if the adoptable is a Common (Gold/Gold/Black). 
        
$type $mysidia -> db -> select ("owned_adoptables", array("type"), "aid='{$adopt->aid}' and owner ='{$item->owner}'") -> fetchColumn();   
        if(
$type == "Common (Gold/Gold/Black)") { 
           
//The adoptable is does not have calico. It's type can be switched to a Common (Gold/Gold/BlackCalico). 
            
switch($adopt->type){ 
                case 
"$type"
                    
$mysidia -> db -> update("owned_adoptables", array("type" => 'Common (Gold/Gold/BlackCalico)'),"aid='{$adopt->aid}' and owner ='{$item->owner}'"); 
                    
$note "Your adoptable {$adopt->name} is now a Common (Gold/Gold/BlackCalico)."; }
            
//Update item quantity... 
            
$delitem $item->remove(); 
            
$note "It appears your adoptable can't use the potion."; } 
        } 
        return 
$note
        } 
I tried, however, to add in another "if" section with the next color which is all gold (because I want to set up some breed adopts where you can mix the markings), but the breed change didn't work. I didn't realize at the time that you can't have multiple outcomes in a function I guess.

What I'm wondering is if doing an array would work the way that I want it to. If not, are there any other suggestions anyone might have that might work? I'm going to keep tinkering with this on my days off because this is one of the things that I need to fix before I set up the alpha tests on my site.

Hopefully I'm making sense with my questions, too. I'm having one of those weeks where my language skills are off (and I can't blame wedding brain anymore)

Thanks!
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
Female Adopts can breed; male adopts only have 1. Phoeniix Questions and Supports 2 11-09-2013 01:56 AM
Make users make their own website on your site ... kitty08 Mys v1.2.x Mods 0 10-27-2011 03:49 PM
Just to make sure... ipengu Questions and Supports 4 08-20-2011 05:00 PM
Where do i go to make one? Amber Questions and Supports 3 12-07-2009 03:05 PM
How do you make... Blue Icebox Questions and Supports 2 02-20-2009 12:49 AM


All times are GMT -5. The time now is 03:43 PM.

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