Unless something is changing between each time the NPC gets to another WP, it will just keep doing the same thing every WP. You need to either have it set something to stop it, or one of your qglobals that are being checked needs to change before the next WP is reached.
Code:
my $EventStart;
sub EVENT_SPAWN {
$EventStart = 0;
quest::depopall(999151);
}
sub EVENT_WAYPOINT
{
if (defined($qglobals{lord}))
{
if ($qglobals{lord} == 4)
{
quest::signal(999247);
}
}
elsif (defined($qglobals{kingdomfaction}))
{
if ($qglobals{kingdomfaction} == 1 && $EventStart == 0)
{
#Stop further spawnings
$EventStart = 1;
#spawns lvl 65 guards in Hall
, west facing
quest::spawn2(999151,0,0,1722.50,1556.52,231.25,190);
quest::spawn2(999151,0,0,1722.50,1593.45,228.75,190);
quest::spawn2(999151,0,0,1722.50,1655.94,228.75,190);
quest::spawn2(999151,0,0,1722.50,1694.96,228.75,190);
quest::spawn2(999151,0,0,1722.50,1755.84,228.75,190);
quest::spawn2(999151,0,0,1722.50,1795.59,228.75,190);
#spawns lvl 65 guards in Hall
, east facing
quest::spawn2(999151,0,0,1674.43,1556.52,231.25,60);
quest::spawn2(999151,0,0,1674.43,1593.45,228.75,60);
quest::spawn2(999151,0,0,1674.43,1655.94,228.75,60);
quest::spawn2(999151,0,0,1674.43,1694.96,228.75,60);
quest::spawn2(999151,0,0,1674.43,1755.84,228.75,60);
quest::spawn2(999151,0,0,1674.43,1795.59,228.75,60);
#spawns lvl 65 guards outside Hall
, north facing
quest::spawn2(999151,0,0,1795,1880,227.25,0);
quest::spawn2(999151,0,0,1605,1880,227.25,0);
quest::spawn2(999151,0,0,1680,1880,227.25,0);
quest::spawn2(999151,0,0,1718,1880,227.25,0);
quest::spawn2(999151,0,0,1755,1838,227.25,0);
quest::spawn2(999151,0,0,1645,1838,227.25,0);
quest::spawn2(999151,0,0,1605,1838,227.25,0);
quest::spawn2(999151,0,0,1795,1838,227.25,0);
}
}
}