阴阳师后台全平台(使用网易 MuMu 模拟器)辅助。支持御魂,觉醒,御灵,结界突破,秘闻副本,地域鬼王。

Overview

阴阳师后台全平台辅助

screen

  • Python 版本:Python 3.8.3
  • 模拟器:网易 MuMu雷电模拟器
  • 模拟器分辨率:1024*576
  • 显卡渲染模式:兼容(OpenGL)
  • 兼容 Windows 系统和 MacOS 系统

思路:

利用 adb 截图后,使用 opencv 找图找色,模拟点击。使用 adb 操作模拟器,相当于后台操作。

我主要为了刷勾玉,所以此工具更侧重地域鬼王,结界突破和秘闻副本,御魂是用来刷突破券的。

为了防止收到鬼使黑的来信,所以增加随机等待的时间比较多,每次随机等待 2-3 秒,导致整体运行速度稍微慢了一些。

此工具适合放在后台干其他工作的同学使用。也比较符合我个人的使用。


地域鬼王需要先把姑获鸟,以津真天和山童收藏。

收藏

结界突破主要是把九宫格的坐标保存到列表,使用 shuffle 方法随机打乱,然后循环执行。

第一次进入突破会主动失败一次,失败的话难度不会增加,方便刷排名和勾玉使用。

每突破三次会领取一次奖励,等待九次全部完成后,会把右上角突破剩余数量截图上传到腾讯 OCR 识别接口,如果剩余次数大于等于九次,递归执行,否则停止执行。

腾讯 OCR 每月有一千次免费次数。如果只是识别结界券使用,应该是够用了,如果不够用可以按需付费或者自建字典识别。

突破剩余数量

这一步需要申请 腾讯云文字识别 OCR 的 secretId 和 secretKey。

然后新建文件 tencentcloudKeys.py,写入:

secretId = "AKI***********************aYHDtmaOw"
secretKey = "Sg**************************QdZ7X"

模拟器版

部分操作参考 网易 MuMu 开发者必备说明书【雷神命令】常用adb命令整理贴

建议直接看雷神模拟器社区的命令整理,比较详细。

运行阴阳师

如果不清楚应用的启动命令,可以先手动运行该程序,然后使用命令:

adb shell dumpsys window | findstr mCurrentFocus

查找正在运行的应用。

启动阴阳师的命令为:

adb shell am start -n com.netease.onmyoji.netease_simulator/com.netease.onmyoji.Client

因为我是 iOS,只能扫码登录,所以启动命令对我来说并不实用。

模拟点击

例如我们需要点击 500, 266 这个坐标:

adb shell input tap 500 266

模拟滑动

0, 0 滑动到 200, 200,耗时 0.5 秒:

adb shell input swipe 0 0 200 200 500

截图

需要先运行此命令:

adb shell screencap /data/screen.png

再将截图推送到电脑:

adb pull /data/screen.png .

注意:示例中的命令将图片保存到当前路径下。

找图

这里借助 opencv 库实现。

import cv2

def p():
    capture_img = ""  # 程序运行时的截图
    temp_img = ""  # 已经保存好的图片
    
    img1 = cv2.imread(capture_img)
    img2 = cv2.imread(temp_img)
    result = cv2.matchTemplate(img1, img2, cv2.TM_CCOEFF_NORMED)
    
    if result.max() > 0.9:
        return True

找色

如何在截图中获取某坐标的像素值?

import cv2

def p(x, y):
    capture_img = ""
    _img = cv2.imread(capture_img)
    img = cv2.cvtColor(_img, cv2.COLOR_BGR2RGB)
    r, g, b = img[y, x]  # 注意这里的坐标是相反的
    return r, g, b

裁剪图片

我们截图完成以后,如何从截图中获取剩余结界突破数量?

import cv2

capture_img = ""
img = cv2.imread(capture_img)
cv2.imwrite("new.png", img[12:30, 705:750])  # 裁剪坐标为 [y0:y1, x0:x1]

需要注意的是坐标都是 y, x。

双开应用切换

由于多开改版后(2.2.2x86/x64 版本之后)所有的多开应用和原应用都是同一个包名,所以需要通过 UserId 来控制多开的应用。

这里以网易云游戏为例,多开后分别获取包名,使用命令:

adb shell dumpsys window | findstr mCurrentFocus

全部都是 com.netease.android.cloudgame/com.netease.android.cloudgame.MainActivity

所以需要通过切换 UserId 来切换应用。

通过包名来获取对应 UserId:

adb shell ps|findstr com.netease.android.cloudgame

返回如下内容:

对应用户ID

可以看到原端应用的进程 id 是 u0_a36 ,看 _ 前面的 u0 就行,即 UserId=0; 在 MuMu 上一般原端的 UserId=0,多开端 #N1 的 UserId=10,如此类推 #N2 的 UserId=11,#N3 的 UserId=12,#N4 的 UserId=13

所以多开操作分为两步:

  1. 切换 UserId
  2. 打开应用

根据上边的截图,UserId 分别是 0 和 10,如果要在两个应用之间切换可以使用:

# 切换原应用
adb shell am start-user 0
adb shell am start --user 0 com.netease.android.cloudgame/com.netease.android.cloudgame.MainActivity

