This is not to be used on antiban on it's own, but rather as a multi threaded anti ban. (eg, misclicking a rock while mining, and then properly clicking it)
SCAR Code:
function MisMouse(Target: TPoint; rX, rY: integer; Right: boolean; MouseColor(Yellow, Red, Either)): boolean;
var
realX, realY, tx, ty, tt: integer;
TimeFactor: extended;
begin
realX := Random(rX) + Target.x;
realY := Random(rY) + Target.y;
tx := Random(RMOUSE_X);
ty := Random(RMOUSE_Y);
tt := 50 + Random(CLICK_TIME) ;
Timefactor := tt * 0.1;
Mouse(realX, RealY, tx, ty, Right);
wait(tt);
Mouse(
Target.x - round(TimeFactor*(realX + tx)),
Target.y - round(TimeFactor*(realY + ty)),
Right
);
Result := true;
If MouseColor <> Either then
if MouseColor = Red then
if DidRedClick then
Result := true
else
Result := false
else //MouseColor = Yellow
if DidYellowClick then
Result := true
else
Result := false;
end;
Thoughts, comments?
I could always add the % parameter to make it more user friendly, meaning you'd always call MisMouse instead of mouse, with a % possibility of it misclicking.
~RM