Changeset 101
- Timestamp:
- Apr 6, 2010, 3:03:44 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java-automator/src/nl/rickvanderzwet/farmville/Automator.java
r92 r101 8 8 import java.awt.AWTException; 9 9 import java.awt.Color; 10 import java.awt.Point;11 10 import java.awt.PointerInfo; 12 11 import java.awt.Robot; … … 30 29 bot.mousePress(InputEvent.BUTTON1_MASK); 31 30 // Constant values are tricky, computers can only do that 32 Thread.sleep( 500 + randomGenerator.nextInt(250));31 Thread.sleep(100 + randomGenerator.nextInt(250)); 33 32 bot.mouseRelease(InputEvent.BUTTON1_MASK); 34 33 … … 36 35 37 36 private static void moveMouse(Direction direction) throws InterruptedException { 38 moveMouse(direction, 200);37 moveMouse(direction, 100); 39 38 } 40 39 … … 78 77 randomGenerator = new Random(); 79 78 // Allow time to focus Firefox window 80 Thread.sleep( 2000);79 Thread.sleep(3000); 81 80 82 81 int x = 0 ,y = 0; … … 90 89 /* Constants */ 91 90 Boolean press_mouse = true; 92 Integer farm_size_y = 6;93 Integer farm_size_x = 2 0;91 Integer farm_size_y = 9; 92 Integer farm_size_x = 22; 94 93 /* 0 = up, 1 = down, 2 = left, 3 = right */ 95 94 … … 122 121 123 122 moveMouse(Direction.LEFT); 123 pressMouse(); 124 124 125 125 if (direction == Direction.UP) { … … 141 141 142 142 } 143 144 145 146
Note:
See TracChangeset
for help on using the changeset viewer.