View Single Post
  #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