# 切换多开应用
adb shell am start-user 10
adb shell am start --user 10 com.netease.android.cloudgame/com.netease.android.cloudgame.MainActivity

切换之后就可以继续操作了。

赞赏

Owner
简讯
简讯
Visualization Data Drug in thailand during 2014 to 2020

Visualization Data Drug in thailand during 2014 to 2020 Data sorce from ข้อมูลเปิดภาครัฐ สำนักงาน ป.ป.ส Inttroducing program Using tkinter module for

Narongkorn 1 Jan 05, 2022
An adaptable Snakemake workflow which uses GATKs best practice recommendations to perform germline mutation calling starting with BAM files

Germline Mutation Calling This Snakemake workflow follows the GATK best-practice recommandations to call small germline variants. The pipeline require

12 Dec 24, 2022
🧇 Make Waffle Charts in Python.

PyWaffle PyWaffle is an open source, MIT-licensed Python package for plotting waffle charts. It provides a Figure constructor class Waffle, which coul

Guangyang Li 528 Jan 02, 2023
a robust room presence solution for home automation with nearly no false negatives

Argos Room Presence This project builds a room presence solution on top of Argos. Using just a cheap raspberry pi zero w (plus an attached pi camera,

Angad Singh 46 Sep 18, 2022
Make visual music sheets for thatskygame (graphical representations of the Sky keyboard)

sky-python-music-sheet-maker This program lets you make visual music sheets for Sky: Children of the Light. It will ask you a few questions, and does

21 Aug 26, 2022
This is my favourite function - the Rastrigin function.

This is my favourite function - the Rastrigin function. What sparked my curiosity and interest in the function was its complexity in terms of many local optimum points, which makes it particularly in

1 Dec 27, 2021
Generate "Jupiter" plots for circular genomes

jupiter Generate "Jupiter" plots for circular genomes Description Python scripts to generate plots from ViennaRNA output. Written in "pidgin" python w

Robert Edgar 2 Nov 29, 2021
Package managers visualization

Software Galaxies This repository combines visualizations of major software package managers. All visualizations are available here: http://anvaka.git

Andrei Kashcha 1.4k Dec 22, 2022
Plot and save the ground truth and predicted results of human 3.6 M and CMU mocap dataset.

Visualization-of-Human3.6M-Dataset Plot and save the ground truth and predicted results of human 3.6 M and CMU mocap dataset. human-motion-prediction

Gaurav Kumar Yadav 5 Nov 18, 2022
A python visualization of the A* path finding algorithm

A python visualization of the A* path finding algorithm. It allows you to pick your start, end location and make obstacles and then view the process of finding the shortest path. You can also choose

Kimeon 4 Aug 02, 2022
Python package for hypergraph analysis and visualization.

The HyperNetX library provides classes and methods for the analysis and visualization of complex network data. HyperNetX uses data structures designed to represent set systems containing nested data

Pacific Northwest National Laboratory 304 Dec 27, 2022
A toolkit to generate MR sequence diagrams

mrsd: a toolkit to generate MR sequence diagrams mrsd is a Python toolkit to generate MR sequence diagrams, as shown below for the basic FLASH sequenc

Julien Lamy 3 Dec 25, 2021
kyle's vision of how datadog's python client should look

kyle's datadog python vision/proposal not for production use See examples/comprehensive.py for a mostly working example of the proposed API. 📈 🐶 ❤️

Kyle Verhoog 2 Nov 21, 2021
Simple, realtime visualization of neural network training performance.

pastalog Simple, realtime visualization server for training neural networks. Use with Lasagne, Keras, Tensorflow, Torch, Theano, and basically everyth

Rewon Child 416 Dec 29, 2022
Extract and visualize information from Gurobi log files

GRBlogtools Extract information from Gurobi log files and generate pandas DataFrames or Excel worksheets for further processing. Also includes a wrapp

Gurobi Optimization 56 Nov 17, 2022
Bar Chart of the number of Senators from each party who are up for election in the next three General Elections

Congress-Analysis Bar Chart of the number of Senators from each party who are up for election in the next three General Elections This bar chart shows

11 Oct 26, 2021
Realtime Web Apps and Dashboards for Python and R

H2O Wave Realtime Web Apps and Dashboards for Python and R New! R Language API Build and control Wave dashboards using R! New! Easily integrate AI/ML

H2O.ai 3.4k Jan 06, 2023
GDSHelpers is an open-source package for automatized pattern generation for nano-structuring.

GDSHelpers GDSHelpers in an open-source package for automatized pattern generation for nano-structuring. It allows exporting the pattern in the GDSII-

Helge Gehring 76 Dec 16, 2022
Certificate generating and sending system written in Python.

Certificate Generator & Sender How to use git clone https://github.com/saadhaxxan/Certificate-Generator-Sender.git cd Certificate-Generator-Sender Add

Saad Hassan 11 Dec 01, 2022
Python implementation of the Density Line Chart by Moritz & Fisher.

PyDLC - Density Line Charts with Python Python implementation of the Density Line Chart (Moritz & Fisher, 2018) to visualize large collections of time

Charles L. Bérubé 10 Jan 06, 2023