Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-01-2009, 04:28 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default Tour Guide NPC

This is an example of a city tour guide I made for the new custom Crescent Reach zone I am working on.

Basically, you just create a few grids and edit this quest with your new grid numbers. Then, you would also want to adjust the waypoints so that he announces when he is done.

Code:
#Crescent City Tour Guide

#Store which route the guide is on
$route = undef;

#Store if he is in route or not
$in_route = 0;

sub EVENT_SPAWN { 

quest::start(118);
$in_route = 0;

}

sub EVENT_SAY { 

	if ($text && $in_route == 1)
	{
		quest::say("Sorry, $name, but I can only take requests when I am at my home point.");
	}


	if ($text=~/Hail/i && $in_route == 0)
	{
		quest::say("Hello, $name.  I am the tour guide for this part of the city.  Would you like me to [show] you around?");
	}

	if ($text=~/show/i && $in_route == 0)
	{
		quest::say("I can take you to the Class [Trainers] Section, Beginner [Merchant], Augment Distiller [Pool], or the [Forge] Area.  Please make your selection.");
	}

	if ($text=~/Trainers/i && $in_route == 0)
	{
		quest::say("To the Class Trainers Section it is.  Please follow me.");
		$route = "Trainers";
		$in_route = 1;
		quest::start(118); 
	}

	if ($text=~/Merchant/i && $in_route == 0)
	{
		quest::say("To the Beginner Merchant it is.  Please follow me.");
		$route = "Merchant";
		$in_route = 1;
		quest::start(119); 
	}
		
	if ($text=~/Pool/i && $in_route == 0)
	{
		quest::say("To the Augment Distiller Pool it is.  Please follow me.");
		$route = "Pool";
		$in_route = 1;
		quest::start(120); 
	}

	if ($text=~/Forge/i && $in_route == 0)
	{
		quest::say("To the Forge Area it is.  Please follow me.");
		$route = "Forge";
		$in_route = 1;
		quest::start(121); 
	}

}

sub EVENT_WAYPOINT {



	if ($wp == 0)
	{
	quest::stop();
	$in_route = 0;
	}
	
	if ($wp == 11 && $route eq "Trainers")
	{
	quest::say("Destination Class Trainers Section completed.  Returning home now.");
	}

	if ($wp == 3 && $route eq "Merchant")
	{
	quest::say("Destination Beginner Merchant completed.  Returning home now.");
	}

	if ($wp == 8 && $route eq "Pool")
	{
	quest::say("Destination Augment Distiller Pool completed.  Distiller Merchant nearby as well.  Returning home now.");
	}

	if ($wp == 5 && $route eq "Forge")
	{
	quest::say("Destination Forge Area completed.  Returning home now.");
	}	
	
}
When creating the grids, you will want to use this grid setting:

Code:
#grid add XXX 3 1
Then, I always do a #goto, so I am on top of the mob for the first waypoint.

Then, simply do something like:

Code:
#wp add XXX 1
Note: You no longer need to set the WP number. It will start at 0 and increment from there. This saves time because you can just repeat the same unmodified command over and over. The only thing you might change is the pause time at the end.

Also, a hint for creating a tour guide is to create their first WP, facing the direction you want them to face. Then, step back 1 or 2 steps and create the second WP with a pause delay of 0 seconds. Then, continue to where ever you were wanting them to go to. The reason I say to step back like that is so when he returns to his home location, he will be facing the right direction you want him facing.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 05-02-2009 at 01:32 PM..
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 08:13 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