Jump to content

Photo

Default UI Scripts


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

#661 Gee19

Gee19
  • Junkies
  • Undeadclass_name
  • US-Shattered Hand
  • Ruin
  • Posts: 46
  • Talents: Shadow 0/1/0/1/2/2
  • 2v2: 2233
  • 3v3: 2423
  • 5v5: 2438
  • RBG: 960

Posted 12 April 2012 - 06:08 PM

----------------------------------------------------------------------------------------------------
--PartyTrinkets--
----------------------------------------------------------------------------------------------------
local trinkets = {}
local events = CreateFrame("Frame")            
local partyFrame, trinket
    for i = 1, MAX_PARTY_MEMBERS do
        partyFrame = "PartyMemberFrame"..i
        trinket = CreateFrame("Cooldown", partyFrame.."Trinket")
        trinket:SetPoint("TOPRIGHT", partyFrame, 30, -6)
        trinket:SetSize(24, 24)
        trinket.icon = trinket:CreateTexture(nil, "BACKGROUND")
        trinket.icon:SetAllPoints()
        trinket.icon:SetTexture("Interface\\Icons\\inv_jewelry_trinketpvp_02")
        trinket:Hide()
        trinkets["party"..i] = trinket
    end
function events:UNIT_SPELLCAST_SUCCEEDED(unitID, spell, rank, lineID, spellID)
    if not trinkets[unitID] then
        return
    end
    if spellID == 59752 or spellID == 42292 then
        CooldownFrame_SetTimer(trinkets[unitID], GetTime(), 120, 1)        
    elseif spellID == 7744 then
        CooldownFrame_SetTimer(trinkets[unitID], GetTime(), 45, 1)        
    end
end
function events:PLAYER_ENTERING_WORLD()
        local _, instanceType = IsInInstance()
             if instanceType == "arena" then
                 self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
             elseif instanceType == "none" then
                 self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
             elseif self:IsEventRegistered("UNIT_SPELLCAST_SUCCEEDED") then
                 self:UnregisterEvent("UNIT_SPELLCAST_SUCCEEDED")          
             for _, trinket in pairs(trinkets) do
                 trinket:SetCooldown(0, 0)
                 trinket:Hide()
             end  
        end  
end
events:SetScript("OnEvent", function(self, event, ...) return self[event](self, ...) end)
events:RegisterEvent("PLAYER_ENTERING_WORLD")


How would you make this work for the blizzard raid frames?
  • 0

#662 Phorplai

Phorplai
  • Members
  • Posts: 5

Posted 14 April 2012 - 01:02 AM

Navariumx, Thank you for your post. I love the way this UI feels and looks. I do have a few issues I would like to work out though. All of the macros work for me until I get to the ones below. I do the first one, then I get an error from the second one.

Scales the arena frames, set ArenaFrame1 through 3 in position, repositions their casting bar, set THAT up to scale, HIDE the names, CHANGES THE TEXTURES AND MAKES THE CASTINGBARS' COLOR BLUE *saves breaths* ... jesus.

/run for i=1,MAX_ARENA_ENEMIES do _G["ArenaEnemyFrame"..i]:SetPoint("CENTER",-860+i*180,-300)_G["ArenaEnemyFrame"..i.."Name"]:Hide()_G["ArenaEnemyFrame"..i.."Texture"]:SetVertexColor(.05,.05,.05)_G["ArenaEnemyFrame"..i.."CastingBar"]:SetScale(1.5)end
/run for i=1,MAX_ARENA_ENEMIES do _G["ArenaEnemyFrame"..i.."CastingBar"]:SetStatusBarColor(0,0.45,0.9)_G["ArenaEnemyFrame"..i]:SetScale(1.6)G["ArenaEnemyFrame"..i.."CastingBar"]:SetPoint("RIGHT",-10,30)_G["ArenaEnemyFrame"..i]:ClearAllPoints()end


