RaidWatch 2

API / Timers

mod:Timer(time, text [, icon, optionName, default, color, endMessage])

This is the base constructor for creating a Timer object

Parameters
time
The duration that the timer bar should have
text
The text on the timer bar, this can be a spellID or plain text
icon
Icon texture, this can be the path to the texture or a spellID
default
Set the default state of this timer, if false then you need to go into the configuration for the encounter to turn it on.
optionName
This is the visible name of the option in the configuration for this Timer object. If not passed then the text parameter will be used for this instead.
color
Override the default color of the timer bar
endMessage
If set to true then a popup message will be shown when the timer ends.
Returns
return
Returns a timer object
Usage
-- Create a timer with a 10s duration and with the text, icon and option name from the spell ID 4536
-- It will be enabled by default and use the default color, and it will not show any message in the end
local tTimer = mod:Timer(10, 4536)

-- Create a timer with 15s duration and  with the text "This is a timer", icon will be "SomeIcon" 
-- and the text for the option in the config window will be "Some Timers". It will be disabled by default, 
-- have a red color and will show a message when it runs out.
local tTimer2 = mod:Timer(15, "This is a timer", "Interface\ICONS\SomeIcon", "Some Timers", false, {1, 0, 0, 1}, true)


mod:CDTimer(...)

mod:DurTimer(...)

mod:DurTargetTimer(...)

mod:DurTargetStackTimer(...)

mod:DurStackTimer(...)

mod:BerserkTimer(time, text, ...)

mod:CustomTimer(...)

You must login to post a comment. Don't have an account? Register to get one!