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.
|
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?
|
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 () Code:
#Lord.pl (999247) |
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. |
Quote:
|
Yeah, sorry about that. I have modified this several times since I posted. Here is the Lord script with the stoptimers:
Code:
sub EVENT_SIGNAL Code:
sub EVENT_SIGNAL |
Ok, I see. You could add a variable that doesn't allow him to continuously react to signals. And with your stoptimers, you should stop them as soon as the trigger hits. Take a look at this example:
Code:
my $started; |
Code:
my $started; |
I've never used a my outside of a sub before, just saw that used in another file. Maybe put it inside the spawn? Not sure if that will change the scope of it though, which will negate what I was doing...
Or try my $started = 0; That's the only thing I could think of that would be wrong here. |
Quote:
|
All times are GMT -4. The time now is 01:43 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.