Runes of Magic Wiki
Advertisement

Get the duration of a debuff in seconds from a unit from an ID number.

UnitDebuffLeftTime("unit",num)

Parameter[ | ]

unit
String - the UnitID (e.g. "target", "party1", "raid1", etc..)
num
Integer - the buff ID number.

Returns[ | ]

Duration
Integer - the duration of the debuff located at the ID number. Use number 1 to get the first debuff duration the unit has, use 2 to get the second debuff duration, and so on. Returns nil for unlimited-time debuffs such as Mind Control.

Example[ | ]

Print the duration and name of your debuff located at ID 1 to the Say channel.

SendChatMessage("My first debuff is " .. UnitDebuff("player",1) .. " and it lasts " .. UnitDebuffLeftTime("Player",1) .. " seconds.","SAY")
Advertisement