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 11-13-2013, 09:40 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,604
Default

Your sub EVENT_WAYPOINT is wrapped around sub EVENT_TIMER.

P.S. Formatting is sweet when it comes to troubleshooting mismatched or unmatched curly brackets.

Not to do it all for you, but this should work:
Code:
sub EVENT_SPAWN 
{ 
	quest::settimer("eddie", 30);
	if ($zonetime < 700 || $zonetime > 1900)
	{ # its after 7pm and before 8am and its night
		quest::spawn_condition($zonesn, 2,0); #live are 2 
		quest::spawn_condition($zonesn, 1,1); #undead are 1
		quest::shout ("They only come out at night");
	}
	else 
	{	 #its between 8am and 7pm ie daylight
		quest::spawn_condition($zonesn, 2,1); #live are 2 
		quest::spawn_condition($zonesn, 1,0); #undead are 1
		quest::shout ("The Blessed Sunlight!.. Cleansing our world.");
	}
}

sub EVENT_WAYPOINT
{
	if ($zonetime < 700 || $zonetime > 1900)
	{
		quest::spawn_condition($zonesn, 2,0); #live are 2
		quest::spawn_condition($zonesn, 1,1); #undead are 1
	}
	else 
	{	
		quest::spawn_condition($zonesn, 2,1); #live are 2
		quest::spawn_condition($zonesn, 1,0); #undead are 1
	}
}

sub EVENT_TIMER 
{
	$npc->SetAppearance(1);
	if($timer eq "eddie") 
	{
		my $random_number = quest::ChooseRandom(0, 1, 2, 3, 4, 5, 6, 7, 8);
		if ($random_number == 0 || $random_number == 1 || $random_number == 2)
		{
			$npc->SetAppearance(1);
			quest::shout ("I shall return later!");
			$npc->Depop(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 11:58 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