PDA

View Full Version : Is this clicking code too bot-like?



Mr. Roboto
08-13-2014, 04:53 AM
This code is meant to look for a Wall safe then click it. It finds the x, y position of the safe then calculates a random offset for those points so that I don't always click on the same spot.

I am afraid that it might be teleporting the mouse around instead of dragging it.




// Search for a safe.
if mainscreen.findObject(x, y, 5855585, 11, ['all safe'], MOUSE_MOVE)
then begin
rx := randomRange(-50, 10);
ry := randomRange(-10, 50);
mouse(x, y, rx, ry, MOUSE_LEFT);


Is the movement human enough or is it obviously a bot? Can it be improved, if so, how?

The Mayor
08-13-2014, 04:59 AM
This code is meant to look for a Wall safe then click it. It finds the x, y position of the safe then calculates a random offset for those points so that I don't always click on the same spot.

I am afraid that it might be teleporting the mouse around instead of dragging it.




// Search for a safe.
if mainscreen.findObject(x, y, 5855585, 11, ['all safe'], MOUSE_MOVE)
then begin
rx := randomRange(-50, 10);
ry := randomRange(-10, 50);
mouse(x, y, rx, ry, MOUSE_LEFT);


Is the movement human enough or is it obviously a bot? Can it be improved, if so, how?

No real need for randomness on the randomness, and that is a massive range for a mouse offset. If you move it 50px to the left you'll probably miss the safe altogether.

Mr. Roboto
08-13-2014, 05:36 AM
So something like this code below would be enough randomness?


if mainscreen.findObject(x, y, 5855585, 11, ['all safe'], MOUSE_MOVE)
then begin
mouse(x, y, 5, 5, MOUSE_LEFT);

On a related note. Would those long strings that I see in people's code, I think they are called DTMs, improve randomness on clicks?

The Mayor
08-13-2014, 06:01 AM
So something like this code below would be enough randomness?


if mainscreen.findObject(x, y, 5855585, 11, ['all safe'], MOUSE_MOVE)
then begin
mouse(x, y, 5, 5, MOUSE_LEFT);

On a related note. Would those long strings that I see in people's code, I think they are called DTMs, improve randomness on clicks?

Yes.

Regarding the DTMs it would just be the same. findDTM(dtm, x, y, etc..) The Midpoint of the DTM is put into (x, y) so you would just do the same thing as you do above.