Coder Social home page Coder Social logo

cssxsh / arknights-helper Goto Github PK

View Code? Open in Web Editor NEW
44.0 2.0 4.0 791 KB

Mirai Console 插件开发计划

Home Page: https://github.com/users/cssxsh/projects/4

License: GNU Affero General Public License v3.0

Kotlin 99.72% Shell 0.28%
arknights qqbot mirai mirai-console

arknights-helper's Introduction

基于 Mirai Console明日方舟 助手插件

Release Downloads MiraiForum DataHolder Test

使用前应该查阅的相关文档或项目
Arknights Helper 在2.0版本进行了重构 需要重新配置订阅 详见 方舟蹲饼

指令

注意: 使用前请确保可以 在聊天环境执行指令
带括号的/前缀是可选的
<...>中的是指令名,由空格隔开表示或,选择其中任一名称都可执行例如/抽卡 十连
[...]表示参数,当[...]后面带?时表示参数可选
{...}表示连续的多个参数

本插件指令权限ID 格式为 xyz.cssxsh.mirai.plugin.arknights-helper:command.*, * 是指令的第一指令名
例如 /方舟公招 远程位 支援 的权限ID为 xyz.cssxsh.mirai.plugin.arknights-helper:command.ark-recruit

助手抽卡指令

指令 描述
/<ark-gacha 方舟抽卡> <one 单抽> [times]? 单抽times次,默认为1
/<ark-gacha 方舟抽卡> <one 十连> [times]? 十连times次,默认为1
/<ark-gacha 方舟抽卡> <detail 详情> 查看卡池规则
/<ark-gacha 方舟抽卡> <set 设置> [name] 设置卡池为name, 默认为NORMAL
/<ark-gacha 方舟抽卡> <pool 卡池> [name] [set]? {rules} 设置卡池name的规则为rules,当settrue时设置为当前卡池

抽卡每一抽会消耗600合成玉,合成玉可以通过答题获得

ArknightsGachaCommand 卡池规则rules参数格式

rules参数从第二行起,按行分割
每行格式为规则干员名|星级|other|...:概率或者注释#...
星级用连续的*表示,例如*****表示五星干员,需要单行设置,设置的概率不包括已设置干员名
other表示剩余的其他干员
概率用小数表示,全部行的概率加起来的概率要为100%,即1.00
例子

/抽卡 卡池 限时寻访深悼
浊心斯卡蒂|凯尔希:0.014
赤冬:0.04
******:0.006
*****:0.04
****:0.48
other:0.42

助手答题指令

指令 描述
/<ark-mine 方舟挖矿 方舟答题> [type]? 机器人会提出一个问题
/<ark-audio 方舟听力 方舟语音> 机器人会提出一个听力问题
/<ark-question 方舟问题> <detail 详情> [name] 查看自定义问题的详情
/<ark-question 方舟问题> <list 列表> 列出已经设置的自定义问题
/<ark-question 方舟问题> <delete 删除> 删除指定问题
/<ark-question 方舟问题> <add 添加> 与机器人互动,输入条件,设置新问题
/<ark-question 方舟问题> <count 统计> 答题情况统计
  1. 回复选项序号A~Z,即算回答问题
  2. type是提问问题类型,默认为全部类型
    可选值 BUILDING, PLAYER, TALENT, POSITION, PROFESSION, RARITY, POWER, ILLUST, VOICE, SKILL, STORY, ENEMY, WEEKLY, MUSIC, OTHER
  3. 回答了当前问题才会出现下一个问题
  4. 快速回答(规定时间的1/3内)会有相应奖励
  5. 群聊模式的其他群员亦可回答题目,但题目只能被回答一次,且其他人作为抢答者有相应奖励和惩罚
  6. 题目结构如下
[类型](得分) 问题
A. 选项
B. 选项
...

助手公招指令

指令 描述
/<ark-recruit 方舟公招> {words} 查看关键词words的公招干员
  • words的数量为1~5
    例如 /方舟公招 远程位 支援

助手材料指令

