View Single Post
  #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