# on wechat jump plug-in

In fact, there are ready-made plug-ins on the Internet in various ways. Figure recognition, human flesh measurement. They are all good choices. Please refer to the link https://github.com/wangshub/wechat'jump'game. Plug in based on Android ADB. I haven't used this one, but it's definitely more efficient than on a mobile phone. In fact, I still want to realize a plug-in by myself, which means nothing but pure fun.

So I want to realize a plug-in based on the touch wizard, for the sake of simplicity. Then came up with the following recognition methods: 1. Scan line by line to identify the target coordinates to jump. In order to improve the efficiency, the scanning step can be increased appropriately. Define a rectangular area. The target to jump is relatively fixed. 2. Get the location of the villain, and locate the coordinates by touching the wizard's search color function. Although there are some errors, as long as you can get the coordinates, it is basically OK to use them for calculation. 3. Calculate jumping distance by Pythagorean theorem of direct triangle. The pressing time needs to be corrected according to the distance. The 1.2 I used in the test of Xiaomi 5S is basically OK.

Known problems: 1. The method of searching coordinates by touching sprites is inefficient and takes a long time. 2. After running for a period of time, there will be errors in the color finding function and the function to get the coordinates of the villain, resulting in the inability to get the real coordinates. I added a few judgements. If there is a problem, just restart the script. 3. Because the matching is based on color, the accuracy of the relative time identification coordinates is much lower than the python version above.

Improve the way: 1. Match the function of search coordinates, search in half. If the villain is on the left, search directly on the right. If the villain searches the left directly on the right side. 2. Restart the script directly after matching the error, and use the cycle operation function of touch wizard 3. Other unknown function modification? I don't know what. Ha-ha