View Single Post
  #5  
Old 05-26-2009, 10:58 PM
chrsschb's Avatar
chrsschb
Dragon
 
Join Date: Nov 2008
Location: GA
Posts: 904
Default

Thanks for the reply Trev. Think this would work?
Code:
sub EVENT_SPAWN {
  my $x = $npc->GetX();
  my $y = $npc->GetY();
  quest::set_proximity($x - 100, $x + 100, $y - 100, $y + 100);

 $enter_count = 0;  #Keep track of how many characters enter the proximity.
}

sub EVENT_ENTER {

$enter_count = $enter_count + 1;

  if ($enter_count >= 6) {
    quest::echo("No more than 6 at a time may do this encounter.");
    quest::movepc(152, 0, 0, -30);
  }
  
sub EVENT_EXIT (

$enter_count = $enter_count - 1;

}

sub EVENT_COMBAT (

  if ($combat_state == 0) {
    $enter_count = 0; 
 }
}
Reply With Quote