Skip to content

Commit 2e5d468

Browse files
committed
Update bank.simba
1 parent c0e7d16 commit 2e5d468

File tree

1 file changed

+30
-22
lines changed

1 file changed

+30
-22
lines changed

osrs/interfaces/mainscreen/bank.simba

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,37 +1134,45 @@ begin
11341134
if Inventory.Items.Find(item, slot) then
11351135
Result := Self._InteractionHelper(ERSBankInteraction.DEPOSIT, slot, 1, useQuantityButton);
11361136
end;
1137+
11371138
(*
1138-
##Bank.DepositInventory
1139+
## Bank.DepositInventory
11391140
```pascal
1140-
function TRSbank.DepositInventory: Boolean;
1141+
function TRSbank.DepositInventory(): Boolean;
11411142
```
1142-
Deposits All Items In Inventory into the bank. Doesn't close bank after depositing.
1143+
Deposits all items in the {ref}`inventory` into the bank.
1144+
11431145
Example:
11441146
```pascal
1145-
Procedure Test;
1146-
1147-
begin
1148-
Map.Setup([ERSChunk.VARROCK]);
1149-
bank.DepositInventory;
1150-
end;
1147+
WriteLn Bank.DepositInventory();
11511148
```
11521149
*)
1150+
function TRSBank.DepositInventory(): Boolean;
1151+
var
1152+
count: Integer;
1153+
begin
1154+
count := Inventory.Slots.Count();
1155+
Bank.DynamicButtons[ERSBankDynamicButtons.DEPOSIT_INVENTORY].Click(EMouseButton.LEFT);
1156+
Result := SleepUntil(Inventory.Slots.Count() < count, 200, 4*TICK);
1157+
end;
11531158

1154-
function TRSBank.DepositInventory: Boolean;
1159+
(*
1160+
## Bank.DepositEquipment
1161+
```pascal
1162+
function TRSBank.DepositEquipment(): Boolean;
1163+
```
1164+
Deposits all items in the worn equipment into the bank.
1165+
1166+
Example:
1167+
```pascal
1168+
WriteLn Bank.DepositEquipment();
1169+
```
1170+
*)
1171+
function TRSBank.DepositEquipment(): Boolean;
11551172
begin
1156-
begin
1157-
If bank.open Then
1158-
Bank.DynamicButtons[ERSBankDynamicButtons.DEPOSIT_INVENTORY].Click(EMouseButton.LEFT)
1159-
Else Bank.open;
1160-
Result:=True;
1161-
end;
1162-
begin
1163-
If not Inventory.slots.CountEmpty then
1164-
Bank.DynamicButtons[ERSBankDynamicButtons.DEPOSIT_INVENTORY].Click(EMouseButton.LEFT);
1165-
Result:=True;
1166-
end;
1167-
end;
1173+
Bank.DynamicButtons[ERSBankDynamicButtons.DEPOSIT_WORN].Click(EMouseButton.LEFT);
1174+
Result := True;
1175+
end;
11681176

11691177

11701178
(*

0 commit comments

Comments
 (0)