Jump to content

Shorten current health values


  • Please log in to reply
No replies to this topic

#1 laukond

laukond
  • Members
  • Undeadclass_name
  • EU-Tarren Mill
  • Misery
  • Posts: 11
  • Talents: ./././././.
  • RBG: 1971

Posted 25 December 2012 - 06:16 PM

I am looking for a script to shorten the way health is displayed. Currently I am using this to remove the total health:
hooksecurefunc("TextStatusBar_UpdateTextStringWithValues", function()
PlayerFrameHealthBar.TextString:SetText(AbbreviateLargeNumbers(UnitHealth("player")))
PlayerFrameManaBar.TextString:SetText(AbbreviateLargeNumbers(UnitMana("player")))
end

I want to add this in some way:

If current health > 10 000 then display in k            so 10 000 will become 10k
if current health > 800 000 then display in m         so 500 000 will become 0.8m
if current health > 800 000 000 then display in b   so 500 000 000 will become 0.8b

This should affect player, target, focus, and if possible boss frame(s).




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

<