X8 Auto Tapper plugin is only available in X8 0.3.0.0 or higher.
Simple ModeYou can only set one auto tap position. If you need more positions or other customized content, you need to use the advanced mode of the X8 Auto Tapper.
Advanced mode Using the Lua engine, the most common example: Click on 2 positions.
1 2 3 4 5 6 7 8 9 |
-- Use English "--" to match comments While true do -- loop starts -- There are 4 spaces at the beginning of the line, the same below Tap(300, 400) -- click coordinates (300,400) Delay (200) -- delay 200 mm Tap(320, 400) -- click coordinates (320,400) Delay (200) -- delay 200 mm End -- end of loop |
Copy the above code into the input box of the tapper plugin, modify the coordinate position as needed, and click Run.
FAQ:
1, how to find the coordinates of the position to tap?
Set position in simple mode, write down this position. If there are multiple points, repeat it. You will use that positions when you write lua script.
2, the game I play needs to click 5 points, loop for 10 times, how to set up?
This can be done using for loop,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
-- i from 1 to 10, each loop i+1 For i=1,10 do Tap(1345, 714) -- Coordinate 1 Delay(200) Tap(678, 606) -- coordinates 2 Delay(200) Tap(631, 29) -- coordinates 3 Delay(200) Tap(108, 6) -- coordinates 4 Delay(200) Tap(6, 606) -- coordinates 5 Delay(200) End |
3, can’t stop after starting, what should I do?
This is usually because Delay is set too short, and the system can’t receive taps from your finger.
The average human touch speed is about 100ms, and it is recommended not to be less than 100ms.
In this case, forces the return to the desktop, clears the game progress, re-enters the game.
4, script auto stop after starting, what should I do?
First check if the script is wrong: 1, use English symbols, such as commas and parentheses; 2, the English case is wrong, strictly follow; 3. The contents of the loop body must start with 4 spaces.
Next, check the script logic, for example, there is no loop, of course, it ends.
Appendix, other functions
TouchDown
Features
1 |
Press a point on the specified position on the screen to support pressing 5 points simultaneously |
Syntax
1 |
TouchDown(x1,y1,id) |
Parameter description
1 2 3 4 |
x: integer, abscissa y: integer, ordinate Id: integer, custom, the recommended range is [-9999,9999] Note: The TouchDown command and the TouchUp command need to be used together |
Example
1 2 3 |
TouchDown (100,100,1) TouchMove (100,200,1,100) TouchUp (1) |
TouchMove
Features
1 |
Simulate slide action |
Syntax
1 |
TouchMove (x1,y1,id[,time]) |
Parameter description
1 2 3 4 |
x: integer, abscissa y: integer, ordinate Id: integer, the recommended range is [-9999,9999] Time: integer, sliding time (optional, default is 300) in milliseconds |
TouchUp
Features
1 |
Release the point pressed by the TouchDown command |
Syntax
1 |
TouchUp(id) |
Parameter description
1 |
id: integer, contact ID, id corresponding to TouchDown |
KeyDown
Features
1 |
hold the specified key |
Syntax
1 |
KeyDown(virtual_key) |
Parameter description
1 |
virtual_key: a numeric type indicating the encoding of a key |
Example
1 2 |
--hold the home keyboard KeyDown(3) |
KeyPress
Features
1 |
Press the specified key |
Syntax
1 |
KeyPress(virtual_key) |
Parameter description
1 |
virtual_key: a numeric type indicating the encoding of a key |
Example
1 2 |
--Press the home keyboard KeyPress(3) |
KeyUp
Features
1 |
Release the specified key |
Syntax
1 |
KeyUp(virtual_key) |
Parameter description
1 |
virtual_key: a numeric type indicating the encoding of a key |
Example
1 2 |
--release the home button KeyUp(3) |
Swipe
Features
1 |
simulating the finger's swipe action on the screen |
Syntax
1 |
Swipe(x1,y1,x2,y2[,time]) |
Parameter description
1 2 3 4 5 |
x1: numeric, move start x coordinate Y1: numeric type, moving starting point y coordinate X2: numeric type, moving end point x coordinate Y2: numeric type, moving end point y coordinate Time: numeric, moving time (can be omitted), in milliseconds |
Example
1 |
Swipe(100,100,200,200) |
Tap
Features
1 |
Short click on the location specified on the screen |
Syntax
1 |
Tap(x1,y1) |
Parameter description
1 2 |
x1: numeric, abscissa Y1: numerical type, ordinate |
Example
1 |
Tap(100,100) |
Touch
Features
1 |
Click on the specified location on the screen and keep pressing for a while |
Syntax
1 |
Touch(x1,y1,time) |
Parameter description
1 2 3 |
x: numeric, abscissa y: numerical type, ordinate Time: numeric, duration, in milliseconds |
Example
1 |
Touch(100,100,100) |
Delay
Features
1 |
The script pauses for a while |
Syntax
1 |
Delay(time) |
Parameter description
1 |
time: numeric expression, delay time, in milliseconds |
Example
1 2 |
--delay 6 seconds Delay(6000) |
Virtual Keycode Table
This table is mainly for the key code of the known function. It establishes a character constant and virtual code comparison and description. The key code of the unknown function is not displayed here. The key code that is not displayed can only be simulated by keypress, keydown and keyup.
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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
Virtual key code character constant 0 none unknown key 1 None Unknown key 2 none unknown key 3 home home button 4 back Back button 5 call Call key 6 endcall hanging phone key 7 0 number 0 8 1 number 1 9 2 number 2 10 3 number 3 11 4 number 4 12 5 number 5 13 6 number 6 14 7 number 7 15 8 number 8 16 9 number 9 number 17 18 # #号 19 dpadup navigation keys up 20 dpaddown navigation keys down 21 dpadleft navigation keys to the left 22 dpadright navigation keys to the right 23 dpadcenter navigation keys OK button 24 volup volume plus 25 voldown volume minus 26 power power button 27 camera camera 28 none 29 A A key 30 B B button 31 C C key 32 D D button 33 E E button 34 F F button 35 G G button 36 H H button 37 I I button 38 J J key 39 K K button 40 L L button 41 M M button 42 N N key 43 O O button 44 P P key 45 Q Q button 46 R R key 47 S S key 48 T T key 49 U U button 50 V V button 51 W W button 52 X X button 53 Y Y key 54 Z Z button 55, comma 56 . . 57 altleft altleft 58 altright altright 59 shiftleft shiftleft 60 shiftright shiftright 61 tab tab 62 space space 63 None Unknown key 64 None Unknown key 65 None Unknown key 66 enter Enter 67 del del 68 ` `key 69 - minus 70 = equal sign 71 [square brackets 72 ] square brackets 73 \ Unknown key 74 ; semicolon 75 ' single quote 76 / / key 77 @ @符号 78 None Unknown key 79 None Unknown key 80 focus photo focus button 81 + plus 82 menu menu 83 notification notification button 84 search search key 85 mediaplaypause Multimedia pause/play 86 mediastop multimedia key stop 87 medianext multimedia key next 88 mediaprevious multimedia key Previous 89 mediarewind Multimedia button Rewind 90 mediafastforward multimedia key fast forward 91 mute microphone mute button 92 pageup Previous 93 pagedown Next 94 None Unknown key 95 none unknown key 96 gamepadbuttonsA Gamepad button A 97 gamepadbuttonsB gamepad button B 98 gamepadbuttonsC gamepad button C 99 gamepadbuttonsX gamepad button X 100 gamepadbuttonsY gamepad button Y 101 gamepadbuttonsZ gamepad button Z 102 gamepadbuttonsL1 gamepad button L1 103 gamepadbuttonsL2 gamepad button L2 104 gamepadbuttonsR1 gamepad button R1 105 gamepadbuttonsR2 gamepad button R2 106 gamepadbuttonsLeftThumb Left Thumb Button 107 gamepadbuttonsRightThumb Right Thumb Button 108 gamepadbuttonsStart gamepad button Start 109 gamepadbuttonsSelete Gamepad Button Select 110 gamepadbuttonsMode Gamepad Button Mode 111 esc ESC key 112 backspace delete key 113 ctrlleft ctrlleft key 114 ctrlright ctrlright key 115 capslock caps lock key 116 scrolllock scroll lock button 117 Unknown Unknown key 118 Unknown Unknown key 119 Unknown Unknown key 120 Unknown Unknown key 121 pause pause button 122 movehome cursor moves to start 123 moveend cursor moves to the end 124 insert insert key 125 unknown unknown key 126 mediaplay multimedia key play 127 mediapause multimedia key pause 128 mediaclose multimedia key close 129 mediaeject multimedia key pop up 130 mediarecord multimedia key recording 131 f1 f1 key 132 f2 f2 key 133 f3 f3 button 134 f4 f4 button 135 f5 f5 button 136 f6 f6 button 137 f7 f7 button 138 f8 f8 button 139 f9 f9 key 140 f10 f10 key 141 f11 f11 key 142 f12 f12 button 143 numlock keypad lock 144 0 keypad 0 145 1 keypad 1 146 2 keypad 2 147 3 keypad 3 148 4 keypad 4 149 5 keypad 5 150 6 keypad 6 151 7 keypad 7 152 8 keypad 8 153 9 keypad 9 154 / division 155 * multiplication 156 - minus sign 157 + plus 158 . 159, comma 160 enter Enter key 161 = equal sign 162 (left parenthesis 163) Right parenthesis 164 volmute speaker mute button 165 None Unknown key 166 none unknown key 167 none unknown key 168 zoomin zoom in button 169 zoomout zoom out button 170 None Unknown key 171 None Unknown key 172 none unknown key 173 None Unknown key 174 no unknown key 175 None Unknown key 176 none unknown key 177 None Unknown key 178 None Unknown key 179 none unknown key 180 None Unknown key 181 None Unknown key 182 no unknown key 183 no unknown key 184 no unknown key 185 no unknown key 186 no unknown key 187 None Unknown key 188 gamepadbuttons1 universal gamepad button #1 189 gamepadbuttons2 Universal Gamepad Button #2 190 gamepadbuttons3 Universal Gamepad Button #3 191 gamepadbuttons4 Universal Gamepad Button #4 192 gamepadbuttons5 Universal Gamepad Button #5 193 gamepadbuttons6 universal gamepad button #6 194 gamepadbuttons7 Universal Gamepad Button #7 195 gamepadbuttons8 Universal Gamepad Button #8 196 gamepadbuttons9 universal gamepad button #9 197 gamepadbuttons10 Universal Gamepad Button #10 198 gamepadbuttons11 Universal Gamepad Button #11 199 gamepadbuttons12 universal gamepad button #12 200 gamepadbuttons13 Universal Gamepad Button #13 201 gamepadbuttons14 Universal Gamepad Button #14 202 gamepadbuttons15 Universal Gamepad Button #15 203 gamepadbuttons16 universal gamepad button #16 |