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 04-16-2009, 08:40 PM
realityincarnate
Developer
 
Join Date: Dec 2007
Posts: 122
Default Return to spawn location

I feel like I must be missing something, but I can't seem to find the appropriate quest command and was wondering if there is one that I overlooked. I'm trying to get an npc to disappear and immediately return to its spawn location after a certain amount of time has elapsed. Using quest::respawn seemed like an obvious choice, but that seems to just destroy the current npc (I assume it respawns after the timer elapses, but I haven't waited around that long). I also thought about using gmmove, but it would just be cleaner if there was something that basically did a one npc repop.

Any suggestions?
Reply With Quote
  #2  
Old 04-16-2009, 09:25 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

Does it have to be done without respawning him? Certain variable set or something?
Reply With Quote
  #3  
Old 04-16-2009, 10:24 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

It all depends on exactly what you are wanting to do. The easiest way would be to make a second NPC to manage the one you are trying to set to respawn. Then just have them do

Code:
quest::depop(ncp_id);
quest::spawn2(npc_id, 0, 0, x, y, z, h);
And have that second NPC keep a timer of when do "repop" him. Otherwise, you could just have the NPC itself do:

Code:
quest::depop();
On itself and then set the respawn timer on him to like 1 second.

There are plenty of other ways to accomplish what you are wanting to do, but it depends on how complex you want to be :P
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 04-16-2009, 11:35 PM
realityincarnate
Developer
 
Join Date: Dec 2007
Posts: 122
Default

For a little bit more background: I've been trying to get the controllable boats to work for a little while now, and I think I finally got it (I'll post the code after a little bit more testing). I know in Live, at least back in the day (most of my play time was pre-Kunark), the boats would reset to their original spawn position if no one used them for about an hour.
I was hoping to come up with a generic quest that could be used for all the boats in different zones to do this, without worrying about the specifics of each boat (spawn2 ids, respawn times, anything like that). At the moment, it looks like the options are to a.) modify quest::gmmove to allow a heading parameter as well, and use that to just move the boat; b.) spawn another copy and depop the original, like suggested; or c.) just have them respawn and not worry about the respawn times.
Option c.) might actually be the most Live like, since I remember a lot of times wandering the river banks in Tox forest looking for the boat, only to have it reappear about 30 seconds after I gave up and swam to Kerra Ridge.
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 03:58 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3