Timers - Need an Example Please

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

reece
decaying skeleton
decaying skeleton
Posts: 8
Joined: Tue Oct 14, 2003 9:45 am

Timers - Need an Example Please

Post by reece » Wed Oct 15, 2003 7:33 am

Could anyone give me an example of how to use timers with the latest build? An example of how to set them and how to check for them to be expired would be very much appreciated.

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

Post by EqMule » Wed Oct 15, 2003 9:05 am

Code: Select all

Sub Main
/declare combinedonetimer timer
:clickcombine
/varset combinedonetimer 12
/click left pack 0 combine
:WaitCombine
/delay 0
/if n @combinedonetimer==0 /goto :clickcombine
/if $pack(0,empty)!=TRUE /goto :WaitCombine
/end
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.

[40oz]
a hill giant
a hill giant
Posts: 156
Joined: Tue Nov 12, 2002 12:14 pm

Post by [40oz] » Fri Oct 17, 2003 6:17 pm

Thankd EQmule

I was using code similar to this:

Code: Select all

/declare myTimer timer

/varset myTimer 100

:myLoop
/if n @myTimer<=0 /echo my code went here
/goto :myLoop
And it wasn't working right. I'll look around for other errors I might have made, but according to your example that should work.