1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
.........
if (e.getButton() == MouseEvent.BUTTON2) {
Main.rightClick = true;
}
if (e.getButton() == MouseEvent.BUTTON1) {
Main.left = true;
}
executorService.submit(() -> {
try {
Robot robot = new Robot();
while (Main.rightClick && Main.left && compteur < nballe) {
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
System.out.println("ClickLeftAuto");
if (e.getButton() != MouseEvent.BUTTON1 ) {
return;
}
Thread.sleep((long) ((long) 1025 / rateoff));
compteur++;
System.out.println("compteur++");
}
}catch (Exception e1) {
e1.printStackTrace();
}
});
executorService.submit(() -> {
try {
Robot robot = new Robot();
Point point;
while (Main.rightClick && Main.left && compteur < nballe) {
point = MouseInfo.getPointerInfo().getLocation();
robot.mouseMove(point.x, point.y);
if (e.getButton() != MouseEvent.BUTTON1 ) {
return;
}
Thread.sleep((long) ((long) 100 / rateoff));
// System.out.println("NoRecoil-off");
}
}catch (Exception e1) {
e1.printStackTrace();
}
});
reste du code ............. |