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 07-31-2009, 08:36 PM
Dibalamin
Hill Giant
 
Join Date: Dec 2007
Posts: 182
Default

Sweet, thanks for the tips on the qglobal check, I actually copy and pasted that from the wiki =o.

I'd tested absolutely every combination of timer names from flat numbers, to copying what I used for other PL files that work completely. This was a recent additional failure.

Ok, I got the First part of the PL working.

Code:
#-1028.3,5120,115.2,112
#-877.4,4058.1,-41.3,.5
#32.6,4695.1,2.1,190.5
#.4,4113.4,-25.8,201.3
#-464.1,4492.2,95.8,202.1
#-917.1,4679.2,43.4,74.9,1

#Aeolwind
my $a;
my $b;
my $c;
my $d;
my $e;
my $f;
my $g;
my $MobToSpawn;
$Night = undef;

sub EVENT_SPAWN {
if (($zonetime >= 0)&&($zonetime <= 800)){           #nighttime
	quest::setglobal(Night,1,3,F);}
elsif (($zonetime >= 2000)&&($zonetime <= 2359)){    #nighttime
	quest::setglobal(Night,1,3,F);}     
else{		#daytime
	quest::setglobal(Night,0,3,F);}}

sub EVENT_WAYPOINT {
if (($zonetime >= 0)&&($zonetime <= 800)){           #nighttime
	quest::setglobal(Night,1,3,F);}
	#	quest::say("Night Global is $Night");}     #undead are 1
elsif (($zonetime >= 2000)&&($zonetime <= 2359)){    #nighttime
	quest::setglobal(Night,1,3,F);}
	#quest::say("Night Global is $Night");}     #undead are 1
else{		#daytime
	quest::setglobal(Night,0,3,F);}}
		#quest::say("Night Global is $Night");}}
## End spawn Script

sub EVENT_SIGNAL {
if ($signal == 1){
quest::settimer(1, 10);
quest::shout("Got Signal");
quest::shout("Timer is $timer");
}
}

sub EVENT_TIMER {
if($timer eq "1"){
if(defined ($qglobals{Night})) {
	if($qglobals{Night} == 1) {
		my $random_result = int(rand(100));
		my $a = 1526; #npc - ##a_decaying_skeleton
		my $b = 1528; #npc - ##a_restless_skeleton
		my $c = 1530; #npc - ##a_putrid_skeleton
		my $d = 1532; #npc - ##a_dread_corpse		
		my $e = 1534; #npc - ##a_skeleton
		my $f = 4171; #npc - Varsoon
		my $g = 4147; #npc - Pyzjn
		my $MobToSpawn = quest::ChooseRandom($a,$d,$f,$a,$b,$c,$d,$e,$f,$a,$b,$c,$d,$e,$f,$g);	
		quest::shout("$random_result, $MobToSpawn");
			if($random_result<16){
			quest::say("Spawning mariner trigger1");
			quest::spawn2($MobToSpawn,5,0,-1028.3,5120,115.2,112);
			}elsif(($random_result>=16) && ($random_result<32)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,6,0,-877.4,4058.1,-41.3,.5);
			}elsif(($random_result>=32) && ($random_result<48)){
			quest::say("Spawning shaman trigger3");
			quest::spawn2($MobToSpawn,7,0,32.6,4695.1,2.1,190.5);
			}elsif(($random_result>=48) && ($random_result<64)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,8,0,-464.1,4492.2,95.8,202.1);
			}elsif(($random_result>=64) && ($random_result<80)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,8,0,-917.1,4679.2,43.4,74.9,1);
			}elsif(($random_result>=80) && ($random_result<101)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,8,0,-917.1,4679.2,43.4,74.9,1);
			}			
		} 
}
}
}
When I add in the else for the qglobal it stops working.

