about last error - seems you modify code and it tryes to edit raid debuffs, but raid debuffs not have a color border.
about show/hide -
Lua Code:
self.uf = CreateFrame('frame', nil, self)
self.uf:SetScript('OnUpdate', function(ss, elapsed)
ss = ss:GetParent()
if not ss:IsShown() then return end
ss.st = elapsed + (ss.st or 0)
if ss.st > .2 then
local h, mh = UnitHealth(ss.unit) or 1, UnitMaxHealth(ss.unit) or 100
local perc = h/(mh/100)
print(perc)
if perc < 100 or InCombatLockdown() or UnitAffectingCombat('player') then
ss:SetAlpha(1)
else
ss:SetAlpha(0)
end
ss.st = 0
end
end)
paste it after
Lua Code:
if self.unit == 'player' and not self.raidbutton then