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 09-07-2010, 11:01 PM
neiv2
Hill Giant
 
Join Date: Mar 2009
Location: CO
Posts: 183
Default

Below is the complete script for each NPC. I backed-up the originals and removed all but the relevant script from each to do this testing. I also rewrote the Watcher script per Caryatis:

Watcher
Code:
## 999281, Watcher

my $EventStart = 0;

sub EVENT_SPAWN {
	$EventStart = 0;
	quest::depopall(999228);
	}

sub EVENT_WAYPOINT
	{
	if ($EventStart == 0)
		{
		$EventStart = 1;
		my $x = $npc->GetX();
		my $y = $npc->GetY();
		my $z = $npc->GetZ();
		my $h = $npc->GetHeading();	
		quest::spawn2(999228,0,0,$x+1,$y+1,$z,$h);	
		quest::shout("Wanderer spawned");
		}
	}
Wanderer
Quote:
##Wanderer, npcid 999228

sub EVENT_SPAWN
{
quest::shout("Hi");
}
Here is the in-game chatbox text:
Quote:
You say '#reloadquest'
Clearing quest memory cache.
You say '#repop'
Zone depoped. Repoping now.
watcher shouts 'Wanderer spawned'
watcher shouts 'Hi'
Now, when I remove the commented out script name at the top of each file . . .
Code:
my $EventStart = 0;

sub EVENT_SPAWN {
	$EventStart = 0;
	quest::depopall(999228);
	}

sub EVENT_WAYPOINT
	{
	if ($EventStart == 0)
		{
		$EventStart = 1;
		my $x = $npc->GetX();
		my $y = $npc->GetY();
		my $z = $npc->GetZ();
		my $h = $npc->GetHeading();	
		quest::spawn2(999228,0,0,$x+1,$y+1,$z,$h);	
		quest::shout("Wanderer spawned");
		}
	}
and . . .
Code:
sub EVENT_SPAWN
	{	
	quest::shout("Hi");
	}
. . . the resulting in-game chatbox text reads:
Quote:
You say '#reloadquest'
Clearing quest memory cache.
You say '#repop'
Zone depoped. Repoping now.
watcher shouts 'Wanderer spawned'
wanderer shouts 'Hi'
So the script works when the title lines are deleted but not when they are present.

By the way, both WAYPOINT_ARRIVE and WAYPOINT_DEPART (per joligario) break the script (I have an older version of the server code and it may not have the ability to do these functions).

The larger question is, why would a commented-out line impact the script? I am using Notepad++, and I have ensured there are no extra spaces in the commented-out line nor in the blank line below it. This has never been an issue before. Any ideas why it would respond this way?
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 08:11 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