Thread: Anti Train Code
View Single Post
  #8  
Old 07-22-2009, 09:38 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Just a guess, but does there also happen to be an EVENT_SPAWN section that sets the $startingx, $startingy, $startingz, and $startingh variables that you didn't post? And if so, does leashing work effectively with multiple of the same NPCs running the same script and being aggroed at the same time? I might have to test that script out :P

I know Kayen posted this leashing script a while back in this thread, but I think it leashes NPCs to other NPCs, not to their spawn point:

http://www.eqemulator.net/forums/showthread.php?t=28131

Code:
sub EVENT_AGGRO
{
quest::settimer("LeashCheck",5);
}

sub EVENT_TIMER {

 if ($timer eq "LeashCheck") {
 $LeashedID = $entity_list->GetMobByNpcTypeID(1247);
 $distanceCHK = $LeashedID->CalculateDistance($x, $y, $z);
 #quest::shout("$distanceCHK x $LeashedID");
   	if ($distanceCHK >= 30) { 
   	$LeashedID->WipeHateList();
   	$LeashedID->GMMove($x, $y, $z, 1);
       }
  }
}
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote