Jump to content

Default UI Scripts


  • This topic is locked This topic is locked
676 replies to this topic

#1 Kollektiv

Kollektiv
  • Premium Junkies
  • Curse Premium
  • Orcclass_name
  • US-Tichondrius
  • Bloodlust
  • Posts: 9
  • Talents: Elemental 1/1/2/2/0/2
  • RBG: 2508

Posted 13 June 2010 - 12:09 AM

*
POPULAR

Here are some "macros" you can use to modify the default UI. The feature macros are ones that should be in the default UI. Request an interesting macro and I'll probably make it.

Features
Multi macro features should only be pressed once each and in the order that they are listed. FPS may be affected.


Show buffs and debuffs on party frames
Positions debuffs to the right of each party frame. Buffs are displayed under each party frame. Be sure to adjust options in "Buffs and Debuffs" or they might not show up as you expect.

Original Code
for i=1,4 do
	local f = _G["PartyMemberFrame"..i]
	f:UnregisterEvent("UNIT_AURA")
	local g = CreateFrame("Frame")
	g:RegisterEvent("UNIT_AURA")
	g:SetScript("OnEvent",function(self,event,a1)
		if a1 == f.unit then
			RefreshDebuffs(f,a1,20,nil,1)
		else
			if a1 == f.unit.."pet" then
				PartyMemberFrame_RefreshPetDebuffs(f)
			end
		end
	end)
	local b = _G[f:GetName().."Debuff1"]
	b:ClearAllPoints()
	b:SetPoint("LEFT",f,"RIGHT",-7,5)
	for j=5,20 do
		local l = f:GetName().."Debuff"
		local n = l..j
		local c = CreateFrame("Frame",n,f,"PartyDebuffFrameTemplate")
		c:SetPoint("LEFT",_G[l..(j-1)],"RIGHT")
	end
end

for i=1,4 do
	local f = _G["PartyMemberFrame"..i]
	f:UnregisterEvent("UNIT_AURA")
	local g = CreateFrame("Frame")
	g:RegisterEvent("UNIT_AURA")
	g:SetScript("OnEvent",function(self,event,a1)
		if a1 == f.unit then
			RefreshBuffs(f,a1,20,nil,1)
		end
	end)
	for j=1,20 do
		local l = f:GetName().."Buff"
		local n = l..j
		local c = CreateFrame("Frame",n,f,"TargetBuffFrameTemplate")
		c:EnableMouse(false)
		if j == 1 then
			c:SetPoint("TOPLEFT",48,-32)
		else
			c:SetPoint("LEFT",_G[l..(j-1)],"RIGHT",1,0)
		end
	end
end

Condensed into 6 macros. This could probably be minimized into 4 macros but I wrote them as separate features.
/run V={ A="PartyMemberFrame", B="ClearAllPoints", C="PartyDebuffFrameTemplate", D=PartyMemberFrame_RefreshPetDebuffs, E=RefreshDebuffs }
/run for i=1,4 do local f,g=_G[V.A..i],CreateFrame("Frame");f:UnregisterEvent("UNIT_AURA");g:RegisterEvent("UNIT_AURA");g:SetScript("OnEvent",function(_,_,a) if a==f.unit then V.E(f,a,20,nil,1) else if a==f.unit.."pet" then V.D(f) end end end) end
/run for i=1,4 do local f,b,l,n,c;f=_G[V.A..i];b=_G[f:GetName().."Debuff1"];b[V.B](b);b:SetPoint("LEFT",f,"RIGHT",-7,5) for j=5,20 do l=f:GetName().."Debuff";n=l..j;c=CreateFrame("Frame",n,f,V.C);c:SetPoint("LEFT",_G[l..(j-1)],"RIGHT") end end
/run Z={A="PartyMemberFrame",B="UnregisterEvent",C=CreateFrame,D="RegisterEvent",E=RefreshBuffs,F="TargetBuffFrameTemplate",G="SetPoint",H="Buff",I="SetPoint",J="TOPLEFT",K="LEFT",L="RIGHT",M="EnableMouse",N="UNIT_AURA",O="Frame",P="OnEvent",R="GetName"}
/run function SD(f,j) local l,m,n,o;m=f[Z.R](f);l=m..Z.H;n=l..j;o=Z.C(Z.O,n,f,Z.F);o[Z.M](o,nil) if j==1 then o[Z.I](o,Z.J,48,-32); else o[Z.I](o,Z.K,_G[l..(j-1)],Z.L,1,0); end end
/run for i=1,4 do local f,g,m,n,o=_G[Z.A..i],Z.C(Z.O);f[Z.B](f,Z.N);g[Z.D](g,Z.N);g:SetScript(Z.P,function(_,_,a) if a==f.unit then Z.E(f,a,20,nil,1) end end) for j=1,20 do SD(f,j) end end

