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
  #4  
Old 02-23-2018, 06:42 PM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

Yes, you can use both in the same script, but they do different things. ZONE fires any time any player zones (via Client::Handle_OP_ZoneChange()). ENTERZONE only fires on entering a zone (via Client::CompleteConnect()).

It should be simple enough to put a conditional in any EVENT that you are worried about adding to, and then have it call an external, custom subroutine or collection of them.

Also, you are able to call external files from your scripts via perl's 'do', that way you can keep all of your individual zone files separate, even if they're all in the same folder.

Code:
# current full working directory
( my $cwd = $0 ) =~ s/(?:(?!\\|\/)\S)+$//;

# hash with zonesn as keys and external scripts to run for the zone
my %signal_zone = {
	butcher => "singal_butcher.pl",
	cauldron => "signal_cauldron.pl"
};

# you'll want to add some sanity checks to make sure you have valid data here
sub EVENT_ENTERZONE
{
	do "${cwd}$signal_zone$zonesn";
}
__________________
I muck about @ The Forge.
say(rand 99>49?'try '.('0x'.join '',map{unpack 'H*',chr rand 256}1..2):'incoherent nonsense')while our $Noport=1;
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 02:56 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