This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Classic Theme
Thottbot Theme
Warrior (and Shaman) weapon swap macro
Post Reply
Return to board index
Post by
Maelchav
Hey all. I wanted to write a macro to swap weapons for my warrior. I've seen them for 2-hander to sword and board, or sword and board to dual-wield. But I wanted to incorporate all three possibilities in one macro. I know, there are add-ons and the equipment manager. Let's call this an academic exercise (I just don't want to give up on it). Here's what I have:
#showtooltip item:2H2H2H;item:SHIELD;item:OHOHOH
/equipslot 16 item:2H2H2H;16 item:MHMHMH
/equipslot 17 item:SHIELD;17 item:OHOHOH
2H2H2H is a placeholder for the item number of my 2-hander, MHMHMH for my main-hand weapon, OHOHOH for my off-hand for dual-wielding, and SHIELD for, well, you get the idea. I threw those in so I could keep an eye on the 255-character limit (and it comes in
just
under the limit as long as none of the item numbers is longer than 6 digits).
It
should
go like this:
With 2-hander equipped (Alt): dual-wield (equip main hand, then off hand)
With 2-hander equipped: 1-hander and shield (equip main hand, then shield)
With 1-hander and shield (Alt): 2-hander (swap main-hand weapon for 2-hander)
With 1-hander and shield: dual-wield (swap shield for second weapon)
Dual-wielding (Alt): 2-hander (swap main-hand weapon for 2-hander)
Dual-wielding: 1-hander and shield (swap off-hand weapon for shield)
Basically, if you're not using a shield you hit the macro (without Alt held) to use your main-hand + shield;
if you're not wielding a two-hander hit the macro
with
Alt held to equip it;
otherwise, dual-wield. So it's ideal for a protection warrior (kinda "defaults" to sword-and-board) who uses a 2-hander more often than dual-wielding.
The showtooltip line works, not that that helps me a whole lot.
So here's what happens when I use it. I can switch freely back and forth between sword-and-board and dual-wield, no problem. And I can switch from either of those to my 2-hander. But I can't go from the 2-hander to sword-and-board nor from 2-hander to dual-wielding. If I have my 2-hander equipped and I hit use the macro, the 2-hander stays equipped and I get a message saying I need two hands for that item. I'm assuming it's trying to equip the shield or off-hand weapon before it replaces the 2-hander with my main-hand... but it never does equip the main-hand.
Any suggestions for fixing this macro? In case anyone is interested, it's good for warriors and shaman (I think). Never played a shaman, but from what I gather they're the only class aside from warriors that can wear a shield or a two-hander or dual-wield.
Thanks!
Post by
Maelchav
Hmm, I might have figured this out...
#showtooltip item:2H2H2H;item:SHIELD;item:OHOHOH
/equipslot 16 item:2H2H2H;16 item:MHMHMH
/equipslot 17 item:SHIELD;17 item:OHOHOH
When I first put this together, I thought the syntax would work, but then found it should be ... and missed fixing that in the second conditional in the second line. So I suspect the above should work. Maybe. Can't test it atm because I'm at work. If anyone has a chance to try it out and post whether or not it works, I'd be much oglibed. If not, I'll try it out later on and let you know how it goes.
Post by
RedwoodElf
If you are going to dual-wield, be sure to equip the main hand weapon first. That will de-equip whatever you were weilding. If you try to equip a shield first, it won't automatically de-equip the two hander...but it looks like you're already doing that part right.
you can use the item codes instead of the descriptions in the conditionals I do believe.
I'm assuming that, basically, Mod:alt will toggle back and forth between dual wield and 2-hander, while normal clicks toggle between S/B and Dual?
I think I see part of your problem, though. Try this:
#showtooltip item:OHOHOH;item:2H2H2H;item:SHIELD
/equipslot 16 item:MHMHMH;16 item:2H2H2H
/equipslot 17 item:SHIELD;17 item:OHOHOH
Remember, the conditionals are evaluated in the state they were in when the button was clicked, so will evaluate as true, even if the first /equipslot command de-equipped your two hander by equipping your MH weapon.
Post by
Maelchav
Thank you very much, RedwoodElf. I thought there was probably a better way to consolidate the conditions, but couldn't find it. And I keep forgetting about the evaluation all happening at once... I put it together in two parts, looking at the off-hand after the main-hand, and wasn't considering the starting conditions.
And you're right, spamming the macro with Alt held will toggle between two-hand and dual-wield; spamming it without Alt will toggle between sword-and-board and dual-wield. The intent was to go to sword-and-board from either of the other states without Alt, and to go to 2-hander from either of the other states with Alt held. With that in mind, the way you set it up makes a lot of sense.
Thanks again!
Post Reply
You are not logged in. Please
log in
to post a reply or
register
if you don't already have an account.