Script does not work anymore

hello,

ive been using a script to hide names from blizzard default raid and/or group frames.

this is the code:

hooksecurefunc(“CompactUnitFrame_UpdateName”,function()
local i=1
local name
repeat
name = _G[“CompactRaidFrame”…i…“Name”]
if name then
name:Hide()
end
i=i+1
until not name
end)

Since pre patch it stopped working sadly. Any idea what might be the problem here?

I think this should work.

hooksecurefunc("CompactUnitFrame_UpdateName", function(frame) 
    if frame.optionTable == DefaultCompactUnitFrameOptions then 
        frame.name:Hide() 
    end 
end)

Hey! Could u help with this Script too? Doesn’t work anymore, had it for over 10 years :frowning:
Originally it changed target and focus frame to class color. Also changed target frame size. I don’t need this last bit anymore since its now a feature in the game (I guess in this case i only delete the last line?.
It’s the class colors that i really need. This is how it looks:
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(“Interface\TargetingFrame\UI-StatusBar”)
end

TargetFrame:SetScale(1.1)

Found an addon that does this.
https://www.curseforge.com/wow/addons/healthbarcolor

Thanks anyway :stuck_out_tongue:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.