WeakAuras

current/max hp //mana

  • 5 posts
    #1 Oct 05, 2011 at 19:57 UTC - 0 likes

    Sers,

    I just want a text display my max and my current hp unfortunately I have no idea about lua. So plz help me :>

    #2 Oct 05, 2011 at 21:21 UTC - 0 likes

    There is a health trigger (Status -> Unit Health), just use it with a progress bar display. ;D Its as simple as that :D

    If you want to see the MAX value, enter "%t" [for total] into either the left or right text box of the progress bar display

    Last edited Oct 05, 2011 by CommanderSirow
    #3 Oct 05, 2011 at 21:57 UTC - 0 likes

    okay thats great. just %p / %t into the right text and it works.

    #4 Oct 08, 2011 at 05:29 UTC - 0 likes

    Is there a way to turn this display into a percentage as opposed to the absolute values?

    #5 Oct 08, 2011 at 09:36 UTC - 0 likes

    Use text "%c" and in the custom text code use:

    function()
      local p = math.max(0, UnitHealth("UNITID")) / math.max(1, UnitHealthMax("UNITID")) * 100;
      return p;  -- Unformated
      return string.format("Percent: %.2f", p); -- Formated
    end
    

    Replace "UNITID" with "target", "player", "focus", ect. and either remove the - - Formated or - - Unformated line. ;)

    Last edited Oct 08, 2011 by CommanderSirow
  • 5 posts

You must login to post a comment. Don't have an account? Register to get one!