Stuf LUA help - WoWInterface
Thread Tools Display Modes
Prev Previous Post   Next Post Next
10-03-15, 01:16 PM   #1
A Murloc Raider
hikokun's Avatar
Join Date: Oct 2015
Posts: 4
Stuf LUA help

I'm looking for a custom lua code to show curhp/maxhp followed by perchp with two decimals for Stuf Unit Frames. The current code I'm using which only shows perchp with two decimals -

function(unit, cache, textframe)
  if UnitExists(unit) then
    local perchp = 100 * UnitHealth(unit)/UnitHealthMax(unit)
    return "%.2f%%",perchp
    local perchp = 100 * UnitHealth("player")/UnitHealthMax("player")
    return "%.2f%%",perchp
I'd like a code for both of the following setups if possible

300000/500000 | 60.00%
60.00% | 300000/500000

Thanks for any help!
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Stuf LUA help

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