1. #1
    Field Marshal Tactica's Avatar
    10+ Year Old Account
    Join Date
    Mar 2014
    Location
    9942 Apophis
    Posts
    87

    Target health macro?

    I've been searching around and can't find a definitive answer as to whether or not this is even possible within a macro. I'm looking for a macro that will announce target health for example:

    /1 %t @ 87%
    No this is not for timeless isle rares, however it would come in handy for Nevermaw

  2. #2
    The various Timeless Isles Rare Addons are how you see Huolon 100%, etc. Not sure if it's only available via API or not, though.

  3. #3
    Code:
    /script SendChatMessage(UnitName("target").." @ ".. (UnitHealth("target")/UnitMaxHealth("target")*100).."%", "CHANNEL", nil, 1)

  4. #4
    Field Marshal Tactica's Avatar
    10+ Year Old Account
    Join Date
    Mar 2014
    Location
    9942 Apophis
    Posts
    87
    Quote Originally Posted by alexkeren View Post
    The various Timeless Isles Rare Addons are how you see Huolon 100%, etc. Not sure if it's only available via API or not, though.
    As far as I know these addons use API but these addons are hit or miss depending on what one is looking for. Thus far I use MoPRares with an edited lua:

    Timeless Spotter - Announces loot from rares - Doesn't announce rare death

    MoPRares - Announces percentage and death - Announces every time rare is targeted

    Rare Announcer - Fires response to "raretimer %t" requests - Doesn't announce deaths

    Rare Coordinator - Smexy UI & Announces Death (if you manually announce alive) - No loot or timer announce

    - - - Updated - - -

    Quote Originally Posted by Aleaa View Post
    Code:
    /script SendChatMessage(UnitName("target").." @ ".. (UnitHealth("target")/UnitMaxHealth("target")*100).."%", "CHANNEL", nil, 1)
    Thanks Aleaa, testing now.

    EDIT. No response/announcement when tested on Leafmender will look into it more.

    - - - Updated - - -

    Changed UnitMaxHealth to UnitHealthMax:
    /script SendChatMessage(UnitName("target").." @ ".. (UnitHealth("target")/UnitHealthMax("target")*100).."%", "CHANNEL", nil, 1)
    This works however it gives off several decimal places in the announcement: %t @ 98.6256734%

    Any way to change to just 98%?

    - - - Updated - - -

    This works perfectly:

    /run SendChatMessage(UnitName("target").." @ "..(math.floor((UnitHealth("target") / UnitHealthMax("target")) * 100)).."%", "CHANNEL", nil, 1)
    Thanks for all the help!
    Last edited by Tactica; 2014-04-06 at 11:13 PM.

  5. #5
    Deleted
    Code:
    /run if not UnitExists("target") return end SendChatMessage(("%s @ %.1f%%"):format((UnitName("target")),(UnitHealth("target")/UnitHealthMax("target"))*100),"CHANNEL",nil,1)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •