1. #1

    Question [WeakAuras] Move custom script to WA

    Hello my dear friends!

    I made a script that shows the status of autoattacks (on/off) and it works great. Now I want to move it to the WA, but I don’t know how. Need your help.

    Thank you!

    Code:
    local f = CreateFrame("Frame", nil, UIParent)
    
    f.str = f:CreateFontString(nil, "OVERLAY")
    f.str:SetFont(STANDARD_TEXT_FONT, 19, "OUTLINE")
    f.str:SetTextColor(1, 0.2, 0.2)
    f.str:SetText("ATTACK")
    f.str:SetPoint("TOP", PlayerAttackIcon, "CENTER", 0, -22)
    f:Hide()
    
    local function updateStatus()
        if PlayerFrame.inCombat then
            f:Show()
        else
            f:Hide()
        end
    end
    
    hooksecurefunc("PlayerFrame_UpdateStatus", updateStatus)
    Last edited by UIQuestioner; 2019-08-15 at 01:47 AM.

Posting Permissions

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