SRL Archive - SRL Suggestions

Antiban.scar - MouseOffScreen


TomTuff

2011-02-01 00:22:12

{*******************************************************************************
procedure MouseOffScreen(MinimumWait, RandomWait: Integer);
By: TomTuff
Description: Uses MMouse() to move the mouse somewhere off the screen
*******************************************************************************}
procedure MouseOffScreen(MinimumWait, RandomWait: Integer);
var
w, h: Integer;
Pt: TPoint;
begin
GetClientDimensions(w, h);
repeat
Pt := Point(RandomRange(-w, 2 * w), RandomRange(-h, 2 * h));
until(not(PointInBox(Pt, IntToBox(0, 0, w, h))));
MMouse(Pt.x, Pt.y, 0, 0);
Wait(MinimumWait + Random(RandomWait));
end;

It's simple, but good antiban IMO. Use it if you wish :spot:

Coh3n

2011-02-01 01:28:03

I'm almost positive there's a procedure that already does this. I've seen my mouse move outside the SMART window before..

TomTuff

2011-02-01 01:32:33

From: Coh3n
I'm almost positive there's a procedure that already does this. I've seen my mouse move outside the SMART window before..


Well if there is, it's definitely in the wrong part of the include. Here's the file header for Antiban.scar in SRL
//-----------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//-- ? AntiBan Routines --//
//-----------------------------------------------------------------//
// * procedure RandomRClick; // by phantombmx/EvilChicken!, idea by NaumanAkhlaQ
// * procedure HoverSkill(Skill: String; Click: Boolean); // by Dankness extended by Cheesehunk and fixed by Ron
// * procedure PickUpMouse; // by dark_sniper
// * procedure RandomMovement; // by Krazy_Meerkat
// * procedure BoredHuman; // by WT-Fakawi
// * procedure ExamineInv; // by R1ch
// * procedure RandomAngle(HowToEnd : Variant); // by R1ch
// * function LevelUp : Boolean; // by R1ch

Coh3n

2011-02-01 01:37:45

Yeah I can't seem to find it. Maybe I'm wrong, who knows. :p

It's a good idea, though. I remember reading something about it before, maybe it's already been suggested.

Frement

2011-02-01 01:47:52

There is/was this function? At least in the early 2007. I have used it.

Rich

2011-02-01 02:56:12

Maybe it's in BoredHuman? I can't actually be bothered to to open it and a have look (laziness, I know), but I know BoredHuman does quite a bit.

TomTuff

2011-02-01 03:06:37

From: Rich
Maybe it's in BoredHuman? I can't actually be bothered to to open it and a have look (laziness, I know), but I know BoredHuman does quite a bit.


bored human screws around with the camera and right clicks a bunch of stuff. I've just read antiban.scar, nothing does this, unless I don't understand the code… but it's all just simple key/mouse movements, so I hope I understand it properly

Bonfield

2011-02-01 04:21:13

i remember this to, what ever happened to it?

Gu3st...

2011-02-01 04:37:23

I don't like that loop in there though..
If you could make it so that it wont loop until it finds a point, then I'd like it

TomTuff

2011-02-01 22:19:09

From: Zyt3x
I don't like that loop in there though..
If you could make it so that it wont loop until it finds a point, then I'd like it


procedure MouseOffScreen(MinimumWait, RandomWait: Integer);
var
Pt: TPoint;
w, h: Integer;
begin
GetClientDimensions(w, h);
Pt := Point(RandomRange(-w, 2 * w), RandomRange(-h, 2 * h));
if ((Pt.x <= w) and (Pt.x >= 0)) and not((Pt.y <= 0) or (Pt.y >= 0)) then
IncEx(Pt.x, w);
MMouse(Pt.x, Pt.y, 0, 0);
Wait(MinimumWait + Random(RandomWait));
end;

NCDS

2011-02-01 23:01:11

From: Coh3n
Yeah I can't seem to find it. Maybe I'm wrong, who knows. :p

It's a good idea, though. I remember reading something about it before, maybe it's already been suggested.


I wrote up a quick version of it a while ago for MSI's anti ban, that's probably what your thinking of. :p