View Full Version : [Addon] LowhealthAlert
Kicksome
12-23-2008, 12:06 PM
This is a very simple addon, but it really rocks for less skilled players like me.
Since it's so hard to keep track of my followers health in instances (And tank, hold aggro, dps etc...), I wrote an addon to alert me when my alts are taking damage. Not only does it alert me, but it also displays what key I need to press to heal that alt.
So instead of having to:
Watch my alts health bars
See they're taking damage
Figure out what toon it is
Figure out what key is mapped to heal that toon
Press that key
I can just:
Read the alert
Press the key that the alert tells me to press :)
It's pretty simple:
When anyone, besides the tank, is below 75% health it displays a warning message in YELLOW to press the exact macro that will heal that toon (G1, G2, G3, G4). It also plays an audio alert.
When someone is below 25% it'll display the warning message in RED. It also plays an audio alert.
What you need to do to make the addon work for you
This is the important part. The addon will work out of the box, but you'll need to edit the following file: Lowhealthalert.lua
Change these lines so they correlate to your team members:
--- change these values for your team
local p1 = "1-1-1 Sweetcups";
local p2 = "2-2-2 Sweetum";
local p3 = "3-3-3 Sweetpee";
local p4 = "4-4-4 Sweete";
So I'd simply change
local p1 = "1-1-1 Sweetcups";
to
local p1 = "G1 Dkkiller";
If the person in the party1 position was DKkiller on my team, and if G1 was the key I needed to press to heal Dkkiller.
Here's a link to version .1 of the addon ('www.godsoftime.com/dnload/lowhealthalert.zip') . I plan to write a interface so you don't have to edit the LUA file!
-Kicksome
emesis
12-23-2008, 12:28 PM
Sweet. I'm really looking forward to trying this. What I particularly have a problem with personally is that, when I switch from one window to another (for instance, my main dies in a PvP situation), the party order being different messes me up big time in terms of identifying which heal key to hit. It should be possible to set this up (though with different config settings for each window) so it tells me the right key to hit regardless of which window I have in front.
Maybe I should have just named my toons F1, F2, etc. :-)
maxel
12-23-2008, 03:09 PM
This is great. I'd like to take what you have and expand it to include a couple of things. Thank you for your contribution!
- Make it flexible by healer class
- Make it show different options for healing based on healee's hp threshold (this ties to the first option)
- Add an option that shows when the group needs healing and at what threshold.
The reasons for this should be apparent, but for the sake of argument, I run a priest as a healer with a wide array of single and group target healing spells. What I would like to do is make the awesome code above a bit more dynamic. Here is some pseudo code I threw together. Be kind... ;)
local DEAD = 0
local LOW = 1
local MEDIUM = 2
local HUGH = 3
local FULL = 4
local playerName = "Player"
local party1Name = "Party1"
local party2Name = "Party2"
local party3Name = "Party3"
local party4Name = "Party4"
local single_LowHealthSpell = "Greater Heal" -- for use when a single target is between 0% and 50% hps
local single_MediumHealthSpell = "Flash Heal" -- for use when a single target is between 51% and 89% hps
local single_HighHealthSpell = "Renew" -- for use when a single target is between 90% and 95%
local group_LowHealthSpell = "Prayer of Healing" -- for use when a group of targets is between 0% and 50% average hps
local group_MediumHealthSpell = "Circle of Healing"-- for use when a group of targets is between 51% and 89% average hps
local group_HighHealthSpell = "Circle of Healing" -- for use when a group of targets is between 90% and 95% average hps
local group_LowHealthButton = "E"
local group_MediumHealthButton = "ALT E"
local group_HighHealthButton = "CTRL E"
local player_LowHealthButton = "1"
local player_MediumHealthButton = "ALT 1"
local player_HighHealthButton = "CTRL 1"
local party1_LowHealthButton = "2"
local party1_MediumHealthButton = "ALT 2"
local party1_HighHealthButton = "CTRL 2"
local party2_LowHealthButton = "3"
local party2_MediumHealthButton = "ALT 3"
local party2_HighHealthButton = "CTRL 3"
local party3_LowHealthButton = "4"
local party3_MediumHealthButton = "ALT 4"
local party3_HighHealthButton = "CTRL 4"
local party4_LowHealthButton = "5"
local party4_MediumHealthButton = "ALT 5"
local party4_HighHealthButton = "CTRL 5"
-- pseudo code below:
local alertRaised = 0
if Count_of_Players_Needing_Healing > 1 and Average_Group_Health_Percent is between 0% and 50% then
Alert "Press : " + group_LowHealthButton + " (" + group_LowHealthSpell + ") " + "group is Critical and needs healing NOW!"
alertRaised = 1
end if
if Count_of_Players_Needing_Healing > 1 and Average_Group_Health_Percent is between 51% and 89% then
Alert "Press : " + group_MediumHealthButton + " (" + group_MediumHealthSpell + ") " + "group is hurt and needs healing."
alertRaised = 1
end if
if Count_of_Players_Needing_Healing > 1 and Average_Group_Health_Percent is between 90% and 99% then
Alert "Press : " + group_HighHealthButton + " (" + group_HighHealthSpell + ") " + "group is damaged and needs healing."
alertRaised = 1
end if
if Count_of_Players_Needing_Healing = 1 AND alertRaised = 0 then
if(UnitNeedsHealing("player")) then
if(UnitHealingThreshold("player") = LOW then
Alert "Press : " + player_LowHealthButton + " (" + single_LowHealthSpell + ") " + playerName + " is Critical and needs healing NOW!"
alertRaised=1
end if
if(UnitHealingThreshold("player") = MEDIUM then
Alert "Press : " + player_MediumHealthButton + " (" + single_MediumHealthSpell + ") " + playerName + " is hurt and needs healing."
alertRaised=1
end if
if(UnitHealingThreshold("player") = HIGH then
Alert "Press : " + player_HighHealthButton + " (" + single_HighHealthSpell + ") " + playerName + " is damaged and needs healing."
alertRaised=1
end if
end if
if(UnitNeedsHealing("party1") AND alertRaised = 0)
if(UnitHealingThreshold("party1") = LOW then
Alert "Press : " + party1_LowHealthButton + " (" + single_LowHealthSpell + ") " + party1Name + " is CRITICAL and needs healing NOW!"
alertRaised=1
end if
if(UnitHealingThreshold("party1") = MEDIUM then
Alert "Press : " + party1_MediumHealthButton + " (" + single_MediumHealthSpell + ") " + party1Name + " is hurt and needs healing NOW!"
alertRaised=1
end if
if(UnitHealingThreshold("party1") = HIGH then
Alert "Press : " + party1_HighHealthButton + " (" + single_HighHealthSpell + ") " + party1Name + " is damaged and needs healing NOW!"
alertRaised=1
end if
end if
-- Repeat Above Party1 code for each additional PartyMemeber
end if
-- Represents whether or not the unit specified needs healing
-- Returns 1 if unit needs healing, otherwise 0
function UnitNeedsHealing(unit)
return UnitHealingThreshold(unit) != FULL AND UnitHealingThreshold(unit) != DEAD
end
-- Represents the degree to which a unit needs healing
-- If the health of the player is 0 returns DEAD otherwise
-- returns LOW, MEDIUM, HIGH, or FULL depending on the percentage
-- of hitpoints remaining for the unit.
function UnitHealingThreshold(unit)
local health = UnitHealth
local healthPct = health / UnitHealthMax(unit);
if health = 0 return DEAD
if health = UnitHealthMax(unit) return FULL
if healthPct between 90% and 99% return HIGH
if healthPct between 51% and 89% return MEDIUM
if healthPct between 0% and 50% return LOW
end
davedontmind
12-24-2008, 05:28 AM
local single_LowHealthSpell = "Greater Heal" -- for use when a single target is between 0% and 50% hps
local single_MediumHealthSpell = "Flash Heal" -- for use when a single target is between 51% and 89% hps
local single_HighHealthSpell = "Renew" -- for use when a single target is between 90% and 95%
local group_LowHealthSpell = "Prayer of Healing" -- for use when a group of targets is between 0% and 50% average hps
local group_MediumHealthSpell = "Circle of Healing"-- for use when a group of targets is between 51% and 89% average hps
local group_HighHealthSpell = "Circle of Healing" -- for use when a group of targets is between 90% and 95% average hps As a raiding priest (when I'm not multiboxing) I'd take issue with those choices.
If I'm healing a tank and his health is very low (say < 25%) and falling fast, I'd *not* use Greater Heal, simply because it takes too long to cast. Same for Prayer Of Healing.
Greater Heal is the heal of choice if you have the time to use it because it's the most mana efficient (same for Prayer of Healing for group use), but you don't want to be using it if there's any chance your target could die while you're casting, so you need to use the shorter cast-time spells.
I understand you're trying to simplify what is, in reality, probably the most complex role in WoW, and so compromises need to be made, but this is roughly how my brain works when healing:
Tank/Plate target:
- low health (<25%) and losing health quickly = Flash Heal (maybe preceded by a shield or Prayer of Mending)
- low health and not losing health quickly or doesn't have aggro = Greater Heal, Prayer of Mending
- medium health (25% - 90%) = Greather Heal, Prayer of Mending
- high health (>90%) = Renew
Squishy target:
- low to medium health and has aggro = Flash Heal (maybe preceded by a shield or Prayer of Mending)
- low to medium health, doesn't have aggro = Greater Heal
- high health = Renew
Group:
- average low health, someone very low health = Circle of Healing
- average medium health = Prayer Of Healing
- average medium to high health = Renew on all
The group healing choice is made a bit more complicated in the next patch, when CoH gains a 6sec CD...
Tizer
12-24-2008, 06:17 AM
Nice idea, but i think all the alerts would drive me nuts in the end xD besides which, if im losing health in PVP atm, i know im generally dead before i react :D
maxel
12-24-2008, 11:26 AM
local single_LowHealthSpell = "Greater Heal" -- for use when a single target is between 0% and 50% hps
local single_MediumHealthSpell = "Flash Heal" -- for use when a single target is between 51% and 89% hps
local single_HighHealthSpell = "Renew" -- for use when a single target is between 90% and 95%
local group_LowHealthSpell = "Prayer of Healing" -- for use when a group of targets is between 0% and 50% average hps
local group_MediumHealthSpell = "Circle of Healing"-- for use when a group of targets is between 51% and 89% average hps
local group_HighHealthSpell = "Circle of Healing" -- for use when a group of targets is between 90% and 95% average hps As a raiding priest (when I'm not multiboxing) I'd take issue with those choices.
If I'm healing a tank and his health is very low (say < 25%) and falling fast, I'd *not* use Greater Heal, simply because it takes too long to cast. Same for Prayer Of Healing.
Greater Heal is the heal of choice if you have the time to use it because it's the most mana efficient (same for Prayer of Healing for group use), but you don't want to be using it if there's any chance your target could die while you're casting, so you need to use the shorter cast-time spells.
I understand you're trying to simplify what is, in reality, probably the most complex role in WoW, and so compromises need to be made, but this is roughly how my brain works when healing:
Tank/Plate target:
- low health (<25%) and losing health quickly = Flash Heal (maybe preceded by a shield or Prayer of Mending)
- low health and not losing health quickly or doesn't have aggro = Greater Heal, Prayer of Mending
- medium health (25% - 90%) = Greather Heal, Prayer of Mending
- high health (>90%) = Renew
Squishy target:
- low to medium health and has aggro = Flash Heal (maybe preceded by a shield or Prayer of Mending)
- low to medium health, doesn't have aggro = Greater Heal
- high health = Renew
Group:
- average low health, someone very low health = Circle of Healing
- average medium health = Prayer Of Healing
- average medium to high health = Renew on all
The group healing choice is made a bit more complicated in the next patch, when CoH gains a 6sec CD...You do get that the above was quickly thrown together and not meant to be what was actually used? It was meant to be flexible and able to be setup however you wished. I threw those in as simple examples, not as an exercise in what a raiding priest or otherwise might use in actuality.
Golle
12-24-2008, 10:38 PM
Nevertheless, it's a very good idea - I will definately be using something like this.
vBulletin® v4.2.2, Copyright ©2000-2025, Jelsoft Enterprises Ltd.