Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 05-26-2009, 08:58 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
 

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 11:20 PM.


 

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