View Single Post
  #1  
Old 09-05-2016, 01:15 PM
N0ctrnl's Avatar
N0ctrnl
Discordant
 
Join Date: Jan 2007
Posts: 443
Default Dozekar the Cursed - Temple of Veeshan (leashing script)

This will leash Dozekar to his room, as it's supposed to be. What I did was simply to set the x/y coordinates to not let him go past the doors before leashing back to spawn.

Note: He will not wipe aggro with this script.

Code:
sub EVENT_SPAWN {
  $SpawnX = $x;
  $SpawnY = $y;
  $SpawnZ = $z;
  $SpawnH = $h;
}

sub EVENT_TIMER {
  $LeashedID = $entity_list->GetMobByNpcTypeID(124037);
  if ($timer eq "CheckLeash") {
    quest::stoptimer("CheckLeash");
    if($x > -1100 || $y > -950 || $y < -1200) {
      $LeashedID->GMMove($SpawnX, $SpawnY, $SpawnZ, $SpawnH);
    }
    quest::settimer("CheckLeash",1);
  }
}

sub EVENT_AGGRO {
  quest::settimer("CheckLeash", 1);
}

sub EVENT_DEATH_COMPLETE {
  quest::stoptimer("CheckLeash");
}
__________________
Ender - Lead GM/Developer
Vegarlson Asylum Server - http://www.vegarlson-server.org/
Reply With Quote