Weakaura/script for automated toy use on event

I’m trying to figure out if its possible to get a toy to kick off with a event detected from the combat log.

primarily im running a weakaura that is doing a /say and a random emote when i get a killing blow in pvp, i’m trying to add the store bought horde’s might and lion’s pride fireworks in to that so the firework auto goes off on a killing blow.

is that possible at all?

No, since https://wow.gamepedia.com/API_UseToy is protected

1 Like

What Ketho said, toy use as well as use/cast of any spell, ability, or item is protected and no addon can access it. If an addon tries to use a protected function, it will generate a really nasty error that could impact the entire addon.

The best you could do is create a weakaura to remind you to “use this toy now” and then create a macro that allows you to activate the toy from your action bar or a keybinding.

is it possible to do a /run in a macro that will use Usetoy after an event in the combat log is detected?

something like

#showtooltip Necrotic Strike(PvP Talent)
/cast Necrotic Strike(PvP Talent)
/cast [@pettarget]Claw
/run if sourceGUID == UnitGUID(“player”) and bit.band(destFlags, COMBATLOG_OBJECT_TYPE_PLAYER) > 0 then if subevent == “PARTY_KILL” then DoUseToy “horde’s might”

Out of combat, yes. In combat, no.

If a method is found to choose whether to use an item based on any combat situation that’s not already sanctioned by the existing secure environment, then Blizzard will very likely consider it an exploit and seek to disable it.

Outside combat, a secure button could register for an event and change attributes based on the event. In combat, things are locked down. You can’t change attributes from outside the secure environment.

And any method that uses an item solely based on event without a hardware event has broken even vanilla’s anything-goes rules and would probably be grounds for banning the account. A user caught doing that would not be anywhere near inside the rules of the game.

1 Like

well as i understand it, what im doing is not using automation to press the button, but using automation so that when i press a button, its effect is denied unless certain conditions are met. mainly i dont want the firework to go off for every body i pass, only when i specifically killed someone.

i still physically have to press a button on my keyboard which still has to activate a macro bound to my action bar

afaik that should be kosher.

Yeah pressing a button to use an item during that hardware event is fine.

And of course Blizzard will not take action against anyone doing anything with what they’ve provided us. If we find ways to do things they don’t like, they disable it.

For instance, one exploit was summoning a battle pet when conditions were met and then attempting to /target the pet. If the pet was out, it’d cast one spell; if the pet was not, it’d cast another. Blizzard not only protected summoning a pet (so it can’t be programmatically summoned via event, change in health, etc.), but at the same time they stopped allowing addons and macros to target battle pets.

My last point in the previous post was just to emphasize that using items in reaction to an event alone was not even possible in vanilla. Before 1.10 we could hook movement to automatically cast buffs/dispels that were needed on programatically chosen targets and even /tar Aa through Zz and put every target around you on the minimap. Even then, using an item in reaction to an event was verboten. (Though, to be technical, some events are client-side and it’s possible for these to fire during a hardware event. Even today a hardware event could be used as long as the secure environment could be triggered without awareness of the event.)

2 Likes