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
  #7  
Old 10-30-2012, 11:12 AM
draugluin's Avatar
draugluin draugluin is offline
Member
 
Join Date: Oct 2011
Location: germany
Posts: 120
Gender: Unknown/Other
Credits: 14,910
draugluin is on a distinguished road
Default

okay, I fixed it

this is the code for useful gender-swap

PHP Code:
function items_alts1($item$adopt){
  
// First lets check if alternative image exists for an adoptable at this level.
  
$lev $GLOBALS['adopts']->select("levels", array(), "adoptiename='{$adopt->type}' and thisislevel ='{$adopt->currentlevel}'")->fetchObject();
  if(
$lev->alternateimage == ""){
      
// The alternate image does not exist, cannot convert adoptable into its alternate form
    
$note "It appears that your adoptable could not swap its gender...<br>";
  }
  else{
      
// The alternate image exists, conversion between primary and alternate image is possible.
    
switch($adopt->usealternates){
      case 
"yes"
        
$GLOBALS['adopts']->update("owned_adoptables", array("usealternates" => 'no'"gender" => 'm'), "aid ='{$adopt->aid}' and owner='{$item->owner}'");        
        
$note "{$adopt->name} is male.";
        break;
      default:
        
$GLOBALS['adopts']->update("owned_adoptables", array("usealternates" => 'yes'"gender" => 'f'), "aid ='{$adopt->aid}' and owner='{$item->owner}'");       
        
$note "  {$adopt->name} is female";
    }
      
//Update item quantity...
      
$delitem $item->removeitem(1$item->owner);    
  }
  return 
$note;    

You only have to modify your text and have alternate images female.
I've the primary image for male and alternates for female.

much fun - I will have fun too - or better : my user
Reply With Quote
 

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.3 Gender Ratio Mod for Mys v1.3.3 Hall of Famer Mys v1.3.x Mods 17 05-23-2019 03:34 PM
Gender superdude44 Questions and Supports 5 07-11-2013 01:17 AM
different images for gender MA 1.3.3 draugluin Questions and Supports 3 06-18-2013 01:30 AM
Mys v1.3.2 Gender Ratio Mod for Mys v1.3.2 Hall of Famer Mys v1.3.x Mods 6 01-08-2013 02:02 PM
Gender? [answered] Arianna Questions and Supports 4 11-19-2009 06:33 AM


All times are GMT -5. The time now is 08:57 PM.

Currently Active Users: 4356 (0 members and 4356 guests)
Threads: 4,081, Posts: 32,043, 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