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 07-18-2008, 03:12 PM
Neiv
Hill Giant
 
Join Date: May 2008
Location: Colorado
Posts: 238
Default respawn?

What exactly does the quest:respawn function do? Is it used for npcs already spawned in the zone and need to be moved elsewhere? If not, how exactly would I accomplish that. I have an npc that spawns at a certain location after a turn-in, and (after a series of exchanges with him) I need him to move to a different location and stay there. What is the function to accomplish this? Thanks!
Reply With Quote
  #2  
Old 07-20-2008, 11:55 PM
Striat
Sarnak
 
Join Date: Aug 2006
Posts: 60
Default

To my knowledge, respawn is just for respawning a certain npc id. Not exactly sure what you mean about moving the npc. If you mean moving an npc from one location to the next, I made a little example in which a signal triggers a guard to move via quest::signal(targetnpcid, waittime).

Code:
#look for EVENTA for the sequence of moving the npc.

my $location = 0;

sub EVENT_SPAWN {
	$location = 0;	#resets location variable
	}


sub EVENT_WAYPOINT {	#this event is triggered everytime npc moves
  $npc->SaveGuardSpot(0);	#This prevents the npc from running back to his original spot

	if ($location == 2) {	#EVENTD - NPC makes it to location and triggers this
	quest::settimer("adjustheading",1);
	}
}

sub EVENT_SIGNAL {
	if ($location == 0) {	$EVENTA - NPC is triggered
	quest::settimer("move",1);
	$location = 1;
	}
}


sub EVENT_TIMER {
	if ($timer eq "move") {
	quest::stoptimer("move");
	if ($location == 1) {
	quest::moveto(-832,-1345,87);	#EVENTB - NPC moves to this xyz
	$location = 2;	#EVENT C - Changes variable.
	}
	}
	if ($timer eq "adjustheading") {	#EVENTE - The npc is in the appropriate location.  Sets Heading
	quest::stoptimer("adjustheading");
	if ($location == 2) {
	$npc->SetHeading(123);	#What heading does npc face?
	$npc->SendPosition();	#Now, send this heading change to client
	}
	}
}
Reply With Quote
  #3  
Old 07-22-2008, 07:27 AM
Neiv
Hill Giant
 
Join Date: May 2008
Location: Colorado
Posts: 238
Default

Thanks, Striat, I will give this a try.
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 10:47 AM.


 

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