Quantcast
WoWInterface - View Single Post - Combine two lua scripts
View Single Post
06-21-20, 11:57 AM   #4
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,259
Lua Code:
  1. local s = Status(unit)
  2. if s then
  3.   return s
  4. end
  5. local r,g,b = ClassColor(unit)
  6. local string1 = string.format('|cff%02x%02x%02x%s|r %s%s%s|', r,g,b,Name(unit),Angle(AFK(unit) or DND(unit)))
  7. local cur,max = HP(unit),MaxHP(unit);
  8. local hr,hg,hb=HPColor(cur,max);
  9. local string2 = string.format("|cff%02x%02x%02x%.0f|r" or "", hr,hg,hb,100*cur/max)
  10. return string1 .. string2

Someone here probably has a better solution.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote