Skip to content

Commit

Permalink
feat: login loop now has a workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
Torwent committed Jan 12, 2025
1 parent be4e1c2 commit 91ce72e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
2 changes: 2 additions & 0 deletions osr/antiban/antiban.simba
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,8 @@ begin
Self.AddTask(7 * ONE_MINUTE, @Self.RandomPOVTask, 0.33);
end;

Self.AddTask(7 * ONE_MINUTE, @Self.RandomKeyboard, 0.33);

if WLSettings.GetObject('antiban').getJSONObject('tasks').getBoolean('mouse') then
Self.AddTask(8 * ONE_MINUTE, @Self.RandomMouseTask, 0.33);

Expand Down
9 changes: 6 additions & 3 deletions osr/interfaces/gametabs/gametabs.simba
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
{$I WaspLib/osr.simba}
{$ENDIF}

procedure TKeyboard.PressKey(Key: Integer); override;
procedure TKeyboard.PressKey(const key: Integer); override;
begin
inherited;

if Self.IsKeyDown(Key) then
Self.KeyUp(Key);
while Self.IsKeyDown(key) do
begin
Self.KeyUp(key);
Wait(50);
end;
end;

function TRSGameTabs.FKeyOpen(Tab: ERSGameTab): Boolean; override;
Expand Down
9 changes: 9 additions & 0 deletions osr/interfaces/gametabs/logout.simba
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ Extends SRL's TRSLogout.
{$I WaspLib/osr.simba}
{$ENDIF}

procedure TRSLogout.ClearEnter();
begin
if Keyboard.LastKey <> VK_RETURN then Exit;
Antiban.RandomKeyboard();
end;

(*
## Logout.ClickLogout
```pascal
Expand Down Expand Up @@ -43,6 +49,9 @@ begin
end;

for i := 1 to attempts do
begin
Self.ClearEnter();
if Self.GetButton(ERSLogoutButton.CLICK_HERE).Click() and WaitUntil(not RSClient.IsLoggedIn(), 500, Interval + SRL.NormalRange(-2000, 2000)) then
Exit(True);
end;
end;
3 changes: 1 addition & 2 deletions osr/rsclient.simba
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ procedure TRSClient.CheckClientSettings();
var
userB, expB: TBox;
begin
if not MainScreen.HighestPitch then
MainScreen.SetHighestPitch();
if not MainScreen.HighestPitch then MainScreen.SetHighestPitch();

if not WL.GameSettings.MaxBrightness then
begin
Expand Down
Binary file removed osr/walker/maps/agility-winter.png
Binary file not shown.

0 comments on commit 91ce72e

Please sign in to comment.