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 02-21-2010, 02:39 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default Instanced Zone question

I want to try something where there will be an instanced zone that people with a certain qglobal can get into and otherwise would go to the regular zone. Do you think I could do something where an NPC creates an instance when it spawns and then everyone who asks to be sent to the instanced zone will all go to the exact same zone? I know how I could set it up so everyone goes to their own individual instance, but I want them to actually be in the exact same one like they would in a regular zone.
Reply With Quote
  #2  
Old 02-21-2010, 07:26 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

There was a discussion doing this for guild halls in pok. see if the instance code looks similar to what you want to do.
http://www.eqemulator.org/forums/showthread.php?t=29359
Reply With Quote
  #3  
Old 02-21-2010, 07:44 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

That kind of seems like what I am trying to do, but not quite. Is there a way to create an instance with a set ID each time? If so, then I think I can get it to work. Like I want to create an instance for one zone with id 1, then another with ID 2 and so on.
Reply With Quote
  #4  
Old 02-22-2010, 02:30 AM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

I haven't used any of the quest:: instance commands myself, but I think you can achieve what you want without worrying about what the instance id's are. The perl can save the id of each instance it creates and then you can assign a player to whatever instance based on the qglobl flag you've given them.
Code:
// instance_spawner
my $zoneA = 0;
my $zoneB = 0;
my $zoneC = 0;

sub EVENT_SPAWN {
  $zoneA = quest::CreateInstance("freportw", 0, 3000);
  $zoneB = quest::CreateInstance("freportw", 1, 3000);
  $zoneC = quest::CreateInstance("freportw", 2, 3000);
}

sub EVENT_SAY {
  if($text=~/Hail/i) {
    if(defined($qglobals{instance_flag_a}) {
      quest::AssignToInstance($zoneA);
    }
    if(defined($qglobals{instance_flag_b}) {
      quest::AssignToInstance($zoneB);
    }
    if(defined($qglobals{instance_flag_c}) {
      quest::AssignToInstance($zoneC);
    }
  }
}
Reply With Quote
  #5  
Old 02-28-2010, 03:00 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

I tried to use this quest on the NPC, but it is only sending my characters to the regular arena despite their qglobal. It will say the message that it is assigning them to the correct instance, but then it will zone them into the original zone.

Code:
my $zoneB = 0;
my $zoneC = 0;

sub EVENT_SPAWN {
  $zoneB = quest::CreateInstance("arena", 1, 3000);
  $zoneC = quest::CreateInstance("arena", 2, 3000);
}

sub EVENT_SAY {
  if($text=~/Hail/i) {
    if($qglobals{arena1} == 1) {
      quest::AssignToInstance($zoneB);
	$client->Message(3,"Assigning to Arena1");
	quest::MovePCInstance(77, $zoneB, -41, 131, -0.5);
    }
    elsif($qglobals{arena1} == 2) {
      quest::AssignToInstance($zoneC);
      $client->Message(3,"Assigning to Arena2");
	quest::MovePCInstance(77, $zoneC, -41, 131, -0.5);
    }
    else{
	$client->Message(3,"Sending to regular arena");
	quest::zone(arena);
}
  }
 if ($text =~/arena1/i){
  $client->Message(3,"Would you like me to enable ArenaA or ArenaB?");
 }
 if ($text =~/arenaA/i){
 quest::setglobal("arena1", 1, 5, "F");
 $client->Message(3,"Global arena1 set to 1");
 }
 if ($text =~/arenaB/i){
 quest::setglobal("arena1", 2, 5, "F");
 $client->Message(3,"Global arena1 set to 2");
 }
}
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 11:15 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