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
  #1  
Old 02-23-2018, 04:36 PM
Aardil
Fire Beetle
 
Join Date: Jan 2018
Location: Mississippi
Posts: 27
Default Player.pl question

I an working on an event that covers several zones.
I am using Player.pl to detect the player level.

Through signals (determined by the player level)
A signal is sent to a zone controller.

Zone controller depops a few NPC's and spawns NPC's of the correct level.

All the above works as it should.

Now he question.

Since this happens in several zones, I am unsure of what to do with the player .pl

Should I take all signals from every zone and place them all in a single player.pl? ( it would end up being about 5000 lines of code ( 100 lines of code per zone and there are 50 effected zones).

If it all needs to go in one player.pl is there a way to sub devide the code by zone so it wont be looking through 5000 lines to find a match?
Maybe something like this?
Code:
sub EVENT_ZONE {
  if(zonen == "butcher"){
     if($ulevel <= 5 && $ulevel >= 1) {
    quest::signalwith(51,22,0);
	quest::signalwith(51,12,10);
	}
	elsif($ulevel <= 10 && $ulevel >= 6) {
	quest::signalwith(51,22,0);
	quest::signalwith(51,13,10);
	}
	elsif($ulevel <= 15 && $ulevel >= 11) {
	quest::signalwith(51,22,0);
	quest::signalwith(51,14,10);
	}
	elsif($ulevel <= 20 && $ulevel >= 16) {
	quest::signalwith(51,22,0);
	quest::signalwith(51,15,10);
	}
	elsif($ulevel <= 25 && $ulevel >= 21) {
	quest::signalwith(51,22,0);
	quest::signalwith(51,16,10);
	}
	elsif($ulevel <= 30 && $ulevel >= 26) {
	quest::signalwith(51,22,0);
	quest::signalwith(51,17,10);
	}
	elsif($ulevel <= 35 && $ulevel >= 31) {
	quest::signalwith(51,22,0);
	quest::signalwith(51,18,10);
	}
	elsif($ulevel <= 40 && $ulevel >= 36) {
	quest::signalwith(51,22,0);
	quest::signalwith(51,19,10);
	}
	elsif($ulevel <= 45 && $ulevel >= 41) {
	quest::signalwith(51,22,0);
	quest::signalwith(51,20,10);
	}
	elsif($ulevel <= 49 && $ulevel >= 46) {
	quest::signalwith(51,22,0);
	quest::signalwith(51,21,10);
	}
	else {
	quest::signalwith(50,22,0);
	}
	}
	}
The above code is not tested as written. It does what it should without the
if (zonen == "butcher") { line

Or can each zone have a specific player.pl that only effects that zone?
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 04:12 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3