Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 07-31-2009, 08:04 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

For numbers, you would use:

Code:
quest::settimer(1, 10);
...
if($timer == 10)
For strings, you would use:

Code:
quest::settimer("string", 10);
...
if($timer eq "string")
When you set a timer, you can set them to numbers or strings.

Since you have a number in a string, it should probably work the way you have it set, but you might want to try changing that up a bit to see if it makes a difference.

A good way to check if you have other issues is to try simplifying your timer. Try just setting the entire timer section to this, and work from there if the timer triggers this time:

Code:
sub EVENT_TIMER {
  if($timer eq "1"){
    quest::shout("Timer Triggered!");
  }
}
If that works, then you know the problem is something inside the timer itself.

Also, you probably don't want to check if a qglobal is defined and also check what it is equal to in the same if line. Instead, maybe break it up by doing this:
Code:
if(defined($qglobals{Night})) {
  if($qglobals{Night} == 1) {
I also noticed you didn't have the parenthesis for the define around the qglobal, so I added them to the example above.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
 


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 07:35 PM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3