View Single Post
12-24-09, 11:52 AM   #137
Katae
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 208
Originally Posted by Pixol View Post
Is it possible to create a script to remind us of a buff such as fort or inner fire? recently got rid of powerauras for raid because it was very cpu-intensive. So now I find myself mid-fight sometimes without my spellpower buffs
thank you
Sorry, didn't see your post till now.

Here's a quick buff check that will watch a specific buff and tell you if it's down. As a bonus, I added a 10 second countdown for when it's falling off.

Code:
{   name = "WatchBuff",
    anchor_to = "CENTER", anchor_from = "CENTER", y_off = 300,
    text = {
        string = function()
            local buff = "Inner Fire" -- name of watched buff
            local aura, time_left = UnitAura("player", buff)
            if aura then
                time_left = floor(select(7, UnitAura("player", buff)) - GetTime())
                if time_left <= 10 and time_left > 0 then
                    return format("%s is down in %s seconds", buff, time_left)
                end
            end
            if not aura or time_left <= 0 then
                return buff.." is down."
            end
        end,
        size = 10, color = "1 0.75 0", outline = 2,
    }
}

Last edited by Katae : 12-24-09 at 11:54 AM.
  Reply With Quote