WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Macro Help (https://www.wowinterface.com/forums/forumdisplay.php?f=140)
-   -   Macro to swap the talent set and the equipment set (https://www.wowinterface.com/forums/showthread.php?t=59553)

fullmoon_sulfuras 04-10-23 08:52 PM

Macro to swap the talent set and the equipment set
 
Hi! I'm trying to come up with a macro to swap to a equipment set and the talents.

I play a enh shaman, and sometimes I go OS for healing. So I'd like a macro that:

1. Switches to the secondary talent set
2. Switches to a specific equipment set from the equipment manager

Switching to resto:

Code:

#showtooltip Healing Wave
/script C_EquipmentSet.UseEquipmentSet(0)
/script SetActiveTalentGroup(2)

The problem is that the switch to Enh macro:

Code:

#showtooltip Stormstrike
/script C_EquipmentSet.UseEquipmentSet(1)
/script SetActiveTalentGroup(1)

I get a "You cannot dual-wield" error, which makes sense, I need to first switch the talents. So:

Code:

#showtooltip Stormstrike
/script SetActiveTalentGroup(1)
/script C_EquipmentSet.UseEquipmentSet(1)

But now I get a "You can't do that right now"; the talent set gets swapped, but not the gear. So I tried a function:

Code:

#showtooltip Stormstrike
/script function enh() SetActiveTalentGroup(1) C_EquipmentSet.UseEquipmentSet(1) end enh()

That also gives me a "You can't do that right now" error.

It seems that the WoW client is trying to run the function calls simultaneously.

Is there any way to run one and then the other? Maybe an if-end block with an and?

Thanks!

SDPhantom 04-12-23 04:21 PM

An addon can do it since apparently, even though equipping individual items is protected, triggering set swaps through the equipment manager isn't. It would be easier if neither set required a talent to equip. I have a DK macro for example that swaps between tank and DPS sets and talents by swapping the set first, then spec.

As you've run into already, this doesn't work for your setup as your enhancement set required the dual wield talent. Some addons provide a delay command or you can use C_Timer.After() to delay a Lua function call, but this also causes some issues on its own as the timer inherently cannot be canceled. This also doesn't account for any lag you may experience or canceling the talent swap.



If you wish to continue this route, here's an example macro.
Code:

/run SetActiveTalentGroup(1) C_Timer.After(3,function() C_EquipmentSet.UseEquipmentSet(1) end)
This should swap your equipment set 3 seconds after triggering a spec change. I don't remember how long it takes to apply a spec, so this delay may need to be adjusted.

fullmoon_sulfuras 04-12-23 06:13 PM

Thanks! Swapping the talents takes 5 seconds, so this works perfectly:

Code:

#showtoolip Bloodlust
/run SetActiveTalentGroup(1) C_Timer.After(6,function() C_EquipmentSet.UseEquipmentSet(1) end)


Tim 04-13-23 09:53 PM

There is also this handy addon: https://www.wowinterface.com/downloa...WLoadouts.html


All times are GMT -6. The time now is 02:24 AM.

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