Skip to content

Commit 3b5d02e

Browse files
committed
Merge branch 'Documentation' of https://github.com/jacz24/WaspLib-2000 into Documentation
2 parents 69bad84 + 7c3d609 commit 3b5d02e

File tree

2 files changed

+47
-2
lines changed

2 files changed

+47
-2
lines changed

osrs/interfaces/mainscreen/bank.simba

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,6 +1464,51 @@ begin
14641464
Result := Target.FindColor($0000ff, 4, box.Expand(2, 1)).Intersection(box.Expand(1, 0).Corners).Length = 4;
14651465
end;
14661466

1467+
1468+
(*
1469+
## Bank.LockSlot
1470+
```pascal
1471+
function TRSBank.LockSlot(slot: Integer): Boolean;
1472+
```
1473+
Locks an inventory slot and returns confirmation the slot was locked.
1474+
1475+
Example:
1476+
```pascal
1477+
{$I WaspLib/osrs.simba}
1478+
begin
1479+
if Bank.LockSlot(0) then
1480+
WriteLn('Slot 0 has been locked');
1481+
end.
1482+
```
1483+
*)
1484+
function TRSBank.LockSlot(slot: Integer): Boolean;
1485+
begin
1486+
if Self.IsSlotLocked(slot) then Exit(True);
1487+
Result := Self.Slots.Interact(slot, 'Lock-slot') and SleepUntil(Self.IsSlotLocked(slot), Random(100, 300), 1200);
1488+
end;
1489+
1490+
(*
1491+
## Bank.LockSlot
1492+
```pascal
1493+
function TRSBank.UnlockSlot(slot: Integer): Boolean;
1494+
```
1495+
Unlocks an inventory slot and returns confirmation the slot was unlocked.
1496+
1497+
Example:
1498+
```pascal
1499+
{$I WaspLib/osrs.simba}
1500+
begin
1501+
if Bank.UnlockSlot(0) then
1502+
WriteLn('Slot 0 has been unlocked');
1503+
end.
1504+
```
1505+
*)
1506+
function TRSBank.UnlockSlot(slot: Integer): Boolean;
1507+
begin
1508+
if not Self.IsSlotLocked(slot) then Exit(True);
1509+
Result := Self.Slots.Interact(slot, 'Unlock-slot') and SleepUntil(not Self.IsSlotLocked(slot), Random(100, 300), 1200);
1510+
end;
1511+
14671512
var
14681513
(*
14691514
## Bank variable

version.simba

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ WaspLib version.
4040
*)
4141
WL_VERSION_YEAR: Integer = 2025;
4242
WL_VERSION_MONTH: Integer = 12;
43-
WL_VERSION_DAY: Integer = 11;
43+
WL_VERSION_DAY: Integer = 12;
4444
(*
4545
## Commit Hash Constants
4646
```pascal
@@ -49,7 +49,7 @@ WL_VERSION_COMMIT_HASH
4949
Should be self explanatory but holds the shortened hash of the commit that has
5050
created the current WaspLib version.
5151
*)
52-
WL_VERSION_COMMIT_HASH: String = '993c2e7';
52+
WL_VERSION_COMMIT_HASH: String = 'b072fe9';
5353

5454

5555
(*

0 commit comments

Comments
 (0)