However I strongly recommend that you add some code to prevent your script from executing during combat using InCombatLockdown(). Otherwise your code may fail in usage at random, at least to other users than yourself and other developers. Hopefully the WeakAura author will provide some helper functions soon since I see more and more WA scripts that create secure actions without ensuring they're in a state to do so (non trivial to schedule it after combat in an efficient manner for individual scripts).
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello addon developers! Sorry if I'm writing in the wrong place.
I want to create a button that would track the buff on me. And when a button appears, I would press it and use a spell.
For this, I decided to use the addon Weakauras 2. This addon can track buffs, it remains only to write the code for the button.
The button only responds to a mouse left click.
Please tell me what needs to be added to the code so that my button responds to the "1" key.
Thanks!
My code
Check out https://wow.gamepedia.com/API_SetBinding
Just have it click your button.
However I strongly recommend that you add some code to prevent your script from executing during combat using InCombatLockdown(). Otherwise your code may fail in usage at random, at least to other users than yourself and other developers. Hopefully the WeakAura author will provide some helper functions soon since I see more and more WA scripts that create secure actions without ensuring they're in a state to do so (non trivial to schedule it after combat in an efficient manner for individual scripts).