You don't need to declare an event based on a timer, you only need to put in your sub main the declaration of the timer and assign it a value
Code: Select all
/declare myhptimer timer
/varset myhptimer 2s
then you need to put in the macro an Event_Timer that will exec your code every time the myhptimer go to zero (it is a countdown to zero from the value you have set it, in this exemple 2 secs).
Code: Select all
Sub Event_Timer
/if @Param0=="myhptimer" {
/if n $char(hp,pct)<10 {
/call FiegnDeath
/varset myhptimer 2s
}
}
/return
The check on the Param0
is there because you can have more than a timer and you need to know which one have reached zero. Just remember to put
along your code, you will reach the event_timer only if and when you check for the events (with /doevents).
Hope this will help you.