Here is what my script is set to currently for Naggy:
Code:
# Attempt to limit players level 53 And over from engaging nagafen And vox.
# Banished to Lavastorm.
sub EVENT_SPAWN {
my $x = $npc->GetX();
my $y = $npc->GetY();
quest::set_proximity($x - 500, $x + 500, $y - 500, $y + 500);
}
sub EVENT_ENTER {
if (($ulevel >= 53) && ($status <= 79)) {
quest::echo("I will not fight you, but I will banish you!");
quest::movepc(27,-64,262,-93.96,0); }
}
sub EVENT_AGGRO {
quest::settimer("getloc",15); #mob will get position every 15 seconds if pulled away from spawn point
if (($ulevel >= 53) && ($status <= 79)) {
quest::echo("I will not fight you, but I will banish you!");
quest::movepc(27,-64,262,-93.96,0); }
}
sub EVENT_TIMER {
quest::clear_proximity();
my $x = $npc->GetX();
my $y = $npc->GetY();
quest::set_proximity($x - 500, $x + 500, $y - 500, $y + 500);
}
sub EVENT_DEATH {
quest::stoptimer("getloc");
quest::clear_proximity();
}
But, since proximities won't work if you are in the zone when the NPC spawns, I also have an invisible NPC that runs this script and is always up near Naggy/Vox:
Code:
# Banisher to Lavastorm.
sub EVENT_SPAWN {
my $x = $npc->GetX();
my $y = $npc->GetY();
quest::set_proximity($x - 500, $x + 500, $y - 500, $y + 500);
}
sub EVENT_ENTER {
if (($ulevel >= 53) && ($status <= 79)) {
quest::movepc(27,-64,262,-93.96,0); }
}
sub EVENT_DEATH {
quest::clear_proximity();
}