Hey,
i've been using WeakAauras for a long time to visualize how many Stacks of specific buff I currently got. But to keep my performance as high as possible I decided to write a script for that on my own.
My LUA knowledge isnt that high, so the following script is what came out of my plan.
local readysetaim1 = UIParent:CreateTexture(nil,"Overlay")
readysetaim1:SetHeight(25)
readysetaim1:SetWidth(25)
readysetaim1:SetPoint("CENTER",SpellActivationOverlayFrame,"CENTER", 0, -220)
readysetaim1:SetTexture("Interface\\ready1.blp")
local readysetaim2 = UIParent:CreateTexture(nil,"Overlay")
readysetaim2:SetHeight(25)
readysetaim2:SetWidth(25)
readysetaim2:SetPoint("CENTER",SpellActivationOverlayFrame,"CENTER", 0, -220)
readysetaim2:SetTexture("Interface\\ready2.blp")
local readysetaim = CreateFrame("FRAME")
readysetaim:RegisterEvent("UNIT_AURA")
readysetaim:SetScript("OnEvent", function(self, event, ...)
local unitid = ... if unitid ~= "player" then return end
local mm={UnitBuff("player","Ready, Set, Aim...")}
if UnitBuff("player", "Ready, Set, Aim...") and mm[4]==1 thenreadysetaim1:Show()
else if UnitBuff("player", "Ready, Set, Aim...") and mm[4]==2 then
readysetaim1:Hide()
readysetaim2:Show()
else
readysetaim1:Hide()
readysetaim2:Hide()
end
end
end)
It just creates two different Textures which I created with Photoshop. These are only shown if I either got one or two stacks of "Ready, Set, Aim..."
Screenshot:
http://i.imgur.com/hNyFOtN.jpg
My question now is if its possible to make this any less performance-heavy or if its "okay" the way i made it. Actually it just needs to show the number of stacks like "1" or "2". So is it even necessary to use a texture?
greetings and first of all thanks for any help!