EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Gender variable check (https://www.eqemulator.org/forums/showthread.php?t=30339)

bthomsen0312 01-17-2010 09:18 AM

Gender variable check
 
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

Code:

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.


All times are GMT -4. The time now is 01:52 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.