Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 12-19-10, 02:40 PM   #1
Porsha
A Black Drake
Join Date: Apr 2008
Posts: 88
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!
Porsha is offline   Reply With Quote
 

Go BackWoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Stuf Unit LUA help

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off