Thread: Faction Check ?
View Single Post
  #2  
Old 10-04-2017, 03:55 PM
Turmoiltoad
Forum Guide
 
Join Date: Apr 2013
Posts: 27
Default

$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!");
     }
}
Reply With Quote