매크로

/run UIP=UnitIsPlayer RCC=RAID_CLASS_COLORS UC=UnitClass TFNB=TargetFrameNameBackground FFNB=FocusFrameNameBackground
/run f=CreateFrame("FRAME") f:RegisterEvent("PARTY_MEMBERS_CHANGED") f:RegisterEvent("PLAYER_TARGET_CHANGED") f:RegisterEvent("PLAYER_FOCUS_CHANGED") f:RegisterEvent("UNIT_FACTION")
/run function e(self,event,...) if UIP("target") then c=RCC[select(2,UC("target"))] TFNB:SetVertexColor(c.r,c.g,c.b) end if UIP("focus") then c=RCC[select(2,UC("focus"))] FFNB:SetVertexColor(c.r,c.g,c.b) end end f:SetScript("OnEvent",e)

lua

local frame = CreateFrame("FRAME")
frame
:RegisterEvent("GROUP_ROSTER_UPDATE")
frame
:RegisterEvent("PLAYER_TARGET_CHANGED")
frame
:RegisterEvent("PLAYER_FOCUS_CHANGED")
frame
:RegisterEvent("UNIT_FACTION")

local function eventHandler(self, event, ...)
       
if UnitIsPlayer("target") then
                c
= RAID_CLASS_COLORS[select(2, UnitClass("target"))]
               
TargetFrameNameBackground:SetVertexColor(c.r, c.g, c.b)
       
end
       
if UnitIsPlayer("focus") then
                c
= RAID_CLASS_COLORS[select(2, UnitClass("focus"))]
               
FocusFrameNameBackground:SetVertexColor(c.r, c.g, c.b)
       
end
end

frame
:SetScript("OnEvent", eventHandler)

for _, BarTextures in pairs({TargetFrameNameBackground, FocusFrameNameBackground}) do
       
BarTextures:SetTexture("InterfaceTargetingFrameUI-StatusBar")
end







매크로


/run UIP=UnitIsPlayer UIC=UnitIsConnected RCC=RAID_CLASS_COLORS PFHB=PlayerFrameHealthBar UC=UnitClass
/run function colour(sb,unit) if UIP(unit) and UIC(unit) and unit==sb.unit and UC(unit) then _,cl=UC(unit) c=RAID_CLASS_COLORS[cl] sb:SetStatusBarColor(c.r,c.g,c.b) PFHB:SetStatusBarColor(0,1,0) end end
/run hooksecurefunc("UnitFrameHealthBar_Update", colour) hooksecurefunc("HealthBar_OnValueChanged", function(self) colour(self, self.unit) end)

lua

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)



2개 다 적용하면 이렇게 됨.





다른것들 알고 싶으면 


http://www.arenajunkies.com/topic/222642-default-ui-scripts/