Hekili / hekili

Hekili Priority Helper for DPS and Tanks (WoW Retail)
298 stars 162 forks source link

Function the check if three or more people are missing health #3305

Open Ratayu opened 1 week ago

Ratayu commented 1 week ago

Before You Begin

Feature Request

Hey,

I’m playing Resto Shaman and I’m trying to configure Hekili for healing priorities. I have successfully created my own custom priority list, but there's one condition I want to add: casting Chain Heal if at least three people are missing health.

I've tried to research and come up with a script to check if at least three people are missing health. However, I’m not exactly sure how to integrate this condition into Hekili. Specifically, I want to create a condition where this custom function returns true.

Here’s the script I have so far:

-- Count injured friendlies local countInjuredFriendlies = 0 for i = 1, 40 do local unit = "raid" .. i if not UnitExists(unit) then break end if UnitHealth(unit) < UnitHealthMax(unit) then countInjuredFriendlies = countInjuredFriendlies + 1 end if countInjuredFriendlies >= 3 then break end end

-- Return true if at least three people are injured countInjuredFriendlies >= 3

Is there a way for me to add this condition script so that it can be used within the Hekili addon, such as by placing it in a file or folder within the addon? This would allow me to use a function like Chain Heal if this function returns true.

Any help or guidance on how to achieve this would be greatly appreciated!

Additional Information

Just wanted to note that I’m not necessarily requesting this to be added as a future within the add-on, but if there is a way that I can always add this as a custom function that I would need to do manually every time I don’t mind doing that

Contact Information

No response