Skip to content

Commit

Permalink
fix: blocking real input had to be inverted
Browse files Browse the repository at this point in the history
  • Loading branch information
Torwent committed Jul 29, 2024
1 parent d873b2b commit e2e6d86
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
14 changes: 7 additions & 7 deletions osr/antiban/antiban.simba
Original file line number Diff line number Diff line change
Expand Up @@ -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;


Expand All @@ -127,31 +127,31 @@ end;
procedure TAntiban.SmallRandomMouse(); override;
var
b: TBox;
P: TPoint;
p: TPoint;
t: TCountDown;
begin
Self.DebugLn('Random Mouse (Small)');

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
Expand Down
6 changes: 1 addition & 5 deletions utils/input/remoteinput.simba
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit e2e6d86

Please sign in to comment.