Thread Tools Display Modes
03-19-22, 10:51 AM   #1
Biowoolf
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2015
Posts: 5
LF addon for sound mana tracking

Hello everyone. I'm playing as a tank and I'm looking for an addon that warns with a sound about the healer's low mana. For example, at 20% and 10% mana. This addon is needed for a group of 5 players.
If someone understands Lua, can you help to make such a small addon?
Thank you in advance
  Reply With Quote
03-24-22, 03:35 AM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
Is this for retail or classic? For retail, it wouldn't be hard to detect the assigned role for party members and work off that. Classic unfortunately doesn't have that functionality and the best way is to try to inspect talents. This is never going to be 100% accurate as many builds blur the lines between caster and healer. In many cases, even a non-healer spec can put on healer gear and be adequate at the role.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
03-24-22, 06:05 AM   #3
Biowoolf
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2015
Posts: 5
Originally Posted by SDPhantom View Post
Is this for retail or classic? For retail, it wouldn't be hard to detect the assigned role for party members and work off that. Classic unfortunately doesn't have that functionality and the best way is to try to inspect talents. This is never going to be 100% accurate as many builds blur the lines between caster and healer. In many cases, even a non-healer spec can put on healer gear and be adequate at the role.
For retail. In Mythic+, you often get distracted and don't notice the amount of mana the healer has. Sound warning is very convenient.
  Reply With Quote
03-24-22, 08:34 AM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
Here's a simple example of what I've come up with. It'll pop up with big text in the center of your screen whenever your healer's mana goes below 25%.

Copy/Paste this into addon.bool.no and it'll make it into an addon for you.

Lua Code:
  1. local WarningText=UIParent:CreateFontString(nil,"OVERLAY","BossEmoteNormalHuge");
  2. WarningText:SetPoint("CENTER",0,128);
  3. WarningText:SetTextColor(ColorMixin.GetRGB(PowerBarColor.MANA));
  4.  
  5. local EventFrame=CreateFrame("Frame");
  6. EventFrame:RegisterEvent("UNIT_POWER_UPDATE");
  7. EventFrame:RegisterEvent("UNIT_POWER_FREQUENT");
  8.  
  9. local Enum_PowerType_Mana=Enum.PowerType.Mana;
  10. EventFrame:SetScript("OnEvent",function(self,event,unit,powertype)
  11.     if powertype=="MANA" and UnitInParty(unit) and UnitGroupRolesAssigned(unit)=="HEALER" then
  12.         local percent=UnitPower(unit,Enum_PowerType_Mana)*100/UnitPowerMax(unit,Enum_PowerType_Mana);
  13.         if percent<=25 then
  14.             WarningText:SetFormattedText("%s %s %.0f%%",UnitName(unit),MANA,percent);
  15.         else WarningText:SetText(nil); end
  16.     end
  17. end);
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
03-25-22, 05:19 AM   #5
Biowoolf
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2015
Posts: 5
Super implementation! Very comfortably! There is one mistake. If you change specialization with a minimum amount of mana, the inscription remains until the UI is reloaded. But this is not critical.
How to add your own .ogg sound file?

("Interface\\AddOns\\AddonName\\SoundName.ogg", "master")
  Reply With Quote
03-25-22, 06:39 PM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
I'd have to completely rewrite it to avoid it from blasting you with constant queuing of the sound while below the set percentage. And by constant queuing, it'll overlap the sound on top of itself indefinitely.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
12-30-22, 02:28 AM   #7
Biowoolf
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2015
Posts: 5
The addon no longer works in DF. Can anyone update it? An error appears with an empty window.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » LF addon for sound mana tracking

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