🐎🖥《赛马娘》(ウマ娘: 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
ADExplorerSnapshot.py is an AD Explorer snapshot ingestor for BloodHound.

ADExplorerSnapshot.py ADExplorerSnapshot.py is an AD Explorer snapshot ingestor for BloodHound. AD Explorer allows you to connect to a DC and browse L

576 Dec 23, 2022
Archive-Crack - A Tools for crack file archive

Install In TERMUX apt update && apt upgrade -y pkg install python git unrar

X - MrG3P5 10 Oct 06, 2022
Salesforce Recon and Exploitation Toolkit

Salesforce Recon and Exploitation Toolkit Salesforce Recon and Exploitation Toolkit Usage python3 main.py URL References Announcement Blog - https:/

81 Dec 23, 2022
Make your own huge Wordlist with advanced options

#It's my first tool i hope to be useful for everyone, Make your own huge Wordlist with advanced options, You need python3 to run this tool, If you hav

0.1Arafa 6 Dec 08, 2022
Fuck - Multi Brute Force 🚶‍♂

f-mbf Fuck - Multi Brute Force 🚶‍♂ Install Script $ pkg update && pkg upgrade $ pkg install python2 $ pkg install git $ pip2 install requests $ pip2

Yumasaa 1 Dec 03, 2021
A Fast Broken Link Hijacker Tool written in Python

Broken Link Hijacker BrokenLinkHijacker(BLH) is a Fast Broken Link Hijacker Tool written in Python.

Mayank Pandey 70 Nov 30, 2022
APKLeaks - Scanning APK file for URIs, endpoints & secrets.

APKLeaks - Scanning APK file for URIs, endpoints & secrets.

dw1 3.5k Jan 09, 2023
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
Valeria stealer- - (4Feb 2022) program detects wifi saved passwords in your ROM

Valeria_stealer- Requirements : python 3.9.2 and higher (4Feb 2022) program dete

Mikhail Yolkin 3 May 05, 2022
Transparent proxy server that works as a poor man's VPN. Forwards over ssh. Doesn't require admin. Works with Linux and MacOS. Supports DNS tunneling.

sshuttle: where transparent proxy meets VPN meets ssh As far as I know, sshuttle is the only program that solves the following common case: Your clien

9.4k Jan 04, 2023
How to exploit a double free vulnerability in 2021. 'Use-After-Free for Dummies'

This bug doesn’t exist on x86: Exploiting an ARM-only race condition How to exploit a double free and get a shell. "Use-After-Free for dummies" In thi

Stephen Tong 1.2k Dec 25, 2022
OpenSource Poc && Vulnerable-Target Storage Box.

reapoc OpenSource Poc && Vulnerable-Target Storage Box. We are aming to collect different normalized poc and the vulerable target to verify it. Now re

cckuailong 560 Dec 23, 2022
Mr.Holmes is a information gathering tool (OSINT)

🔍 Mr.Holmes Mr.Holmes is a information gathering tool (OSINT). Is main purpose is to gain information about domains,username and phone numbers with t

534 Jan 08, 2023
A piece of software that shows a traceroute of a URL redirect path

Tracing URL redirects has never been easier! Usage • Download 🚩 Use Cases To see where an affiliate link ends up To see what affiliate network is bei

41 Nov 22, 2022
Exploit and Check Script for CVE 2022-1388

F5-CVE-2022-1388-Exploit Exploit and Check Script for CVE 2022-1388 Usage Check against single host python3 CVE-2022-1388.py -v true -u target_url At

Andy Gill 52 Dec 22, 2022
Providing DevOps and security teams script to identify cloud workloads that may be vulnerable to the Log4j vulnerability(CVE-2021-44228) in their AWS account.

We are providing DevOps and security teams script to identify cloud workloads that may be vulnerable to the Log4j vulnerability(CVE-2021-44228) in their AWS account. The script enables security teams

Mitiga 13 Jan 04, 2022
Exploit for CVE-2017-17562 vulnerability, that allows RCE on GoAhead (< v3.6.5) if the CGI is enabled and a CGI program is dynamically linked.

GoAhead RCE Exploit Exploit for CVE-2017-17562 vulnerability, that allows RCE on GoAhead ( v3.6.5) if the CGI is enabled and a CGI program is dynamic

Francisco Spínola 2 Dec 12, 2021
IDA Python Script for anti ollvm

IDA Python Script for anti ollvm

Shocker 62 Dec 23, 2022
Phishing-Crack tools to punish friends

Phishing-Crack Phishing Tool Version 1.0.0 Created By temirovazat A Phishing Tool With PHP and Python3 Features Fake Instagram Phishing Page Fake Face

3 Oct 04, 2022
Log4Shell RCE Exploit - fully independent exploit does not require any 3rd party binaries.

Log4Shell RCE Exploit fully independent exploit does not require any 3rd party binaries. The exploit spraying the payload to all possible logged HTTP

258 Jan 02, 2023