Need some help with making an anti recoil script

12/22/2021 17:48 HunteR_90#1
Hello, I'm trying to make an anti recoil script.
I'm trying to do it with Java (I also make screenshots to detect which weapon is in use and its attachments).

Currently struggling with making mouse to move down in order to compensate the recoil.
I try to do it with the java.awt.Robot library. I have something like this just for the test:

while (true) {
int currentX = MouseInfo.getPointerInfo().getLocation().x;
int currentY = MouseInfo.getPointerInfo().getLocation().y;
robot.mouseMove(currentX, currentY + 1);
Thread.sleep(10);
}

On my desktop it look like works, but in the game it isn't. I mean, when I run it, it just flip around my screen instead of smoothly move my aim down. I'm not sure what is happening. I'll be happy if there is some Java guru to give me some help. Thanks. :)
12/26/2021 16:49 muleriot#2
Quote:
Originally Posted by HunteR_90 View Post
Hello, I'm trying to make an anti recoil script.
I'm trying to do it with Java (I also make screenshots to detect which weapon is in use and its attachments).

Currently struggling with making mouse to move down in order to compensate the recoil.
I try to do it with the java.awt.Robot library. I have something like this just for the test:

while (true) {
int currentX = MouseInfo.getPointerInfo().getLocation().x;
int currentY = MouseInfo.getPointerInfo().getLocation().y;
robot.mouseMove(currentX, currentY + 1);
Thread.sleep(10);
}

On my desktop it look like works, but in the game it isn't. I mean, when I run it, it just flip around my screen instead of smoothly move my aim down. I'm not sure what is happening. I'll be happy if there is some Java guru to give me some help. Thanks. :)
Hey man, the coding forum section of ElitePvp you may get more traction or answers on than a generic forum over here, try that and see if it helps!