🐎🖥《赛马娘》(ウマ娘: 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
labsecurity is a framework and its use is for ethical hacking and computer security

labsecurity labsecurity is a framework and its use is for ethical hacking and computer security. Warning This tool is only for educational purpose. If

Dylan Meca 16 Dec 08, 2022
Python decompiler for Python 1.5-2.4 (for historical archive)

This preserves the early code of a Python decompiler for Python versions 1.5 to 2.4. I have been able to install this using pyenv using Python 2.3.7 u

R. Bernstein 2 Jan 04, 2022
对安卓APP注入MSF PAYLOAD,并且对手机管家进行BYPASS。

520_APK_HOOK 介绍 将msf生成的payload,注入到一个正常的apk文件中,重新打包后进行加固,bypass手机安全管家的检测。 项目地址: https://github.com/cleverbao/520apkhook 作者: BaoGuo 优点 相比于原始的msf远控,此版本ap

BaoGuo 368 Jan 02, 2023
A brute Force tool for Facebook

EliBruter A brute Force tool for Facebook Installing this tool -- $ pkg upgrade && update $ pkg install python $ pkg install python3 $ pkg install gi

Eli Hacks 3 Mar 29, 2022
Brute-Force-Connected

Brute-Force-Connected Guess the password for Connected accounts the use : Create a new file and put usernames and passwords in it Example : joker:1234

4 Jun 05, 2022
A Python 3 script that uploads a tasks.pickle file that enables RCE in MotionEye

MotionEye/MotionEyeOS Authenticated RCE A Python 3 script that uploads a tasks.pickle file that enables RCE in MotionEye. You need administrator crede

Matt 1 Apr 18, 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
Receive notifications/alerts on the most recent disclosed CVE's.

Receive notifications on the most recent disclosed CVE's.

Ameliorate 7 Nov 24, 2022
This is simple python FTP password craker. To crack FTP login using wordlist based brute force attack

This is simple python FTP password craker. To crack FTP login using wordlist based brute force attack

Varun Jagtap 5 Oct 08, 2022
Suricata Language Server is an implementation of the Language Server Protocol for Suricata signatures

Suricata Language Server is an implementation of the Language Server Protocol for Suricata signatures. It adds syntax check, hints and auto-completion to your preferred editor once it is configured.

Stamus Networks 39 Nov 28, 2022
GitLab CE/EE Preauth RCE using ExifTool

CVE-2021-22205 GitLab CE/EE Preauth RCE using ExifTool This project is for learning only, if someone's rights have been violated, please contact me to

3ND 164 Dec 10, 2022
Crypto Meta Extractor

Crypto Meta Extractor This repository contains the code which extracts some metadata of all the cryptocurrencies listed (9K) on CoinMarketCap. Coding

Samyak Jain 3 Jul 03, 2022
This is a multi-password‌ cracking tool that can help you hack facebook accounts very quickly

Pro_Crack Facebook Fast Cracking Tool This is a multi-password‌ cracking tool that can help you hack facebook accounts very quickly Installation On Te

•JINN• 1 Jan 16, 2022
log4j-tools: CVE-2021-44228 poses a serious threat to a wide range of Java-based applications

log4j-tools Quick links Click to find: Inclusions of log4j2 in compiled code Calls to log4j2 in compiled code Calls to log4j2 in source code Overview

JFrog Ltd. 171 Dec 25, 2022
FOSSLight Scanner performs open source analysis after downloading the source by passing a link that can be cloned by wget or git.

FOSSLight Scanner Analyze at once for Open Source Compliance. FOSSLight Scanner performs open source analysis after downloading the source by passing

FOSSLight 8 Nov 03, 2022
This tool help you to check if your Windows machine has hidden miner.

Hidden Miner Detector This tool help you to check if your Windows machine has hidden miner. Miners track when you open antivirus software or task mana

Николай Борщёв 2 Oct 05, 2022
Bilgi Sistemleri Projesi için yapılan keylogger

Keylogger Bilgi Sistemleri Projesi için yapılan keylogger Projede kullanılan kütüphanelere sahip olmasanız da python dosyası çalıştığında kendisi gere

Tarik Bulut 1 Jan 07, 2022
PKUAutoElective for 2021 spring semester

PKUAutoElective 2021 Spring Version Update at Mar 7 15:28 (UTC+8): 修改了 get_supplement 的 API 参数,已经可以实现课程列表页面的正常跳转,请更新至最新 commit 版本 本项目基于 PKUAutoElectiv

Zihan Mao 84 Sep 09, 2022
Find existing email addresses by nickname using API/SMTP checking methods without user notification. Please, don't hesitate to improve cat's job! 🐱🔎 📬

mailcat The only cat who can find existing email addresses by nickname. Usage First install requirements: pip3 install -r requirements.txt Then just

282 Dec 30, 2022
Repository for a project of the course EP2520 Building Networked Systems Security

EP2520_ACME_Project Repository for a project of the course EP2520 Building Networked Systems Security in Royal Institute of Technology (KTH), Stockhol

1 Dec 11, 2021