Timer Help

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

blakbelt
a lesser mummy
a lesser mummy
Posts: 70
Joined: Wed Aug 27, 2003 12:40 pm
Location: Scotland UK

Timer Help

Post by blakbelt » Tue Oct 14, 2003 6:46 pm

Have never used a timer before and have a question concerning them.

using the following code, will this target the add mez it then wait for 35 secs and then re-mez it:

Code: Select all

/Sub Do-add
  /assist @MasterName
  /target notid $target(id)
  /call SpellSub "Rapture"
  /varset MezTimer 0                | is this counted in seconds??
  /goto :Mezzed
  /if n @IsMezzed==1 /tell @MasterName $target(name) has been Mezzed
  /goto :Re-Mez
/return


:Mezzed
  /varset IsMezzed 1
/return

:Re-Mez 
  /if @MezTimer==35 /call SpellSub "Rapture"
  /varset MezTimer 0
/return
Thanks
Blakbelt

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Tue Oct 14, 2003 11:35 pm

No, and for a number of reasons other than timers.

Timers count down and they stop at zero. Timer ticks are in tenths of a second. You can use an 's' or an 'm' for seconds or minutes when you set them.

blakbelt
a lesser mummy
a lesser mummy
Posts: 70
Joined: Wed Aug 27, 2003 12:40 pm
Location: Scotland UK

Post by blakbelt » Wed Oct 15, 2003 2:07 am

Excellent thanks :)
Blakbelt