Thread Tools Display Modes
Prev Previous Post   Next Post Next
06-20-11, 10:51 PM   #1
jeffy162
A Pyroguard Emberseer
 
jeffy162's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2,364
PitBull4 Lua texts - Colored health and power?

I'm using PitBull4 for my unit frames, and I've been trying to figure out how to get the health text to be health colored and the power text the color of the characters power using PB4's Lua texts. I've tried a few things, but only get errors. I found an example somewhere to color my characters' level by class, but can't seem to find anything about health color or power color.

What I'm using at the moment:

Class colored level:
Code:
Outline()
if UnitIsPlayer(unit) then
local cr,cg,cb = ClassColor(unit)
return "|cff%02x%02x%02x%s|r",cr,cg,cb,Level(unit)
end
Health (which is always bright green, but I want the color to change as the health goes down, if possible):
Code:
Outline()
return "|cff00ff00%s|r",HP(unit)
Power (which I'd like to be power colored):
Code:
Outline()
return "%s",Power(unit)
The characters' name is just fine in white, and this is what I use for that:
Code:
Outline()
return '%s %s%s%s',Name(unit),Angle(AFK(unit) or DND(unit))
I have posted a similar question on the WoWAce PitBull forum (Post), but I am posting it here, also, to try to get a "broader audience", as it were. Hopefully, someone can help me with this problem.

Last edited by jeffy162 : 06-20-11 at 10:54 PM.
  Reply With Quote
 

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » PitBull4 Lua texts - Colored health and power?

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