Show buffs and debuffs on raid frame group 1.
Make sure raid frame 1 exists before applying these macros. Set buffs to show on the frame. You might want to filter the buffs in the interface options.

Original Code
MAX_RAID_AURAS = 10
if RaidPullout1 then
	for i=1,5 do
		local b = _G["RaidPullout1Button"..i]
		local i = CreateFrame("Frame")
		i:RegisterEvent("UNIT_AURA")
		i:SetScript("OnEvent",function(_,_,a)
			if a==b.unit then RefreshAuras(b,a,10,"ZZ",nil,nil) end
		end)
		if b then
			local n = b:GetName().."Aura"
			local z = b:GetName().."ZZ"
			for j=1,10 do
				if j > 1 then
					local a = _G[n..j] or CreateFrame("Frame",n..j,b,"RaidAuraFrameTemplate")
					a:ClearAllPoints()
					a:SetPoint("LEFT",_G[n..(j-1)],"RIGHT")
				end

				local y = CreateFrame("Frame",z..j,b,"RaidAuraFrameTemplate")
				y:SetPoint("TOP",_G[n..j],"BOTTOM",0,-1)
			end
		end
	end
end

Condensed into 3 macros
/run MAX_RAID_AURAS=10 for i=1,5 do local b,a=_G["RaidPullout1Button"..i];n=b:GetName().."Aura" for j=2,10 do a=_G[n..j] or CreateFrame("Frame",n..j,b,"RaidAuraFrameTemplate");a:ClearAllPoints();a:SetPoint("LEFT",_G[n..(j-1)],"RIGHT") end end
/run J={ O="RaidPullout1Button", P=CreateFrame, Q="Frame", R="RaidAuraFrameTemplate", S=RefreshAuras, T="RegisterEvent", U="UNIT_AURA", A="SetScript", B="OnEvent", C="SetPoint", D="BOTTOM", E="TOP", F="GetName", G="Aura", }
/run for i=1,5 do local b,i,a,c,d,e=_G[J.O..i],J.P(J.Q);i[J.T](i,J.U);i[J.A](i,J.B,function(_,_,x) if x==b.unit then J.S(b,x,10,"Z",1,nil) end end) a=b[J.F](b);d,e=a..J.G,a.."Z";for j=1,10 do c=J.P(J.Q,e..j,b,J.R);c[J.C](c,J.E,_G[d..j],J.D,0,-2);end end

Change portraits to show class icons
/run UFP = "UnitFramePortrait_Update"; UICC = "Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Classes"; CIT = CLASS_ICON_TCOORDS
/run hooksecurefunc(UFP,function(self) if self.portrait then local t = CIT[select(2,UnitClass(self.unit))] if t then self.portrait:SetTexture(UICC) self.portrait:SetTexCoord(unpack(t)) end end end)

Misc

Move bottom left and right action bars
Change numbers to adjust positioning
/run MultiBarBottomLeft:ClearAllPoints();MultiBarBottomLeft:SetPoint("CENTER",0,0)
/run MultiBarBottomRight:ClearAllPoints();MultiBarBottomRight:SetPoint("CENTER",0,-100)

Hide art that are to the left and right of the main action bar
/run MainMenuBarLeftEndCap:Hide();MainMenuBarRightEndCap:Hide()


#2 massivez

massivez
  • Junkies
  • Gnomeclass_name
  • US-Kel'Thuzad
  • Nightfall
  • Posts: 436
  • Talents: Unholy
  • RBG: 384

Posted 13 June 2010 - 12:10 AM

first

#3 Arcasion

Arcasion
  • Members
  • Trollclass_name
  • US-Cho'gall
  • Rampage
  • Posts: 20
  • Talents: Arms

Posted 13 June 2010 - 12:13 AM

sex

+rep
Viva Cuba Libre

#4 Kubuss

Kubuss
  • Junkies
  • Blood Elfclass_name
  • EU-Agamaggan
  • Blackout
  • Posts: 2392
  • Talents: Fire

Posted 13 June 2010 - 12:13 AM

ah

#5 Ticked

Ticked
  • Members
  • Blood Elfclass_name
  • US-Illidan
  • Rampage
  • Posts: 894
  • Talents: Holy

Posted 13 June 2010 - 12:25 AM

Awesome. Thanks Kollektiv :D

