Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:Item equipping
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Any to Any === Script to swap from one set of weapons to another, in any combination. I've included an expanded version of the somewhat obfuscated code, although it's a too long to be usable itself. The CloseMerchant() call is included for safety reasons. The shorter version uses bag 3, slot 5 for the main weapon and bag 4, slot 6 for the offhand item, whereas the expanded version uses more descriptive terms for those locations. Note that the held weapons will end up in those inventory slots after the swap, so if you're swapping between a two-handed weapon and a one-handed + offhand configuration, you'll need to leave the offhand bag slot empty while you're wielding it, or swapping it out won't work properly. ''/script local a,b,c=CursorHasItem,PickupInventoryItem,PickupContainerItem;if(not a())then CloseMerchant();b(17);if(a())then c(4,6);c(4,5);b(16)else c(4,5);b(16);c(4,6);b(17)end end /script if ( not CursorHasItem() )then CloseMerchant(); PickupInventoryItem(17); if ( CursorHasItem() ) then PickupContainerItem(offhandBag, offhandBagSlot); PickupContainerItem(mainhandBag, mainhandBagSlot); PickupInventoryItem(16); else PickupContainerItem(mainhandBag, mainhandBagSlot); PickupInventoryItem(16); PickupContainerItem(offhandBag, offhandBagSlot); PickupInventoryItem(17); end end
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)