View Full Version : Function - Checking faction name ?
Im starting to write quests (Thx smogo for all your tutorials btw), I was wondering if a function exist or a way to do PERL quest that will check value of player faction.
Example : "Faction is ally, NPC will speak with him" ?
Monrezz
04-13-2004, 11:24 PM
There's the $faction variable, it returns a number corresponding to the current faction level. See the sticky on Perl Quest guide at the top.
Ah yes, thanks Monrezz like always.
Look like i have skipped the identifier part.
Monrezz
04-13-2004, 11:47 PM
It is mainly used for if statements, so you can check the player has a high enough faction before the quest continues:
sub EVENT_SAY
{
if(($text =~ /Hail/i) && ($faction >= 3))
{
quest::say("Do you think I ave time to talk to people like you?.");
}
elsif(($text =~ /Hail/i) && ($faction < 3))
{
quest::say("Greetings, $name.");
}
}
vBulletin® v3.8.11, Copyright ©2000-2024, vBulletin Solutions Inc.