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 09-23-2010, 11:13 PM
cylynex2
Sarnak
 
Join Date: Jul 2010
Posts: 36
Default Instance Creation problem

Having a problem with this script. It creates the instance and ports the player properly and all. The problem I'm having is it does not assign everyone in the group to the same instance ID. The 2nd player to hail will be assigned a different Instance ID, and it will try to zone them, but then they just end up back in PoK. I'm stumped. I don't know much about qglobals yet, am I missing something I need to do with them?

Code:
sub EVENT_SAY {

	$inpoka = quest::GetInstanceID("akanon",0);
	$group = $client->GetGroup();

	if ($text =~/hail/i) {
		#quest::say ("hi");

		if($inpoka == 0) {
			$Instance = quest::CreateInstance("akanon", 1, 64800);
			quest::AssignGroupToInstance($Instance);
		    	quest::say("Instance added.");
			quest::say("Your instance is: $Instance");

			#quest::setglobal($name."poknowledgea",$Instance,7,"H18");
			#quest::setglobal($name."zone",$Instance,7,"H18");
			quest::MovePCInstance(55, $Instance, 788.7,-496.3,-126.1);

		} else {
			$client->Message(13, "You are already in an instance, the ID which is $inpoka");
			quest::say("If you wish to [return] to this instance, just say so!");
		}

	}

	if ($text =~/return/i) {
		quest::MovePCInstance(55, $inpoka, 788.7,-496.3,-126.1);
	}
	
	if ($text =~/46/i) {
		quest::DestroyInstance(48);
	}

}
Reply With Quote
  #2  
Old 09-23-2010, 11:27 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

Either move the group instead of just the pc or you can cycle through the group members to move them individually.
Reply With Quote
  #3  
Old 09-23-2010, 11:30 PM
cylynex2
Sarnak
 
Join Date: Jul 2010
Posts: 36
Default

Made a small update to it, it works now. So do I not need to set qglobals for anything? I got the porting to work as well, I just have it commented out for now (was testing the return line).

Updated:
Code:
sub EVENT_SAY {

$inpoka = quest::GetInstanceID("akanon",0);

if ($text =~/hail/i) {
	#quest::say ("hi");

	if($inpoka == 0) {
		$Instance = quest::CreateInstance("akanon", 0, 64800);
		quest::AssignGroupToInstance($Instance);
	    	quest::say("Instance added.");
		quest::say("Your instance is: $Instance");

		#quest::setglobal($name."akanon",$Instance,7,"H18");
		#quest::setglobal($name."zone",$Instance,7,"H18");
		#quest::MovePCInstance(55, $Instance, -77.2,50.7,1.9);
		quest::say("I'd move you, but Cy has it commented out currently.");

	} else {
		$client->Message(13, "You are already in an instance, the ID which is $inpoka");
		quest::say("If you wish to [return] to this instance, just say so!");
	}

}
if ($text =~/return/i) {
		quest::MovePCInstance(55, $inpoka, -77.2,50.7,1.9);
	}
if ($text =~/clearme/i) {
		quest::DestroyInstance(56);
		quest::say("Clearing your instance stuff");
	}
}
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 07:09 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