Originally Posted by TheBelgarion
Hi,
i moved my item with the functions mentioned above and it works ... but than moving more than one
FindFirstEmptySlotInBag(2) always reports the same position to insert new item, which does not work naturally ... how can I update bag so its finds a new empty SLot?
-- must call secure protected (pickup the item via cursor)
result = CallSecureProtected("PickupInventoryItem", item.bag, item.slot, item.stack)
if (result) then
-- must call secure protected (drop the item on the cursor)
result = CallSecureProtected("PlaceInInventory", toBag, toSlot)
end
|
You probably need to implement some time buffering or wait for the update single item inventory event before moving the next item.