Thread Tools Display Modes
Prev Previous Post   Next Post Next
12-26-15, 03:20 PM   #1
slayos
A Deviate Faerie Dragon
 
slayos's Avatar
Join Date: May 2015
Posts: 15
Post Pitbull Text

Hello i have a code here wich i want some attention to:

local cur, max = HP(unit), MaxHP(unit)
local PerHP = cur/max
local hr, hg, hb

if (PerHP < 0.5) then
hr = 255
hg = 255 * PerHP * 2
hb = 0
else
hr = 255 * (1 - ((PerHP - 0.5) * 2))
hg = 255
hb = 0
end

return "|cff%02x%02x%02x%s",hr,hg,hb,Short(cur,true)
at the moment it displays my health as (409k)
but i want it to display my health as (409200)
also i want this only on "players"
on otther units such as mobs, npcs i want it to display as (409k)
With Health set to Green at 100% health, Orange at 75% health and Red at 35% health

Last edited by slayos : 12-26-15 at 03:23 PM.
  Reply With Quote
 

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Pitbull Text


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