EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Question about global "watchers" (https://www.eqemulator.org/forums/showthread.php?t=26117)

Neiv 09-07-2008 11:18 PM

Question about global "watchers"
 
I've noticed that many global scripts include watchers that are used (as I understand it) to jump start the perl script when a pc enters the zone where it executed when no pc was in the zone. My question is, why wouldn't a quest global do this on its own without a watcher? If I have included the script in my player.pl under a EVENT_ENTERZONE, isn't that equivalent to a watcher?

One of the questions someone asked recently was how to spawn a mob in zone B by killing a mob in zone A. If I include a setglobal in the EVENT_DEATH of the mob I am killing, and include a global check in the EVENT_ENTERZONE of my player.pl, shouldn't that spawn the mob when I enter zone B?

joligario 09-08-2008 12:20 AM

Allow Globals
 
Make sure you are allowing that NPC to modify globals

trevius 09-08-2008 03:28 AM

Without an NPC to assign a quest script to, they do not run.

joligario 09-08-2008 01:47 PM

However, I think the concept should work. Just as long as the NPC killed in zone A can set the global on the PC, then the player.pl file in zone B can check for the global and do a unique spawn if the global meets the criterea. Unless there is a restriction on the player.pl that won't let it spawn NPCs?

Angelox 09-08-2008 03:49 PM

Keep this in mind: Perl will not activate in any given zone if there are not any PC's there.
I probably started the 'Global Watchers' thing. The best method to have a watcher is via 2 point grid on an NPC (grids need a 3-5 second delay on each), another words, you make an NPC, give him to grid points all on the same spawnpoint (preferably invisible). Now, when you enter the zone, the script will activate and continue executing any changes it spots, with each grid movement (EVENT_WAYPONT).
EVENT_SPAWN works if the zone is not static, and only once , Proximity is nice (EVENT_ENTER), but you have to plant 'watchers' all over the zone ( my old method).
EVENT_WAYPOINT is the way to go. if there's no player in the zone, the scripts need not be active anyway.
I've never tried EVENT_ENTERZONE , but I can tell you without even trying it; EVENT_WAYPOINT is better because the script is checked with each grid movement, so long as there is a player in the zone.
I haven't seen any lag problems with this either.

Neiv 09-10-2008 01:03 AM

I could probably experiment till I figured it out, but what kind f script does the watcher have on him?


All times are GMT -4. The time now is 02:36 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.