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

Quests::Submissions This is where you submit your quests for review

Reply
 
Thread Tools Display Modes
  #1  
Old 03-19-2009, 07:33 PM
Rezbee
Sarnak
 
Join Date: Jan 2009
Location: USA
Posts: 38
Default Send New Players to tutoriala INSTANCE

This quest WORKS under one condition, you have instancing working on your server.

Here is the rundown, basically like live, a new player starts in tutoriala first. There is no way of setting up an instance from the enter tutorial button from character creation screen yet that I know of, but this does the trick by sending the player to tutorialb by default when the rule is set to enable the tutorial button, however, after zonein, this script will use the user id to setup a personal instance for the character and send them to that instance of tutoriala.

Code:
sub EVENT_SPAWN
	{# setting up the proximities.
	$x = $npc->GetX();
	$y = $npc->GetY();
	quest::set_proximity($x - 650, $x + 650, $y - 650, $y + 650);
	{

sub EVENT_ENTER
	{# We want this event to run automatically when a player enters the tutorial.  So here we go.
	# Ok if they're over level 12 and not a GM, then they don't belong here.
	if ($ulevel > 12 && $status < 19)
		{
		$client->Message(15, "You are too high of level for the tutorial!");
		quest::movepc(202,337.91,335.60,-126.50);
		}
	# If they are level 1 they should be in tutoriala instance. 
	elsif($ulevel == 1)
		{ # We gotta get an instance.... Unique is good... $userid does that and we get an infinate amount of zones
		$instance_start 	= 5000; # Ok, this is where we start the instance id's, it has to be greater than 1000.  If a GM has to get into the zone with the player, they will need to flag themselves.
		$instance_id 		= $userid + $instance_start;
		quest::setinstflagmanually(188,-1,0);# Removing all other instances
		quest::setinstflagmanually(188,$instance_id,0);# setting the instance up.
		if(quest::getinstflag() == $instance_id)
			{# We need to make darn well sure that the instance has been set correctly, if so zone them, if not, tell them and stop.
			$client->Message(15, "Please wait while your tutorial instance id '". quest::getinstflag() ."' is loaded.");
			quest::movepc(188,146,8,-25);# moving out.
			} else {# If this is called there is a problem.  Instructing the player to /petition or camp.
			$client->Message(15, "Tutorial instance failed to load properly.  Please /petition or camp and try again.");
			quest::setinstflagmanually(188,-1,0);# Destroying any curruption in the instancing.
			}
		}
	# if they are level 2 and just exited the tutorial, we have some cleanup to do...  Deleting the instances and quest globals... They shouldn't be loosing any levels at level 2 so there is no need for a global flag. 
	#  But lets not go deleting everyone's instance flags, so we're going to define a statement that must be true in order to proceed.
	elsif($ulevel == 2 && quest::getinstflag() == $instance_id)
		{# Sending a test message to the client to let them know the instance destroy was successful.
		$client->Message(15, "Testing: Tutorial instance number ". quest::getinstflag() ." destroyed.  <Don't Panic You're Done!>");
		quest::setinstflagmanually(188,-1,0); # destroying the instance.
		}
	}

sub EVENT_SAY
{
 if ($text=~/Hail/i){quest::say("Did you know that when you die your soul can be recalled to your last bind spot? Well it can , and that is exactly my purpose on this world. I can [bind] your soul so that after death you will be brought to life again in this spot.");}
 elsif ($text=~/bind/i){quest::selfcast(35);}
 elsif ($text=~/instance/i){$client->Message(15, quest::getinstflag());}
 elsif ($text && $status >= 100)
	{# GM's can just tell rashere the user's ID and get into the instance with them here.
	$instance_start 	= 5000;
	$instance_id 		= $text + $instance_start;
	quest::setinstflagmanually(188,-1,0);
	quest::setinstflagmanually(188,$instance_id,0);
	#time to zone
	quest::movepc(188,146,8,-25);
	}
}
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 02:27 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