SRL Archive - SRL Suggestions

RandomCompassMovement [antiban]


Nebula

2012-02-27 19:17:23

Basically moves the compass in a random direction for a random amount of degrees depending on Min+MaxMovement. if Return is true, it returns the compass to its original position. I think this would be a great addition to antiban.

Function CompassMovement(MinMovement, MaxMovement: Integer; Return: Boolean): Boolean;
var
StartAngle, Movement : Integer;
begin
Result := False;
StartAngle := round(rs_GetCompassAngleDegrees());
case Random(2) of
0: Movement := RandomRange(-MinMovement, -MaxMovement);
1: Movement := RandomRange(MinMovement, MaxMovement);
end;
MakeCompass(StartAngle + Movement);
if (Return = true) then
begin
wait(RandomRange(100,350));
MakeCompass(StartAngle);
end;
Result := true;
end;

Coh3n

2012-03-06 20:02:19

Isn't this just like RandomMovement?

Nebula

2012-03-06 20:08:19

Not exactly.

This doesn't use the mouse at all. This allows you to choose the amount of degrees moved, and whether or not to return to your original Position.

CompassMovement(10, 30, True) would move the compass to a random spot 10 to 30 degrees away, then return the compass to its original position.

Coh3n

2012-03-06 20:09:07

Alright, I'll add it right now.

E: Done!