Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.29 KB | None | 0 0
  1. function(unit)
  2.     if UnitHealth(unit) >= 1e6 then
  3.         return ("%.1fm"):format(UnitHealth(unit) / 1e6):gsub("%.?0+([km])$", "%1")
  4.     elseif UnitHealth(unit) >= 1e3 or value <= -1e3 then
  5.         return ("%.1fk"):format(UnitHealth(unit) / 1e3):gsub("%.?0+([km])$", "%1")
  6.     else
  7.         return UnitHealth(unit)
  8.     end
  9. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement