Depending on exactly how you wanted the event to play out and how to deal with resetting the event and such, it probably wouldn't be to hard to do what you are wanting.
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);
}
}
If you wanted to get more advanced, you could use sub EVENT_COMBAT to handle resetting the enter count variable if people fail the event so it could be restarted. You could also use temporary quest globals to assign to people as they enter and do a check for that temporary qglobal before upping the enter count again. This way, the first 6 chars to get inside the proximity can then leave and come back and still get in, but it won't allow others to come in.
I don't know anything at all about bots, so I don't know if they would be counted properly, or if proximities even take them into account at all.