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 05-27-2009, 03:30 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Well, part of the problem is that even though Proximities are useful, they are also very limited and don't handle certain things as well as they should. Really, IMO, the best way to do it would be to run the clientsearch check that you can get from the Rampage script that Kayen posted here:

http://www.eqemulator.net/forums/showthread.php?t=27850

You can do distance checks and even count in real time how many players are in range.

Then, probably what I would do would be to assign temporary qglobals to each person that enters the proximity. And, have it set an incrementing value for the qglobal so that it starts at 1 and goes up just like the enter_count variable does.

Then, you can use the client search code from the Rampage script to look for players and check their qglobals. If their value is greater than 6, it kicks them out.

Though, this would mean that once the limit of people are reached in the proximity, they would be the only chars that could do that event until their qglobal ran out.

You could also use a combination of that script along with the player.pl and have the player.pl do an EVENT_EXIT_ZONE or whatever the event for leaving a zone is called. And, when they leave the zone (die/gate/whatever), it deletes their temporary global and makes it available to the next person to enter.

There really are quite a few options depending on how creative you are about it and exactly what you are trying to accomplish.

If you wanted a simple way to handle it, you could just set the zone in the zones table to only allow a max of how many players you want to limit the encounter to. But, if you are only wanting to limit it for certain NPCs and not the whole zone, that wouldn't really work. Again, it depends on exactly what you are trying to do. I figured I would just give you a few ideas about things to consider. With enough creativity, a ton of stuff is possible that you wouldn't normally think would be possible.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
Old 05-27-2009, 12:35 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Huh. So EntityList->GetClientByID() actually takes more of an Index as a parameter than an ID. Interesting.
Reply With Quote
  #3  
Old 05-27-2009, 12:48 PM
chrsschb's Avatar
chrsschb
Dragon
 
Join Date: Nov 2008
Location: GA
Posts: 904
Default

Trev, your idea sounds good, but way beyond my skill level.

The encounter is inside of a public zone. The boss is located in a room and I want only X number of people to be able to attempt him at once. If someone dies, or leaves, another person should be able to enter.

The way I have above is really simple, but slow and exploitable.
Reply With Quote
  #4  
Old 05-27-2009, 02:02 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

i could sugest a crude work around to create a sort of "mini-zone" inside a public zone

make the door leading to mobs room to be perma locked
put either a quest npc or an inviseable triger in front on the door which will allow only 6 peopel in by tagging them with a temp flag

this way NO one who doesnt have a flag can get in.
If person dies inside a room- he can be rezzed from inside i guess

in additon block casting of spells like COH


reset encounter after some min time has passed or if mob dies

THE only problem if zone itself doesn't have ANY doors actualy aviable - like Ruj or Guk LDONs.
BTW if anyone can sugest how to load ANy door into guk, mir or ruj LDON- i will be eternaly grateful =)
Reply With Quote
  #5  
Old 05-27-2009, 07:24 PM
chrsschb's Avatar
chrsschb
Dragon
 
Join Date: Nov 2008
Location: GA
Posts: 904
Default

Quote:
Originally Posted by ChaosSlayerZ View Post
i could sugest a crude work around to create a sort of "mini-zone" inside a public zone

make the door leading to mobs room to be perma locked
put either a quest npc or an inviseable triger in front on the door which will allow only 6 peopel in by tagging them with a temp flag

this way NO one who doesnt have a flag can get in.
If person dies inside a room- he can be rezzed from inside i guess

in additon block casting of spells like COH


reset encounter after some min time has passed or if mob dies

THE only problem if zone itself doesn't have ANY doors actualy aviable - like Ruj or Guk LDONs.
BTW if anyone can sugest how to load ANy door into guk, mir or ruj LDON- i will be eternaly grateful =)
This is a big and open room, a door really isn't an option (and it lacks the ability to drop the count).
Reply With Quote
  #6  
Old 05-27-2009, 07:50 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

EVENT_SLAY for when the npc kills a pc would be a good place to decrement the count.
__________________
The Realm
Reply With Quote
  #7  
Old 05-28-2009, 09:04 AM
nosfentora
Discordant
 
Join Date: Oct 2004
Location: In a house
Posts: 387
Default

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?
Reply With Quote
Reply

Thread Tools
Display Modes

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 12:42 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