#6 Deyzx

Deyzx
  • Junkies
  • Humanclass_name
  • US-Magtheridon
  • Ruin
  • Posts: 1106
  • Talents: Assassination 2/2/0/1/0/2
  • RBG: 384

Posted 13 June 2010 - 01:33 AM

thanks

#7 Philkes

Philkes
  • Members
  • Goblinclass_name
  • US-Burning Legion
  • Vindication
  • Posts: 226
  • Talents: Restoration

Posted 13 June 2010 - 02:30 AM

since when did you become so forum posty :)

#8 Bijan

Bijan
  • Members
  • Taurenclass_name
  • EU-Stormscale
  • Cyclone / Wirbelsturm
  • Posts: 116
  • Talents: Arms

Posted 13 June 2010 - 11:07 AM

+rep

#9 Demun

Demun
  • Junkies
  • Humanclass_name
  • EU-Frostmane
  • Misery
  • Posts: 71
  • Talents: Retribution 1/0/0/2/0/2/2
  • 2v2: 1769
  • RBG: 1501

Posted 13 June 2010 - 11:27 AM

Trying to use the raid pullout show buffs/debuffs but the FPS drop is unplayable and i have to /reloadui back to default, is there a work around so it dosent drop as much?

#10 Absolut

Absolut
  • Junkies
  • Posts: 718

Posted 13 June 2010 - 12:21 PM

If you want to toggle showing enemy totem nameplates mid-fight etc., Kollektiv found this:

Kollektiv said:

/run SetCVar('nameplateShowFriends',value)
/run SetCVar('nameplateShowFriendlyPets',value)
/run SetCVar('nameplateShowFriendlyGuardians',value)
/run SetCVar('nameplateShowFriendlyTotems',value)
/run SetCVar('nameplateShowEnemies',value)
/run SetCVar('nameplateShowEnemyPets',value)
/run SetCVar('nameplateShowEnemyGuardians',value)
/run SetCVar('nameplateShowEnemyTotems',value)
/run SetCVar('nameplateAllowOverlap',value)

Replace value with 1 (on) or 0 (off).

Wrathless Gladiator Bilian

#11 oogleboogle

oogleboogle
  • Members
  • Undeadclass_name
  • EU-Twisting Nether
  • Rampage / Saccage
  • Posts: 901
  • Talents: Destruction

Posted 13 June 2010 - 12:39 PM

