$faction scales from 1 to 9:
http://wiki.eqemulator.org/p?Faction_Values
Another option, maybe?
Code:
sub EVENT_SAY {
$myfaction = $client->GetCharacterFactionLevel(105); # 105 = Freeport Militia
if ($text=~/Hail/i && $myfaction >= 1401 ) {
quest::say("Greetings $name. I am a member of the Freeport Militia.");
} else {
quest::say("Be Gone Fool!");
}
}
Or if you're just looking for "ally" faction, maybe this..?
Code:
sub EVENT_SAY {
if ($text=~/Hail/i && $faction == 1 ) {
quest::say("Greetings $name. I am a member of the Freeport Militia.");
} else {
quest::say("Be Gone Fool!");
}
}