指令 描述
/<ark-item 方舟材料> [name] [limit]? [now]? 查看材料的关卡掉落率
/<ark-stage 方舟关卡> [name] [limit]? [now]? 查看关卡的材料掉落率
/<ark-zone 方舟章节> [name] [limit]? [now]? 查看地图所有关卡的材料掉落率
  • limit 是显示前多少项查询结果
  • now 是是否只显示当前开启关卡,默认为 true

助手蹲饼指令

指令 描述
/<ark-guard 方舟蹲饼> <detail 详情> 查看蹲饼详情
/<ark-guard 方舟蹲饼> <blog 微博> [contact] {blogs} 设置微博蹲饼内容
/<ark-guard 方舟蹲饼> <video 视频> [contact] {videos} 设置视频蹲饼内容
/<ark-guard 方舟蹲饼> <announce 公告> [contact] {announces} 设置公告蹲饼内容
/<ark-guard 方舟蹲饼> <weekly 周常> [contact] {weeklies} 设置周常蹲饼内容
/<ark-guard 方舟蹲饼> <activity 活动> [contact] {themes} 设置活动蹲饼内容
  • contact 为群号或Q号
  • blogs 可选值为 ARKNIGHTS(官号), BYPRODUCT(朝陇山), MOUNTEN(一拾山), HISTORICUS(泰拉记事社)
    例如 /方舟蹲饼 微博 123456 ARKNIGHTS MOUNTEN, 就订阅了官方号和一拾山
  • videos 可选值为 ANIME, MUSIC, GAME, ENTERTAINMENT
    例如 /方舟蹲饼 视频 123456 GAME MUSIC, 就订阅了PV和音乐单曲
  • announces 可选值为 ANDROID, IOS, BILIBILI
    例如 /方舟蹲饼 公告 123456 ANDROID, 就订阅了官服的公告
  • weeklies 可选值为 EVOLVE, MATERIAL, SPECIAL
    例如 /方舟蹲饼 周常 123456 EVOLVE MATERIAL, 就订阅了物资筹备和芯片搜索
  • themes 可选值为 ROGUELIKE, CRISIS, MAINLINE, ACTIVITY 例如 /方舟蹲饼 周常 123456 ROGUELIKE, 就订阅了肉鸽

助手数据指令

指令 描述
/<ark-data 方舟数据> <clear 清理> 清理缓存
/<ark-data 方舟数据> <cron 定时> 重载定时设置

位于 Mirai-Console 运行目录下的 config/xyz.cssxsh.mirai.plugin.arknights-helper 文件夹下的 cron.json 文件

助手表情指令

需要 Meme Helper 作为前置

指令 描述
/<ark-face 方舟表情> <random 随机> 随机发送一个表情
/<ark-face 方舟表情> <detail 详情> 查看表情详情

配置文件

位于 Mirai-Console 运行目录下的 config/xyz.cssxsh.mirai.plugin.arknights-helper 文件夹下的 config 文件

安装

MCL 指令安装

./mcl --update-package xyz.cssxsh:arknights-helper --channel maven-stable --type plugin

手动安装

  1. Releases 或者 Maven 下载 mirai2.jar
  2. 将其放入 plugins 文件夹中

TODO

  • 配置问题类型出现的概率
  • 记录答题正确率 21/06/10
  • 关卡规划
  • 周常提醒
  • 游戏公告

数据来源

afdian

arknights-helper's People

Contributors

cssxsh avatar syuueenn 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

Watchers

 avatar  avatar

arknights-helper's Issues

公招模块优化,优先输出复数tag确定的干员

公招模拟是一个非常强大且实用的功能!
在尝试过程中发现了一点优化可能,在 tag 较多的时候非常刷屏而且关键信息不明确,排序也稍显混乱。

大多数时候其实输出复数 tag 主要是为了查看互相组合能够产生什么干员,因此有一点优化建议。
1.存在资深/高级资深时,忽略没有这两个 tag 的其他组合。
2.复数 tag 时优先输出存在组合的情况
3.将不同组合结果拆分→利用折叠/合并转发减少占屏

进一步,将自定义输出模式加入config,例如是否自动忽略单一 tag 结果,是否只输出 4-5-6 星干员结果等。