Message: [string "for i=1,MAX_ARENA_ENEMIES do _G["ArenaEnemy..."]:1: attempt to index global 'G' (a nil value)
Time: 04/13/12 19:49:29
Count: 1
Stack: [string "for i=1,MAX_ARENA_ENEMIES do _G["ArenaEnemy..."]:1: in main chunk
[C]: in function `RunScript'
Interface\FrameXML\ChatFrame.lua:2118: in function `?'
Interface\FrameXML\ChatFrame.lua:4293: in function `ChatEdit_ParseText'
Interface\FrameXML\ChatFrame.lua:3992: in function `ChatEdit_SendText'
Interface\FrameXML\ChatFrame.lua:2704: in function <Interface\FrameXML\ChatFrame.lua:2697>
[C]: in function `UseAction'
Interface\FrameXML\SecureTemplates.lua:275: in function `handler'
Interface\FrameXML\SecureTemplates.lua:561: in function <Interface\FrameXML\SecureTemplates.lua:509>

Locals: (for index) = 1
(for limit) = 5
(for step) = 1
i = 1
(*temporary) = nil
(*temporary) = "ArenaEnemyFrame1CastingBar"
(*temporary) = "1"
(*temporary) = "CastingBar"
(*temporary) = 0.9
(*temporary) = "attempt to index global 'G' (a nil value)"

Not sure what is causing it. I used a script to better show the issue in the SS below. I don't know much about scripts except how to copy/paste and change x/y variables. :\

/run LoadAddOn("Blizzard_ArenaUI")
/run ArenaEnemyFrames:Show(); ArenaEnemyFrame1:Show(); ArenaEnemyFrame2:Show(); ArenaEnemyFrame3:Show();ArenaEnemyFrame1CastingBar:Show();ArenaEnemyFrame2CastingBar:Show();ArenaEnemyFrame3CastingBar:Show()

Before http://postimage.org/image/8u0jy02l7/
After http://postimage.org/image/ey0g7esp3/
  • 0

#663 yeahno

yeahno
  • Members
  • Undeadclass_name
  • EU-Blackrock
  • Glutsturm / Emberstorm
  • Posts: 72
  • Talents: Subtlety 1/2/0/1/0/0

Posted 14 April 2012 - 08:03 AM

was there a solution for having default arena frame healthbars classcolored? i think clayz was aking for this some time ago.
  • 0

#664 Thaya

Thaya
  • Moderators
  • Humanclass_name
  • EU-Silvermoon
  • Cyclone / Wirbelsturm
  • Posts: 4,275
  • Talents: Destruction 0/2/0/1/0/0/0
  • 2v2: 1338
  • LocationRussia

Posted 14 April 2012 - 01:50 PM

was there a solution for having default arena frame healthbars classcolored? i think clayz was aking for this some time ago.

-- Class color in hp bars

local function colour(statusbar, unit)
	local _, class, c
	if UnitIsPlayer(unit) and UnitIsConnected(unit) and unit == statusbar.unit and UnitClass(unit) then
		_, class = UnitClass(unit)
		c = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
		statusbar:SetStatusBarColor(c.r, c.g, c.b)
		PlayerFrameHealthBar:SetStatusBarColor(0,1,0)
	end
end

hooksecurefunc("UnitFrameHealthBar_Update", colour)
hooksecurefunc("HealthBar_OnValueChanged", function(self)
	colour(self, self.unit)
end)

  • 1
Default UI Scripts - Compilation & how-to

#665 Navariumx

Navariumx
  • Junkies
  • Blood Elfclass_name
  • EU-Skullcrusher
  • Cyclone / Wirbelsturm
  • Posts: 625
  • Talents: Retribution
  • RBG: 1775
  • LocationDenmark

Posted 14 April 2012 - 02:13 PM

Navariumx, Thank you for your post. I love the way this UI feels and looks. I do have a few issues I would like to work out though. All of the macros work for me until I get to the ones below. I do the first one, then I get an error from the second one.



Message: [string "for i=1,MAX_ARENA_ENEMIES do _G["ArenaEnemy..."]:1: attempt to index global 'G' (a nil value)
Time: 04/13/12 19:49:29
Count: 1
Stack: [string "for i=1,MAX_ARENA_ENEMIES do _G["ArenaEnemy..."]:1: in main chunk
[C]: in function `RunScript'
Interface\FrameXML\ChatFrame.lua:2118: in function `?'
Interface\FrameXML\ChatFrame.lua:4293: in function `ChatEdit_ParseText'
Interface\FrameXML\ChatFrame.lua:3992: in function `ChatEdit_SendText'
Interface\FrameXML\ChatFrame.lua:2704: in function <Interface\FrameXML\ChatFrame.lua:2697>
[C]: in function `UseAction'
Interface\FrameXML\SecureTemplates.lua:275: in function `handler'
Interface\FrameXML\SecureTemplates.lua:561: in function <Interface\FrameXML\SecureTemplates.lua:509>

Locals: (for index) = 1
(for limit) = 5
(for step) = 1
i = 1
(*temporary) = nil
(*temporary) = "ArenaEnemyFrame1CastingBar"
(*temporary) = "1"
(*temporary) = "CastingBar"
(*temporary) = 0.9
(*temporary) = "attempt to index global 'G' (a nil value)"

Not sure what is causing it. I used a script to better show the issue in the SS below. I don't know much about scripts except how to copy/paste and change x/y variables. :\

/run LoadAddOn("Blizzard_ArenaUI")
/run ArenaEnemyFrames:Show(); ArenaEnemyFrame1:Show(); ArenaEnemyFrame2:Show(); ArenaEnemyFrame3:Show();ArenaEnemyFrame1CastingBar:Show();ArenaEnemyFrame2CastingBar:Show();ArenaEnemyFrame3CastingBar:Show()

Before http://postimage.org/image/8u0jy02l7/
After http://postimage.org/image/ey0g7esp3/

I've made a copy/paste error, there's missing a _ before one of the G's in the macro. =) Sorry!

/run for i=1,MAX_ARENA_ENEMIES do _G["ArenaEnemyFrame"..i]:SetPoint("CENTER",-860+i*180,-300)_G["ArenaEnemyFrame"..i.."Name"]:Hide()_G["ArenaEnemyFrame"..i.."Texture"]:SetVertexColor(.05,.05,.05)_G["ArenaEnemyFrame"..i.."CastingBar"]:SetScale(1.5)end
/run for i=1,MAX_ARENA_ENEMIES do _G["ArenaEnemyFrame"..i.."CastingBar"]:SetStatusBarColor(0,0.45,0.9)_G["ArenaEnemyFrame"..i]:SetScale(1.6)_G["ArenaEnemyFrame"..i.."CastingBar"]:SetPoint("RIGHT",-10,30)_G["ArenaEnemyFrame"..i]:ClearAllPoints()end

Use these and it should work =)
  • 0

I think you guys need to realize that shamans are not the problem, and are probably less powerful than you think.


#666 Cyberowl

Cyberowl
  • Members
  • Posts: 9

Posted 15 April 2012 - 07:24 PM

Is it an addon- which shows Innervate, AMS, Cloak or Cyclone, Roots et cetera in the potrait or is it an extra add on?

Link or the script would be very appreciated :)
  • 0

#667 iBurley

iBurley
  • Members
  • Posts: 7

Posted 16 April 2012 - 01:08 AM

This has probably been asked somewhere before, but I can't seem to find it in my scanning of this thread. Now, I want to make one of these UI macros to move my self and target frames to where I like them, and I have it set up now exactly where I like just by unlocking them and dragging them around to a grid using the addon "Align". Now, I know the code to move these frames, but I have no idea what the exact coordinates are that I like my frames at. Is there any way to sort of see what coordinate you have things set at?

I could easily just install Align every time I make a new character and do this, but when I'm at a lan party at a local gaming place, I'd like to have the macro on my account so that I can change it on the fly.

Here's a screenshot of where I like them, this is with "Align 32" turned on, if anybody knows how to tell what coordinate it is. http://i.imgur.com/xlyH5.jpg

Also, I only chose there because of the cast bar, to make it easy to see when I'm dying while staring at my action bars/cast bar. So really, even if it's not exact, if anybody knows the right coordinated to place them on either side of the cast bar with a decent padding between them and it, they'll work. It doesn't have to be exactly where I have them.

Thanks guys! Hope somebody knows how to help, not super sure if there's any way to do this without just throwing in random numbers until it's where you wanted it.

P.S. Anybody else thing Blizzard should put a trinket timer on the stock arena frames? It puts me at such a disadvantage against people using Gladius when I can't really use addons with what I do.
  • 0

#668 Thaya

Thaya
  • Moderators
  • Humanclass_name
  • EU-Silvermoon
  • Cyclone / Wirbelsturm
  • Posts: 4,275
  • Talents: Destruction 0/2/0/1/0/0/0
  • 2v2: 1338
  • LocationRussia

Posted 16 April 2012 - 01:34 AM

You can use /fstack to get an approximate location, then experiment with your script until you're happy. I don't really understand why would you need that though if the game saves your unit frame positions anyway.

As for the trinket timers, just check the last few pages. It was posted several times very recently.
  • 0
Default UI Scripts - Compilation & how-to

#669 kylol

kylol
  • Members
  • Undeadclass_name
  • US-Burning Blade
  • Vindication
  • Posts: 3
  • Talents: Subtlety
  • RBG: 960

Posted 16 April 2012 - 05:59 AM

there a script to change texture of castbar/nameplates or default raid frames?
  • 0

#670 Navariumx

Navariumx
  • Junkies
  • Blood Elfclass_name
  • EU-Skullcrusher
  • Cyclone / Wirbelsturm
  • Posts: 625
  • Talents: Retribution
  • RBG: 1775
  • LocationDenmark

Posted 17 April 2012 - 12:49 AM

Don't think it's possible with nameplate texture via scripts, raid frames maybe, but haven't had too much luck myself.

This will change the texture of the player's castingbar to that of LortiUI (search google pics):

/run CastingBarFrameBorder:SetVertexColor(.05,.05,.05)

.05, .05, and .05 is corresponding red, blue and green, change to your liking =)

Edited by Navariumx, 17 April 2012 - 12:50 AM.

  • 0

I think you guys need to realize that shamans are not the problem, and are probably less powerful than you think.


#671 Thaya

Thaya
  • Moderators
  • Humanclass_name
  • EU-Silvermoon
  • Cyclone / Wirbelsturm
  • Posts: 4,275
  • Talents: Destruction 0/2/0/1/0/0/0
  • 2v2: 1338
  • LocationRussia

Posted 17 April 2012 - 06:46 AM

Icon Diminishing return tracker for Cheap Shot, Kidney Shot, Gouge and Sap. First script I've made. :P

Posted Image

/run USD="UNIT_SPELLCAST_SUCCEEDED";OT="OnEvent";FR="Frame";RF=CreateFrame;RD="Border";UE=UnitName
/run CS=RF(FR) CS.c=RF("Cooldown","CST",CS.t) CS:RegisterEvent(USD) 
/run CS.c:SetAllPoints(CS) CS:SetPoint("TOPRIGHT",PlayerFrame,-2,8)CS:SetSize(22,22)CS.t=CS:CreateTexture(nil,RD)CS.t:SetAllPoints()CS.t:SetTexture("Interface\\Icons\\ability_cheapshot")
/run CS:SetScript(OT,function(self,event,...) if UE(select(1,...))==UE("player") and select(5,...)==1833 then CST:SetCooldown(GetTime(), 23)end if UE(select(1,...))==UE("player") and select(5,...)==408 then CST:SetCooldown(GetTime(), 25) end end)
/run SP=RF(FR) SP.c=RF("Cooldown","SAP",SP.t) SP:RegisterEvent(USD) 
/run SP.c:SetAllPoints(SP) SP:SetPoint("TOPRIGHT",PlayerFrame,-25,8)SP:SetSize(22,22)SP.t=SP:CreateTexture(nil,RD)SP.t:SetAllPoints()SP.t:SetTexture("Interface\\Icons\\ability_sap")
/run SP:SetScript(OT,function(self,event,...) if UE(select(1,...))==UE("player") and select(5,...)==6770 then SAP:SetCooldown(GetTime(), 27)end if UE(select(1,...))==UE("player") and select(5,...)==1776 then SAP:SetCooldown(GetTime(), 23) end end)

Mmm I didn't try this myself but what exactly does this track? DRs on yourself from those spells (from enemy rogues)? And why do you set 23 and 25sec cooldowns when DRs are 15?
  • 0
Default UI Scripts - Compilation & how-to

#672 darthvedar

darthvedar
  • Members
  • Posts: 9

Posted 17 April 2012 - 10:20 PM

Ah, yes, of course!

This macro HAS to be run first.

/run CCC=CUSTOM_CLASS_COLORS;RCC=RAID_CLASS_COLORS;UIP=UnitIsPlayer;UIC=UnitIsConnected;UC=UnitClass;hs=hooksecurefunc;UFH="UnitFrameHealthBar_Update";HBO="HealthBar_OnValueChanged";u=unit;c=class;PN=PetName

/run local function colour(statusbar,u)local _,c,c if UIP(u)and UIC(u)and u == statusbar.unit and UC(u)then _,c=UC(u)c=CCC and CCC[c]or RCC[c]statusbar:SetStatusBarColor(c.r,c.g,c.b)end end;hs(UFH,colour)hs(HBO,function(self)colour(self,self.unit)end)


Has to be pressed inside arena:
/run for i=1,MAX_ARENA_ENEMIES do _G["ArenaEnemyFrame"..i.."CastingBar"]:SetStatusBarColor(0,0.45,0.9)

/run for i,v in pairs({CastingBarFrame,FocusFrameSpellBar,TargetFrameSpellBar})do v:SetStatusBarColor(0,0.45,0.9)end

Sorry that I write just now ... No reaction to the macro does not :( :( :(
  • 0

#673 Navariumx

Navariumx
  • Junkies
  • Blood Elfclass_name
  • EU-Skullcrusher
  • Cyclone / Wirbelsturm
  • Posts: 625
  • Talents: Retribution
  • RBG: 1775
  • LocationDenmark

Posted 17 April 2012 - 10:32 PM

Can you elaborate? Which ones aren't working for you?
  • 0

I think you guys need to realize that shamans are not the problem, and are probably less powerful than you think.


#674 darthvedar

darthvedar
  • Members
  • Posts: 9

Posted 18 April 2012 - 12:02 AM

Simply, if you use the macro, nothing happens. Is it possible that the problem may be in RU-client?
  • 0

#675 Navariumx

Navariumx
  • Junkies
  • Blood Elfclass_name
  • EU-Skullcrusher
  • Cyclone / Wirbelsturm
  • Posts: 625
  • Talents: Retribution
  • RBG: 1775
  • LocationDenmark

Posted 18 April 2012 - 01:08 AM

Possibly, I just copy pasted my macros, which, all work for me.
  • 0

I think you guys need to realize that shamans are not the problem, and are probably less powerful than you think.


#676 darthvedar

darthvedar
  • Members
  • Posts: 9

Posted 18 April 2012 - 10:00 AM

Well, check on the EU-client...
  • 0

#677 Pharaun

Pharaun
  • LocationSeattle, WA

Posted 20 April 2012 - 04:06 AM

http://www.arenajunk...ult-ui-scripts/
  • 0
"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

<