Lore archive · Warcraft Wiki, 2023 dump
API PickupInventoryItem
Last wiki revision 2022-07-22
Picks up / interacts with an equipment slot. PickupInventoryItem(slotId)
- Arguments
- slotId: - the slot ID of the worn inventory slot.
- Details
- If the cursor is empty, then it will attempt to pick up the item in the slotId.
- If the cursor has an item, then it will attempt to equip the item to the slotId and place the previous slotId item (if any) where the item on cursor orginated.
- If the cursor is in repair or spell-casting mode, it will attempt the action on the slotId.
- You can use GetInventorySlotInfo to get the slotId:
- Example
/script PickupInventoryItem(GetInventorySlotInfo("MainHandSlot")) /script PickupInventoryItem(GetInventorySlotInfo("SecondaryHandSlot"))
The above attempts a main hand/off-hand weapon swap. It will pick up the weapon from the main hand and then pick up the weapon from the off-hand, attempting to equip the main hand weapon to off-hand and sending the off-hand to main hand if possible.
Source
https://warcraft.wiki.gg/wiki/API_PickupInventoryItem · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.