$combat_state not being set unless...
$combat_state not being set unless you have a COMBAT_EVENT subroutine.
Without at least: sub EVENT_COMBAT { } $combat_state doesn't get set to any value whatsoever. I wanted to check combat status during a timer event, which is how I discovered this. |
Just like any other event specific variable it is only exported for the event in question. Not really a bug; just how it works.
And the reason it works that way is there would be no way to export variables for events that don't trigger as we wouldn't know what the values were. Using these variables outside of the events they're called will cause undefined behavior. |
If you want to check if they are in combat, you can either use $npc->IsEngaged() or use the hatelist iterator from the example files in the /utils/examples/ folder.
|
Thanks for the info. Will fix my script.
Travius, where can I find a list of all these $npc as well as all other quest usable variables? |
Quest objects are here:
http://www.eqemulator.net/wiki/wikka...a=QuestObjects Normal quest commands are here: http://www.eqemulator.net/wiki/wikka...=QuestTutorial The wiki has tons of great info if you know where to look or do searches for it. The example list iterations can be found here as well: http://code.google.com/p/projecteqem...stIteration.pl I went ahead and added a page to the wiki for the List Iteration Examples. You can now get to it from the main quests page here: http://www.eqemulator.net/wiki/wikka...CategoryQuests |
Thanks man!
|
All times are GMT -4. The time now is 01:49 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.