Stuf Unit LUA help
I have this for my target name but I was hoping someone could help me with adding level and class color to the string.
function(unit)
local name = UnitName(unit)
if (name and string.len(name) > 10) then
name = string.gsub(name, "([^%s]+) ", function(s) return string.sub(s,1,1) .. "." end)
end
return name
end
This code works fine as is but I can figure out how to add class color to the text or the level to it either.
thanks much!
|