Skip to content

Commit 77bbd18

Browse files
committed
Merge remote-tracking branch 'origin/feature/geSlot-progress' into feat/geImprovements
2 parents 798a0cf + 79d5b25 commit 77bbd18

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

osrs/interfaces/mainscreen/grandexchange/grandexchange.simba

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,31 @@ begin
285285
Result := EGEOfferStatus.NONE;
286286
end;
287287

288+
(*
289+
## TRSGrandExchangeSlot.Progress
290+
```pascal
291+
property TRSGrandExchangeSlot.Progress: Integer;
292+
```
293+
Returns the progress percentage of the slot.
294+
295+
Example:
296+
```pascal
297+
WriteLn GrandExchange.Slots[2].Progress;
298+
```
299+
*)
300+
property TRSGrandExchangeSlot.Progress: Integer;
301+
var
302+
tpa: TPointArray;
303+
begin
304+
tpa := Target.FindColor($1964A8, 0, Self.StatusBox);
305+
if not (tpa = []) then
306+
Result := Round(tpa.Bounds.Width() / 105 * 100)
307+
else if Target.HasColor($004A00, 0, 1, Self.StatusBox) then
308+
Result := 100
309+
else
310+
Result := -1;
311+
end;
312+
288313
(*
289314
## TRSGrandExchangeSlot.Open
290315
```pascal

0 commit comments

Comments
 (0)