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 10-31-2011, 11:33 PM
Durge
Sarnak
 
Join Date: Jan 2010
Location: USA
Posts: 51
Default Creating A New Instance

Sorry folks, I'm back again :p, this time with an instancing problem. I have recently tried to use the plugin for it, but have had no luck with it.
I was not sure how to make it send you to the already made instance if one existed, therefore I just tried adding in the 'else' statement.

Code:
sub EVENT_SAY
{
	if($text=~/hail/i);
	{
		$client->Message(315, "Hello $name, would you be interested in creating a new [zone]?");
	}
	
	if($text=~/Zone/i || $text=~/Enter Zone/i);
	{
			my $TYPE = $uguild_id;
			my $space = "_";
			my $InstanceName = "Inst";
			my $ZoneSN = $zonesn;
			if($uguild_id)
			{
				if (defined($qglobals{"$TYPE$space$InstanceName$space$ZoneSN"}))
				{
					plugin::SendToInstance("guild", sebilis, 1, $Cx, $Cy, $Cz, "Inst", 648000);
					$client->Message(15, "I will now relocate you to the instance: [$zoneln].");
				}
				else
				{
					plugin::SendToInstance("guild", sebilis, 1, $Cx, $Cy, $Cz, "Inst", 648000);
				}
			}
	}
}
__________________
Reply With Quote
  #2  
Old 11-01-2011, 10:34 AM
sorvani
Dragon
 
Join Date: May 2010
Posts: 965
Default

I haven't used the plugin for instances in the stuff i've done on PEQ. Here is an example of how someone gets into Uqua from Yxtta.
Assigning the raid to the instance. Obviously just tweak this for a single person.
Code:
sub EVENT_SAY {
  if ($text=~/hail/i) {
    quest::say("blah blah blah  just tell me you are [ready] and I will blah blah blah");
  }
  if ($text=~/ready/i) {
    $raid = $client->GetRaid();
    if($raid){
      if(!defined $qglobals{uqualockout}) {
        if($InInstanceUqua == 0){
          $Instance = quest::CreateInstance("uqua", 0, 21600);
          quest::AssignRaidToInstance($Instance);   
          quest::say("Instance added.");
          quest::say("Place your hands on one of the altars behind me and the way will be revealed. Be wary for you are about to encounter some of the most vicious trusik known. If for any reason you wish to return, place your hands on the golem within the temple.");           
        } else {
          $client->Message(13, "You are already in an instance!");
        }
      } else {
        $client->Message(13,"You have recently completed this raid.");
      }
    } else {
      $client->Message(13, "You are not in a raid!");
    }
  }
}
Then in the player PL for when they click on the statues to zone in. Agian this could simply be integrated into the NPC you hail.
Code:
sub EVENT_CLICKDOOR {
  if ($doorid == 35 || $doorid == 36) { #uqua zone in
    my $InInstanceUqua = quest::GetInstanceID("uqua",0);
    if(!defined $qglobals{uqualockout}) {
      if($InInstanceUqua > 0){
        quest::MovePCInstance(292,$InInstanceUqua,-17,-7,-24);
      } else {
        $client->Message(13, "You are not a part of an instance!");
      }
    } else {
      $client->Message(13, "You have recently completed this raid, please come back at a later point");
    }
}
Reply With Quote
  #3  
Old 11-01-2011, 10:43 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

Quote:
Originally Posted by Durge View Post
Sorry folks, I'm back again :p, this time with an instancing problem. I have recently tried to use the plugin for it, but have had no luck with it.
I was not sure how to make it send you to the already made instance if one existed, therefore I just tried adding in the 'else' statement.

Code:
sub EVENT_SAY
{
	if($text=~/hail/i);
	{
		$client->Message(315, "Hello $name, would you be interested in creating a new [zone]?");
	}
	
	if($text=~/Zone/i || $text=~/Enter Zone/i);
	{
			my $TYPE = $uguild_id;
			my $space = "_";
			my $InstanceName = "Inst";
			my $ZoneSN = $zonesn;
			if($uguild_id)
			{
				if (defined($qglobals{"$TYPE$space$InstanceName$space$ZoneSN"}))
				{
					plugin::SendToInstance("guild", sebilis, 1, $Cx, $Cy, $Cz, "Inst", 648000);
					$client->Message(15, "I will now relocate you to the instance: [$zoneln].");
				}
				else
				{
					plugin::SendToInstance("guild", sebilis, 1, $Cx, $Cy, $Cz, "Inst", 648000);
				}
			}
	}
}
The plugin is designed to do all of the heavy lifting.

You have several errors in that script above. The plugin knows that you have created the instance with the one line alone, you need to enable qglobals on the NPC and make sure you have the plugins repo checked out:

Code:
sub EVENT_SAY
{
	if($text=~/hail/i){
		$client->Message(315, "Hello $name, would you be interested in creating a new [zone]?");
	}
	if($text=~/zone/i){
		plugin::SendToInstance("guild", sebilis, 1, 0, 235, 40, "Inst", 648000);
	}
}
Let me know if you have questions
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 12:02 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