Да блин, я то умею искать по ключевым словам, да только нету у меня такого)
PHP код:
local timer=0
local total=0
local frame = CreateFrame("FRAME", "ArenaCountDown")
frame:ClearAllPoints()
frame:SetHeight(1000)
frame:SetWidth(1000)
frame:RegisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL")
frame.text = frame:CreateFontString(nil, "BACKGROUND", "PVPInfoTextFont")
frame.text:SetAllPoints()
frame:SetPoint("CENTER", UIPARENT, "CENTER", 0, 0)
frame:SetAlpha(1)
function Fuark(self,elapsed)
if timer>0 then
timer = timer - elapsed
frame.text:SetText(ceil(timer))
if timer<=0 then
frame:Hide()
end
end
if (UnitAffectingCombat("player") or (select(2,GetInstanceInfo())~="arena" and select(2,GetInstanceInfo())~="pvp") or not UnitInBattleground("player")) and timer>0 then
frame:Hide()
timer=0
end
if timer>0 and timer<15 then
frame:Show()
end
end
CreateFrame("Frame", "FuarkFrame")
FuarkFrame:SetScript("OnUpdate", Fuark)
local function EventHandler(self, event, ...)
if select(2,GetInstanceInfo())=="arena" and (string.find(arg1,"Fifteen") or string.find(arg1,"Пятнадцать") or string.find(arg1,"15")) then
timer=15
frame:Hide()
end
if select(2,GetInstanceInfo())=="pvp" and string.find(arg1,"30") then
timer=30
frame:Hide()
end
end
frame:SetScript("OnEvent", EventHandler)