• 0

    posted a message on Please I Need Help With Color Bar Code For WeakAuras
    What would have to change on this code for it to work for spell cooldowns that have no debuff or buff on the target? For instance Mind Blast and Shadow Word: Death are two spells that do not work for this code because it does not have a debuff or buff command for debuff_name. Anyone know what command would work for this?

    function(progress, r1, g1, b1, a1, r2, g2, b2, a2)
        -- Set the debuff and threshold time here:
        local debuff_name, warning_time = "Devouring Plague", 3
        local _,_,_,_,_,_,expires, etc = UnitDebuff("target", debuff_name, nil, "PLAYER|HARMFUL")
        if expires ~= nil then
            local time_left = expires - GetTime()
            if time_left < warning_time then
                return r2, g2, b2, a2
        return r1,g1,b1, a1

    And here's a YouTube video about the code on weakauras Happy new Year!
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.