04-30-2012, 07:25 PM
|
Member
|
|
Join Date: Oct 2011
Posts: 63
Gender: Male
Credits: 9,545
|
|
Quote:
Originally Posted by Hall of Famer
Here is a possible way to have alternates set by gender:
Find these lines in doadopt.php:
PHP Code:
$alts = getaltstatus($id, 0, 0);
// We need a unique code for the adoptable so we can show it to the user when we're done here...
$code = rand(1, 20000); $genders = array('f', 'm'); $rand = rand(0,1); runquery("INSERT INTO {$prefix}owned_adoptables VALUES ('', '{$row['type']}', '$name','$loggedinname','0','0', '$code', '','$alts','fortrade','no', '$genders[$rand]','0')");
// Adoption complete, show the user a confirmation screen...
Replace with something like this(the code may be different depending on the structure of your table prefix_owned_adoptables):
PHP Code:
// We need a unique code for the adoptable so we can show it to the user when we're done here...
$code = rand(1, 20000); $genders = array('f', 'm'); $rand = rand(0,1); $petgender = $genders[$rand]; switch($petgender){ case "m": $alts = "yes"; break; default: $alts = "no"; }
runquery("INSERT INTO {$prefix}owned_adoptables VALUES ('', '{$row['type']}', '$name','$loggedinname','0','0', '$code', '','$alts','fortrade','no', '$petgender','0')");
// Adoption complete, show the user a confirmation screen...
This will set female sprite to be primary and male sprite to be alternate. Lemme know if this code wont work for you, and take a screenshot of your prefix_owned_adoptables so I can assist you further.
|
i am sorry for the BUMP, but is there a way to accomplish this in MAS 1.3.0?
-thanks
EDIT: i fixed it. i didn't have one of the } towards the end.
-thanks
Last edited by superdude44; 05-01-2012 at 08:39 PM.
|