Git Product home page Git Product logo

king-of-glory's Introduction

King-of-glory

王者荣耀相关的一些工具

gold.sh V1.0

一个王者荣耀刷金币的小外挂。 始发于:教你使用50行Python代码刷王者荣耀金币

原理

王者荣耀的冒险模式里有个挑战模式,第一次过关可以获得比较多的金币,后面重新挑战还是会获得少量金币,这不算是bug,你不嫌烦手动蛮力也可以刷金币。

推荐关卡:大师 - 陨落的祸源 - 稷下战场

只要你能模拟屏幕点击就可以完成刷金币的脚本.

在安卓模拟界面点击最简单的方式就是使用ADB发送命令,不需要root手机,不需要安装第三方软件,方便快捷。ADB命令点击屏幕坐标[x, y] 可以使用命令:

adb shell input tap x y

iOS与mac用户,可以利用WDA,参考微信跳一跳辅助程序的相关安装步骤,他们已经写的非常详细了。原理也是通过WDA来模拟屏幕点击,这里也不再赘述环境的准备。(与跳一跳的环境是一样的)

准备

  • 需要真实安卓手机。
  • 手机需开启USB调试模式,允许电脑调试。
  • 电脑需安装好安卓驱动,一般豌豆荚或者各种管家就可以自动帮你装好。
  • 电脑需要有ADB驱动,可以到这里下载。
  • ADB需要加入环境变量PATH中,方便随时调用。

如果只是为了刷金币,只需要安装好驱动和ADB工具即可。

步骤

如果万事具备,那么步骤就非常简单。

环境检测

  1. 用USB连接手机,如果弹出警告,请允许电脑调试手机。
  2. 使用命令 adb devices 检验adb和手机状态已经就绪。
$ adb devices
List of devices attached
b******4        device

模拟点击屏幕,比如你可以打开画图软件,然后运行命令:

adb shell input tap 500 500

如果如果一切OK,那么你将看到画图软件在坐标(500,500)的位置有一个点。

代码实现

  • 因为直接使用的是shell命令,所以只能用linux系统或者Mac系统执行。
  • 通关需要点击的屏幕位置是固定的,加上注释我们只需要不到30行代码就可以完成。
  • 代码的逻辑就是用一个循环来控制循环执行。

拿来主义

  1. 下载项目中的 gold.sh 到本地
  2. 将游戏打开主界面
  3. 根据手机性能和分辨率,调整gold.sh中的参数 (本人使用的是小米Max2)
  4. 运行以下命令,手机上就可以查看实时运行效果。
sh gold.sh

注意

  1. 每周金币上限4200,需要接近4个小时,不建议一次刷满,手机和你都要休息。
  2. 铭文,手机性能,英雄选择都会影响通关速度,自己微调等待时间。
  3. 如果你不想被USB数据线束缚,可以考虑使用无线连接Android真机

声明

本脚本纯属娱乐和探索的心得,如果你因为违反了游戏规则导致被封号,我概不负责。

king-of-glory's People

Contributors

xyxsns avatar

Watchers

James Cloos avatar  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.