Skip to content

Akaisorani/QQ-bot-Arknights-Helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QQ bot-Arknights Helper

A qq bot based on nonebot and coolq

Description

It can help you choose which tag/tags to use in "公开招募"

Screenshot_20190511_154352_com.tencent.mobileqq.jpg VhOIVx.jpg VhXlz4.jpg

Usage

  1. tag list split by space

e.g. 近卫 男

Result
【近卫】: 幽灵鲨★5, 因陀罗★5, 杜宾★4, 艾丝黛尔★4, 慕斯★4, 霜叶★4, 缠丸★4, Castle-3★1, ★1~3...1

【男】: 角峰★4, Castle-3★1, ★1~3...6

【近卫+男】: Castle-3★1

  1. send a screenshot of tags in game, get result as above

  2. tell character name

e.g. tell 艾雅法拉

Result
姓名: 艾雅法拉
阵营: 卡普里尼
职业: 术师
星级: 6
性别: 女
是否感染: 是
获取途径: 干员寻访
初始生命: 732
初始攻击: 292
初始防御: 46
初始法抗: 10
再部署: 慢
部署费用: 19
完美部署费用: 19
阻挡数: 1
攻击速度: 较慢
特性: 攻击造成法术伤害
标签: 远程位、输出、削弱

  1. @this_bot hello

tell you some info about this bot

  1. @this_bot update_data

update character data from wiki

  1. mati/材料 固源岩组

    mati/材料
    (不加名称,查看表格)

File Structure

├─akaisora-bot
   ├─akaisora
   │  └─plugins
   │      │  recom_tags.py
   │      │  material.py
   │      │  ocr_tool.py
   │      │  fuzzname.py
   │      │  record.py
   │      └─ chardata.json
   │  bot.py
   └─ config.py

Install Requirement

Python: Python>=3.6.1
Packages: nonebot>=1.3.0, baidu-aip>=2.2.13.0, fuzzywuzzy>=0.17.0, xpinyin>=0.5.6

Run

1. Run Bot

python bot.py
or
nohup python bot.py >nohup.out 2>&1 &

use python3 bot.py for your need

2. Get It Work

Windows

  1. Download CoolQ, install it.

CoolQ Air version is for free but can receive/send image

  1. Add CoolQ plugin CoolQ HTTP API, install it follow the instruction.
  2. Run CoolQ and Activate the plugin above.
  3. Configure CoolQ HTTP API follow this instruction
  4. Run Bot

Linux

CoolQ has no linux version, but we can run it in docker.

  1. Install Docker
  2. Get and Run Docker CoolQ (with CoolQ HTTP API) image follow this instruction
  3. Run CoolQ and Activate the plugin above.
  4. Configure CoolQ HTTP API follow this instruction, note that you should use post_url as 172.17.0.1 instead of 127.0.0.1 because of using Docker.
  5. Run Bot

3. Additional Instruction

The ocr part (extract tags from image) uses baidu-ocr-api(free).
You need to open an account and fill in APP_ID, API_KEY, SECRET_KEY in template_apikeys.py file.
Finally, rename template_apikeys.py to apikeys.py to make it work.

Acknowledgements

Thanks for nonebot's very detailed instruction.
https://nonebot.cqp.moe/

Thanks for character data from MRFZ-wiki.
http://wiki.joyme.com/arknights/%E5%B9%B2%E5%91%98%E6%95%B0%E6%8D%AE%E8%A1%A8

Thanks for enemy data from ak.mooncell
http://ak.mooncell.wiki/w/%E9%A6%96%E9%A1%B5

Thanks for baidu open api
https://ai.baidu.com/

About

A qq bot based on nonebot and coolq

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published