WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   LF addon for sound mana tracking (https://www.wowinterface.com/forums/showthread.php?t=59071)

Biowoolf 03-19-22 10:51 AM

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 :)

SDPhantom 03-24-22 03:35 AM

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.

Biowoolf 03-24-22 06:05 AM

Quote:

Originally Posted by SDPhantom (Post 340445)
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. :)

SDPhantom 03-24-22 08:34 AM

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);

Biowoolf 03-25-22 05:19 AM

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")

SDPhantom 03-25-22 06:39 PM

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.

Biowoolf 12-30-22 02:28 AM

The addon no longer works in DF. Can anyone update it? An error appears with an empty window. :(


All times are GMT -6. The time now is 05:33 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI