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
  #9  
Old 05-27-2009, 01:33 AM
chrsschb's Avatar
chrsschb
Dragon
 
Join Date: Nov 2008
Location: GA
Posts: 904
Default

Ok, now I'm trying to add a timed check because the script fires slowly. I expect if several people rush the proximity at the same time the boss would lose count. Using the following code he still keeps count and tells you he's over his limit, but the second MovePC won't fire. I'm guessing this is because he doesn't know which PC to move? Can I have him move a random PC if this is the case?


Code:
sub EVENT_SPAWN {
	my $x = $npc->GetX();
	my $y = $npc->GetY();
	quest::set_proximity($x - 15, $x + 15, $y - 15, $y + 15);
	quest::settimer("count",5);

	$enter_count = 0;
}


sub EVENT_ENTER {

	$enter_count = $enter_count + 1;
	quest::shout("1");

	if ($enter_count > 1) {
	quest::shout("No more than 1 at a time may do this encounter.");
	quest::movepc(241, 0, 0, 20);
	}
}


sub EVENT_TIMER {
	if (($timer eq "count") && ($enter_count > 1)) {
		quest::shout("No more than 1 at a time may do this encounter. Part 2");
		quest::movepc(241, 0, 0, 20);
		quest::stoptimer("count");
		quest::settimer("count",5);
		}
}
  
  
sub EVENT_EXIT {

$enter_count = $enter_count - 1;
quest::shout("2");

}
Reply With Quote
 


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 10:49 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