Code Monkey home page Code Monkey logo

yys-auto-yuhun's Introduction

阴阳师自动御魂脚本

网易阴阳师电脑版,Autohotkey/Python 脚本,自动御魂, 已支持完全后台。

This is a script, written using Autohotkey and Python, for automated Yuhun farming in Netease game Onmyoji, PC emulator version. Now the script supports fully background running.

作者已经弃坑很久了,建议使用 AcademicDog 开发的版本 https://github.com/AcademicDog/onmyoji_bot

准备工作

玩家需自行下载网易阴阳师电脑版,并登录至游戏内,不要调整窗口大小。

该脚本为本人修仙时间使用 Autohotkey 1.1.28 版本编写,玩家可以自行下载 Autohotkey,以及所有源文件,然后运行 onmyoji_yys-auto-yuhun.ahk。

游戏窗口和AHK脚本都需要右键使用管理员权限运行!

玩家也可以下载预先编译好的 AutoHotKey 可执行版本 Releases

玩家还可以使用 Python 脚本 py_onmyoji_yuhun.py,Python 脚本需要以 管理员 权限运行,脚本运行后自动开始,并需要在命令行用 Ctrl+C 中止。 感谢 #4 的反馈,Python 需要使用32位的版本,64位的可能会报错。

如果需要使用本地双开脚本,参考 dual.py

使用方法及功能简介

玩家需要先进入探索灯笼-御魂-八歧大蛇-十层界面(或你想要挂机的层数),然后可以使用键盘快捷键(F10)开始运行脚本,鼠标不需要提前放在游戏窗口内。 但是如果有超过一个阴阳师游戏窗口,该程序可能无法找到正确的游戏窗口。

挂机界面请参考 如果 YYS 游戏的 UI 更新了,你看到的游戏御魂准备界面不是这样的,你可以自行修改“挑战”按钮对应的坐标和颜色(py_onmyoji_yuhun.py line 102, 142, 143),或者发 Issue 等待开发者不定期更新。

使用了后台插件,窗口现在可以完全后台,可以被遮挡,但是不能最小化。

该脚本为单人探索,每次消耗6体力。在脚本开始时会弹出对话框,输入对应的数字以选择自动点击中间或右边怪物。

玩家需要开启自动战斗模式,并提前准备好战斗阵容。御魂十层界面中的阵容 需要 锁定。 (2019.4.4更新后,该脚本不会再自动点击战斗中的“准备”)

在御魂战斗过程中,该脚本会自动拒绝所有悬赏封印的邀请。

该脚本仅使用了画面找色,鼠标后台点击的函数,完全模拟人类玩家行为,没有使用任何内存读写函数。在敏感位置添加了均匀分布的随机时间漂移,和随机坐标漂移。 作者使用过该脚本上万体力仍没有收到鬼使黑来信,而且作者不对您的可能存在的任何被封禁结果负责。

不建议在御魂战斗中移动窗口位置,可能会导致战斗镜头漂移。

该脚本也适用于觉醒材料,和御灵。

玩家可以在任何时刻使用键盘快捷键结束脚本(F12)。

感谢您使用该脚本,并欢迎各种反馈和改进意见。

已知存在的问题

  • 2019/05/07, #8 提出,如果使用点怪功能,系统会弹出一个对话框检测是否脚本。错误回答会导致鬼使黑来信。请玩家慎重使用!如果有对应的截图,欢迎打码后发Issue,这样方便作者修改脚本来添加对应的绕过机制。

  • 当玩家使用 Windows 7 系统时,需要以管理员身份运行阴阳师游戏窗口和脚本。而且,需要调整系统的画面设置: 右键我的电脑 -> 高级系统设置 -> 高级 -> 设置 -> 取消勾选以下3项: "启用 Aero peek","启用透明玻璃",和"启用桌面组合"。

  • 在 Windows 10 系统中,不需要调整系统画面设置。

  • 玩家也可以使用旧版的按键精灵脚本,该按键精灵脚本不会再继续更新。按键精灵使用了后台点击,和前台找色函数,窗口不能被遮挡,不能被移动,但是不需要调整系统的画面设置。

  • 作者把 AutoHotKey 代码用 Python 重写了一遍,目前 Python 代码可以正常运行,但是

    • 需要提前手动注册插件: regsvr32.exe TSPlug.dll
    • 需要用管理员权限运行 Python 脚本 (以及游戏窗口)
    • Python 脚本目前还不支持键盘快捷键 capture,只能手动运行脚本, 以及通过任务管理器或 Ctrl + C 来终止 Python 进程。 欢迎 PR 来添加键盘快捷键支持。
  • Run pip install pywin32 to install win32com.client module for Python.

