View Single Post
  #5  
Old 10-13-2008, 08:39 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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();

}
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote