View Single Post
  #3  
Old 07-30-2009, 05:12 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I went ahead and added the 2 new options to quest::moveto. It wasn't hard to get them added using guard spots. Here is the new explanation of the command I updated in the wiki for it:

Quote:
quest::moveto(x,y,z, [h, saveguardspot?]) - NPC moves to the set coordinates with Heading and saveguardspot being optional. NPC will path back unless saveguardspot is set to 1. Heading of -1 will use existing heading.
Any quests already using this command should still be fine, since the 2 new ones are completely optional. Though, there isn't much use to set the heading field unless you are saving the guard spot as well, as the NPC will just return right away anyway. You can set heading to -1 and that will force the NPC to keep the heading it was using on it's way to the destination. So, you don't have to set headings manually each time unless you really want to use a particular heading at some point.

Here is an example of a quest using all of these options:

Code:
sub EVENT_SAY {

my $move = quest::saylink("move and stay there");

	if ($text =~/Hail/i)
	{
		quest::say ("Hello, $name. Would you like me to [$move]?");
	}

	if ($text =~/move and stay there/i)
	{
		quest::say ("Ok, I am moving and I won't be back!  I might even face South when I get there, if I am feeling crazy!");
		#Example loc at the top of the center of Nexus facing South
		quest::moveto(5, 5, -31, 127, 1);
	}

}
Lemme know if there are any questions or issues with this.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 07-30-2009 at 01:19 PM..
Reply With Quote