Hall of Famer |
08-24-2011 01:57 AM |
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.
|