Git Product home page Git Product logo

jgm-automator's Introduction

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

说明

  • 建筑编号

  • Weditor

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

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

# 启动 Weditor
python -m weditor
  • 货物素材

我们可以自行制作货物的素材:先生成屏幕快照,随后在实际大小下,截取货物图片,保存至 targets/ 目录下,并在 target.py 声明对应的货物种类及其图片路径。

jgm-automator's People

Contributors

jiahonzheng avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.