🐎🖥《赛马娘》(ウマ娘: Pretty Derby)辅助脚本

Overview

auto-derby

python

自动化养马

育成结果 Nurturing result

功能

  • 支持客户端
    • DMM (前台)
    • 实验性 安卓 ADB 连接(后台)开发基于 1080x1920 分辨率
  • 团队赛 (Team race)
    • 有胜利确定奖励时吃帕菲
  • 日常赛 (Daily race)
  • PvP 活动赛 (Champions meeting)
  • 传奇赛 (Legend race)
    • 自动领奖励
  • 活动抽奖转盘 (Roulette derby)
  • 遇到限时商店自动买空
  • 育成 (Nurturing)
    • 自动选择训练
      • 基于当前属性
      • 基于训练效果
      • 基于训练等级
      • 基于精确体力消耗
      • 基于羁绊值获取量
      • 暑期集训保留体力
      • 年末抽奖前消耗体力
    • 遇到新事件选项请求人工处理,后续相同事件使用相同选择
    • 自动参加比赛
      • 预估比赛结果,如果不能仅靠属性拿冠军则暂停请求人工确认
      • 自动选择比赛跑法
        • 基于属性和适性
        • 基于对手跑法选择跑法(倾向人数少的跑法)
    • 支持友人卡(在实现前可以带友人卡,就是外出时需要自己手动选)
  • 支持 python 插件

使用方法

需求 DMM 版 和 python3.8

安装依赖

py -3.8 -m pip install -r requirements.txt

双击 launcher.cmd 可通过一个简单的 GUI 进行启动

或者手动调用模块:

py -3.8 -m auto_derby 工作名称

工作名称随便输入错误的名字会提示当前支持的工作

问题反馈

通过 Github issues 提交反馈

启动器勾选 debug 时会在同目录下生成相关调试信息,反馈时请将相关信息一同附上

launcher.log

启动器日志,强制退出时不会包含运行日志

反馈前请手动清理敏感信息(例如用户名、机器名)

auto_derby.log

运行日志,.1 .2 .3 后缀的文件为之前日志的备份

last_screenshot.local.png

脚本的最后一次截图

ocr_images.local

文本识别时使用的图片

single_mode_event_images.local

育成事件选择时用于匹配的图片

