View Single Post
  #3  
Old 10-28-2012, 08:46 AM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

besides missing the opening parenthesis and having an extra closing one your 'if' statement, you don't have anything for the script to do if it evaluates to true (nothing in curly braces, just ends with a semicolon). additionally, the following 'elsif' statement doesn't have anything to evaluate at all (should likely just be an 'else'), and the code to execute following isn't enclosed in curly braces.

you're probably looking for something like this:

Code:
if ($faction >= 6) {
    quest::shout2("Hey, $name. I'm going to hunt you down... make you pay. There is a bounty on your head.");
}
else {
    quest::shout2("$name, I ain't looking fer you today... move along.");
}
EVENT_ENTER only works when the client enters a set proximity to the npc, not when they enter the zone.

if you're wanting to check when a player enters the zone, you'll need to use EVENT_ENTERZONE in that zone's player.pl script. you should be able to check faction using $client->GetCharacterFactionLevel(), $client->GetFactionLevel(), or $client->GetModCharacterFactionLevel().
Reply With Quote