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 09-12-2008, 01:56 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Is your watcher set to have access to qglobals in the npc_types table?
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #2  
Old 09-12-2008, 02:11 PM
Neiv
Hill Giant
 
Join Date: May 2008
Location: Colorado
Posts: 238
Default

Quote:
Originally Posted by AndMetal View Post
Is your watcher set to have access to qglobals in the npc_types table?
I didn't bother changing that flag since my other global works fine without it. In my kingdom global, the king sets a global for a kingdom buff and that works fine; and another npc deletes that global when the kingdom has been defeated, and that works fine. Are you saying the access needs to be turned on only on an npc that is checking a global? I went ahead and tuned it on for all npcs involved just in case.

In the meantime . . .

I have been playing with the watcher script and changed it from this:
Code:
sub EVENT_WAYPOINT
	{
	quest::shout("start WAY POINT");
	if (defined($qglobals{king}))
		{	
		if ($qglobals{king} == 4) 
			{
			quest::shout("start signal");
			quest::signal(999247);
			quest::shout("signal completed");
			}
		}
	}
. . . to this:

Code:
sub EVENT_WAYPOINT
	{
	quest::shout("start WAY POINT");
	if (defined($qglobals{king} == 4)) 
		{
		quest::shout("start signal");
		quest::signal(999247);
		quest::shout("signal completed");
		}
	}
All the shouts are now displaying as they should, but the spawned king still is not doing what he needs to do. I'm going to start playing with him, but does the revised slayer script look right?
Reply With Quote
  #3  
Old 09-12-2008, 02:16 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

No it only looks like it's working, but it's not - set the flag
Reply With Quote
  #4  
Old 09-12-2008, 03:05 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Just to clarify, the flags allows that particular NPC to view the globals. This is so they don't have to exported for every single NPC (which, as you can imagine, can be VERY resource intensive). Anyone can set a global, even without the flag set in npc_types. That's why you can set it in the player.pl file (which coincidentally has the globals accessable automatically), but can't read it in the watcher script.

This caused me a lot of headache with the PoJ Trial of Execution when it was first changed, but once I figured it out, it was easy enough to fix.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #5  
Old 09-12-2008, 03:14 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

I would have mine working 'half-assed' when I forget to set that- it would do things like make the global, but not change it.
Reply With Quote
  #6  
Old 09-13-2008, 05:04 PM
Neiv
Hill Giant
 
Join Date: May 2008
Location: Colorado
Posts: 238
Default

Okay, appreciate the tip on setting the qglobal flag on the npcs. Things are almost working correctly. I'm currently having an issue with the watcher. The signal script on the watcher triggers a settimer on the spawned npc. That timer has three parts to it so that the npc kneels to simulate "looting" the item (actually stripped from the client by the slayer), then stands to make an announcement to the server that he is now ruling the world, then depops. The problem is, the watcher keeps tripping the timer and restarting it before the npc is able to depop. How do I get the signal to stop?
Reply With Quote
  #7  
Old 09-13-2008, 08:08 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default

When using quest::settimer(id,time), as soon as it hits 0, it will start over and repeat itself. Make sure you are using quest::stoptimer(id).

Another idea (not sure if it will work; you will need to test)... you might be able to have him signal himself. For example, looks like the NPCID is 999247. To start the sequence, I would have the watcher signal the Lord:

Code:
#Watcher.pl ()
sub EVENT_WAYPOINT {
  if (defined($qglobals{king})) {
    if ($qglobals{king} == 4) {
      quest::signalwith(999247,1,1); #Signal 1 to Lord
    }
  }
}
Then I would have the lord do this:

Code:
#Lord.pl (999247)
sub EVENT_SIGNAL {
  if ($signal == 1) { #Sequence started
    quest::setsky(14); #Change sky
    quest::selfcast(3430); #Light of Nife
    quest::signalwith(999247,2,10); #Tell Lord to kneel
  }
  if ($signal == 2) { #Kneel
    $npc->SetAppearance(4); #Kneeling appearance
    quest::shout("Ah, so there you are");
    quest::signalwith(999247,3,10); #Tell Lord to shout
  }
  if ($signal == 3) { #Shout
    $npc->SetAppearance(0); #Standing appearance
    quest::shout2("My servants, hear me and rejoice! For my power and cruelty have returned to me. I now reign supreme. Join me, my minions, and together we shall destroy our enemies!");
    quest::signalwith(999247,4,10); #Tell Lord to depop
  }
  if ($signal == 4) { #Depop
    quest::setsky(1); #Change sky to normal
    quest::delglobal("king"); #Delete global
    $king = undef;
    quest::depop(); #Depop
  }
}
Once again, you will have to test. I am not sure if the scripting will efficiently allow to signal itself. If not, have the watcher send the signals with 10 second additions.
Reply With Quote
  #8  
Old 09-14-2008, 12:03 AM
Neiv
Hill Giant
 
Join Date: May 2008
Location: Colorado
Posts: 238
Default

I will try this, thanks. One point though. I have a stoptimer on all the timers, so I don't think that's the problem. The shout and emote statements are being repeated, and I have to think that's due to the EVENT_WAYPOINT, which triggers each time the npc leaves a waypoint (in this case, every 7 seconds--I tried adjusting it to 10 seconds, but the npc stalls out for some reason). Which is also why I'm dubious about adding seconds to the timer function of the watcher (whether in a timer or a signalwith function). If the watcher re-signals the Lord each time he leave a waypoint, and if the pause time of the waypoint movement is set to 7, then it seems to me that the waypoint movement of the watcher will override any longer duration of time I set in a timer on the Lord. Feel free to correct me on this if I'm wrong.

I'll try the signalwith function and see if I get different results. Thanks again.
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 11:07 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