Home > Backend Development > Python Tutorial > WeChat Tiaoyitiao python auxiliary script example sharing

WeChat Tiaoyitiao python auxiliary script example sharing

小云云
Release: 2018-01-13 13:10:01
Original
2464 people have browsed it

This article mainly organizes the auxiliary script content about WeChat Tiaoyitiao. This time we have compiled the python script content for you. Let’s learn it together.

During this period, the WeChat Tiaoyitiao game is very popular, but it is very difficult to get high scores. For programmers, the first idea is to write an auxiliary script plug-in to increase the score. Easy, python is very popular now. Let’s summarize the following auxiliary scripts about jumping written by various gods based on python language. When learning, you mainly understand their writing ideas, which is very helpful for you to learn python. .

1. WeChat jumps to automatically run the python script

Notes: Ideas

Core: after each stabilization Take a screenshot and calculate the coordinates of the chess piece and the midpoint coordinate of the top surface of the next block based on the screenshot.

Get the long press time based on the distance between the two points multiplied by a time coefficient

Identify the chess pieces: Rely on the color of the chess pieces to identify the position. Through the screenshot, I found that the bottom line is probably a straight line, so I traversed from top to bottom line by line.

Compare the colors (the color uses a interval to compare) Find all the points in the bottom row, and then find a midpoint.

After finding it, let the Y-axis coordinate reduce half the height of the chess piece chassis to get the coordinates of the center point

Identify the chessboard: rely on the color difference between the background color and the squares. Start from the position below the score and scan line by line. Since the top of the circular blocks is a line,

The top of the square is probably a point, so I used a method similar to identifying chess pieces to identify a few more points to find the midpoint.

At this time, I got the X-axis of the midpoint of the block. Coordinates, assuming that the chess piece is now at the center of the current block,

The Y coordinate of the midpoint is derived based on a fixed angle obtained through a screenshot

Finally: According to The coordinates of the two points are calculated by multiplying the distance by a coefficient to obtain the long press time (it seems that the X-axis distance can be used directly)

2. Score dominance! Python helps you jump on WeChat to get high scores

Note: The working principle of this script

Screenshot of the jump page

Calculate the distance between the initial point and the end point

Find a way to measure the coefficient of distance and pressing time

Find a way to press the phone for a specified time

Repeat 1-4

3, WeChat Jump Mini Game Python Script

Principle: Configure adb environment variables and add the path where adb.exe is located in My Computer-"Properties-"Advanced System Settings-"Environment Variables-"Path.

4. Detailed explanation of the steps to implement the WeChat jump auxiliary tool in python

This is a script about simulation on the PC side

Instructions:

1. Install an Android emulator on windows, Android version 5.1 or above

2. Download and install the latest WeChat 6.6.1 in the emulator

3. It is best to use python2.7. The pyhook package of python3 has bugs, which is more troublesome to solve.

5. WeChat Tiaoyitiao python auxiliary software ideas and image recognition source code analysis

Core idea

Get the distance from the chess piece to the center point of the next block

Calculate the time of touching the screen

Click the screen

Calculate the distance from the chess piece to the center point of the next block

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

And then upload it through the image Use the information to find out the coordinates of the chess piece and the coordinates of the center point of the next block

Then calculate the distance through the distance formula between the two points

6. Xiaomi 5s WeChat Jump app python source code

This script uses the Xiaomi 5S mobile phone as an example. The principle and implementation are similar to those introduced before.

7. python3 realizes jump, click and jump

1. Overall idea

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

2. Distribution ideas

1. Take the screenshot according to the command and save the initial image to the mobile phone, and then upload it to the local folder

2 , put the obtained screenshot into the newly created coordinate axis (matplotlib)

3. Obtain the initial coordinates and key coordinates through the mouse click event, and calculate the straight-line distance

4. Jump, clear the coordinates and update the screenshot after the jump is completed

8. Teach you to use Python to implement WeChat jump (Mac+iOS version)

This is Script implemented in Python in MAC environment and IOS system.

9. Python+OpenCV lets the computer help you play WeChat.

The script in this article is slightly more complicated and is suitable for advanced python programmers to learn.

The above is the relevant content compiled by Script House for you about using python language to write WeChat jump scripts under different operating system environments. If you are very interested in this, then after studying the above Content, you will have a deeper understanding of Python knowledge. By taking the small game of Jump as an example, you can draw inferences about other cases from more content.

Related recommendations:

php implementation of WeChat jump game

##js push box game implementation tutorial

How to implement HTML5 brick-breaking game using native js

The above is the detailed content of WeChat Tiaoyitiao python auxiliary script example sharing. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template