Currently using the "default arena frame ui show trinket CD macro" Im forced to click 5 differenct macros everytime i relog or reload ui. How can I change this and turn it into a script so It runs everytime i log on?
Need help with scripts!
Started by Oaktane, Nov 21 2012 04:14 PM
7 replies to this topic
#1
Posted 21 November 2012 - 04:14 PM
#2
Posted 21 November 2012 - 04:17 PM
/run USS="UNIT_SPELLCAST_SUCCEEDED";OE="OnEvent";PvP="Interface\\Icons\\inv_jewelry_trinketpvp_01";F="Frame";CF=CreateFrame;BO="Border";PvPT="PvP Trinket";EMFH="Every Man for Himself";UC=UnitClass;AE="ArenaEnemyFrame"
/run function TrS(f,x,y,cd,T,s,h,n) f:SetPoint("LEFT",AE..n,"Right",x,y)f:SetSize(s,s)f.c=CF("Cooldown",cd)f.c:SetAllPoints(f)f.t=f:CreateTexture(nil,BO)f.t:SetAllPoints()f.t:SetTexture(T);if h then end f:RegisterEvent(USS) end
/run function Tr(f,cd,U,N,T)if(U==T and (N==PvPT or N==EMFH))then f:Show();CooldownFrame_SetTimer(cd,GetTime(),120,1) C=UC(T)end end
/run t1=CF(F);TrS(t1,0,0,"cd1",PvP,28,true,1);t2=CF(F);TrS(t2,0,0,"cd2",PvP,28,true,2);t3=CF(F)TrS(t3,0,0,"cd3",PvP,28,true,3)
/run t1:SetScript(OE,function(_,_,U,N)Tr(t1,cd1,U,N,"arena1")end);t2:SetScript(OE,function(_,_,U,N)Tr(t2,cd2,U,N,"arena2")end);t3:SetScript(OE,function(_,_,U,N)Tr(t3,cd3,U,N,"arena3")end)
This is what I'm using currently
/run function TrS(f,x,y,cd,T,s,h,n) f:SetPoint("LEFT",AE..n,"Right",x,y)f:SetSize(s,s)f.c=CF("Cooldown",cd)f.c:SetAllPoints(f)f.t=f:CreateTexture(nil,BO)f.t:SetAllPoints()f.t:SetTexture(T);if h then end f:RegisterEvent(USS) end
/run function Tr(f,cd,U,N,T)if(U==T and (N==PvPT or N==EMFH))then f:Show();CooldownFrame_SetTimer(cd,GetTime(),120,1) C=UC(T)end end
/run t1=CF(F);TrS(t1,0,0,"cd1",PvP,28,true,1);t2=CF(F);TrS(t2,0,0,"cd2",PvP,28,true,2);t3=CF(F)TrS(t3,0,0,"cd3",PvP,28,true,3)
/run t1:SetScript(OE,function(_,_,U,N)Tr(t1,cd1,U,N,"arena1")end);t2:SetScript(OE,function(_,_,U,N)Tr(t2,cd2,U,N,"arena2")end);t3:SetScript(OE,function(_,_,U,N)Tr(t3,cd3,U,N,"arena3")end)
This is what I'm using currently
#3
Posted 21 November 2012 - 04:24 PM
Just make a "ArenaTrinket.lua" put in the following lines and put it into "/Interface/AddOns/ArenaTrinket/":
and create an "ArenaTrinket.toc" and also put it in the folder with these contents:
should work
USS="UNIT_SPELLCAST_SUCCEEDED"
OE="OnEvent"
PvP="Interface\\Icons\\inv_jewelry_trinketpvp_01"
F="Frame"
CF=CreateFrame
BO="Border"
PvPT="PvP Trinket"
EMFH="Every Man for Himself"
UC=UnitClass
AE="ArenaEnemyFrame"
function TrS(f,x,y,cd,T,s,h,n)
f:SetPoint("LEFT",AE..n,"Right",x,y)
f:SetSize(s,s)f.c=CF("Cooldown",cd)
f.c:SetAllPoints(f)
f.t=f:CreateTexture(nil,BO)
f.t:SetAllPoints()
f.t:SetTexture(T)
if h
then
end
f:RegisterEvent(USS)
end
function Tr(f,cd,U,N,T)
if(U==T and (N==PvPT or N==EMFH))
then
f:Show()
CooldownFrame_SetTimer(cd,GetTime(),120,1)
C=UC(T)
end
end
t1=CF(F)
TrS(t1,0,0,"cd1",PvP,28,true,1)
t2=CF(F)
TrS(t2,0,0,"cd2",PvP,28,true,2)
t3=CF(F)
TrS(t3,0,0,"cd3",PvP,28,true,3)
t1:SetScript(OE,function(_,_,U,N)
Tr(t1,cd1,U,N,"arena1")end)
t2:SetScript(OE,function(_,_,U,N)
Tr(t2,cd2,U,N,"arena2")end)
t3:SetScript(OE,function(_,_,U,N)
Tr(t3,cd3,U,N,"arena3")end)
and create an "ArenaTrinket.toc" and also put it in the folder with these contents:
## Title: ArenaTrinket ## Interface: 50001 ArenaTrinket.lua(forgot about that - thanks to Thaya)
should work
Edited by Draakex, 21 November 2012 - 04:37 PM.

#4
Posted 21 November 2012 - 04:31 PM
Nah, you also need a .toc file in the folder.
Check the default UI scripts sticky - I've both provided a template and wrote how to make one yourself in the very start of the post.
Check the default UI scripts sticky - I've both provided a template and wrote how to make one yourself in the very start of the post.
Default UI Scripts - Compilation & how-to
#5
Posted 21 November 2012 - 04:41 PM
I'm currently testing it ill post in 5 minutes to see if everything is working
#6
Posted 21 November 2012 - 04:45 PM
Trying to make a .toc file but its not working
edit: would post screenshots but I need 10+ posts lol
edit: Fixed it, it is now a .toc file now testing the addon
edit: would post screenshots but I need 10+ posts lol
edit: Fixed it, it is now a .toc file now testing the addon
#7
Posted 21 November 2012 - 05:00 PM
Is there a script for this? I can't test my arena trinket addon without arena frames showing outside of arena
/run LoadAddOn("Blizzard_ArenaUI") ArenaEnemyFrames:Show() ArenaEnemyFrame1:Show() ArenaEnemyFrame2:Show() ArenaEnemyFrame3:Show() ArenaEnemyFrame1CastingBar:Show() ArenaEnemyFrame2CastingBar:Show() ArenaEnemyFrame3CastingBar:Show()
/run LoadAddOn("Blizzard_ArenaUI") ArenaEnemyFrames:Show() ArenaEnemyFrame1:Show() ArenaEnemyFrame2:Show() ArenaEnemyFrame3:Show() ArenaEnemyFrame1CastingBar:Show() ArenaEnemyFrame2CastingBar:Show() ArenaEnemyFrame3CastingBar:Show()
#8
Posted 21 November 2012 - 07:01 PM
You don't put the .lua code in the .toc file... there should be like 3 or 4 lines in the .toc file that just describe the addon (name, descr, interface ver, and a link to the .lua files to load). The code should be in a .lua file (linked in the toc).
It's all in the sticky. There's even a template download where you won't have to do anything but copy/paste things into the .lua file. Please read it.
It's all in the sticky. There's even a template download where you won't have to do anything but copy/paste things into the .lua file. Please read it.
Default UI Scripts - Compilation & how-to
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users















