Incollo questo post molto ultile, il post originale lo trovate qua
I tried several different macros from here and other places for swapping weapons, but I always seemed to have the irritating event of a weapon or sword stuck on my cursor, or where the items were dropped in the wrong bag. So I tested and came up with the following macros.
"Swap from 2-handed weapon to 1-hand and shield"
This Macro Checks for an off hand item(17), if the off hand is not empty it does nothing. If there is nothing in the off hand, it Picks up the first item in bag 4 (4,1), swaps it with the main weapon (16), and then picks up the second item in bag 4 (4,2) and places that in the off hand(17). This is useful for swapping to dual wield or swapping to sword and shield. The bag slots can be changed to suit your need.
/script
oi=(GetInventoryItemLink("player",17));
if (not oi) then
PickupContainerItem(4,1);
PickupInventoryItem(16);
PickupContainerItem(4,2);
PickupInventoryItem(17);
end;
"Swap from dual/shield to 2-handed weapon"
This Macro Checks for an off hand item(17), if the off hand is empty it does nothing. If there is something in the off hand, it Picks up the off hand (17) and places it in the second slot of bag 4 (4,2). It then picks up the first item in bag 4 (4,1) and places it in the main hand(16). This is usefull for swapping back to a 2 handed weapon from dual wield or sword and shield.The bag slots can be changed to suit your need.
/script
oi=(GetInventoryItemLink("player",17));
if (oi) then
PickupInventoryItem(17);
PickupContainerItem(4,2);
PickupContainerItem(4,1);
PickupInventoryItem(16);
end;
"Swap from dual/shield to 2-handed weapon with a shield bash first"
This macro is identical to the swap macro except it executes a shield bash before swapping back.
/cast ShieldBash(Rank 2)
/script
oi=(GetInventoryItemLink("player",17));
if (oi) then
PickupInventoryItem(17);
PickupContainerItem(4,2);
PickupContainerItem(4,1);
PickupInventoryItem(16);
end;
After getting my first macros working properly, I really wanted to look more at macro making. Now I found several abilities that I really thought were very good for warriors, unfortunately they were in different stances:
Overpower- with Talents a great ability, especially with improved crit and deep wounds, my crit percentage on overpower is around 75%.
Execute - a great finishing move, especially when mobs run, piercing howl/hamstring at 25% and execute to stop them from running.
Taunt- the money maker, no rage cost, great for saving casters.
Disarm- Lowers mobs dps, cooldown sucks being long, but nice dps reduction, and mobs hate it.
Revenge- with Talents a 3 second stun 40% of the time. makes a huge difference in mob dps and damage taken.
Charge- great opener, free rage.
So I wanted to be able to use these abilities pretty much all the time. With tactical mastery, I had the ability to swap stances and use abilities so I set to work on some macros. With Blizzard adding the 'light up' effect to macros, It made this very feasable.
The following macros are designed for usage in BOTH Defensive and Battle stance. The way to use them is to have the macro on BOTH STANCE hotbars in the same slot. What happens is this. If the ability is USABLE, no matter what stance you are in, The macro will "LIGHT UP" if you click the hotkey, if you are in the correct stance, it will use the ability, if not it will swap you to the correct stance. Hitting the button again will then activate the ability. For example, if you are in battle stance and need to taunt, double tap the taunt macro and it will swap to battle and then taunt. Now these macros only work if you have enough talent points in tactical mastery to use the abilities after the stance switch.
"taunt"
This macro checks for defensive stance - GetShapeshiftFormInfo(2) - If in stance it casts taunt, if not it swaps the stance.
/script
texture,name,isActive,isCastable = GetShapeshiftFormInfo(2);
if isActive then CastSpellByName("Taunt()");
else CastSpellByName("Defensive Stance()");
end;
"Execute"
This macro checks for battle stance - GetShapeshiftFormInfo(1) - If in stance it casts execute, if not it swaps the stance.
/script
texture,name,isActive,isCastable = GetShapeshiftFormInfo(1);
if isActive then CastSpellByName("Execute(Rank 4)");
else CastSpellByName("Battle Stance()");
end;
"Overpower"
This macro checks for battle stance - GetShapeshiftFormInfo(1) - If in stance it casts overpower, if not it swaps the stance.
/script
texture,name,isActive,isCastable = GetShapeshiftFormInfo(1);
if isActive then CastSpellByName("Overpower(Rank 3)");
else CastSpellByName("Battle Stance()");
end;
"Charge"
This macro checks for battle stance - GetShapeshiftFormInfo(1) - If in stance it casts charge, if not it swaps the stance.
/script
texture,name,isActive,isCastable = GetShapeshiftFormInfo(1);
if isActive then CastSpellByName("Charge(Rank 3)");
else CastSpellByName("Battle Stance()");
end;
"Revenge"
This macro checks for defensive stance - GetShapeshiftFormInfo(2) - If in stance it casts revenge, if not it swaps the stance.
/script
texture,name,isActive,isCastable = GetShapeshiftFormInfo(2);
if isActive then CastSpellByName("Revenge(Rank 4)");
else CastSpellByName("Defensive Stance()");
end;
"Disarm"
This macro checks for defensive stance - GetShapeshiftFormInfo(2) - If in stance it casts disarm, if not it swaps the stance.
/script
texture,name,isActive,isCastable = GetShapeshiftFormInfo(2);
if isActive then CastSpellByName("Disarm()");
else CastSpellByName("Defensive Stance()");
end;
Note: About these macros, I have formatted them for ease of reading, when you enter them in, there needs to be no line breaks after anything that says /script just one long line of text. Also make sure that the Rank of spell is correct for what you are doing.