Code:
else {
		my $random_result = int(rand(100));
		my $a=1524; #npc - ##a mangy Rat
		my $b=1525; #npc - ##a_brown_bear
		my $c=1527; #npc - ##a_grizzly_bea
		my $d=1529; #npc - ##a_large_rat
		my $e=1531; #npc - ##a_fire_beetle
		my $f=1533; #npc - ##a_gray_wolf
		my $g=1535; #npc - ##a_giant_rat
		my $MobToSpawn = quest::ChooseRandom($a,$d,$f,$a,$b,$c,$d,$e,$f,$a,$b,$c,$d,$e,$f,$g);
			if($random_result<16){
			quest::say("Spawning mariner trigger1");
			quest::spawn2($MobToSpawn,5,0,-1028.3,5120,115.2,112);
			}elsif(($random_result>=16) && ($random_result<32)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,6,0,-877.4,4058.1,-41.3,.5);
			}elsif(($random_result>=32) && ($random_result<48)){
			quest::say("Spawning shaman trigger3");
			quest::spawn2($MobToSpawn,7,0,32.6,4695.1,2.1,190.5);
			}elsif(($random_result>=48) && ($random_result<64)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,8,0,-464.1,4492.2,95.8,202.1);
			}elsif(($random_result>=64) && ($random_result<80)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,8,0,-917.1,4679.2,43.4,74.9,1);
			}else{(($random_result>=80) && ($random_result<101))
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,8,0,-917.1,4679.2,43.4,74.9,1);
			}
	}
__________________
Retired EMarr
Project1999 Developer
Reply With Quote
  #2  
Old 07-31-2009, 09:21 PM
Dibalamin
Hill Giant
 
Join Date: Dec 2007
Posts: 182
Default

Nailed it, thanks guys, I shall share! You can use this for your Pzyjn, you'll need some special mobs so you'll have to modify the NPC ID's for your usage as well as the grids. You'll also need a "walker" mob, I hid mine on one of the pillars. Their might be one in your DB already, named 2_ with NPC ID 51150. You can adjust your locs, these are based on our own experiences at Project1999.

Code:
#-1028.3,5120,115.2,112
#-877.4,4058.1,-41.3,.5
#32.6,4695.1,2.1,190.5
#.4,4113.4,-25.8,201.3
#-464.1,4492.2,95.8,202.1
#-917.1,4679.2,43.4,74.9,1

#Aeolwind
my $a;
my $b;
my $c;
my $d;
my $e;
my $f;
my $g;
my $MobToSpawn;
$Night = undef;

sub EVENT_SPAWN {
if (($zonetime >= 0)&&($zonetime <= 800)){           #nighttime
	quest::setglobal(Night,1,3,F);}
elsif (($zonetime >= 2000)&&($zonetime <= 2359)){    #nighttime
	quest::setglobal(Night,1,3,F);}     
else{		#daytime
	quest::setglobal(Night,0,3,F);}}

sub EVENT_WAYPOINT {
if (($zonetime >= 0)&&($zonetime <= 800)){           #nighttime
	quest::setglobal(Night,1,3,F);}
	#	quest::say("Night Global is $Night");}     #undead are 1
elsif (($zonetime >= 2000)&&($zonetime <= 2359)){    #nighttime
	quest::setglobal(Night,1,3,F);}
	#quest::say("Night Global is $Night");}     #undead are 1
else{		#daytime
	quest::setglobal(Night,0,3,F);}}
		#quest::say("Night Global is $Night");}}
## End spawn Script

sub EVENT_SIGNAL {
if ($signal == 1){
quest::settimer(1, 360);
}
}

