🐎🖥《赛马娘》(ウマ娘: 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
Update of uncaptcha2 from 2019

YouTube Video Proof of Concept I created a new YouTube Video with technical Explanation for breaking Google's Audio reCAPTCHAs: Click on the image bel

Nikolai Tschacher 153 Dec 20, 2022
🔎 Most Advanced Open Source Intelligence (OSINT) Framework for scanning IP Address, Emails, Websites, Organizations.

🔎 Most Advanced Open Source Intelligence (OSINT) Framework for scanning IP Address, Emails, Websites, Organizations.

BhavKaran 1.5k Dec 28, 2022
Open source vulnerability DB and triage service.

OSV - Open Source Vulnerabilities OSV is a vulnerability database and triage infrastructure for open source projects aimed at helping both open source

Google 893 Jan 04, 2023
This is a simple tool to create ZIP payloads using a provided wordlist for the symlink attack (present in some file upload vulnerabilities)

zip-symlink-payload-creator This is a simple tool to create ZIP payloads using a provided wordlist for the symlink attack (present in some file upload

stark0de 6 Aug 18, 2022
PassLock is a medium-security password manager that encrypts passwords using Advanced Encryption Standards (AES)

A medium security python password manager that encrypt passwords using Advanced Encryption Standard (AES) PassLock is a password manager and password

Akshay Vs 44 Nov 18, 2022
CVE-2021-45232-RCE-多线程批量漏洞检测

CVE-2021-45232-RCE CVE-2021-45232-RCE-多线程批量漏洞检测 FOFA 查询 title="Apache APISIX Das

孤桜懶契 36 Sep 21, 2022
Complet and easy to run Port Scanner with Python

Port_Scanner Complet and easy to run Port Scanner with Python Installation 1- git clone https://github.com/s120000/Port_Scanner 2- cd Port_Scanner 3-

1 May 19, 2022
Python library to remotely extract credentials on a set of hosts.

Python library to remotely extract credentials on a set of hosts.

Pixis 1.5k Dec 31, 2022
Tool to scan for RouterOS (Mikrotik) forensic artifacts and vulnerabilities.

RouterOS Scanner Forensics tool for Mikrotik devices. Search for suspicious properties and weak security points that need to be fixed on the router. T

Microsoft 823 Dec 21, 2022
Proof of concept GnuCash Webinterface

Proof of Concept GnuCash Webinterface This may one day be a something truly great. Milestones [ ] Browse accounts and view transactions [ ] Record sim

Josh 14 Dec 28, 2022
A honey token manager and alert system for AWS.

SpaceSiren SpaceSiren is a honey token manager and alert system for AWS. With this fully serverless application, you can create and manage honey token

287 Nov 09, 2022
Simples brute forcer de diretorios para web pentest.

🦑 dirbruter Simples brute forcer de diretorios para web pentest. ❕ Atenção Não ataque sites privados. Isto é illegal. 🖥️ Pré-requisitos Ultima versã

Dio brando 6 Jan 22, 2022
python写的一款免杀工具(shellcode加载器)BypassAV,国内杀软全过(windows denfend)

python写的一款免杀工具(shellcode加载器)BypassAV,国内杀软全过(windows denfend)

1frame 266 Jan 02, 2023
Simple script for looping a Denial Of Service (DoS) attack over one single mac address in range

Bluetooth Simple Denial Of Service (DoS) Legal Note This project is made only for educational purposes and for helping in Proofs of Concept. The autho

1 Jan 09, 2022
BoobSnail allows generating Excel 4.0 XLM macro. Its purpose is to support the RedTeam and BlueTeam in XLM macro generation.

Follow us on Twitter! BoobSnail BoobSnail allows generating XLM (Excel 4.0) macro. Its purpose is to support the RedTeam and BlueTeam in XLM macro gen

STM Cyber 232 Nov 21, 2022
Just another script for automatize boolean-based blind SQL injections.

SQL Blind Injection Tool A script for automatize boolean-based blind SQL injections. Works with SQLite at least, supports using cookies. It uses bitwi

RIM 51 Dec 15, 2022
Scanner for Intranet

cthun3是集成端口扫描,服务识别,netbios扫描,网站识别,暴力破解和漏洞扫描的工具. cthun(克苏恩)是魔兽世界电子游戏中一位上古之神 截图 cthun3结合viper使用时截图 使用方法 端口扫描 -ps-ip 端口扫描的ip地址范围,例如可以输入 -ps-ip 192.168.14

rootkit 18 Sep 03, 2022
BETA: Layla - recon tool for bug bounty

WELCOME TO LAYLA Layla is a python script that automatically performs recon on a

Matheus Faria 68 Jan 04, 2023
A dynamic multi-STL, multi-process OpenSCAD build system with autoplating support

scad-build This is a multi-STL OpenSCAD build system based around GNU make. It supports dynamic build targets, intelligent previews with user-defined

Jordan Mulcahey 1 Dec 21, 2021
IDA plugin for quickly copying disassembly as encoded hex bytes

HexCopy IDA plugin for quickly copying disassembly as encoded hex bytes. This whole plugin just saves you two extra clicks... but if you are frequentl

OALabs 46 Oct 30, 2022