Random Mouse Mover

Ask gaming related questions (AHK v1.1 and older)
Runey
Posts: 2
Joined: 24 Feb 2018, 11:54

Random Mouse Mover

24 Feb 2018, 12:02

So, I'm trying to make or find a script that will meet the following requirements:
1- Move my mouse to a random point on my screen and back
2- Have it set at a random time that is no longer than 5 minutes
3- (Not required but pref) Have it move only on the horizontal axis
4- Try to make sure it doesn't draw any patterns (I'm using this script for Runescape)
Why do I need this code? I am trying to afk mine on Runescape, but their system is too good at detecting bots, so I want a script that won't draw any patterns.
The best I could find atm isn't random and is:

Code: Select all

toggle := 0

F1::
MouseGetPos, MouseX, MouseY
if toggle := !toggle
 gosub, MoveTheMouse
else
 SetTimer, MoveTheMouse, off
return

MoveTheMouse:
MouseMove, 200, 200
SetTimer, MoveTheMouse, -3000  ; every 3 seconds 
MouseMove, %MouseX%, %MouseY%
return
Odlanir
Posts: 659
Joined: 20 Oct 2016, 08:20

Re: Random Mouse Mover

24 Feb 2018, 12:08

Some like this?

Code: Select all

toggle := 0, fixedY := A_ScreenHeight/2 ; choose the y you like

F1::
MouseGetPos, MouseX, MouseY
if toggle := !toggle
 gosub, MoveTheMouse
else
 SetTimer, MoveTheMouse, off
return

MoveTheMouse:
Random, x, 1, % A_ScreenWidth
MouseMove, %x%, %fixedY%
SetTimer, MoveTheMouse, -3000  ; every 3 seconds 
return
____________________________________________________________________________
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode
Odlanir
Posts: 659
Joined: 20 Oct 2016, 08:20

Re: Random Mouse Mover

24 Feb 2018, 12:11

I've forgotten this:

Code: Select all

CoordMode, mouse, screen
____________________________________________________________________________
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode
User avatar
Nwb
Posts: 444
Joined: 29 Nov 2016, 08:56

Re: Random Mouse Mover

24 Feb 2018, 12:48

Odlanir wrote:Some like this?

Code: Select all

toggle := 0, fixedY := A_ScreenHeight/2 ; choose the y you like

F1::
MouseGetPos, MouseX, MouseY
if toggle := !toggle
 gosub, MoveTheMouse
else
 SetTimer, MoveTheMouse, off
return

MoveTheMouse:
Random, x, 1, % A_ScreenWidth
MouseMove, %x%, %fixedY%
SetTimer, MoveTheMouse, -3000  ; every 3 seconds 
return
Question. Would anything change if you removed 'toggle := 0' from the first line? Or is it required?
0 is false right?
Last edited by Nwb on 24 Feb 2018, 12:59, edited 1 time in total.
I am your average ahk newbie. Just.. a tat more cute. ;)
Runey
Posts: 2
Joined: 24 Feb 2018, 11:54

Re: Random Mouse Mover

24 Feb 2018, 12:58

Odlanir wrote:Some like this?

Code: Select all

toggle := 0, fixedY := A_ScreenHeight/2 ; choose the y you like

F1::
MouseGetPos, MouseX, MouseY
if toggle := !toggle
 gosub, MoveTheMouse
else
 SetTimer, MoveTheMouse, off
return

MoveTheMouse:
Random, x, 1, % A_ScreenWidth
MouseMove, %x%, %fixedY%
SetTimer, MoveTheMouse, -3000  ; every 3 seconds 
return
This seems to work for the most part, however, I would like the timer to be completely random with the longest time of inactivity being 4 minutes 59 seconds (at most), that way, Jagex cannot see that I'm moving my mouse every specified second (they record mouse movements, clicks, and when they are made, so I don't want something they can say "This guy's using a program, ban him"
User avatar
Nwb
Posts: 444
Joined: 29 Nov 2016, 08:56

Re: Random Mouse Mover

24 Feb 2018, 13:01

Runey wrote: This seems to work for the most part, however, I would like the timer to be completely random with the longest time of inactivity being 4 minutes 59 seconds (at most), that way, Jagex cannot see that I'm moving my mouse every specified second (they record mouse movements, clicks, and when they are made, so I don't want something they can say "This guy's using a program, ban him"
Moves every 1minute-5minutes. Added mousemove speed just in case and coordmode. Consider that this script can still be detected by the game and can potentially get you banished from the game. So use the script with your own discretion.

Code: Select all

CoordMode, mouse, screen

toggle := 0, fixedY := A_ScreenHeight/2 ; choose the y you like

F1::
MouseGetPos, MouseX, MouseY
if toggle := !toggle
 gosub, MoveTheMouse
else
 SetTimer, MoveTheMouse, off
return

MoveTheMouse:
Random, x, 1, % A_ScreenWidth
MouseMove, %x%, %fixedY%, 100
Random, Time, 1000*60, 1000*60*5
SetTimer, MoveTheMouse, -%time%  ; every 3 seconds 
return
I am your average ahk newbie. Just.. a tat more cute. ;)

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: Shoobis and 89 guests