sub EVENT_TIMER {
if($timer eq "1"){
	if(defined ($qglobals{Night})) {
		if($qglobals{Night} == 1) {
		my $random_result = int(rand(100));
		my $a = 1526; #npc - ##a_decaying_skeleton
		my $b = 1528; #npc - ##a_restless_skeleton
		my $c = 1530; #npc - ##a_putrid_skeleton
		my $d = 1532; #npc - ##a_dread_corpse		
		my $e = 1534; #npc - ##a_skeleton
		my $f = 4171; #npc - Varsoon
		my $g = 4147; #npc - Pyzjn
		my $MobToSpawn = quest::ChooseRandom($a,$d,$f,$a,$b,$c,$d,$e,$f,$a,$b,$c,$d,$e,$f,$g);	
		quest::shout("$random_result, $MobToSpawn");
			if($random_result<16){
			quest::say("Spawning mariner trigger1");
			quest::spawn2($MobToSpawn,5,0,-1028.3,5120,115.2,112);
			}elsif(($random_result>=16) && ($random_result<32)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,6,0,-877.4,4058.1,-41.3,.5);
			}elsif(($random_result>=32) && ($random_result<48)){
			quest::say("Spawning shaman trigger3");
			quest::spawn2($MobToSpawn,7,0,32.6,4695.1,2.1,190.5);
			}elsif(($random_result>=48) && ($random_result<64)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,8,0,-464.1,4492.2,95.8,202.1);
			}elsif(($random_result>=64) && ($random_result<80)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,8,0,-917.1,4679.2,43.4,74.9,1);
			}elsif(($random_result>=80) && ($random_result<101)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,8,0,-917.1,4679.2,43.4,74.9,1);
			quest::stoptimer(1);
			}			
		}
		if($qglobals{Night} != 1) {
		my $random_result = int(rand(100));
		my $a=1524; #npc - ##a mangy Rat
		my $b=1525; #npc - ##a_brown_bear
		my $c=1527; #npc - ##a_grizzly_bea
		my $d=1529; #npc - ##a_large_rat
		my $e=1531; #npc - ##a_fire_beetle
		my $f=1533; #npc - ##a_gray_wolf
		my $g=1535; #npc - ##a_giant_rat
		my $MobToSpawn = quest::ChooseRandom($a,$d,$f,$a,$b,$c,$d,$e,$f,$a,$b,$c,$d,$e,$f,$g);
			if($random_result<16){
			quest::say("Spawning mariner trigger1");
			quest::spawn2($MobToSpawn,5,0,-1028.3,5120,115.2,112);
			}elsif(($random_result>=16) && ($random_result<32)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,6,0,-877.4,4058.1,-41.3,.5);
			}elsif(($random_result>=32) && ($random_result<48)){
			quest::say("Spawning shaman trigger3");
			quest::spawn2($MobToSpawn,7,0,32.6,4695.1,2.1,190.5);
			}elsif(($random_result>=48) && ($random_result<64)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,8,0,-464.1,4492.2,95.8,202.1);
			}elsif(($random_result>=64) && ($random_result<80)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,8,0,-917.1,4679.2,43.4,74.9,1);
			}elsif(($random_result>=80) && ($random_result<101)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,8,0,-917.1,4679.2,43.4,74.9,1);
			quest::stoptimer(1);
			}
	}		
}
}
}
__________________
Retired EMarr
Project1999 Developer
Reply With Quote
  #3  
Old 07-31-2009, 09:49 PM
Dibalamin
Hill Giant
 
Join Date: Dec 2007
Posts: 182
Default

Woops! I had the stop timer out of place, it was only stopping it on certain randoms.

Code:
#-1028.3,5120,115.2,112
#-877.4,4058.1,-41.3,.5
#32.6,4695.1,2.1,190.5
#.4,4113.4,-25.8,201.3
#-464.1,4492.2,95.8,202.1
#-917.1,4679.2,43.4,74.9,1

#Aeolwind
my $a;
my $b;
my $c;
my $d;
my $e;
my $f;
my $g;
my $MobToSpawn;
$Night = undef;

sub EVENT_SPAWN {
if (($zonetime >= 0)&&($zonetime <= 800)){           #nighttime
	quest::setglobal(Night,1,3,F);}
elsif (($zonetime >= 2000)&&($zonetime <= 2359)){    #nighttime
	quest::setglobal(Night,1,3,F);}     
else{		#daytime
	quest::setglobal(Night,0,3,F);}}

