Picks up an item from or puts an item into a slot in one of the player's bags or other containers. If the cursor is empty and the referenced container slot contains an item, that item is put onto the cursor. If the cursor contains an item and the slot is empty, the item is placed into the slot. If both the cursor and the slot contain items, the contents of the cursor and the container slot are exchanged.

An item picked up from a container is not removed from its slot (until put elsewhere); when an item is picked up, the slot becomes locked, preventing other changes to its contents until the disposition (movement, trade, mailing, auctioning, destruction, etc) of the picked-up item is resolved.


See also Container functions, Cursor functions.

Signature:

PickupContainerItem(container, slot)

Arguments:

  • container - Index of one of the player's bags or other containers (number, containerID)
  • slot - Index of an item slot within the container (number, containerSlotID)

Examples:

-- Pickup the first item in your backpack
PickupContainerItem(0, 1)