def TakeItemContainer(): LeftIndex = GemRB.GetVar("LeftIndex") if LeftIndex < 0: return if LeftIndex >= Container['ItemCount']: return GemRB.ChangeContainerItem(0, LeftIndex, 1) UpdateContainerWindow()
def DropItemContainer(): RightIndex = GemRB.GetVar("RightIndex") if RightIndex < 0: return #we need to get the right slot number pc = GemRB.GameGetFirstSelectedPC() inventory_slots = GemRB.GetSlots(pc, 0x8000) if RightIndex >= len(inventory_slots): return GemRB.ChangeContainerItem(0, inventory_slots[RightIndex], 0) UpdateContainerWindow()