1. #1

    Need help of LUA Code: Buff Monitor ((Effects like Power Aura))

    The following code is what i use to indicate buffs, same effect as Power Aura. Could anyone help me modify it? I want it to show effect only when specified buff stacks more than 1 time. Thanks a lot Hope my English works. haha

    PSF=CreateFrame("FRAME")
    PSF:RegisterEvent("UNIT_AURA");
    PSF:SetScript('OnEvent',function()

    o=0
    for i=1,40 do
    _,_,_,_,_,_,_,_,_,_,id=UnitAura("Player",i)
    if id==117828 then SpellActivationOverlay_ShowOverlay

    (SpellActivationOverlayFrame,117828,"TEXTURES\\SPELLACTIVATIONOVERLAYS\\molten_core.

    BLP","LEFT",1,255,255,255,false,false)
    o=1
    end
    end
    if o==0 then SpellActivationOverlay_HideOverlays(SpellActivationOverlayFrame,117828)
    end
    end)

  2. #2
    Deleted
    Did some cleanup and added what you wanted:
    Code:
    local PSF = CreateFrame("Frame")
    PSF:RegisterEvent("UNIT_AURA")
    PSF:SetScript("OnEvent",function()
        local hasBuff = false
        for i=1,40 do
            local _,_,_,count,_,_,_,_,_,_,spellID = UnitAura("player",i)
            if (spellID == 117828) and (count > 1) then
                hasBuff = true
                break
            end
        end
        if hasBuff then
            SpellActivationOverlay_ShowOverlay(SpellActivationOverlayFrame,117828,"TEXTURES\\SPELLACTIVATIONOVERLAYS\\molten_core.BLP","LEFT",1,255,255,255,false,false)
        else
            SpellActivationOverlay_HideOverlays(SpellActivationOverlayFrame,117828)
        end
    end)
    Last edited by mmocba105e19de; 2013-01-07 at 11:35 AM.

  3. #3
    Deleted
    think it should read
    Code:
    if (spellID == 117828) and (count > 1) then
    since treeston changed the name of the variable from id to spellID

  4. #4
    Deleted
    *sneakily edits*

    You saw nothing >.>

  5. #5
    Quote Originally Posted by Treeston View Post
    Did some cleanup and added what you wanted:
    Thank you!!! It's really a big help. And it also makes me realize how little i know to express my gratitude in English~ haha~

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •