Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 08-03-2009, 07:20 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

You can do this:

Code:
sub EVENT_SPAWN {

#Set this to the NPCID you want the NPC to follow
my $OpponentID = 1010101;

#Get Target NPC
my $getmobbynpctype = $entity_list->GetMobByNpcTypeID($OpponentID);
#Get the NPC's Entity ID
my $follow_target = $getmobbynpctype->GetID();

quest::follow($follow_target);

}
By getting the NPC this way, you can set follow to happen from any event type including EVENT_TIMER and EVENT_SIGNAL. If you need anything else, feel free to ask.

And yeah, follow distance would be something awesome to be able to adjust. I could really use an adjustable setting for distance in the scripted event I have been working on lately.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 08-04-2009 at 03:27 AM..
Reply With Quote
  #2  
Old 08-03-2009, 07:48 PM
Dibalamin
Hill Giant
 
Join Date: Dec 2007
Posts: 182
Default

Damnit >< I was so close to gettin this to work that way and just missed it by a smidge.

Thanks Trev!
__________________
Retired EMarr
Project1999 Developer
Reply With Quote
  #3  
Old 08-04-2009, 07:08 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Added a Distance option for quest::follow(entity_id, distance) to allow setting the distance for the NPC to follow at. Seems to work really well. I think this should make the follow command a bit more useful
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 08-04-2009, 11:49 AM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

I tried using the quest you put and just changed the ID, but the mob still won't follow the other npc.
Reply With Quote
  #5  
Old 08-04-2009, 02:20 PM
Dibalamin
Hill Giant
 
Join Date: Dec 2007
Posts: 182
Default

Hmm, worked for me... I used mine with a signal however.
__________________
Retired EMarr
Project1999 Developer
Reply With Quote
  #6  
Old 08-04-2009, 02:46 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Make sure that the npc you are spawning is not on a grid. The follow command won't work for npcs that are on a grid.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #7  
Old 08-04-2009, 10:21 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

Wait, they can't follow a mob on a grid?
Reply With Quote
  #8  
Old 08-04-2009, 10:57 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

They can follow an NPC that is on a grid, they just can't be assigned to a grid themselves (the followers), which also includes a temporary grid. I think even if you use the quest::moveto command and try to make them follow something while they are on the way to that point still, it will fail because essentially it is treated like a grid with a single point in it.

Maybe you should post the whole script you are trying to make for one of these NPCs. It should be fairly easy to get it working.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
Reply


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 08:42 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