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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 02-21-2008, 10:30 PM
Striat
Sarnak
 
Join Date: Aug 2006
Posts: 60
Default

Quote:
Originally Posted by narcberry View Post
I have 2 questions.
1) After using the movepc function, will the quest keep executing? IE, can 1 quest port someone to nexus, then later port them to pok?
2) What is the best method to move an npc around. Not make them walk to a point, but have them instantly teleport to a position?
A little later, but here is somethhing I used for teleporting npcs around. This is an old script that can definitely be written much much better now. Nevertheless, it still gets the job done. You'll want to notice the stuns in there. This was used because npcs would move a little as soon as they were moved. So, it gives time to update. Another alternative to use the stuns is to set npc's run speed very very low if possible. Either will do the trick, but of course you may need to keep run speed up.

Code:
my $location = 0;		#startingpoint

sub EVENT_SPAWN {
	$location = 0;
}

sub EVENT_SAY { 
if($text=~/Hail/i){
	if ($location == 1) {		#I'm at my new destination
	quest::say("You want me to leave this mansion?  bummer!");
	quest::settimer("moveme",1);
	}
	else {				#I'm at my starting point
	quest::say("I am not too happy with my hut");
	quest::settimer("moveme",1);
	}
    }
  }

sub EVENT_TIMER {
if ($timer eq "moveme") {		#This timer is used for moving.  It triggers updateguard
	quest::stoptimer("moveme");
	quest::settimer("updateguard",1);
	if ($location == 1) {	#I call this when I need to go back to starting location
	$npc->Gate();
	$npc->Stun(2000);
	$location = 0;
	}
	else {		#I call for this when I'm leaving my original spot
	$npc->SendTo(260, 353, 0);
	$npc->Stun(2000);
	$location = 1;
	}
   }
if ($timer eq "updateguard") {	#I call this to update guard spot
	quest::stoptimer("updateguard");
	$npc->SaveGuardSpot(0);
   }
}
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 04:51 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3