92

GitHub - Jiahonzheng/JGM-Automator: 《家国梦》游戏自动化脚本。

 4 years ago
source link: https://github.com/Jiahonzheng/JGM-Automator
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

JGM Automator

这是基于 OpenCV 模板匹配的《家国梦》游戏自动化脚本。

安装与运行

# 安装依赖
python -m pip install uiautomator2 opencv

# adb 连接
# 使用 MuMu 模拟器,确保屏幕大小为 1920(长) * 1080(宽)
adb connect 127.0.0.1:7555

# 获取 device 名称,并填写至 main.py
adb devices

# 在已完成 adb 连接后,在手机安装 ATX 应用
python -m uiautomator2 init

# 打开 ATX ,点击“启动 UIAutomator”选项,确保 UIAutomator 是运行的。

# 进入游戏页面,启动自动脚本。
python main.py

说明

  • 建筑编号

Screenshot.png

  • Weditor

我们可以使用 Weditor 工具,获取屏幕坐标,以及在线编写自动化脚本。

# 安装依赖
python -m pip install --pre weditor

# 启动 Weditor
python -m weditor

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK