diff --git a/osr/interfaces/mainscreen/bank.simba b/osr/interfaces/mainscreen/bank.simba index aa9a68d9..d6c84013 100644 --- a/osr/interfaces/mainscreen/bank.simba +++ b/osr/interfaces/mainscreen/bank.simba @@ -165,15 +165,19 @@ end; function TRSBank.DepositRandomItems(items: TRSItemArray): Boolean; var slots: TIntegerArray; + t: UInt64; begin slots := Inventory.FindRandomItems(items); + t := GetTickCount() + 50000; while slots <> [] do begin + if GetTickCount() >= t then + Exit; if not Self.IsOpen() then //Exit in case the bank somehow closed. Exit; - if Self.DepositSlot([slots[0], BANK_DEPOSIT_ALL], True) then + if Self.DepositSlot([slots[0], Bank.QUANTITY_ALL], True) then WaitUntil(not Inventory.IsSlotUsed(slots[0]), 100, 2000); slots := Inventory.FindRandomItems(items);