hekili icon indicating copy to clipboard operation
hekili copied to clipboard

Function the check if three or more people are missing health

Open Ratayu opened this issue 8 months ago • 1 comments

Before You Begin

  • [X] I confirm that I have downloaded the latest version of the addon.
  • [X] I am not playing on a private server.
  • [X] I checked for an existing, open ticket for this request and was not able to find one.
  • [X] I edited the title of this feature request (above) so that it describes the issue I am reporting.

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

Ratayu avatar Jun 20 '24 13:06 Ratayu