FANDOM


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

UnitBuffLeftTime("unit",num)

Parameter Edit

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

Returns Edit

Duration
Integer - the duration of the buff located at the ID number. Use number 1 to get the first buff duration the unit has, use 2 to get the second buff duration, and so on.

Example Edit

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

SendChatMessage("My first buff is " .. UnitBuff("player",1) .. " and it lasts " .. UnitBuffLeftTime("Player",1) .. " seconds.","SAY")

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.