Code:
-- Macro 7 --
/run ArenaEnemyFrame1:SetScale(1.3)
/run ArenaEnemyFrame2:SetScale(1.3)
/run ArenaEnemyFrame3:SetScale(1.3)
/run ArenaEnemyFrame4:SetScale(1.3)
/run ArenaEnemyFrame5:SetScale(1.3)
/run ArenaEnemyFrame5:SetPoint("topright", -390, -25)
-- Macro 8 --
/run rc=36;rfc=CooldownFrame_SetTimer;aef="ArenaEnemyFrame";hb="HealthBar";trt=GetItemIcon(37864)ctf = CreateFrame;oe="ARENA_OPPONENT_UPDATE"ve="PLAYER_ENTERING_WORLD"tr="RIGHT"LoadAddOn("Blizzard_ArenaUI")
/run hooksecurefunc(UFP,function(self) if self.p
-- Macro 9 --
/run function Cr(i)local f=ctf("Frame",nil,UIParent)f:SetPoint(tr,_G[aef..i..hb],tr,80,0)f:SetSize(rc,rc)f.t=f:CreateTexture(nil,"BORDER")f.t:SetAllPoints(true)f.t:SetTexture(trt)f.c=CreateFrame("Cooldown",nil,f)f.c:SetAllPoints(f)return f;end
-- Macro 10 --
/run function ur(f,i)f:SetScript("OnEvent",function(_,e,u,_,_,_,s)if(u=="arena"..i)then if(s==42292 or s==59752)then rfc(f.c,GetTime(),120,1)elseif(s==7744)then rfc(f.c,GetTime(),30,1)end end end)f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")end
-- Macro 11 --
/run for i=1,5 do _G["rf"..i]=Cr(i)local f=_G["rf"..i]ur(f,i)f:Hide()end function str(o,m)for i=1, m do local f=_G["rf"..i]if o then f:Show()else f:Hide()f.c:Hide()end end end
-- Macro 12 --
/run tk=ctf("Frame")tk:SetScript("OnEvent",function(_,e)if e==oe then str(1,GetNumArenaOpponents())else str(nil,5)end end)tk:RegisterEvent(oe)tk:RegisterEvent(ve)
-- Macro 13 --
/run ArenaEnemyFrame1:SetPoint("topright", -390, -25)
/run ArenaEnemyFrame2:SetPoint("topright", -390, -25)
/run ArenaEnemyFrame3:SetPoint("topright", -390, -25)
/run ArenaEnemyFrame4:SetPoint("topright", -390, -25)
Managed to move the frames, but they are not scaling, pvp trinket part is too advanced. Could anyone help me to rewrite CODE so its suitable for lua? Thanks in advance!!!