View Single Post
10-03-19, 02:42 PM   #5
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
It's pure Lua code to get a UI color escape from a percentage value. Works fine on the live Lua demo.
I don't know anything about Pitbull4, never used it.

Edit: From the documentation on LuaTexts, this is the conversion from your DogTag3 script.
Code:
local cur,max=HP(unit),MaxHP(unit);
local r,g,b=HPColor(cur,max);
Outline();
return (cur>0 and cur<max) and "|cff%02x%02x%02x%.0f%%|r" or "",r,g,b,100*cur/max;
Edit: Fixed typo; corrected MaxHP()
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 10-05-19 at 02:20 PM.
  Reply With Quote