Skip to content

Commit 080061e

Browse files
committed
fix: chooseoptions was using RSClient._Bounds() instead of RSClient.Bounds
- also added a small delay to MainScreen.SetHighestPitch()
1 parent 113c38a commit 080061e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

osrs/interfaces/chooseoption.simba

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ begin
5353
p.X += 1;
5454
p.Y += Self.TitleImg.Height;
5555

56-
with RSClient._Bounds() do
56+
with RSClient.Bounds do
5757
tpa := Target.FindColor(Colors.BLACK, 0, [P.X, P.Y, Width - 1, Height - 1]);
5858

5959
Result := tpa <> [];

osrs/interfaces/mainscreen/mainscreen.simba

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,13 +312,12 @@ procedure TRSMainScreen.SetHighestPitch();
312312
var
313313
i, area: Integer;
314314
begin
315-
Keyboard.KeyDown(EKeyCode.UP);
316-
317315
area := Self.Bounds.Area * 100;
316+
Keyboard.KeyDown(EKeyCode.UP);
317+
Sleep(30);
318318
for i := 1 to 10 do // 2500ms timeout
319319
if (Target.GetPixelDifference(250, Self.Bounds).Length / area) < 10 then // less than 10% of the screen changed in 250ms
320320
Break;
321-
322321
Keyboard.KeyUp(EKeyCode.UP);
323322
Self.HighestPitch := True;
324323
end;

0 commit comments

Comments
 (0)