我认为能够极大的优化公招模拟器体验,拙见仅供参考啦。

抽卡指令似乎存在错误/以及语音发送失败

如题,所有指令均能运行正常,但与说明文档不同,抽卡指令只能通过/ark-gacha前缀执行,/gacha和/抽卡均无反应

语音qq群内显示发送,但是是裂开的(1秒的空语音,但是后台已经可以看到生成的语音文件)

无法回答问题

bot发了问题之后无法对回复做出反应,只会等到时间结束发送回答超时(其他所有指令都有效)

蹲饼无法抓取到微博图片

RT,因为新浪有不同图床?是否是因为存在wx1 wx2 wx3 wx4等url导致图片无法保存到本地?
我这里在WeiboData下创建了图片名的文件夹,但没有保存图片,并且bot显示添加图片失败。

插件无响应

用/抽卡 十连这个指令没有反应,其他的指令也没有反应,jar已经放进Marai-plugins里了,data里也自动下载了文件包。是我漏做了啥吗大佬?
image

明日方舟 线索 互换

用户通过设置自己需要的线索拥有的线索服务器,让机器人匹配合适的互换

给予权限后,指令无反应

我在输入/perm permit u* xyz.cssxsh.mirai.plugin.arknights-helper:* 之后后台有回复OK
然后在config的yml中输入了群号 但是在重启框架之后又恢复了初始的{}
指令也无法正常触发

"code":-401,"message":"非法访问"

2023-03-30 13:57:00 W/arknights-helper: 明日方舟 视频 GAME 数据加载失败
io.ktor.client.plugins.ResponseException: Bad response: HttpResponse[https://api.bilibili.com/x/space/wbi/arc/search?mid=161775300&ps=50&pn=1&order=pubdate&tid=4&jsonp=jsonp, 200 ]. Text: "{"code":-401,"message":"非法访问","ttl":1,"data":{"ga_data":{"decisions":["verify_captcha_level3"],"risk_level":1,"grisk_id":"b743f01a6cfe159b28889cfa32a5e185","decision_ctx":{"buvid":"5CF7F234-8E5B-B2D4-4F94-4F062FB642DE20127infoc","ip":"1.27.51.146","mid":"0","scene":"anti_crawler","ua":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/70.0.3538.77 Chrome/70.0.3538.77 Safari/537.36","v_voucher":"voucher_43e4ff28-1059-44da-a473-3efdb02e7abd"}}}}"
    at arknights-helper-2.1.1.mirai2.jar//xyz.cssxsh.arknights.bilibili.VideoDataHolder$load$history$2.invokeSuspend(VideoDataHolder.kt:38)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

Mirai consosle 2.14.0,arknights-helper v2.1.1

风控校验失败

Running MiraiConsole v2.16.0, built on 2023-10-20 06:28:10.
Frontend Terminal: version 2.16.0, provided by Mamoe Technologies

Permission Service: Built In Permission Service

Plugins: Chat Command v0.6.0, fix-protocol-version v1.13.0, mirai-login-solver-sakura v0.0.12, com.github.eiriksgata.rulateday-dice v0.5.2, arknights-helper v2.2.1, MCL Addon v2.1.1

Object Pending Finalization Count: 0
committed | init | used | max
Heap Memory: 608.0MB | 1.0GB | 186.05MB | 15.93GB
Non-Heap Memory: 130.06MB | 7.31MB | 126.74MB | -1

=================================

具体问题为使用抽卡指令提示风控校验失败,打开控制台的链接网页展示内容如下:

https://api.bilibili.com/x/space/wbi/arc/search?mid=161775300&ps=50&pn=1&order=pubdate&tid=3&jsonp=jsonp&wts=1701837061&w_rid=1250e3dd1dff899b3cda023f44055519
↓↓↓↓
{
"code": -352,
"message": "风控校验失败",
"ttl": 1,
"data": {
"v_voucher": "voucher_2d1ff686-f09f-416d-94f6-d94573c29a96"
}
}

缓存清理

缓存清理,尤其WeiboData下,目前只能手动删除,是否能提供过期时间自动清理或者手动调取命令的形式

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.