WeChat skip python script (Summary) and python script

Source: Internet
Author: User

One-hop python script (Summary) and python script

This timeHopThis game is very popular, but it is very difficult to score. For programmers, the first idea is to write an auxiliary script plug-in to make the score easy. python is currently quite popular, based on the python language, let's summarize the following helper scripts written by the gods about the hop. When learning, we mainly understand their writing ideas, it is very helpful for you to learn python.

1,Automatically run the python script

Note: Train of Thought

Core: after each stabilization, the coordinates of the pawns and the midpoint coordinates of the next top are calculated,

Multiply the distance between two points by a time coefficient to obtain the long press time.

Identification: The position is identified by the color of the pawnpiece. by finding that the bottom line is a straight line, the position is traversed from the last line to the next line,

Compare the color (the color uses a range for comparison) to find all the vertices in the bottom row, and then calculate a midpoint,

After obtaining the coordinates, let the Y axis coordinate reduce the half height of the pawn chassis to obtain the coordinates of the center.

Recognize the Board: It depends on the color difference between the bottom and the square. Starting from the position below the score, a row is scanned. Because the top of the circle is a line,

The top of the square is probably a point, so it uses a similar way to identify a piece to identify multiple points for the midpoint,

At this time, we get the X axis coordinates of the midpoint of the block. At this time, we assume that the pawn is in the center of the current block,

Returns the Y coordinate of the midpoint based on a fixed angle obtained.

Finally, calculate the distance multiplied by the coefficient based on the coordinates of the two points to obtain the long time (it seems that the X-axis distance can be used directly)

2,Score ranking! Python helps you get a high score

Note: How this script works

On the hop page

Calculate the distance between the start point and the end point.

Try to measure the coefficient of distance and press time

Try to press the specified time on the phone

Repeat 1-4

3,Python script for a hop-on game

Principle: configure the adbenvironment variable and set the path of adb.exe on the my computer-Zookeeper-advanced system.

4,Steps for implementing a skip-to-one tool in python

This is a script for Simulating on PC.

Note:

1. Install the android simulator on windows, which is later than Android 5.1.

2. download and install the latest 6.6.1 in the simulator

3. It is best to use python2.7 and python3 pyhook packages with bugs to solve problems.

5,Next Hop python auxiliary software ideas and Image Recognition source code analysis

Core Ideology

Obtains the distance from the pawn to the center of the next cube.

Calculate the touch screen time

Click the screen

Calculates the distance from the pawn to the center of the next cube.

Use the adb shell screencap-p command to obtain the current screen of the mobile phone.

Then, we can find the coordinate of the pawn and the coordinate of the center of the next square through the information on the image.

Then, the distance is calculated using the distance formula between two points.

6,Python source code for Xiaomi 5 s hop-on Applet

This script uses the Xiaomi 5S mobile phone as an example. Its principles and implementation methods are similar to those described previously.

7,Python3 enables a hop-and-click hop

I. Overall Thinking

The coordinates of the chess piece and the coordinates to be taken in the next step are calculated based on the two coordinates to calculate the distance between the two points for the jump.

Ii. Distribution ideas

1. Save the initial graph to your mobile phone and upload it to a local folder.

2. Put the obtained information in the new coordinate axis (matplotlib)

3. Click the event to obtain the initial coordinates and key coordinates, and calculate the linear distance.

4. Skip. After the Skip, clear the coordinates and update the coordinates.

8,How to Use Python to achieve a hop (Mac + iOS)

This is a script implemented in Python in MAC and IOS.

9,Python + OpenCV help you get a jump

This script is a little more complex and suitable for advanced python programmers.

The above is the content related to writing a skip-hop script in different operating system environments using the python language. If you are interested in this, finish learning the above content, you will have a more in-depth understanding of python. Through the skip-to-next-hop game as an example, you can refer to the following for more content.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.