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

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

Reply
 
Thread Tools Display Modes
  #1  
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
  #2  
Old 05-15-2009, 01:00 AM
Kayen
Developer
 
Join Date: Mar 2009
Location: -
Posts: 228
Default

Also there is a syntax error in your code that will not make it work. You could use an invs mob instead of whatever that is up to you if you just want 1 mob leashing back to a point. Replace the king with the invs mob. Though you would need to aggro the invs mob. Better way would be to have two quest files and have the that actual mob send a signal to invs mob when aggroed to start timer.
Reply With Quote
  #3  
Old 05-15-2009, 03:10 PM
KingMort
Banned
 
Join Date: Sep 2006
Posts: 841
Default

How would I do this exactly ??

That's what I want to do yeah... I have the invis mob at the spawn point where the named is... I want the named to be able to leash back to that spot if he is pulled away too far..

Really appreciate your help sorry for being a n00b I'm more into the world building end of my server.

King
Reply With Quote
  #4  
Old 05-15-2009, 05:18 PM
gaeorn
Developer
 
Join Date: Apr 2009
Location: USA
Posts: 478
Default

The syntax error with the code you posted is simply a missing curly brace at the end (at least that's all I saw wrong with it).

With that fix, it should work (unless I'm missing something else) as long as the invis mob gets the timer going somehow (agro or signal as suggested earlier in this thread).
Reply With Quote
Reply

Thread Tools
Display Modes

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 11:34 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