1. #1

    Help with some Lua code

    Hey guys,

    Im a complete noob when it comes to Lua code but recently I have been working on upgrading my ui. I have been using pitbull unitframes and have them set to exactly how I want them, apart from one thing;

    I want the name text to be displayed as class colour. The current code I am using is a custom code -

    local abbr = Name(unit)
    if abbr:len() > 20 and abbr:find(" ") then
    abbr = abbr:gsub("([^ ]+) +",
    function(text)
    return text:sub(1,1) .. ". "
    end)
    end
    return "%s", abbr;


    What do I need to change to make the name text display as class colour? Thanks in advance

    ---------- Post added 2012-09-04 at 03:53 PM ----------

    Still require some assistance on this matter. Any help would be greatly appreciated
    Last edited by Slickwhits; 2012-09-04 at 02:52 PM.

  2. #2
    Still need assistance

  3. #3
    Deleted
    Code:
    local abbr = Name(unit)
    if abbr:len() > 20 and abbr:find(" ") then
    abbr = abbr:gsub("([^ ]+) +",
    function(text)
    return text:sub(1,1) .. ". "
    end)
    end
    local c = RAID_CLASS_COLORS[(select(2,UnitClass(unit)))]
    return "|cff%.2x%.2x%.2x%s|r", (c.r*255),(c.g*255),(c.b*255),abbr

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •