Log in

View Full Version : Gender variable check


bthomsen0312
01-17-2010, 09:18 AM
Was wondering if there was a way to do a gender variable check
IE
if (text =~/hail/i) && ($gender == 1)
etc etc
only important for making more specific lifelike dialogue, not too important but would still be nice :D

Derision
01-17-2010, 09:39 AM
sub EVENT_SAY
{
$gender = $client->GetGender();

quest::say("Your gender is $gender");

if($gender == 0)
{
quest::say("You are male.");
}
else
{
quest::say("You are female.");
}

}


Technically 0 = male, 1 = female, 2 = neuter. There is also GetBaseGender which I guess you could use if you wanted to find the real gender of a player with a gender changing Illusion cast on them.