EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Limiting players in a room (https://www.eqemulator.org/forums/showthread.php?t=28350)

nosfentora 05-28-2009 09:04 AM

Is the room completely open or is there a 'doorway' that they need to pass through?

You could put an invisible npc @ the doorway and set it's proximity to be a line / ellipse rather than a circle.

Code:

quest::set_proximity($x, $x, $y - 100, $y + 100);
If the room is an open-air room, you could bound the area by 4 invisible npcs, setting their proximities to create a square/rectangle around the room.

What about a hailable npc to get in, flagging the hailer, and using the boundaries set by invisible npcs?

Dibalamin 05-28-2009 12:11 PM

If there is a doorway you could also use a player.pl with the sub EVENT_CLICKDOOR.

Just have it increment a counter ++1 for each click with a quest::movepc and if counter > 6 it gives them a message saying the encounter is full? I haven't dove into global variables but you could have the counter tied to one of them and then use a sub EVENT_SLAY on the npc in the room to decrement the counter if he murders someone.

If no door I'd use the proximities & 2 different inaccessible areas of a zone....add a crate to a hall or something to block it off.


All times are GMT -4. The time now is 05:37 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.