NPC unable to enter EVENT_TIMER
I am having trouble getting a spawned mob to enter into the EVENT_TIMER subroutine. The mob executes EVENT_SPAWN and sets timers to appropriate values, but does not ever enter into EVENT_TIMER. I would be grateful if someone could look over the code and give some advice.
Code:
#################################################################################################### |
i'm wondering if you are setting the timer correctly. I've seen them typically as quest::settimer("depop",10); and quest::stoptimer("depop"); and i'm not quite sure what you're doing here. do you have your npc qglobals enabled in the database?
one thing i've done to help me with debugging these scripts is to put quest:say("setting timer"); type of things everywhere and repop the npc and see what they say. Then you'll know how far your script is getting. Also, in your log files you will see perl errors in files with the name similar to eqemu_quest_zone_0222.log void QuestManager::settimer(const char *timer_name, int seconds) |
Yes, the mob is permitted to use qglobals.
I actually do the same as you when debugging; I just posted my non-debug file to keep things cleaner. Pertaining to settimer... All settimer ids represent time passed. Despawning, advertising time passed, and determining when to translocate, $timer controls, and is used in, them all. I do recognize that settimer wants a char for the id, and, in trying to determine if that was the problem, added "quest::settimer( 0, 0 );", which works in my other scripts, to the beginning of EVENT_SPAWN, which I know executes; still nothing happened. I'll see about enforcing a conversion to const char and report back with the results. |
It turns out that the const char requirement of settimer() was causing the issue.
Code:
quest::settimer( $timerID, $timerID ); # Does not work |
All times are GMT -4. The time now is 06:41 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.