From e2e6d860f202fbbdea989b34eddb8592ce3ce435 Mon Sep 17 00:00:00 2001 From: Torwent Date: Mon, 29 Jul 2024 10:47:20 +0200 Subject: [PATCH] fix: blocking real input had to be inverted --- osr/antiban/antiban.simba | 14 +++++++------- utils/input/remoteinput.simba | 6 +----- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/osr/antiban/antiban.simba b/osr/antiban/antiban.simba index 3c1407dd..08e73549 100644 --- a/osr/antiban/antiban.simba +++ b/osr/antiban/antiban.simba @@ -108,7 +108,7 @@ end; procedure TAntiban.SmallCameraRotation(); begin Self.DebugLn('Small camera rotation'); - Minimap.SetCompassAngle(Minimap.GetCompassAngle+(Random(-15,15))); + Minimap.SetCompassAngle(Minimap.GetCompassAngle() + Random(-15,15)); end; @@ -127,7 +127,7 @@ end; procedure TAntiban.SmallRandomMouse(); override; var b: TBox; - P: TPoint; + p: TPoint; t: TCountDown; begin Self.DebugLn('Random Mouse (Small)'); @@ -135,23 +135,23 @@ begin b := Box(Mouse.Position(), 350, 350); t.Init(30000); repeat - P := SRL.RandomPoint(b); + p := SRL.RandomPoint(b); if t.IsFinished() then begin WriteLn('Box: ', b); - WriteLn('Point: ', P); + WriteLn('Point: ', p); Self.Fatal('Timed out!'); end; - until P.DistanceTo(b.Center()) < 50; // Make sure we move at least 50 distance + until p.DistanceTo(b.Center()) < 50; // Make sure we move at least 50 distance - ASyncMouse.Move(P); + ASyncMouse.Move(p); end; procedure TAntiban.RandomRightClick(); override; begin Self.DebugLn('Random Right Click'); - Mouse.Move(RootInterface.Bounds(), True, MOUSE_DISTRIBUTION_RANDOM); + Mouse.Move(RootInterface.Bounds(), True, EMouseDistribution.MOUSE_DISTRIBUTION_RANDOM); if ChooseOption.Open() then begin diff --git a/utils/input/remoteinput.simba b/utils/input/remoteinput.simba index 7155239a..ba759018 100644 --- a/utils/input/remoteinput.simba +++ b/utils/input/remoteinput.simba @@ -33,10 +33,6 @@ begin LineEnding + 'If this is not the case, close the osrs clients you''ve used Simba on and try again!' ); - if not WLSettings.GetObject('remote_input').getBoolean('block_real_input', True) then - Exit; - - if EIOS_IsInputEnabled(Self.EIOS) then - EIOS_SetInputEnabled(Self.EIOS, False); + EIOS_SetInputEnabled(Self.EIOS, not WLSettings.GetObject('remote_input').getBoolean('block_real_input', True)); end; {$ENDIF}