Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.AWTException;
- import java.awt.Robot;
- import java.awt.event.MouseEvent;
- import java.util.Random;
- public class Main {
- Thread thread = new Thread(new Runnable()) {
- static int time = 0; //Time variable, we will use this to check whether or not to use overload
- static int offset = 0;
- private static Robot robot = null;
- public static void main (String[] args)
- {
- try{
- robot = new Robot ();
- }
- catch (AWTException e){
- e.printStackTrace();
- }
- timer();
- }
- thread.start();
- public static int randomizeClickPrayerX()
- {
- Random rand = new Random();
- int randomCoords = rand.nextInt((1008 - 995) + 1) + 995;
- return randomCoords;
- }
- public static int randomizeClickPrayerY()
- {
- Random rand = new Random();
- int randomCoords = rand.nextInt((157 - 145) + 1) + 145;
- return randomCoords;
- }
- public static int randomizeClickIntervals()
- {
- Random rand = new Random();
- int randomIntervals = rand.nextInt((400 - 100) + 1) + 100;
- return randomIntervals;
- }
- public static int incrementTime()
- {
- try{
- thread.start();
- Thread.sleep(1000);
- time++;
- } catch (InterruptedException e){
- e.printStackTrace();
- }
- return time;
- }
- public static void timer()
- {
- do{
- clickPray(randomizeClickPrayerX() , randomizeClickPrayerY());
- System.out.println(time);
- System.out.println(randomizeClickIntervals());
- incrementTime();
- //1st sip
- if (time == 10){
- clickOvl(1000 , 500);
- }
- //2nd sip
- if (time == 600){
- clickOvl(300 , 500);
- }
- //3rd sip
- if (time == 900){
- clickOvl(300 , 500);
- }
- //4th sip
- if (time == 1200){
- clickOvl(300 , 500);
- }
- } while (time != 6);
- //18 overloads per 6 uur, dus voor 4x18 clicks doen
- }
- public static void clickOvl (int x, int y)
- {
- robot.mouseMove(x, y);
- robot.delay(10);
- robot.mousePress(MouseEvent.BUTTON1_MASK);
- robot.mouseRelease(MouseEvent.BUTTON1_MASK);
- }
- public static void clickPray (int x, int y)
- {
- robot.mouseMove(x, y);
- robot.delay(randomizeClickIntervals());
- robot.mousePress(MouseEvent.BUTTON1_MASK);
- robot.mouseRelease(MouseEvent.BUTTON1_MASK);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement