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 03-16-2010, 08:03 PM
MNWatchdog
Hill Giant
 
Join Date: Feb 2006
Posts: 179
Default $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.
Reply With Quote
  #2  
Old 03-17-2010, 03:02 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

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.
Reply With Quote
  #3  
Old 03-17-2010, 03:17 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 03-17-2010, 06:10 AM
MNWatchdog
Hill Giant
 
Join Date: Feb 2006
Posts: 179
Default

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?
Reply With Quote
  #5  
Old 03-17-2010, 04:25 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 03-17-2010 at 04:30 PM..
Reply With Quote
  #6  
Old 03-18-2010, 01:30 AM
MNWatchdog
Hill Giant
 
Join Date: Feb 2006
Posts: 179
Default

Thanks man!
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 10:59 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3