sub EVENT_WAYPOINT {
if (($zonetime >= 0)&&($zonetime <= 800)){           #nighttime
	quest::setglobal(Night,1,3,F);}
	#	quest::say("Night Global is $Night");}     #undead are 1
elsif (($zonetime >= 2000)&&($zonetime <= 2359)){    #nighttime
	quest::setglobal(Night,1,3,F);}
	#quest::say("Night Global is $Night");}     #undead are 1
else{		#daytime
	quest::setglobal(Night,0,3,F);}}
		#quest::say("Night Global is $Night");}}
## End spawn Script

sub EVENT_SIGNAL {
if ($signal == 1){
quest::settimer(1, 360);
}
}

sub EVENT_TIMER {
if($timer eq "1"){
	if(defined ($qglobals{Night})) {
		if($qglobals{Night} == 1) {
		my $random_result = int(rand(100));
		my $a = 1526; #npc - ##a_decaying_skeleton
		my $b = 1528; #npc - ##a_restless_skeleton
		my $c = 1530; #npc - ##a_putrid_skeleton
		my $d = 1532; #npc - ##a_dread_corpse		
		my $e = 1534; #npc - ##a_skeleton
		my $f = 4171; #npc - Varsoon
		my $g = 4147; #npc - Pyzjn
		my $MobToSpawn = quest::ChooseRandom($a,$d,$f,$a,$b,$c,$d,$e,$f,$a,$b,$c,$d,$e,$f,$g);	
		quest::shout("$random_result, $MobToSpawn");
		quest::stoptimer(1);
			if($random_result<16){
			quest::say("Spawning mariner trigger1");
			quest::spawn2($MobToSpawn,5,0,-1028.3,5120,115.2,112);
			}elsif(($random_result>=16) && ($random_result<32)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,6,0,-877.4,4058.1,-41.3,.5);
			}elsif(($random_result>=32) && ($random_result<48)){
			quest::say("Spawning shaman trigger3");
			quest::spawn2($MobToSpawn,7,0,32.6,4695.1,2.1,190.5);
			}elsif(($random_result>=48) && ($random_result<64)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,8,0,-464.1,4492.2,95.8,202.1);
			}elsif(($random_result>=64) && ($random_result<80)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,8,0,-917.1,4679.2,43.4,74.9,1);
			}elsif(($random_result>=80) && ($random_result<101)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,8,0,-917.1,4679.2,43.4,74.9,1);
			}			
		}
		if($qglobals{Night} != 1) {
		my $random_result = int(rand(100));
		my $a=1524; #npc - ##a mangy Rat
		my $b=1525; #npc - ##a_brown_bear
		my $c=1527; #npc - ##a_grizzly_bea
		my $d=1529; #npc - ##a_large_rat
		my $e=1531; #npc - ##a_fire_beetle
		my $f=1533; #npc - ##a_gray_wolf
		my $g=1535; #npc - ##a_giant_rat
		my $MobToSpawn = quest::ChooseRandom($a,$d,$f,$a,$b,$c,$d,$e,$f,$a,$b,$c,$d,$e,$f,$g);
			quest::stoptimer(1);
			if($random_result<16){
			quest::say("Spawning mariner trigger1");
			quest::spawn2($MobToSpawn,5,0,-1028.3,5120,115.2,112);
			}elsif(($random_result>=16) && ($random_result<32)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,6,0,-877.4,4058.1,-41.3,.5);
			}elsif(($random_result>=32) && ($random_result<48)){
			quest::say("Spawning shaman trigger3");
			quest::spawn2($MobToSpawn,7,0,32.6,4695.1,2.1,190.5);
			}elsif(($random_result>=48) && ($random_result<64)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,8,0,-464.1,4492.2,95.8,202.1);
			}elsif(($random_result>=64) && ($random_result<80)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,8,0,-917.1,4679.2,43.4,74.9,1);
			}elsif(($random_result>=80) && ($random_result<101)){
			quest::say("Spawning skeleton trigger2");
			quest::spawn2($MobToSpawn,8,0,-917.1,4679.2,43.4,74.9,1);
			}
	}		
}
}
}
__________________
Retired EMarr
Project1999 Developer
Reply With Quote
Reply


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 06:54 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