Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Feature Requests

Development::Feature Requests Post suggestions/feature requests here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 05-15-2009, 12:51 AM
Kayen
Developer
 
Join Date: Mar 2009
Location: -
Posts: 228
Default

I tested this it works.

However your implementing it wrong. There are two mobs in this leash situation. Lets set it up
NPC #1248 King_Gnoll
NPC #1247 Gnoll_Guard

You want the guard to always leash back to the king if its out of range. You put this code on the King_Gnoll.pl . The code then when runs it gets the ID of the gnoll guard, it then calcs the distance of the Gnoll_Guard from the gnoll king, if the distance is greater then 30 it leashes it back got it?

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);
       }
  }
}
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:16 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3