Jump to content

DR tracker script


  • Please log in to reply
No replies to this topic

#1 Tranquilizer

Tranquilizer
  • Members
  • Night Elfclass_name
  • US-Spinebreaker
  • Rampage
  • Posts: 133
  • Talents: Discipline

Posted 26 September 2013 - 03:23 AM

I used to use Adrenaline UI sometime last year for scripts but I haven't played in a while. Looks like Firebug stopped updating the Addon. I still have some parts of it, but it isn't working completely. Can anyone tell me whats wrong, or what I need to update to get it working? Thanks

--#############################--
--[[
DR Tracker
DRX = x position
DRS = icon size

DRt={{DRLIST1},{DRLIST2},{DRLIST3}...}
DEFAULT : DRt={{fear},{polymhorpe}}

-- show frame in left of arena enemyframe
DRX : set minus value(ex DRX : -120)
dp : "LEFT"
and insert in macro 5
DRX+(r-1) -> DRX-(r-1)
----- MACRO -----
/run DRT={{5782,8122,5484,20511,2094,113792,111397},{118,28272,28271,61305,61721,61780,82691,108482,51514}}
/run DRX=140 DRS=0.6 DRP="RIGHT"CF=CreateFrame e00="PLAYER_ENTERING_WORLD"e03="ARENA_OPPONENT_UPDATE"e04="COMBAT_LOG_EVENT_UNFILTERED"LoadAddOn("Blizzard_ArenaUI")function gAEF(i)return _G["ArenaEnemyFrame"..i.."HealthBar"]end
/run function rDR(f)f.e=1 f.t:SetTexture(nil)f.c:Hide()end function sDR(f)f.e=f.e+1 f.c:Show()end function gDRT(i,j)return _G["DRT"..i..":"..j]end function runDR(f,n)CooldownFrame_SetTimer(f.c,GetTime(),18,1)eDR(f,n)sDR(f)oDR(n)end
/run function eDR(f,n)local t=1 f:SetScript("OnUpdate",function(s,e)t=t+e if(t>=18)then f:SetScript("OnUpdate",nil)rDR(f)oDR(n)end end)end function cDR(f,n,s)if f.e<4 then local _,_,t=GetSpellInfo(s)f.t:SetTexture(t)runDR(f,n)end end
/run function oDR(i)local r=1 for j in ipairs(DRT)do local f=gDRT(i,j)f:SetPoint(DRP,gAEF(i),DRP,DRX+(r-1)*50,0)r=r+1 end end function uDR(n,s)for i,t in ipairs(DRT)do for _,j in ipairs(t)do if s==j then cDR(gDRT(n,i),n,s)end end end end
/run function cDRF(i,j)local f=CF("Frame",nil,gAEF(i))f:SetSize(36,36)f:SetScale(DRS)f.t=f:CreateTexture(nil,"BORDER")f.t:SetAllPoints(true)f.c=CF("Cooldown",nil,f)f.c:SetAllPoints(f)f.e=1 return f end
/run function CLDR(_,e,_,_,_,_,_,d,_,_,_,s)if(e=="SPELL_AURA_REMOVED" or e=="SPELL_AURA_REFRESH")then for i=1,5 do local ag=UnitGUID("arena"..i)if(ag ~= nil and d==ag)then uDR(i,s)end end end end
/run function iDRT(o,m)for i=1,m do for j in ipairs(DRT)do local f=gDRT(i,j)if o then f:Show()else rDR(f)end end end end for i=1,5 do for j in ipairs(DRT)do _G["DRT"..i..":"..j]=cDRF(i,j)end end
/run DRF=CreateFrame("Frame")DRF:SetScript("OnEvent",function(_,e,...)if e==e04 then CLDR(...)elseif e==e03 then iDRT(1,GetNumArenaOpponents())else iDRT(nil,5)end end)DRF:RegisterEvent(e00)DRF:RegisterEvent(e03)DRF:RegisterEvent(e04)
-----------------
]]--
--#############################--
DRT={
{5782,8122,5484,20511,2094,113792,118699}, -- FEAR
{118,28272,28271,61305,61721,61780,82691,108482,51514}, -- polymhorpe
}
----------------------------------------------:: 1
DRX=160
DRS=0.6
DRP="RIGHT"
CF=CreateFrame
e00="PLAYER_ENTERING_WORLD"
e03="ARENA_OPPONENT_UPDATE"
e04="COMBAT_LOG_EVENT_UNFILTERED"
LoadAddOn("Blizzard_ArenaUI")
function gAEF(i)return _G["ArenaEnemyFrame"..i.."HealthBar"]end
----------------------------------------------:: 2
function rDR(f)
f.e=1
f.t:SetTexture(nil)
f.c:Hide()
end
function sDR(f)
f.e=f.e+1
f.c:Show()
end
function gDRT(i,j)
return _G["DRT"..i..":"..j]
end
function runDR(f,n)
CooldownFrame_SetTimer(f.c,GetTime(),18,1)
eDR(f,n)
sDR(f)	
oDR(n)
end
----------------------------------------------:: 3
function eDR(f,n)
local t=1
f:SetScript("OnUpdate",
function(s,e)
t=t+e
if(t>=18)then
f:SetScript("OnUpdate",nil)
rDR(f)
oDR(n)
end
end)
end
function cDR(f,n,s)
if f.e<4 then
local _,_,t=GetSpellInfo(s)
f.t:SetTexture(t)
runDR(f,n)
end
end
----------------------------------------------:: 4
function oDR(i)
local r=1
for j in ipairs(DRT)do
local f=gDRT(i,j)
f:SetPoint(DRP,gAEF(i),DRP,DRX+(r-1)*50,0)
r=r+1
end
end
function uDR(n,s)
for i,t in ipairs(DRT)do
for _,j in ipairs(t)do
if s==j then
cDR(gDRT(n,i),n,s)
end
end
end
end
----------------------------------------------:: 5
function cDRF(i,j)
local f=CF("Frame",nil,gAEF(i))
f:SetSize(36,36)
f:SetScale(DRS)
f.t=f:CreateTexture(nil,"BORDER")
f.t:SetAllPoints(true)
f.c=CF("Cooldown",nil,f)
f.c:SetAllPoints(f)
f.e=1
return f
end
----------------------------------------------:: 6
function CLDR(_,e,_,_,_,_,_,d,_,_,_,s)
if(e=="SPELL_AURA_REMOVED" or e=="SPELL_AURA_REFRESH")then
for i=1,5 do
local ag=UnitGUID("arena"..i)
if(ag ~= nil and d==ag)then
uDR(i,s)
end
end
end
end
----------------------------------------------:: 7
function iDRT(o,m)
for i=1,m do
for j in ipairs(DRT)do
local f=gDRT(i,j)
if o then
f:Show()
else
rDR(f)
end
end
end
end
for i=1,5 do
for j in ipairs(DRT)do
_G["DRT"..i..":"..j]=cDRF(i,j)
end
end
----------------------------------------------:: 8
DRF=CreateFrame("Frame")
DRF:SetScript("OnEvent",
function(_,e,...)
if e==e04 then
CLDR(...)
elseif e==e03 then
iDRT(1,GetNumArenaOpponents())
else
iDRT(nil,5)
end
end)
DRF:RegisterEvent(e00)
DRF:RegisterEvent(e03)
DRF:RegisterEvent(e04)
----------------------------------------------:: 9





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

<