Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-06-13, 06:49 PM   #1
Rusken
A Theradrim Guardian
AddOn Compiler - Click to view compilations
Join Date: Dec 2009
Posts: 61
Lua code for stuf, what do i do with it?

As the title says, i want my targets name to be shorten if the name is to long, like Raider's Training Dummy would become R. T. Dummy.
I found a thread on MMO about this and a guy said that this would do it ->

Originally Posted by Code
function(unit)
local name = UnitName(unit) or unit
name = name:gsub('(%S+) ',function(t) return t:sub(1,1)..'.' end)
return name
end
I do however don't have a clue what to do with this text, im quessing i should paste it in to stufs text.lua somewhere?
Could anyone give me som help with this? I really suck at this
I also wonder how it would look if i want the name to be class colored?
Thanks!
  Reply With Quote
 

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Lua code for stuf, what do i do with it?


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