View Single Post
04/09/14, 12:02 PM   #7
Brack
Join Date: Apr 2014
Posts: 5
Originally Posted by Wukar View Post
  • TryBankItem(inventorySlot)
  • TryPlaceInventoryItemInEmptySlot(targetBag)
Neither of these functions (or variations) seem to exist.

Originally Posted by Xrystal View Post
PlaceInInventory protected (integer bagId, integer slotIndex)
PickupInventoryItem protected (integer bagId, integer slotIndex, integer count)
Originally Posted by beeradg View Post
You have to do something like:
CallSecureProtected("PickupInventoryItem", fromBag, fromSlot, quantity)
Okay so CallSecureProtected("PickupInventoryItem", fromBag, fromSlot, quantity) works, as an item in my inventory is placed in my mouse cursor, however that isn't the desired outcome. I want items to be moved to the bank without player interaction (or at least not more than one button click).

I then tried CallSecureProtected("PlaceInInventory", fromBag, fromSlot) but this didn't seem to be able to move banked items into the inventory.

So it seems I'm still stuck. Are we even supposed to be able to use protected functions? I thought the purpose of those was to not allow modders access to those. Seems pretty silly that moving items around in a player's inventory/bank space would be protected anyway.


Edit: Actually I think I got it working... Here is my code that worked (for testing):
Code:
CallSecureProtected("PickupInventoryItem", 1, 1, 1)
BankFirstEmpty = FindFirstEmptySlotInBag(2)
CallSecureProtected("PlaceInInventory", 2, BankFirstEmpty)
Thanks to everyone again for the help.

Last edited by Brack : 04/09/14 at 12:32 PM.
  Reply With Quote