WoW:Item equipping: Difference between revisions

2,588 bytes added ,  30 November 2004
Line 2: Line 2:


/script PickupContainerItem(bag, slot)
/script PickupContainerItem(bag, slot)
bag goes from 0 to 4 (0 being your backpack). slot goes from 1 to the number of slots in that bag (left to right, top to bottom).


The basic command. Works like this:
The basic command. Works like this:
Line 24: Line 26:


Will automatically equip the item referenced by bag,slot, placing any existing already equipped item in the bag slot.
Will automatically equip the item referenced by bag,slot, placing any existing already equipped item in the bag slot.
Yes, this is undoubtedly easier... '''until''' you start dealing with dualwielding. At which point UseContainerItem stops being nice. -- [[User:Sarf|Sarf]]


== Multiple commands ==
== Multiple commands ==
Line 34: Line 39:


Good luck!
Good luck!
== Weapon swapping scripts ==
NOTE: When copying the scripts, make sure they end up on ONE line.
Also, you will NEED to change the offhandBag, offhandBagSlot and mainhandBag, mainhandBagSlot names to actual numbers, as the scripts will NOT fit in a macro as it is.
=== From mainhand/offhand to mainhand/offhand ===
Script to swap items in both hands to other items in both hands.
offhandBag, offhandBagSlot and mainhandBag, mainhandBagSlot need to be specified (duh).
/script if ( not CursorHasItem() ) then PickupContainerItem(mainhandBag, mainhandBagSlot); PickupInventoryItem(16); PickupContainerItem(mainhandBag, mainhandBagSlot); PickupContainerItem(offhandBag, offhandBagSlot); PickupInventoryItem(17); PickupContainerItem(offhandBag, offhandBagSlot); end
=== From mainhand to mainhand/offhand ===
Script to switch from item in main hand to other items in both hands.
offhandBag, offhandBagSlot and mainhandBag, mainhandBagSlot need to be specified (duh).
Weapon in main hand will end up in mainhandBag, mainhandBagSlot.
/script if ( not CursorHasItem() ) then PickupContainerItem(mainhandBag, mainhandBagSlot); PickupInventoryItem(16); PickupContainerItem(mainhandBag, mainhandBagSlot); PickupContainerItem(offhandBag, offhandBagSlot); PickupInventoryItem(17); if ( CursorHasItem() ) then PickupContainerItem(offhandBag, offhandBagSlot); end end
=== From mainhand/offhand to mainhand ===
Script to switch from items in both hands to one item in the main hand.
offhandBag, offhandBagSlot and mainhandBag, mainhandBagSlot need to be specified (duh).
Weapons will end up on the slots specified.
/script if ( not CursorHasItem() ) then PickupInventoryItem(17); if ( CursorHasItem() ) then PickupContainerItem(offhandBag, offhandBagSlot); end PickupContainerItem(mainhandBag, mainhandBagSlot); PickupInventoryItem(16); PickupContainerItem(mainhandBag, mainhandBagSlot); end
=== From mainhand to mainhand ===
Script to switch from item in main hand to another item in the main hand.
mainhandBag, mainhandBagSlot need to be specified (duh).
The equipped weapon will end up on mainhandBag, mainhandBagSlot.
/script if ( not CursorHasItem() ) then PickupContainerItem(mainhandBag, mainhandBagSlot); PickupInventoryItem(16); PickupContainerItem(mainhandBag, mainhandBagSlot); end
Anonymous user