更新记录

2018年1月13日,上传了初始版本。

2018年2月11日,强化了拒绝悬赏的函数。

2018年3月31日,完全使用 Autohotkey 重写了脚本,现在支持完全后台。

2019年4月4日,由于 Issue #3 提及了 2019/3/28 更新后,战斗界面中的“准备”鼓面位置上移,导致脚本不能正确点击“准备”。为了避免以后类似情况的发生,作者注释掉了手动点击“准备”的函数,现在需要在御魂层数选择界面中,提前勾选“阵容锁定”。

免责声明

网易,阴阳师,是网易公司的商标。 http://yys.163.com

按键精灵,是按键精灵公司的商标。 http://www.anjian.com

Autohotkey,为 GPL 开源程序。 https://autohotkey.com/

该脚本为了实现后台点击及找色功能,使用了开源的 天使插件, 该插件由 C++ 编写,用户可以前往他们的站点下载源代码,作者只是调用了预编译好的 dll 库。 并请参考天使插件的 License.

(如果上面天使插件地址不能访问,请尝试 天使插件, 好像他们论坛换地址了。)

协议 (License)

该源代码使用了 GPLv3 开源协议。

This project is licensed under the GPLv3 license.

yys-auto-yuhun's People

Contributors

xwang233 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

yys-auto-yuhun's Issues

关于颜色测试那一块儿代码问题

您好,在您的代码基础上修改了几次,一直想请教一下,颜色测试那块儿代码的作用,现在游戏的界面变化了 单开的时候一直提醒colordebug那块儿不正确。望指导,谢谢 期待您的回复。

谢谢大大源码

简单修改了下python版源码已经实现三开魂土了 十分感谢。

在点击怪物的设计上能否有进一步优化空间?

网易推出了智能技能释放模式,那么以前点怪,现在可以点队友。
点怪的部分是每进一次场景都会一直点击(或者随机某个时间点击一次)
可否增加一个函数,点击队友,开场点击一次,直到判定结束前都不点队友了(脑残机制设置为点队友,下个场景可以继承,点击两次则会取消标记)

运行python版本错误

已注册dll,win10系统,python 3.7.2 x64

运行报错如下
TIM截图20190415223019

查找错误编号众说纷纭,有说装32位python,又有说进程没有关闭导致。

该更新了

作者能否更新一下新引擎下的颜色坐标内容?

自动点怪会导致鬼使黑来信

今天用两个号测试了自动点怪,会有被鬼使黑的风险。好像是,当你体力没有用完的时候他会故意弹出一个窗口,说你体力用完了。结果脚本没有停止回来看已经收到鬼使黑来信了

Originally posted by @Milo-dd in #7 (comment)

new version

After the interface is updated, the script frequently selects between locking the lineup and unlocking the lineup. It will not detect the challenge picture and enter the challenge interface.

双开Bug反馈

双开脚本,打手结算函数,133行中有如下描述:
crnd(ts, *pos_jiesuan) #pos_jiesuan=(1062, 1118, 132, 179)

由于有时候(特别是第一次)打手结算比司机快,此时司机还未发出邀请信号,导致该点击行为重复执行。由于该点正好位于“进度”按钮处,有时候会打开进度表。

检测识图那一块的代码

检测识图,颜色测试那里,能否解释一下
while True:
tscoldebug = ts.GetColor(1, 1)
print(tscoldebug)
if tscoldebug != "000000" and tscoldebug != "FFffff":
break
mysleep(200)
print('passed color debug')
现在界面换颜色之后,挑战的坐标以及单刷进去的界面变化挺大,想修改这个代码,但是不懂这段的具体意思。

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.