How are you so good :(

#12 Bijan

Bijan
  • Members
  • Taurenclass_name
  • EU-Stormscale
  • Cyclone / Wirbelsturm
  • Posts: 116
  • Talents: Arms

Posted 13 June 2010 - 01:00 PM

Yo, been trying to move the casting bar with this script

Quote

/run TargetFrameSpellBar:ClearAllPoints() TargetFrameSpellBar:SetPoint("CENTER",UIParent,"CENTER",-1,-112)
But it resets like instantly, anyone know whats wrong or how to move your castbar?

#13 Dunc

Dunc
  • Junkies
  • Goblinclass_name
  • EU-Agamaggan
  • Blackout
  • Posts: 9700
  • Talents: Discipline
  • LocationEngland

Posted 13 June 2010 - 01:31 PM

the same happens to targetframe, read this post: http://www.arenajunk...29
that's all we'll have when the world is through

#14 Splinks

Splinks
  • Junkies
  • Humanclass_name
  • US-Kel'Thuzad
  • Nightfall
  • Posts: 127
  • Talents: Discipline 1/1/0/1/1/1/1
  • 2v2: 1145
  • 3v3: 1648
  • RBG: 384

Posted 13 June 2010 - 01:36 PM

there a way to reverse the icon one?

#15 Dunc

Dunc
  • Junkies
  • Goblinclass_name
  • EU-Agamaggan
  • Blackout
  • Posts: 9700
  • Talents: Discipline
  • LocationEngland

Posted 13 June 2010 - 01:49 PM

/reloadui apparently
that's all we'll have when the world is through

#16 Absolut

Absolut
  • Junkies
  • Posts: 718

Posted 13 June 2010 - 04:21 PM

I'll throw in my old one:

Quote

for i=1,3 do
  RegisterStateDriver(_G["PartyMemberFrame"..i], "visibility", "[target=raid4,exists] hide; [target=party"..i..",exists] show");
end

With Hide Party Interface in Raid enabled, you will have it correctly hidden in Raids, but still shown for 3v3.
Wrathless Gladiator Bilian

#17 nshzmoo

nshzmoo
  • Members
  • Taurenclass_name
  • EU-Jaedenar
  • Misery
  • Posts: 11
  • Talents: Restoration

Posted 13 June 2010 - 04:49 PM

i have a problem with the script for moving the buffs/debuffs.  LUA error appears ... can anyone assist?

#18 Pharaun

Pharaun
  • LocationSeattle, WA

Posted 13 June 2010 - 04:51 PM

Make sure you're entering everything exactly.

Also, copy/paste exactly what you're entering here, as well as the Lua error.
"Who, after all, is today speaking of the destruction of the Armenians?"

-Adolf Hitler, 1939

#19 nshzmoo

nshzmoo
  • Members
  • Taurenclass_name
  • EU-Jaedenar
  • Misery
  • Posts: 11
  • Talents: Restoration

Posted 13 June 2010 - 04:56 PM

/run V={ A="PartyMemberFrame", B="ClearAllPoints", C="PartyDebuffFrameTemplate", D=PartyMemberFrame_RefreshPetDebuffs, E=RefreshDebuffs }

/run for i=1,4 do local f,g=_G[V.A..i],CreateFrame("Frame");f:UnregisterEvent("UNIT_AURA");g:RegisterEvent("UNIT_AURA");g:SetScript("OnEvent",function(_,_,a) if a==f.unit then V.E(f,a,20,nil,1) else if a==f.unit.."pet" then V.D(f) end end end) end

/run for i=1,4 do local f,b,l,n,c;f=_G[V.A..i];b=_G[f:GetName().."Debuff1"];b[V.B](b);b:SetPoint("LEFT",f,"RIGHT",-7,5) for j=5,20 do l=f:GetName().."Debuff";n=l..j;c=CreateFrame("Frame",n,f,V.C);c:SetPoint("LEFT",_G[l..(j-1)],"RIGHT") end end

/run Z={A="PartyMemberFrame",B="UnregisterEvent",C=CreateFrame,D="RegisterEvent",E=RefreshBuffs,F="TargetBuffFrameTemplate",G="SetPoint",H="Buff",I="SetPoint",J="TOPLEFT",K="LEFT",L="RIGHT",M="EnableMouse"N="UNIT_AURA",O="Frame",P="OnEvent",R="GetName"}

/run function SD(f,j) local l,m,n,o;m=f[Z.R](f);l=m..Z.H;n=l..j;o=Z.C(Z.O,n,f,Z.F);o[Z.M](o,nil) if j==1 then o[Z.I](o,Z.J,48,-32); else o[Z.I](o,Z.K,_G[l..(j-1)],Z.L,1,0); end end

/run for i=1,4 do local f,g,m,n,o=_G[Z.A..i],Z.C(Z.O);f[Z.B](f,Z.N);g[Z.D](g,Z.N);g:SetScript(Z.P,function(_,_,a) if a==f.unit then Z.E(f,a,20,nil,1) end end) for j=1,20 do SD(f,j) end end
This is what i enter and
Message: [string "V={ A="PartyMemberFrame", B="ClearAllPoints", C="PartyDebuffFra..."]:1: ')' expected near '<eof>'

Time: 06/13/10 19:55:28

Count: 1

Stack: [C]: in function `RunScript'

Interface\FrameXML\ChatFrame.lua:1901: in function `value'

Interface\FrameXML\ChatFrame.lua:3577: in function `ChatEdit_ParseText'

Interface\FrameXML\ChatFrame.lua:3222: in function `ChatEdit_SendText'

Interface\FrameXML\ChatFrame.lua:3246: in function `ChatEdit_OnEnterPressed'

[string "*:OnEnterPressed"]:1: in function <[string "*:OnEnterPressed"]:1>


Locals: (*temporary) = "V={ A="PartyMemberFrame", B="ClearAllPoints", C="PartyDebuffFrameTemplate", D=PartyMemberFrame_RefreshPetDebuffs, E=RefreshDebuffs }/run for i=1,4 do local f,g=_G[V.A..i],CreateFrame("Frame");f:UnregisterEvent("UNIT_AURA");g:RegisterEvent("UNIT_AURA""
this is the error

#20 Pharaun

Pharaun
  • LocationSeattle, WA

Posted 13 June 2010 - 05:12 PM

Just to be absolutely clear, you're entering each one of those separately, correct?

What happens if you just enter

/run V={ A="PartyMemberFrame", B="ClearAllPoints", C="PartyDebuffFrameTemplate", D=PartyMemberFrame_RefreshPetDebuffs, E=RefreshDebuffs }

"Who, after all, is today speaking of the destruction of the Armenians?"

-Adolf Hitler, 1939




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

<