Comments
  • Recognize new shop ui

    Recognize new shop ui

    The following implementation will likely need to be changed to recognize the new shop ui. https://github.com/NateScarlet/auto-derby/blob/8060c172411afc3bf283a093733869f6a48ba0f3/auto_derby/scenes/single_mode/shop.py#L141-L171

    logs:

    INFO  [2022-04-12 14:01:56]:auto_derby.template:183: match: tmpl=tmpl<single_mode_shop_item_price.png>, pos=(131, 549), similarity=0.97
    INFO  [2022-04-12 14:01:56]:auto_derby.template:183: match: tmpl=tmpl<single_mode_shop_item_price.png>, pos=(131, 657), similarity=0.97
    INFO  [2022-04-12 14:01:56]:auto_derby.template:183: match: tmpl=tmpl<single_mode_shop_item_price.png>, pos=(131, 441), similarity=0.97
    INFO  [2022-04-12 14:01:57]:auto_derby.jobs.nurturing:56: shop items
    INFO  [2022-04-12 14:01:57]:auto_derby.jobs.nurturing:72: score:	40.00/19.45:	Item<蹄鉄ハンマー・極#[email protected]>	<in cart>
    INFO  [2022-04-12 14:01:57]:auto_derby.jobs.nurturing:72: score:	32.65/19.45:	Item<にんじんBBQセット#[email protected]>	<in cart>
    INFO  [2022-04-12 14:01:57]:auto_derby.jobs.nurturing:72: score:	37.06/26.47:	Item<スパルタメガホン#[email protected]>	<in cart>
    INFO  [2022-04-12 14:01:57]:auto_derby.jobs.nurturing:72: score:	17.16/7.02:	Item<スピード戦術書#[email protected]>	<in cart>
    INFO  [2022-04-12 14:01:57]:auto_derby.jobs.nurturing:72: score:	0.00/4.86:	Item<スピードのメモ帳#[email protected]>	
    INFO  [2022-04-12 14:01:57]:auto_derby.jobs.nurturing:72: score:	0.00/14.59:	Item<プレーンカップケーキ#[email protected]>	
    INFO  [2022-04-12 14:01:57]:auto_derby.jobs.nurturing:72: score:	0.00/24.31:	Item<根性アンクルウェイト#[email protected]>	
    INFO  [2022-04-12 14:01:57]:auto_derby.jobs.nurturing:72: score:	8.00/72.94:	Item<効率練習のススメ#[email protected]>	<coin not enough>
    INFO  [2022-04-12 14:01:57]:auto_derby.template:183: match: tmpl=tmpl<single_mode_shop_item_price.png>, pos=(131, 549), similarity=0.97
    INFO  [2022-04-12 14:01:57]:auto_derby.template:183: match: tmpl=tmpl<single_mode_shop_item_price.png>, pos=(131, 657), similarity=0.97
    INFO  [2022-04-12 14:01:57]:auto_derby.template:183: match: tmpl=tmpl<single_mode_shop_item_price.png>, pos=(131, 441), similarity=0.97
    INFO  [2022-04-12 14:01:57]:auto_derby.scenes.single_mode.shop:150: exchange: Item<スパルタメガホン#[email protected]>
    INFO  [2022-04-12 14:01:58]:auto_derby.template:199: no match: tmpl=('single_mode_shop_use_confirm_button.png', 'close_button.png')
    INFO  [2022-04-12 14:01:58]:auto_derby.template:199: no match: tmpl=('single_mode_shop_use_confirm_button.png', 'close_button.png')
    INFO  [2022-04-12 14:01:58]:auto_derby.template:199: no match: tmpl=('single_mode_shop_use_confirm_button.png', 'close_button.png')
    

    new shop images: Since it is displayed in a reduced size, you can check the original size by clicking.

    others: Now that you can select multiple items and purchase them at the same time, you may be able to optimize the item selection scene.

    bug 
    opened by gentle-knight-13 27
  • 养成出现选项时,在终端选择时出错

    养成出现选项时,在终端选择时出错

    Choose event option(1/2/3/4/5):3 ERROR [12:55:28]:main:119: unexpected exception Traceback (most recent call last): File "C:\Users\WisdomDevil\Desktop\auto-derby-master\auto_derby_main_.py", line 115, in main() File "C:\Users\WisdomDevil\Desktop\auto-derby-master\auto_derby_main_.py", line 87, in main job() File "C:\Users\WisdomDevil\Desktop\auto-derby-master\auto_derby\jobs\nurturing.py", line 326, in nurturing _handle_option() File "C:\Users\WisdomDevil\Desktop\auto-derby-master\auto_derby\jobs\nurturing.py", line 241, in _handle_option ans = choice.get(template.screenshot()) File "C:\Users\WisdomDevil\Desktop\auto-derby-master\auto_derby\single_mode\choice.py", line 80, in get g.choices[event_id] = int(ans) TypeError: list indices must be integers or slices, not str

    以上为错误信息

    question 
    opened by WisdomDevils 19
  • [DEV]选择夏日合宿休息时发生错误

    [DEV]选择夏日合宿休息时发生错误

    卡在选择夏日合宿休息的选择上了,不是第一次出现。~忘记留截屏了,再出现的时候我把截屏发出来~

    DEBUG [2021-06-21 20:45:50]:auto_derby.template:180: not match: tmpl=tmpl<single_mode_rest.png>, pos=(45, 767), similarity=0.436
    DEBUG [2021-06-21 20:45:50]:auto_derby.template:180: not match: tmpl=tmpl<single_mode_command_summer_rest.png>, pos=(51, 753), similarity=0.889
    INFO  [2021-06-21 20:45:50]:auto_derby.template:200: no match: tmpl=('single_mode_rest.png', 'single_mode_command_summer_rest.png')
    DEBUG [2021-06-21 20:45:53]:auto_derby.template:48: screenshot
    DEBUG [2021-06-21 20:45:53]:auto_derby.template:180: not match: tmpl=tmpl<single_mode_rest.png>, pos=(45, 767), similarity=0.436
    DEBUG [2021-06-21 20:45:53]:auto_derby.template:180: not match: tmpl=tmpl<single_mode_command_summer_rest.png>, pos=(51, 753), similarity=0.889
    INFO  [2021-06-21 20:45:53]:auto_derby.template:200: no match: tmpl=('single_mode_rest.png', 'single_mode_command_summer_rest.png')
    DEBUG [2021-06-21 20:45:56]:auto_derby.template:48: screenshot
    
    
    opened by fatinghenji 19
  • OCR fails. It seems to often take the

    OCR fails. It seems to often take the "ジ" as "シ".

    Thanks for the response the other day. The program was working fine, but the current version is failing to OCR.

    OCR frequently mistakes "ジ" for "シ".

    Is there something wrong with my settings? I have not changed any settings in NVIDIA Control Panel -> Manage 3D Settings. (Factory default)

    Does the graphics board or Windows settings affect OCR?

    TEST VERSION fed9276f2a02a770a3116211a3ce42b7bde10c9b launcher.log

    screenshot_1622701278 screenshot_1622701289

    If you need any other logs or screenshots, please let me know.

    bug 
    opened by waraiotoko2501h 19
  • 青春杯選訓練項目時會卡住

    青春杯選訓練項目時會卡住

    MIP4{TQ~2 J2G0L7(6$SA2H FLU{N@ST~Q1KJ1CMJVV3 I2 File "C:\Users\sakurasou\AppData\Local\Programs\Python\Python38-32\lib\concurrent\futures_base.py", line 432, in result return self.__get_result() File "C:\Users\sakurasou\AppData\Local\Programs\Python\Python38-32\lib\concurrent\futures_base.py", line 388, in __get_result raise self._exception File "C:\Users\sakurasou\AppData\Local\Programs\Python\Python38-32\lib\concurrent\futures\thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "D:\软件\autoderby\ver3\auto-derby-master\auto_derby\single_mode\training\training.py", line 428, in from_training_scene_v2 self.skill = _ocr_training_effect(img.crop(bbox_group[5])) File "D:\软件\autoderby\ver3\auto-derby-master\auto_derby\single_mode\training\training.py", line 129, in _ocr_training_effect return int(text.lstrip("+")) ValueError: invalid literal for int() with base 10: ''

    作者你好,這邊情況是用了一年時間也沒遇到過這種,然後最近一週年更新後打算刷活動使用的時候就出現了選訓練項目的時候會卡住,日誌發了最新的一部分,要是發少了繼續補充,不太清楚要發多少。

    bug 
    opened by denpa910 18
  • 自动出门比赛因为找不到对应赛事而报错停止

    自动出门比赛因为找不到对应赛事而报错停止

    集中发生在第二年/第三年3月上下

    示例: INFO [2021-11-12 09:55:09]:auto_derby.template:180: match: tmpl=tmpl<single_mode_race_menu_fan_icon.png>, pos=(203, 586), similarity=0.95 ERROR [2021-11-12 09:55:09]:main:123: unexpected exception Traceback (most recent call last): File "C:\Downloads\auto-derby-master\auto-derby-master\auto_derby_main_.py", line 119, in main() File "C:\Downloads\auto-derby-master\auto-derby-master\auto_derby_main_.py", line 90, in main job() File "C:\Downloads\auto-derby-master\auto-derby-master\auto_derby\jobs\nurturing.py", line 225, in nurturing spec_spec_key(tmpl) File "C:\Downloads\auto-derby-master\auto-derby-master\auto_derby\jobs\nurturing.py", line 88, in _ac_handle_turn _handle_turn(ac.ctx) File "C:\Downloads\auto-derby-master\auto-derby-master\auto_derby\jobs\nurturing.py", line 52, in _handle_turn command_with_scores[0][0].execute(ctx) File "C:\Downloads\auto-derby-master\auto-derby-master\auto_derby\single_mode\commands\race.py", line 85, in execute scene.choose_race(ctx, self.race) File "C:\Downloads\auto-derby-master\auto-derby-master\auto_derby\scenes\single_mode\race_menu.py", line 82, in choose_race for race2, pos in find_by_race_menu_image(ctx, template.screenshot()): File "C:\Downloads\auto-derby-master\auto-derby-master\auto_derby\single_mode\race\game_data.py", line 263, in find_by_race_menu_image for i in _find_by_race_menu_item(ctx, screenshot.crop(bbox)): File "C:\Downloads\auto-derby-master\auto-derby-master\auto_derby\single_mode\race\game_data.py", line 248, in _find_by_race_menu_item raise ValueError("_find_by_race_menu_item: no race match spec: %s", full_spec) ValueError: ('_find_by_race_menu_item: no race match spec: %s', ((2, 5, 1), '中山', 1, 2000, 1, 2, 5400, (200,)))

    question 
    opened by debi-derby 18
  • 巅峰赛中,打开商店页面会唤起浏览器,但浏览器有报错,无限Loading中

    巅峰赛中,打开商店页面会唤起浏览器,但浏览器有报错,无限Loading中

    error JS的错误显示试图获取的Javascript文件被服务器识别为text/plain类型: Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.(assets/index.ac25b9a9.js)

    :8300/assets/vendor.1a7cc180.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.(assets/vendor.1a7cc180.js)

    bug 
    opened by cwbeta 17
  • 默认 ExecutionPolicy 下 launcher.cmd 无法运行

    默认 ExecutionPolicy 下 launcher.cmd 无法运行

    大佬好,请问下载好的文件应该放到哪个路径? 我输入py -3.8 -m pip install -r requirements.txt报错找不到文件,之后尝试在cmd里面cd到auto-derby-master所在路径再使用上面的语句会读条安装pip依赖,pip list里面也能看到opencv等依赖 现在双击launcher.cmd会闪一下命令提示符界面,但是没有GUI。 现在不知道该怎么弄了,希望大佬能指点一下我。

    bug 
    opened by loveliveao 16
  • 识别当前属性出错

    识别当前属性出错

    image 再次出现相同问题,这次应该不是字体的锅 重新启动后可以通过上图,但是会卡在新的图片上,比如下图: image

    Originally posted by @fatinghenji in https://github.com/NateScarlet/auto-derby/issues/16#issuecomment-854383348

    bug 
    opened by NateScarlet 15
  • 笔记本分辨率不够

    笔记本分辨率不够

    我是从launch.cmd启动的,这是点了powershell的输出文本 已启动脚本,输出文件为 D:\Program Files\auto-derby-1.27.1\launcher.log

    Job : nurturing Debug : True CheckUpdate : True PythonExecutablePath : D:\Program Files\Python\Python38\python.exe SingleModeChoicesDataPath : D:\Program Files\auto-derby-1.27.1\data\single_mode _choices.csv PauseIfRaceOrderGt : 4 Plugins : auto_crane,Medium_and_long_panhandle_races TargetTrainingLevels : 2,2,2,2, ADBAddress : Version : 1.27.1 Python Version : Python 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 1 1:48:03) [MSC v.1928 64 bit (AMD64)]

    command: title auto-derby: 1.27.1 cd /d "D:\Program Files\auto-derby-1.27.1" set "DEBUG=auto_derby" set "AUTO_DERBY_ADB_ADDRESS=" set "AUTO_DERBY_CHECK_UPDATE=true" set "AUTO_DERBY_LAST_SCREENSHOT_SAVE_PATH=debug/last_screenshot.png" set "AUTO_DERBY_OCR_IMAGE_PATH=debug/ocr_images" set "AUTO_DERBY_PAUSE_IF_RACE_ORDER_GT=4" set "AUTO_DERBY_PLUGINS=auto_crane,Medium_and_long_panhandle_races" set "AUTO_DERBY_SINGLE_MODE_CHOICE_PATH=D:\Program Files\auto-derby-1.27.1\data \single_mode_choices.csv" set "AUTO_DERBY_SINGLE_MODE_EVENT_IMAGE_PATH=debug/single_mode_event_images" set "AUTO_DERBY_SINGLE_MODE_TARGET_TRAINING_LEVELS=2,2,2,2," set "AUTO_DERBY_SINGLE_MODE_TRAINING_IMAGE_PATH=debug/single_mode_training_imag es" set "AUTO_DERBY_WEB_LOG_BUFFER_PATH=debug/log.jsonl" set "AUTO_DERBY_WEB_LOG_IMAGE_PATH=debug/images" "D:\Program Files\Python\Python38\python.exe" -m auto_derby nurturing start "auto-derby launcher" cmd.exe /c .\launcher.cmd exit 到这里之后就提示我说powershell已停止工作,自己关闭了 同时游戏的ui界面变成这样,不知道为什么变的非常大 TC{PR39D_{2C50FYF7 GXRD 然后这是debug文件里面log.jsonl的信息 %FJ)A55@_3C})Q0 CAZPOU7

    question 
    opened by aishangbiao 12
  • 在选择比赛的时候滑动事件会变成点击事件

    在选择比赛的时候滑动事件会变成点击事件

    报告一个新bug 在选择比赛的时候滑动事件会变成点击事件。log如下: auto_derby.log 手动adb执行adb shell input swipe 232 1391 232 1353 200同样为点击,应该不是触摸时间或者延迟的问题吧。 感觉依旧是超出了屏幕的最大值

    Originally posted by @fatinghenji in https://github.com/NateScarlet/auto-derby/issues/69#issuecomment-864555012

    bug 
    opened by NateScarlet 11
  • 支持自动学技能

    支持自动学技能

    现在的手动加技能点对我够用了 因为我不刷历战

    这个功能想要的人多了 (不要发 +1 回复而是右上角 😊 点 👍)再考虑实现

    其他人如果自己实现了也欢迎发 PR,不过从图片识别技能的那部分代码要求带测试。

    PS:

    这个功能在 @yourlies 的 fork 有实现

    不过还不支持插件配置 并且基于的版本比较老

    enhancement 
    opened by NateScarlet 0
Releases(v1.28.3)
Owner
NateScarlet
Nuke compositor; Manga translator; Painting hobbyist
NateScarlet
A deobfuscator for multiple python obfuscators

PY4COC A deobfuscator for multiple python obfuscators, supports exe's packed with pyinstaller too. How to use python3 py4coc.py exe file or py file o

svenskithesource 16 Dec 03, 2022
Android Malware Behavior Deleter

Android Malware Behavior Deleter UDcide UDcide is a tool that provides alternative way to deal with Android malware. We help you to detect and remove

27 Sep 23, 2022
This program will brute force any Instagram account you send it its way given a list of proxies.

Instagram Bruter This program will brute force any Instagram account you send it its way given a list of proxies. NOTICE I'm no longer maintaining thi

1 Nov 15, 2021
On the 11/11/21 the apache 2.4.49-2.4.50 remote command execution POC has been published online and this is a loader so that you can mass exploit servers using this.

ApacheRCE ApacheRCE is a small little python script that will allow you to input the apache version 2.4.49-2.4.50 and then input a list of ip addresse

3 Dec 04, 2022
Scanning for CVE-2021-44228

Filesystem log4j_scanner for windows and Unix. Scanning for CVE-2021-44228, CVE-2021-45046, CVE-2019-17571 Requires a minimum of Python 2.7. Can be ex

Brett England 4 Jan 09, 2022
A forensic collection tool written in Python.

CHIRP A forensic collection tool written in Python. Watch the video overview 📝 Table of Contents 📝 Table of Contents 🧐 About 🏁 Getting Started Pre

Cybersecurity and Infrastructure Security Agency 1k Dec 09, 2022
Passphrase-wordlist - Shameless clone of passphrase wordlist

This repository is NOT official -- the original repository is located on GitLab

Jeff McJunkin 2 Feb 05, 2022
DepFine Is a tool to find the unregistered dependency based on dependency confusion valunerablility and lead to RCE

DepFine DepFine Is a tool to find the unregistered dependency based on dependency confusion valunerablility and lead to RCE Installation: You Can inst

Hossam mesbah 14 Nov 11, 2022
PyPasser is a Python library for bypassing reCaptchaV3 only by sending 2 requests.

PyPasser is a Python library for bypassing reCaptchaV3 only by sending 2 requests. In 1st request, gets token of captcha and in 2nd request,

253 Jan 05, 2023
Tool for finding PHP source code vulnerabilities.

vulnz Tool for finding php source code vulnerabilities. Scans PHP source code and prints out potentially dangerous lines. This tool is useful for secu

Mateo Hanžek 1 Jan 14, 2022
A web-app helping to create strong passwords that are easy to remember.

This is a simple Web-App that demonstrates a method of creating strong passwords that are still easy to remember. It also provides time estimates how long it would take an attacker to crack a passwor

2 Jun 04, 2021
MD5-CRACKER - A gmail brute force app created with python3

MD5-CRACKER So this is my first app i created with python3 . if you guys downloa

2 Nov 10, 2022
On-demand scanning for container registries

Lacework registry scanner Install & configure Lacework CLI Integrate a Container Registry Go to Lacework Resources Containers Container Image In

Will Robinson 1 Dec 14, 2021
SonicWALL SSL-VPN Web Server Vulnerable Exploit

SonicWALL SSL-VPN Web Server Vulnerable Exploit

44 Nov 15, 2022
User-friendly reference finder in IDA

IDARefHunter Updated: This project's been introduced on IDA Plugin Contest 2021! Why do we need RefHunter? Getting reference information in one specif

Jiwon 29 Dec 04, 2022
The probability of having the password you want in the PassMaker is +90%!!

PasswordMaker Strong listing password Introduction The probability of having the password you want in the tool is +90%!! How to Install Open the termi

MasterBurnt 4 Sep 05, 2021
Tool-X is a kali linux hacking Tool installer.

Tool-X is a kali linux hacking Tool installer. Tool-X developed for termux and other Linux based systems. using Tool-X you can install almost 370+ hacking tools in termux app and other linux based di

Rajkumar Dusad 4.2k May 29, 2022
macOS Initial Access Payload Generator

Mystikal macOS Initial Access Payload Generator Related Blog Post: https://posts.specterops.io/introducing-mystikal-4fbd2f7ae520 Usage: Install Xcode

Leo Pitt 206 Dec 31, 2022
md5 hash cracking with python.

Python-Md5-Cracker- md5 hash cracking with python. Original files added First create a file called word.txt then run the wordCreate.py script The task

Nebil Sharifi 0 Aug 31, 2022
SSRF search vulnerabilities exploitation extended.

This tool search for SSRF using predefined settings in different parts of a request (path, host, headers, post and get parameters).

Andri Wahyudi 13 Jul 04, 2021