Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Question Random mouse movement

Joined
Feb 2, 2018
Messages
3
Is there a way to move the mouse to specific / random coordinates on the screen?

The Mouse.move() function requires an Interactable as a parameter.

All i want is to add some randomness to my bot.
Not moving the mouse until the next action seems extremely obvious / detectable.
 
Joined
Aug 23, 2015
Messages
1,970
Mouse.move(Screen.getPosition())

But don't do that. Let the built-in client antiban take care of you until you're a much more experienced developer (or forever). You'll just create patterns for bot watch to pick up on "randomly" moving your mouse around.
 
Joined
Feb 2, 2018
Messages
3
Alright, thanks!

It's nice to know that there is a built-in antiban.
However, i don't see any random mouse movements after any interaction.
The mouse always stays in exactly the same spot where it was clicked, until the next action is called.
Maybe it has to be enabled manually?
 
For future reference, this seems to be the only working solution:

Code:
int x = Random.nextInt(0,800);
int y = Random.nextInt(0,600);
Mouse.move(Screen.getBounds().getInteractionPoint(new InteractablePoint(x,y)));
 
12 year old normie
Joined
Jan 8, 2015
Messages
2,769
Alright, thanks!

It's nice to know that there is a built-in antiban.
However, i don't see any random mouse movements after any interaction.
The mouse always stays in exactly the same spot where it was clicked, until the next action is called.
Maybe it has to be enabled manually?
 
For future reference, this seems to be the only working solution:

Code:
int x = Random.nextInt(0,800);
int y = Random.nextInt(0,600);
Mouse.move(Screen.getBounds().getInteractionPoint(new InteractablePoint(x,y)));
Please don't do this. You think you're creating antiban but you're just creating patterns. Think about it. You're moving your mouse every time after a successful interaction, that's a pattern right there.

The client has a system in place called Clouse. It handles a more humanlike approach to moving the mouse and interacting with entities.
 
Java Warlord
Joined
Nov 17, 2014
Messages
4,906
Alright, thanks!

It's nice to know that there is a built-in antiban.
However, i don't see any random mouse movements after any interaction.
The mouse always stays in exactly the same spot where it was clicked, until the next action is called.
Maybe it has to be enabled manually?
 
For future reference, this seems to be the only working solution:

Code:
int x = Random.nextInt(0,800);
int y = Random.nextInt(0,600);
Mouse.move(Screen.getBounds().getInteractionPoint(new InteractablePoint(x,y)));
The Screen.getBounds part is entirely redundant, and also what @Derk said +1
 
Mod Automation
Joined
Jul 26, 2013
Messages
3,051
Any bot that implements anti-bans patterns like this will/should be rejected from the Bot Store.
 
Top