├── .gitignore
├── Dockerfile
├── LICENSE
├── README.md
├── __init__.py
├── docs
├── README.txt
└── v3
│ └── ver.json
├── scripts
├── install-docker.sh
├── yobot-gocqhttp-auto.ps1
└── yobot-gocqhttp-auto.sh
└── src
└── client
├── README.md
├── logo.ico
├── main.py
├── main.spec
├── nonebot_plugin.py
├── packedfiles
├── default_BossIdAndName.json
├── default_boss.json
├── default_config.json
└── default_pool.json
├── public
├── libs
│ ├── axios@0.19.2
│ │ └── dist
│ │ │ └── axios.min.js
│ ├── canvas-nest.js@1.0.1
│ │ └── dist
│ │ │ └── canvas-nest.min.js
│ ├── echarts@4.7.0
│ │ └── dist
│ │ │ └── echarts.min.js
│ ├── element-ui@2.13.0
│ │ └── lib
│ │ │ ├── index.js
│ │ │ └── theme-chalk
│ │ │ ├── fonts
│ │ │ ├── element-icons.ttf
│ │ │ └── element-icons.woff
│ │ │ └── index.css
│ ├── github-buttons@2.7.0
│ │ └── dist
│ │ │ └── buttons.min.js
│ ├── github-markdown-css@3.0.1
│ │ └── github-markdown.css
│ ├── jquery@2.1.1
│ │ ├── jquery.min.js
│ │ └── jquery.min.map
│ ├── vue@2.6.11
│ │ └── dist
│ │ │ └── vue.min.js
│ └── yocool@final
│ │ └── princessadventure
│ │ ├── banner.png
│ │ ├── boss_icon
│ │ ├── 0.webp
│ │ ├── 300100.webp
│ │ ├── 300200.webp
│ │ ├── 300300.webp
│ │ ├── 300400.webp
│ │ ├── 300600.webp
│ │ ├── 300700.webp
│ │ ├── 300800.webp
│ │ ├── 301000.webp
│ │ ├── 301100.webp
│ │ ├── 301300.webp
│ │ ├── 301400.webp
│ │ ├── 301500.webp
│ │ ├── 301800.webp
│ │ ├── 302000.webp
│ │ ├── 302100.webp
│ │ ├── 302600.webp
│ │ ├── 302700.webp
│ │ ├── 302800.webp
│ │ ├── 302900.webp
│ │ ├── 303000.webp
│ │ ├── 303300.webp
│ │ ├── 303500.webp
│ │ ├── 303606.webp
│ │ ├── 303900.webp
│ │ ├── 304000.webp
│ │ ├── 304100.webp
│ │ ├── 304500.webp
│ │ ├── 304600.webp
│ │ ├── 304800.webp
│ │ ├── 305100.webp
│ │ ├── 305700.webp
│ │ ├── 305800.webp
│ │ ├── 305900.webp
│ │ ├── 306100.webp
│ │ ├── 306200.webp
│ │ ├── 306900.webp
│ │ ├── 307202.webp
│ │ ├── 309000.webp
│ │ ├── 309200.webp
│ │ ├── 312000.webp
│ │ ├── 312501.webp
│ │ ├── 313400.webp
│ │ └── 316600.webp
│ │ ├── box-gift.png
│ │ ├── clanbg.png
│ │ ├── error.png
│ │ ├── flag.png
│ │ ├── icon-loading.png
│ │ ├── jquery.sliderBar.js
│ │ ├── karin_q.png
│ │ ├── karyl_q.png
│ │ ├── kokkoro_q.png
│ │ ├── logo.png
│ │ ├── pecorine_q.png
│ │ ├── scheme-01.css
│ │ ├── scheme-02.css
│ │ ├── scheme-03.css
│ │ ├── sprite01.png
│ │ ├── sprite02.png
│ │ ├── sprite03.png
│ │ ├── style.css
│ │ ├── text-loading.png
│ │ ├── yocool.js
│ │ └── yui_q.png
├── static
│ ├── admin
│ │ ├── groups.js
│ │ ├── pool-setting.js
│ │ ├── setting.js
│ │ └── users.js
│ ├── chara_marks.png
│ ├── clan
│ │ ├── clan-rank.js
│ │ ├── panel.js
│ │ ├── progress.js
│ │ ├── setting.js
│ │ ├── statistics.js
│ │ ├── statistics
│ │ │ ├── deviation.png
│ │ │ ├── many.png
│ │ │ ├── order.png
│ │ │ ├── pie.png
│ │ │ └── statistics2.js
│ │ ├── subscribers.js
│ │ └── user.js
│ ├── gacha.js
│ ├── gongan.png
│ ├── marionette.js
│ ├── password.js
│ └── small.ico
└── template
│ ├── 404.html
│ ├── about.html
│ ├── admin
│ ├── groups.html
│ ├── setting.html
│ └── users.html
│ ├── clan
│ ├── clan-rank.html
│ ├── panel.html
│ ├── progress.html
│ ├── setting.html
│ ├── statistics.html
│ ├── statistics
│ │ ├── statistics1.html
│ │ └── statistics2.html
│ ├── subscribers.html
│ ├── unauthorized.html
│ └── user.html
│ ├── help.html
│ ├── homepage.html
│ ├── login-code.html
│ ├── login.html
│ ├── manual.html
│ ├── marionette.html
│ ├── password.html
│ ├── unauthorized.html
│ ├── user-info.html
│ └── user.html
├── requirements.txt
├── ybplugins
├── __init__.py
├── clan_battle
│ ├── __init__.py
│ ├── battle.py
│ ├── components
│ │ ├── define.py
│ │ ├── fonts
│ │ │ └── msyh.ttf
│ │ ├── handler.py
│ │ ├── image_engine.py
│ │ ├── kernel.py
│ │ ├── multi_cq_utils.py
│ │ ├── realize.py
│ │ ├── score.py
│ │ └── web_operation.py
│ ├── exception.py
│ ├── typing.py
│ └── util.py
├── custom.py
├── group_leave.py
├── homepage.py
├── login.py
├── marionette.py
├── settings.py
├── shorten_url.py
├── switcher.py
├── templating.py
├── web_util.py
├── ybdata.py
├── yobot_exceptions.py
└── yobot_msg.py
└── yobot.py
/.gitignore:
--------------------------------------------------------------------------------
1 | **/__pycache__
2 | .vscode/
3 | src/client/yobot_data/*
4 | src/client/public/template/help/
5 | src/client/public/static/aya.ico
6 | src/client/venv
7 | src/client/dist
8 | src/client/build
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.8-slim-buster
2 | LABEL maintainer="yobot"
3 |
4 | ENV PYTHONIOENCODING=utf-8
5 |
6 | ADD src/client/ /yobot
7 |
8 | RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
9 | && echo 'Asia/Shanghai' >/etc/timezone \
10 | && apt update \
11 | && apt upgrade -y \
12 | && apt install build-essential -y \
13 | && cd /yobot \
14 | && pip3 install aiocqhttp==1.4.3 Quart==0.18.3 --no-cache-dir \
15 | && pip3 install -r requirements.txt --no-cache-dir \
16 | && python3 main.py \
17 | && chmod +x yobotg.sh
18 |
19 | WORKDIR /yobot
20 |
21 | EXPOSE 9222
22 |
23 | VOLUME /yobot/yobot_data
24 |
25 | ENTRYPOINT /yobot/yobotg.sh
26 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # yobot_remix
2 |
3 | yobot魔改版,支持新版公会战。
4 | 删除了除会战外的功能(肯定有没删干净的地方)
5 | 没实战测试过,可能存在未知bug
6 | 多来点测试工程师\_(:з)∠)_
7 |
8 | 现已将全部在线CDN以及资源改为本地静态资源。注意不要在设置中开启 web_gzip 压缩,保持为0即为关闭状态,否则开启后网页资源会加载不全。
9 |
10 | 现在已支持多CQ适配(部分),网页端主动消息已经可以正常发送。
11 | 新创建的公会自动添加多CQ记录,以前创建的公会请发送“手动添加群记录”来修复多CQ适配。
12 |
13 | ## 指令表
14 | > 大部分和原版yobot相同,只标出和原版yobot不同的命令
15 |
16 | | 指令 | 说明 |
17 | | :---------------: | :----------------------------------------------------------: |
18 | |申请出刀 [指定boss] [是否为补偿] [@某人]|如:**申请出刀 1** 或 **申请出刀 2b**(b为指定补偿)
开始挑战boss,进入**出刀状态**
必须指定boss,可以不指定补偿,当完整刀使用完后自动使用补偿
(新增申请出刀方式,发送 **进x** 即可,x为指定boss)|
19 | |取消(出刀/申请) [@某人]/[all]|**出刀状态**下可用
退出出刀状态。@某人为取消指定成员的出刀申请,加all则取消所有人的出刀申请|
20 | |报伤害 ?s?w [@某人]|**出刀状态**下可用
如:**报伤害 2s200w**
申请出刀后暂停报伤害,例子意为剩2秒打了200w伤害。可@某人为其报伤害|
21 | |报刀 [-指定boss] [具体伤害] [是否是补偿] [@某人] [昨日] [:留言]|例1:**报刀 -1 100w**
例2:**报刀 100w@xxx**
例3:**报刀 -1 100w b** (b代表指定补偿)
对boss造成伤害但未击败时用,记录伤害,并退出**出刀状态**。
**指定boss需要在前面加个-(横杠)**,若在**出刀状态**,可以不指定boss
一般情况下不需要指定为补偿,会自动选择
如果有at则为代报,有冒号则为留言
如果有“昨日”则将记录添加到前一天|
22 | |尾刀 [指定boss] [是否是补偿] [@某人] [昨日] [:留言]|同上,不需要具体伤害,指定boss时前面不需要加-(横杠)|
23 | |状态|显示所有boss的当前状态,且可看到当前正在挑战的成员、报伤害、挂树情况|
24 | |挂树|**出刀状态**下可用|
25 | |手动添加群记录|修复多CQ适配(修复网页催刀报刀不在群里通知)|
26 | > 关于指定补偿问题,建议普通公会直接无视指定补偿这个功能,可出刀总数是固定的,不指定也不会有任何影响。
27 | > 有指挥的公会才需要严格遵守。
28 | > 指定补偿时不止可以用b,还可以用 (补偿/补/b/bc)
29 | > ps:用补偿刀收尾会影响补偿判断,如果用补偿刀收尾需要报补偿
30 |
31 | [源码](./src/client)
32 |
33 | [介绍](https://yobot.win)
34 |
--------------------------------------------------------------------------------
/__init__.py:
--------------------------------------------------------------------------------
1 | from .src.client import nonebot_plugin
2 |
--------------------------------------------------------------------------------
/docs/README.txt:
--------------------------------------------------------------------------------
1 | 文档移动至 https://github.com/pcrbot/yobot-docs
--------------------------------------------------------------------------------
/docs/v3/ver.json:
--------------------------------------------------------------------------------
1 | {
2 | "stable": {
3 | "version": 99999,
4 | "url": "http://download.yobot.win/scyb/yobot210.zip"
5 | }
6 | }
--------------------------------------------------------------------------------
/scripts/install-docker.sh:
--------------------------------------------------------------------------------
1 | installDocker() {
2 | curl -fsSL "https://get.docker.com" | /bin/bash
3 | sudo usermod -aG docker $(whoami)
4 | }
5 |
6 | changeDockerSource() {
7 | sudo cat>/etc/docker/daemon.json<Dockerfile
74 | docker build . -t gocqhttp
75 | rm Dockerfile -f
76 |
77 | echo "initializing gocqhttp configure file"
78 | docker run --rm \
79 | -v ${PWD}/gocqhttp_data:/bot \
80 | gocqhttp >/dev/null 2>&1
81 |
82 | echo "writing configure files"
83 | docker run --rm -v ${PWD}:/work -w /work -e qqid -e qqpassword python:3.7-slim-buster python3 -c "
84 | import json, os, random, string
85 | access_token = ''.join(random.choices(string.ascii_uppercase + string.ascii_lowercase + string.digits, k=16))
86 | with open('yobot_data/yobot_config.json', 'w') as f:
87 | json.dump({'access_token': access_token}, f, indent=4)
88 | with open('gocqhttp_data/config.json', 'r+') as f:
89 | config = json.load(f)
90 | config['uin'] = int(os.environ['qqid'])
91 | config['password'] = os.environ['qqpassword']
92 | config['access_token'] = access_token
93 | config['enable_db'] = False
94 | config['web_ui']['enabled'] = False
95 | config['http_config']['enabled'] = False
96 | config['ws_config']['enabled'] = False
97 | config['ws_reverse_servers'] = [{
98 | 'enabled': True,
99 | 'reverse_url': 'ws://yobot:9222/ws/',
100 | 'reverse_api_url': '',
101 | 'reverse_event_url': '',
102 | 'reverse_reconnect_interval': 3000
103 | }]
104 | f.seek(0)
105 | f.truncate()
106 | json.dump(config, f, indent=4)
107 | "
108 |
109 | echo "starting yobot"
110 | docker run -d \
111 | --name yobot \
112 | -p 9222:9222 \
113 | --network qqbot \
114 | -v ${PWD}/yobot_data:/yobot/yobot_data \
115 | yobot/yobot
116 |
117 | echo "starting gocqhttp"
118 | docker run -it \
119 | --name gocqhttp \
120 | --network qqbot \
121 | -v ${PWD}/gocqhttp_data:/bot \
122 | gocqhttp
123 |
--------------------------------------------------------------------------------
/src/client/README.md:
--------------------------------------------------------------------------------
1 | # 使用方法
2 |
3 | ## 运行环境
4 |
5 | python最低要求为 `python3.6`
6 |
7 | ## 打包
8 |
9 | (一般不建议对 python 项目打包)
10 |
11 | 安装 `pyinstaller`
12 |
13 | ```sh
14 | pip install pyinstaller
15 | ```
16 |
17 | 打包程序
18 |
19 | ```sh
20 | pyinstaller main.spec
21 | ```
22 |
23 | 在 `dist` 中找到目标文件
24 |
25 | ## 扩展
26 |
27 | 见[custom.py](./ybplugins/custom.py)文件
28 |
29 | ## 移植
30 |
31 | 经过多次迭代,yobot与[cq-http-api](https://github.com/richardchien/coolq-http-api/)的耦合越来越深,不再适合移植了
32 |
--------------------------------------------------------------------------------
/src/client/logo.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/logo.ico
--------------------------------------------------------------------------------
/src/client/main.py:
--------------------------------------------------------------------------------
1 | """
2 | 实例1:利用aiocqhttp作为httpapi的服务端
3 | """
4 |
5 | import platform
6 | import os
7 | import sys
8 | import random
9 |
10 | if platform.system() == "Linux":
11 | if "-g" not in sys.argv[1:]:
12 | with open("yobotg.sh", "w") as g:
13 | g.write("""
14 | echo $$ > yobotg.pid
15 | loop=true
16 | while $loop
17 | do
18 | loop=false
19 | {} -g
20 | if [ -f .YOBOT_RESTART ]
21 | then
22 | loop=true
23 | rm .YOBOT_RESTART
24 | fi
25 | done
26 | """.format('./yobot' if '_MEIPASS' in dir(sys) else 'python3 main.py'))
27 | print('请通过"sh yobotg.sh"启动')
28 | sys.exit()
29 | if os.path.exists('.YOBOT_RESTART'):
30 | os.remove('.YOBOT_RESTART')
31 |
32 | import asyncio
33 | import json
34 | import time
35 |
36 | import tzlocal
37 | from aiocqhttp import CQHttp
38 | from apscheduler.schedulers.asyncio import AsyncIOScheduler
39 |
40 | import yobot
41 |
42 |
43 | def insert_seq(seq, x):
44 | for i in seq:
45 | if '\u4e00' <= i <= '\u9fa5':
46 | if random.random() < 0.2:
47 | yield x
48 | yield i
49 |
50 |
51 | def insert_zwsp(x: str) -> str:
52 | zwsp = '\ufeff'
53 | m = insert_seq(x, zwsp)
54 | return ''.join(m)
55 |
56 |
57 | def main():
58 | print("""==============================
59 | _ _
60 | | | | |
61 | _ _ ___ | |__ ___ | |_
62 | | | | |/ _ \| '_ \ / _ \| __|
63 | | |_| | (_) | |_) | (_) | |_
64 | \__, |\___/|_.__/ \___/ \__|
65 | __/ |
66 | |___/ --Remix
67 | ==============================""")
68 | print("正在初始化...")
69 |
70 | if os.path.exists('yobot_config.json'):
71 | basedir = "."
72 | else:
73 | basedir = "./yobot_data"
74 | if os.path.exists(os.path.join(basedir, "yobot_config.json")):
75 | try:
76 | with open(os.path.join(basedir, "yobot_config.json"), "r", encoding="utf-8-sig") as f:
77 | config = json.load(f)
78 | except json.JSONDecodeError as e:
79 | print('配置文件格式错误,请检查配置文件。三秒后关闭')
80 | time.sleep(3)
81 | raise e from e
82 | token = config.get("access_token", None)
83 | if token is None:
84 | print("警告:没有设置access_token,这会直接暴露机器人接口")
85 | print("详见https://yobot.win/usage/access-token/")
86 | else:
87 | token = None
88 |
89 | try:
90 | tzlocal.get_localzone()
91 | except:
92 | print("无法获取系统时区,请将系统时区设置为北京/上海时区")
93 | sys.exit()
94 |
95 | cqbot = CQHttp(access_token=token,
96 | enable_http_post=False)
97 | sche = AsyncIOScheduler()
98 | bot = yobot.Yobot(data_path=basedir,
99 | scheduler=sche,
100 | quart_app=cqbot.server_app,
101 | bot_api=cqbot._api,
102 | )
103 | host = bot.glo_setting.get("host", "0.0.0.0")
104 | port = bot.glo_setting.get("port", 9222)
105 |
106 | @cqbot.on_message
107 | async def handle_msg(context):
108 | if context["message_type"] == "group" or context["message_type"] == "private":
109 | reply = await bot.proc_async(context)
110 | else:
111 | reply = None
112 | if isinstance(reply, str) and reply != "":
113 | return {'reply': insert_zwsp(reply),
114 | 'at_sender': False}
115 | else:
116 | return None
117 |
118 | async def send_it(func):
119 | if asyncio.iscoroutinefunction(func):
120 | to_sends = await func()
121 | else:
122 | to_sends = func()
123 | if to_sends is None:
124 | return
125 | for kwargs in to_sends:
126 | await asyncio.sleep(5)
127 | await cqbot.send_msg(**kwargs)
128 |
129 | jobs = bot.active_jobs()
130 | if jobs:
131 | for trigger, job in jobs:
132 | sche.add_job(func=send_it,
133 | args=(job,),
134 | trigger=trigger,
135 | coalesce=True,
136 | max_instances=1,
137 | misfire_grace_time=60)
138 | sche.start()
139 |
140 | print("初始化完成,启动服务...")
141 |
142 | cqbot.run(
143 | host=host,
144 | port=port,
145 | debug=False,
146 | use_reloader=False,
147 | loop=asyncio.get_event_loop(),
148 | )
149 |
150 |
151 | if __name__ == "__main__":
152 | try:
153 | main()
154 | except KeyboardInterrupt:
155 | print("\nCtrl-C")
156 | sys.exit(0)
157 |
--------------------------------------------------------------------------------
/src/client/main.spec:
--------------------------------------------------------------------------------
1 | # -*- mode: python ; coding: utf-8 -*-
2 | """
3 | 打包文件说明(一般不建议对 python 项目打包)
4 |
5 | pip 安装 `pyinstaller` 后,使用 `pyinstaller main.spec`,对项目打包。
6 | """
7 |
8 | import os
9 | import site
10 |
11 | sitepackages = site.getsitepackages()
12 |
13 |
14 | def sitepackages_location(package_name):
15 | for sp in sitepackages:
16 | if os.path.exists(os.path.join(sp, package_name)):
17 | return sp
18 | raise RuntimeError(f"{package_name} not found")
19 |
20 |
21 | block_cipher = None
22 |
23 |
24 | a = Analysis(
25 | ['main.py'],
26 | pathex=['.'],
27 | binaries=[],
28 | datas=[
29 | ("packedfiles", "packedfiles"),
30 | ("public", "public"),
31 | ('ybplugins/clan_battle/components/fonts/', 'fonts'),
32 | ],
33 | hiddenimports=[],
34 | hookspath=[],
35 | runtime_hooks=[],
36 | excludes=[],
37 | win_no_prefer_redirects=False,
38 | win_private_assemblies=False,
39 | cipher=block_cipher,
40 | noarchive=False)
41 | pyz = PYZ(a.pure, a.zipped_data,
42 | cipher=block_cipher)
43 | exe = EXE(pyz,
44 | a.scripts,
45 | a.binaries,
46 | a.zipfiles,
47 | a.datas,
48 | [],
49 | name='yobot',
50 | debug=False,
51 | bootloader_ignore_signals=False,
52 | strip=False,
53 | upx=True,
54 | upx_exclude=[],
55 | runtime_tmpdir=None,
56 | console=True,
57 | icon='./logo.ico',
58 | )
59 |
--------------------------------------------------------------------------------
/src/client/nonebot_plugin.py:
--------------------------------------------------------------------------------
1 | """
2 | 实例3:作为nonebot的插件
3 |
4 | 加载方法:
5 |
6 | 将这个项目整个文件夹放在nonebot插件目录下即可
7 | """
8 |
9 | import sys
10 |
11 | if __name__ == "__main__":
12 | import os
13 |
14 | if len(sys.argv) < 2 or sys.argv[1] != "make_plugin":
15 | raise ValueError("unknown command")
16 |
17 | def makefile(path, content="# doing nothing"):
18 | with open(path, "w") as f:
19 | f.write(content)
20 |
21 | filepath = os.path.abspath(os.path.join(os.getcwd(), "__init__.py"))
22 | makefile(filepath)
23 | filepath = os.path.abspath(os.path.join(os.getcwd(), "../__init__.py"))
24 | makefile(filepath)
25 | filepath = os.path.abspath(os.path.join(os.getcwd(), "../../__init__.py"))
26 | makefile(filepath, "from .src.client import nonebot_plugin")
27 |
28 | sys.exit()
29 |
30 | from .yobot import Yobot
31 | import asyncio
32 |
33 | if "nonebot" in sys.modules:
34 | from nonebot import get_bot, scheduler
35 | else:
36 | raise ValueError("plugin imported before noenbot imported")
37 |
38 | verinfo = {
39 | "run-as": "nonebot-plugin",
40 | "ver_name": "yobot_remix{}插件版".format(Yobot.Version),
41 | }
42 |
43 | cqbot = get_bot()
44 | bot = Yobot(
45 | data_path="./yobot_data",
46 | verinfo=verinfo,
47 | scheduler=scheduler,
48 | quart_app=cqbot.server_app,
49 | bot_api=cqbot._api,
50 | )
51 |
52 | from hoshino.service import Service
53 |
54 | sv = Service("yobot", enable_on_default=True, visible=True)
55 |
56 |
57 | @sv.on_message()
58 | async def handle_msg(cqbot, context):
59 | if context["message_type"] == "group":
60 | reply = await bot.proc_async(context.copy())
61 | else:
62 | reply = None
63 | if reply != "" and reply is not None:
64 | """return {'reply': reply,'at_sender': False}"""
65 | await cqbot.send(context, reply, at_sender=False)
66 | else:
67 | return None
68 |
69 | @cqbot.on_message
70 | async def handle_msg(context):
71 | if context["message_type"] == "private":
72 | reply = await bot.proc_async(context.copy())
73 | else:
74 | reply = None
75 | if reply != "" and reply is not None:
76 | await cqbot.send(context,reply)
77 | # return {"reply": reply, "at_sender": False}
78 | else:
79 | return None
80 |
81 |
82 | async def send_it(func):
83 | if asyncio.iscoroutinefunction(func):
84 | to_sends = await func()
85 | else:
86 | to_sends = func()
87 | if to_sends is None:
88 | return
89 | for kwargs in to_sends:
90 | await asyncio.sleep(5)
91 | await cqbot.send_msg(**kwargs)
92 |
93 |
94 | jobs = bot.active_jobs()
95 | if jobs:
96 | for trigger, job in jobs:
97 | scheduler.add_job(
98 | func=send_it,
99 | args=(job,),
100 | trigger=trigger,
101 | coalesce=True,
102 | max_instances=1,
103 | misfire_grace_time=60,
104 | )
105 |
106 | __plugin_name__ = "yobot"
107 | __plugin_usage__ = "pcr assistant bot"
108 |
--------------------------------------------------------------------------------
/src/client/packedfiles/default_BossIdAndName.json:
--------------------------------------------------------------------------------
1 | {
2 | "1":{
3 | "302100":"双足飞龙",
4 | "305700":"巨型哥布林",
5 | "312501":"マダムエレクトラ"
6 | },
7 | "2":{
8 | "302000":"野性狮鹫",
9 | "304600":"雷雷",
10 | "309000":"陆生树懒",
11 | "316600":"ゴブリンライダー"
12 | },
13 | "3":{
14 | "300600":"针刺攀缘花",
15 | "300700":"兽人头目",
16 | "301000":"海龙",
17 | "303500":"怒蛇",
18 | "304500":"雷电",
19 | "304800":"幽灵领主",
20 | "305100":"巨型凶暴兔",
21 | "305900":"极彩鸟",
22 | "306100":"偷盗豺狼",
23 | "309200":"天空女武神",
24 | "307202":"巴吉里斯克",
25 | "303606":"バーンサウルス"
26 | },
27 | "4":{
28 | "300800":"灵魂角鹿",
29 | "301100":"狂乱魔熊",
30 | "301500":"魔界人狼",
31 | "303300":"暗黑滴水嘴兽",
32 | "303900":"独眼巨人",
33 | "304000":"暗黑独角兽",
34 | "304100":"泰坦陆龟",
35 | "305800":"海蛞蝓",
36 | "306200":"狸猫首领",
37 | "306900":"三战士图腾",
38 | "312000":"水晶闪耀之龙",
39 | "313400":"剑尾蛇"
40 | },
41 | "5":{
42 | "300100":"米诺陶诺斯",
43 | "300200":"利蝎巴鲁托",
44 | "300300":"梦魇杜羊",
45 | "300400":"摩羯教主",
46 | "301300":"暴食魔兽",
47 | "301400":"美杜莎",
48 | "301800":"人马射手",
49 | "302600":"双子魔猪",
50 | "302700":"巨钳魔蟹",
51 | "302800":"炎吼狮王",
52 | "302900":"阿克艾利欧斯",
53 | "303000":"托尔佩顿"
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/client/packedfiles/default_boss.json:
--------------------------------------------------------------------------------
1 | {
2 | "jp": [
3 | [6000000, 8000000, 10000000, 12000000, 15000000],
4 | [6000000, 8000000, 10000000, 12000000, 15000000],
5 | [7000000, 9000000, 13000000, 15000000, 20000000],
6 | [15000000, 16000000, 18000000, 19000000, 20000000]
7 | ],
8 | "cn": [
9 | [6000000, 8000000, 10000000, 12000000, 20000000],
10 | [6000000, 8000000, 10000000, 12000000, 20000000],
11 | [6000000, 8000000, 10000000, 12000000, 20000000]
12 | ],
13 | "tw": [
14 | [6000000, 8000000, 10000000, 12000000, 15000000],
15 | [6000000, 8000000, 10000000, 12000000, 15000000],
16 | [7000000, 9000000, 13000000, 15000000, 20000000],
17 | [15000000, 16000000, 18000000, 19000000, 20000000]
18 | ],
19 | "eff": [
20 | [1.2, 1.2, 1.3, 1.4, 1.5],
21 | [1.6, 1.6, 1.8, 1.9, 2.0],
22 | [2.0, 2.0, 2.4, 2.4, 2.6],
23 | [2.4, 2.4, 2.6, 2.6, 3.0]
24 | ]
25 | }
--------------------------------------------------------------------------------
/src/client/packedfiles/default_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "host": "0.0.0.0",
3 | "port": 9222,
4 | "access_token": "",
5 | "client_salt": null,
6 | "public_address": null,
7 | "public_basepath": "/",
8 | "web_mode_hint": true,
9 | "super-admin": [],
10 | "black-list": [],
11 | "white_list_mode": false,
12 | "black-list-group": [],
13 | "white-list-group": [],
14 | "allow_bulk_private": false,
15 | "clan_battle_mode": "web",
16 | "notify_groups": [],
17 | "notify_privates": [],
18 | "preffix_on": false,
19 | "preffix_string": "",
20 | "zht_in": false,
21 | "zht_out": false,
22 | "zht_out_style": "s2t",
23 | "show_icp": false,
24 | "icp_info": "",
25 | "gongan_info": "",
26 | "web_gzip": 0,
27 |
28 | "boss":{
29 | "jp": [
30 | [6000000, 8000000, 10000000, 12000000, 15000000],
31 | [6000000, 8000000, 10000000, 12000000, 15000000],
32 | [7000000, 9000000, 13000000, 15000000, 20000000],
33 | [15000000, 16000000, 18000000, 19000000, 20000000]
34 | ],
35 | "cn": [
36 | [6000000, 8000000, 10000000, 12000000, 20000000],
37 | [6000000, 8000000, 10000000, 12000000, 20000000],
38 | [6000000, 8000000, 10000000, 12000000, 20000000]
39 | ],
40 | "tw": [
41 | [6000000, 8000000, 10000000, 12000000, 15000000],
42 | [6000000, 8000000, 10000000, 12000000, 15000000],
43 | [6000000, 8000000, 10000000, 12000000, 15000000]
44 | ]
45 | },
46 | "level_by_cycle":{
47 | "cn":[[1,3],[4,10],[11,999]],
48 | "jp":[[1,3],[4,10],[11,45],[46,999]],
49 | "tw":[[1,3],[4,10],[11,999]]
50 | },
51 | "boss_id":{
52 | "cn":["302100","302000","300600","300800","300100"],
53 | "jp":["302100","302000","300600","300800","300100"],
54 | "tw":["302100","302000","300600","300800","300100"]
55 | }
56 | }
--------------------------------------------------------------------------------
/src/client/packedfiles/default_pool.json:
--------------------------------------------------------------------------------
1 | {
2 | "info":{
3 | "name":"默认卡池"
4 | },
5 | "settings":{
6 | "combo": 10,
7 | "day_limit": 2,
8 | "auto_update": false,
9 | "shuffle": false
10 | },
11 | "pool": {
12 | "star3": {
13 | "prop": 25,
14 | "prop_last": 25,
15 | "prefix":"★★★",
16 | "pool": [
17 | "初音","真琴","姬塔","咲恋","望","璃乃","妮侬","伊绪","秋乃","莫妮卡","静流",
18 | "杏奈","纯","真步","亚里沙","镜华","伊利亚","智","流夏","香澄","安","古蕾雅",
19 | "空花(大江户)","妮侬(大江户)","碧(插班生)","克萝伊", "美美(万圣节)",
20 | "露娜","卡娅","伊利亚(圣诞节)","霞(魔法少女)","优妮","琪爱儿","铃(游侠)",
21 | "真阳(游侠)",
22 |
23 | "佩可莉姆(夏日)","铃莓(夏日)","凯留(夏日)","珠希(夏日)","忍(万圣节)",
24 | "美咲(万圣节)","千歌(圣诞节)","绫音(圣诞节)","日和莉(新年)","优衣(新年)",
25 | "静流(情人节)","蕾姆","艾米莉亚","玲奈(夏日)","咲恋(夏日)","真琴(夏日)",
26 | "真步(夏日)","镜华(万圣节)","克里斯蒂娜(圣诞节)","可可萝(新年)",
27 | "凯露(新年)","岛村卯月(偶像大师)","涉谷凛(偶像大师)"
28 | ]
29 | },
30 | "star2": {
31 | "prop": 180,
32 | "prop_last": 975,
33 | "prefix":"★★",
34 | "pool": [
35 | "空花","美冬","雪","茜里","珠希","美美","真阳","忍","香织","千歌","深月",
36 | "惠理子","宫子","栞","铃奈","铃","绫音","美里","纺希","茉莉","娜娜卡"
37 | ]
38 | },
39 | "star1": {
40 | "prop": 795,
41 | "prop_last": 0,
42 | "prefix":"★",
43 | "pool": [
44 | "怜","尤加莉","碧","依里","未奏希","莉玛","铃莓","美咲","日和莉","胡桃","步未"
45 | ]
46 | }
47 | }
48 | }
--------------------------------------------------------------------------------
/src/client/public/libs/canvas-nest.js@1.0.1/dist/canvas-nest.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2016 hustcc
3 | * License: MIT
4 | * Version: v1.0.1
5 | * GitHub: https://github.com/hustcc/canvas-nest.js
6 | **/
7 | !function(){function n(n,e,t){return n.getAttribute(e)||t}function e(n){return document.getElementsByTagName(n)}function t(){var t=e("script"),o=t.length,i=t[o-1];return{l:o,z:n(i,"zIndex",-1),o:n(i,"opacity",.5),c:n(i,"color","0,0,0"),n:n(i,"count",99)}}function o(){a=m.width=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,c=m.height=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function i(){r.clearRect(0,0,a,c);var n,e,t,o,m,l;s.forEach(function(i,x){for(i.x+=i.xa,i.y+=i.ya,i.xa*=i.x>a||i.x<0?-1:1,i.ya*=i.y>c||i.y<0?-1:1,r.fillRect(i.x-.5,i.y-.5,1,1),e=x+1;e=n.max/2&&(i.x-=.03*o,i.y-=.03*m),t=(n.max-l)/n.max,r.beginPath(),r.lineWidth=t/2,r.strokeStyle="rgba("+d.c+","+(t+.2)+")",r.moveTo(i.x,i.y),r.lineTo(n.x,n.y),r.stroke()))}),x(i)}var a,c,u,m=document.createElement("canvas"),d=t(),l="c_n"+d.l,r=m.getContext("2d"),x=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(n){window.setTimeout(n,1e3/45)},w=Math.random,y={x:null,y:null,max:2e4};m.id=l,m.style.cssText="position:fixed;top:0;left:0;z-index:"+d.z+";opacity:"+d.o,e("body")[0].appendChild(m),o(),window.onresize=o,window.onmousemove=function(n){n=n||window.event,y.x=n.clientX,y.y=n.clientY},window.onmouseout=function(){y.x=null,y.y=null};for(var s=[],f=0;d.n>f;f++){var h=w()*a,g=w()*c,v=2*w()-1,p=2*w()-1;s.push({x:h,y:g,xa:v,ya:p,max:6e3})}u=s.concat([y]),setTimeout(function(){i()},100)}();
--------------------------------------------------------------------------------
/src/client/public/libs/element-ui@2.13.0/lib/theme-chalk/fonts/element-icons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/element-ui@2.13.0/lib/theme-chalk/fonts/element-icons.ttf
--------------------------------------------------------------------------------
/src/client/public/libs/element-ui@2.13.0/lib/theme-chalk/fonts/element-icons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/element-ui@2.13.0/lib/theme-chalk/fonts/element-icons.woff
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/banner.png
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/0.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/0.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/300100.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/300100.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/300200.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/300200.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/300300.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/300300.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/300400.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/300400.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/300600.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/300600.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/300700.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/300700.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/300800.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/300800.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/301000.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/301000.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/301100.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/301100.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/301300.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/301300.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/301400.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/301400.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/301500.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/301500.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/301800.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/301800.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/302000.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/302000.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/302100.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/302100.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/302600.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/302600.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/302700.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/302700.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/302800.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/302800.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/302900.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/302900.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/303000.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/303000.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/303300.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/303300.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/303500.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/303500.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/303606.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/303606.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/303900.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/303900.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/304000.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/304000.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/304100.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/304100.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/304500.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/304500.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/304600.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/304600.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/304800.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/304800.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/305100.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/305100.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/305700.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/305700.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/305800.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/305800.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/305900.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/305900.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/306100.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/306100.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/306200.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/306200.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/306900.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/306900.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/307202.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/307202.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/309000.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/309000.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/309200.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/309200.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/312000.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/312000.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/312501.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/312501.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/313400.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/313400.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/boss_icon/316600.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/boss_icon/316600.webp
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/box-gift.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/box-gift.png
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/clanbg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/clanbg.png
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/error.png
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/flag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/flag.png
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/icon-loading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/icon-loading.png
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/jquery.sliderBar.js:
--------------------------------------------------------------------------------
1 | /***************************************************************************************
2 | 侧边栏插件
3 | @autor iProg
4 | @date 2016-01-25
5 | @version 1.0
6 |
7 | 使用方法:
8 | 在页面建立html标签如下:
9 |
10 |
通知消息
11 |
12 | 无消息
13 |
14 |
15 |
16 | 说明:上面的class属性值,除了sliderbar-container1可以随意更改,其它的如title,body都
17 | 不能更改哦!
18 |
19 | 然后加入js代码如下,就可以了:
20 |
32 | ****************************************************************************************/
33 | ;(function ($) {
34 | $.fn.extend({
35 | "sliderBar": function (options) {
36 | // 使用jQuery.extend 覆盖插件默认参数
37 | var opts = $.extend(
38 | {} ,
39 | $.fn.sliderBar.defalutPublic ,
40 | options
41 | );
42 |
43 | // 这里的this 就是 jQuery对象,遍历页面元素对象
44 | // 加个return可以链式调用
45 | return this.each(function () {
46 | //获取当前元素 的this对象
47 | var $this = $(this);
48 |
49 | $this.data('open', opts.open);
50 |
51 | privateMethods.initSliderBarCss($this, opts);
52 |
53 | switch(opts.position){
54 | case 'right' : privateMethods.showAtRight($this, opts); break;
55 | case 'left' : privateMethods.showAtLeft($this, opts); break;
56 | }
57 |
58 | });
59 | }
60 | });
61 |
62 | // 默认公有参数
63 | $.fn.sliderBar.defalutPublic = {
64 | open : true, // 默认是否打开,true打开,false关闭
65 | top : 200, // 距离顶部多高
66 | width : 260, // body内容宽度
67 | height : 200, // body内容高度
68 | position : 'left' // 显示位置,有left和right两种
69 | }
70 |
71 | var privateMethods = {
72 | initSliderBarCss : function(obj, opts){
73 | obj.css({
74 | 'width': opts.width+20+'px',
75 | 'height' : opts.height+20+'px',
76 | 'top' : opts.top+'px',
77 | 'position':'fixed',
78 | 'font-family':'Microsoft Yahei',
79 | 'z-index': '9999'
80 | }).find('.body').css({
81 | 'width': opts.width+'px',
82 | 'height' : opts.height+'px',
83 | 'position':'relative',
84 | 'padding':'15px',
85 | 'overflow-x':'hidden',
86 | 'overflow-y':'auto',
87 | 'font-family':'Microsoft Yahei',
88 | 'font-size' : '15px'
89 | });
90 |
91 | var titleCss = {
92 | 'width':'15px',
93 | 'height':'105px',
94 | 'position':'absolute',
95 | 'top':'-1px',
96 | 'display':'block',
97 | 'font-size': '13px',
98 | 'padding':'8px 4px 8px 5px',
99 | 'color':'#fff',
100 | 'cursor': 'pointer',
101 | 'font-family':'Microsoft Yahei'
102 | }
103 |
104 | obj.find('.title').css(titleCss).find('i').css({
105 | 'font-size': '15px'
106 | });
107 | }
108 | };
109 | })(jQuery)
110 |
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/karin_q.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/karin_q.png
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/karyl_q.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/karyl_q.png
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/kokkoro_q.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/kokkoro_q.png
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/logo.png
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/pecorine_q.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/pecorine_q.png
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/scheme-01.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --primary-color-1: #ffa84e;/* 主色调1 */
3 | --primary-color-2: #ffd34e;/* 主色调2 */
4 | --secondary-color-1: #ffba54;/* 副色调1 */
5 | --secondary-color-2: #FF9800;/* 副色调2 */
6 | --background-color: #fbebd3;/* 背景颜色 */
7 | --font-color: #FF9800;/* 文字颜色 */
8 | }
9 |
10 | /* CharacterspriteAnime */
11 |
12 | .character-container {
13 | width: 200px;
14 | height: 200px;
15 | overflow: hidden;
16 | background: url("/yobot-depencency/yocool@final/princessadventure/sprite01.png");
17 | background-size: 100%;
18 | }
19 |
20 | .character-container.char {
21 | animation: spriteAnimechar 700ms steps(18) infinite;
22 | }
23 |
24 | @keyframes spriteAnimechar {
25 | 0% {
26 | background-position: 0 0;
27 | }
28 |
29 | 100% {
30 | background-position: 0 -3600px;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/scheme-02.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --primary-color-1: #3f51b5;/* 主色调1 */
3 | --primary-color-2: #626ead;/* 主色调2 */
4 | --secondary-color-1: #344080;/* 副色调1 */
5 | --secondary-color-2: #3a177b;/* 副色调2 */
6 | --background-color: #e8ebff;/* 背景色 */
7 | --font-color: #032584;/* 文字颜色 */
8 | }
9 |
10 | /* CharacterspriteAnime */
11 |
12 | .character-container {
13 | width: 200px;
14 | height: 200px;
15 | overflow: hidden;
16 | background: url("/yobot-depencency/yocool@final/princessadventure/sprite02.png");
17 | background-size: 100%;
18 | }
19 |
20 | .character-container.char {
21 | animation: spriteAnimechar 700ms steps(19) infinite;
22 | }
23 |
24 | @keyframes spriteAnimechar {
25 | 0% {
26 | background-position: 0 0;
27 | }
28 |
29 | 100% {
30 | background-position: 0 -3800px;
31 | }
32 | }
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/scheme-03.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --primary-color-1: #56c596;/* 主色调1 */
3 | --primary-color-2: #73c088;/* 主色调2 */
4 | --secondary-color-1: #397d54;/* 副色调1 */
5 | --secondary-color-2: #4dd252;/* 副色调2 */
6 | --background-color: #d5ffd0;/* 背景色 */
7 | --font-color: #117c6f;/* 文字颜色 */
8 | }
9 |
10 | /* CharacterspriteAnime */
11 |
12 | .character-container {
13 | width: 200px;
14 | height: 200px;
15 | overflow: hidden;
16 | background: url("/yobot-depencency/yocool@final/princessadventure/sprite03.png");
17 | background-size: 100%;
18 | }
19 |
20 | .character-container.char {
21 | animation: spriteAnimechar 700ms steps(19) infinite;
22 | }
23 |
24 | @keyframes spriteAnimechar {
25 | 0% {
26 | background-position: 0 0;
27 | }
28 |
29 | 100% {
30 | background-position: 0 -3800px;
31 | }
32 | }
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/sprite01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/sprite01.png
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/sprite02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/sprite02.png
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/sprite03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/sprite03.png
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/text-loading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/text-loading.png
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/yocool.js:
--------------------------------------------------------------------------------
1 | var link = [];
2 | link[0] = "/yobot-depencency/yocool@final/princessadventure/scheme-01.css";
3 | link[1] = "/yobot-depencency/yocool@final/princessadventure/scheme-02.css";
4 | link[2] = "/yobot-depencency/yocool@final/princessadventure/scheme-03.css";
5 | $(function() {
6 | var style = link[Math.floor(Math.random() * link.length)];
7 | if (document.createStyleSheet) {
8 | document.createStyleSheet(style)
9 | } else {
10 | $('', {
11 | rel: 'stylesheet',
12 | href: style
13 | }).appendTo('head')
14 | }
15 | });
16 | document.writeln("");
17 | $(function() {
18 | $(window).scroll(function() {
19 | var topToolbar = $("#topToolbar");
20 | var headerH = $("#header").outerHeight();
21 | var scrollTop = $(document).scrollTop()
22 | })
23 | });
24 | ;(function ($) {
25 | $.fn.extend({
26 | "sliderBar": function (options) {
27 | var opts = $.extend(
28 | {} ,
29 | $.fn.sliderBar.defalutPublic ,
30 | options
31 | );
32 | return this.each(function () {
33 | var $this = $(this);
34 |
35 | $this.data('open', opts.open);
36 |
37 | privateMethods.initSliderBarCss($this, opts);
38 |
39 | switch(opts.position){
40 | case 'right' : privateMethods.showAtRight($this, opts); break;
41 | case 'left' : privateMethods.showAtLeft($this, opts); break;
42 | }
43 |
44 | });
45 | }
46 | });
47 |
48 | $.fn.sliderBar.defalutPublic = {
49 | open : false,
50 | top : 200,
51 | width : 260,
52 | height : 200,
53 | position : 'left'
54 | }
55 |
56 | var privateMethods = {
57 | initSliderBarCss : function(obj, opts){
58 | obj.css({
59 | 'width': opts.width+20+'px',
60 | 'height' : opts.height+20+'px',
61 | 'top' : opts.top+'px',
62 | 'position':'fixed',
63 | 'font-family':'Microsoft Yahei',
64 | 'z-index': '9999'
65 | }).find('.body').css({
66 | 'width': opts.width+'px',
67 | 'height' : opts.height+'px',
68 | 'position':'relative',
69 | 'padding':'10px',
70 | 'overflow-x':'hidden',
71 | 'overflow-y':'auto',
72 | 'font-family':'Microsoft Yahei',
73 | 'font-size' : '14px'
74 | });
75 |
76 | var titleCss = {
77 | 'width':'15px',
78 | 'position':'absolute',
79 | 'top':'-1px',
80 | 'display':'block',
81 | 'font-size': '13px',
82 | 'padding':'8px 4px 8px 5px',
83 | 'color':'#fff',
84 | 'cursor': 'pointer',
85 | 'font-family':'Microsoft Yahei'
86 | }
87 |
88 | obj.find('.title').css(titleCss).find('i').css({
89 | 'font-size': '15px'
90 | });
91 | },
92 | showAtLeft : function(obj, opts){
93 | if(opts.open){
94 | obj.css({left:'0px'});
95 | obj.find('.title').css('right','-25px').find('i').attr('class','fa fa-chevron-circle-left');
96 | }else{
97 | obj.css({left:-opts.width-22+'px'});
98 | obj.find('.title').css('right','-25px').find('i').attr('class','fa fa-chevron-circle-right');
99 | }
100 |
101 | obj.find('.title').click(function(){
102 | if(obj.data('open')){
103 | obj.animate({left:-opts.width-22+'px'}, 500);
104 | $(this).find('i').attr('class','fa fa-chevron-circle-right');
105 | }else{
106 | obj.animate({left:'0px'}, 500);
107 | $(this).find('i').attr('class','fa fa-chevron-circle-left');
108 | }
109 | obj.data('open',obj.data('open') == true ? false : true);
110 | });
111 | },
112 | showAtRight : function(obj, opts){
113 | if(opts.open){
114 | obj.css({right:'0px'});
115 | obj.find('.title').css('right', opts.width+20+'px').find('i').attr('class','fa fa-chevron-circle-right');
116 | }else{
117 | obj.css({right:'25px'});
118 | obj.find('.title').css('right', opts.width+20+'px').find('i').attr('class','fa fa-chevron-circle-left');
119 | }
120 |
121 | obj.find('.title').click(function(){
122 | if(obj.data('open')){
123 | obj.animate({right:-opts.width-22+'px'}, 500);
124 | $(this).find('i').attr('class','fa fa-chevron-circle-left');
125 | }else{
126 | obj.animate({right:'0px'}, 500);
127 | $(this).find('i').attr('class','fa fa-chevron-circle-right');
128 | }
129 | obj.data('open',obj.data('open') == true ? false : true);
130 | });
131 | }
132 | };
133 | })(jQuery)
--------------------------------------------------------------------------------
/src/client/public/libs/yocool@final/princessadventure/yui_q.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/libs/yocool@final/princessadventure/yui_q.png
--------------------------------------------------------------------------------
/src/client/public/static/admin/groups.js:
--------------------------------------------------------------------------------
1 | var vm = new Vue({
2 | el: '#app',
3 | data: {
4 | groupData: [],
5 | },
6 | mounted() {
7 | this.refresh();
8 | },
9 | methods: {
10 | refresh: function (event) {
11 | var thisvue = this;
12 | axios.post(api_path, {
13 | action: 'get_data',
14 | csrf_token: csrf_token,
15 | }).then(function (res) {
16 | if (res.data.code == 0) {
17 | thisvue.groupData = res.data.data;
18 | } else {
19 | thisvue.$alert(res.data.message, '加载数据错误');
20 | }
21 | }).catch(function (error) {
22 | thisvue.$alert(error, '加载数据错误');
23 | });
24 | },
25 | delete_group: function (scope) {
26 | var thisvue = this;
27 | thisvue.$confirm('是否删除' + scope.row.group_name, '提示', {
28 | confirmButtonText: '确定',
29 | cancelButtonText: '取消',
30 | type: 'danger'
31 | }).then(() => {
32 | axios.post(api_path, {
33 | action: 'drop_group',
34 | csrf_token: csrf_token,
35 | group_id: scope.row.group_id,
36 | }).then(function (res) {
37 | if (res.data.code == 0) {
38 | thisvue.$message({
39 | message: '删除成功',
40 | type: 'success',
41 | });
42 | } else {
43 | thisvue.$message.error('删除失败' + res.data.message);
44 | }
45 | }).catch(function (error) {
46 | thisvue.$message.error(error);
47 | });
48 | }).catch(() => {
49 | thisvue.$message({
50 | type: 'info',
51 | message: '已取消删除'
52 | });
53 | });
54 | },
55 | },
56 | delimiters: ['[[', ']]'],
57 | })
--------------------------------------------------------------------------------
/src/client/public/static/admin/pool-setting.js:
--------------------------------------------------------------------------------
1 | var vm = new Vue({
2 | el: '#app',
3 | data: {
4 | settings: null,
5 | },
6 | mounted() {
7 | var thisvue = this;
8 | axios.get(api_path).then(function (res) {
9 | if (res.data.code == 0) {
10 | thisvue.settings = res.data.settings;
11 | } else {
12 | alert(res.data.message, '加载数据错误');
13 | }
14 | }).catch(function (error) {
15 | alert(error, '加载数据错误');
16 | });
17 | },
18 | methods: {
19 | addpool: function () {
20 | let newname = "奖池" + (Object.keys(this.settings.pool).length+1);
21 | this.$set(this.settings.pool, newname, {
22 | prop: 0,
23 | prop_last: 0,
24 | prefix: "★★★",
25 | pool: ["请输入内容"],
26 | });
27 | },
28 | update: function () {
29 | var thisvue = this;
30 | axios.put(api_path, {
31 | setting: thisvue.settings,
32 | csrf_token: csrf_token,
33 | }).then(function (res) {
34 | if (res.data.code == 0) {
35 | alert('设置成功,重启后生效');
36 | } else {
37 | alert('设置失败:' + res.data.message);
38 | }
39 | }).catch(function (error) {
40 | alert(error);
41 | });
42 | },
43 | },
44 | delimiters: ['[[', ']]'],
45 | })
--------------------------------------------------------------------------------
/src/client/public/static/admin/setting.js:
--------------------------------------------------------------------------------
1 | var vm = new Vue({
2 | el: '#app',
3 | data: {
4 | setting: {},
5 | activeNames: [],
6 | bossSetting: false,
7 | domain: '',
8 | domainApply: false,
9 | applyName: '',
10 | loading: false,
11 | boss_id_name: {},
12 | },
13 | mounted() {
14 | var thisvue = this;
15 | axios.get(api_path).then(function (res) {
16 | if (res.data.code == 0) {
17 | thisvue.setting = res.data.settings;
18 | thisvue.boss_id_name = res.data.boss_id_name;
19 | } else {
20 | alert(res.data.message);
21 | }
22 | }).catch(function (error) {
23 | alert(error);
24 | });
25 | },
26 | methods: {
27 | update: function (event) {
28 | var [flag, msg] = this.check_level_by_cycle()
29 | if (!flag) {
30 | alert(msg);
31 | return
32 | }
33 | this.setting.web_mode_hint = false;
34 | axios.put(
35 | api_path,
36 | {
37 | setting: this.setting,
38 | csrf_token: csrf_token,
39 | },
40 | ).then(function (res) {
41 | if (res.data.code === 0) {
42 | alert('设置成功,重启机器人后生效');
43 | } else {
44 | alert('设置失败:' + res.data.message);
45 | }
46 | }).catch(function (error) {
47 | alert(error);
48 | });
49 | },
50 | auto_get_boss_data: function() {
51 | var thisvue = this;
52 | thisvue.$message({
53 | message:'自动获取更新中,请稍后......',
54 | type:'info',
55 | })
56 | axios.post("./auto_get_boss_data/", {
57 | csrf_token: csrf_token
58 | }).then(function (res) {
59 | if (res.data.code == 0) {
60 | thisvue.$alert(res.data.message + '
刷新页面查看获取结果,重启机器人后生效。', '获取成功', {
61 | dangerouslyUseHTMLString: true,
62 | confirmButtonText: '好的',
63 | type: 'success',
64 | });
65 | } else {
66 | thisvue.$message({
67 | dangerouslyUseHTMLString: true,
68 | message:res.data.message + '
自动获取失败',
69 | type:'error',
70 | })
71 | }
72 | }).catch(function (error) {
73 | thisvue.$message({
74 | dangerouslyUseHTMLString: true,
75 | message:error + '
自动获取失败',
76 | type:'error',
77 | })
78 | });
79 | },
80 | sendApply: function (api) {
81 | if (this.domain === '') {
82 | alert('请选择后缀');
83 | return;
84 | }
85 | if (/^[0-9a-z]{1,16}$/.test(this.applyName)) {
86 | ;
87 | } else {
88 | alert('只能包含字母、数字');
89 | return;
90 | }
91 | var thisvue = this;
92 | this.loading = true;
93 | axios.get(
94 | api + '?name=' + thisvue.applyName + thisvue.domain
95 | ).then(function (res) {
96 | thisvue.domainApply = false;
97 | if (res.data.code == 0) {
98 | alert('申请成功,请等待1分钟左右解析生效');
99 | thisvue.setting.public_address = thisvue.setting.public_address.replace(/\/\/([^:\/]+)/, '//' + thisvue.applyName + thisvue.domain);
100 | thisvue.update(null);
101 | } else if (res.data.code == 1) {
102 | alert('申请失败,此域已被占用');
103 | } else {
104 | alert('申请失败,' + res.data.message);
105 | }
106 | thisvue.loading = false;
107 | }).catch(function (error) {
108 | thisvue.loading = false;
109 | alert(error);
110 | });
111 | },
112 | comfirm_change_clan_mode: function (event) {
113 | this.$alert('修改模式后,公会战数据会重置。请不要在公会战期间修改!', '警告', {
114 | confirmButtonText: '知道了',
115 | type: 'warning',
116 | });
117 | },
118 | add_level: function (area) {
119 | this.setting.boss[area].push([0, 0, 0, 0, 0]);
120 | this.setting.level_by_cycle[area].push([0, 0]);
121 | },
122 | remove_level: function (area) {
123 | this.setting.boss[area].pop();
124 | this.setting.level_by_cycle[area].pop();
125 | },
126 | check_level_by_cycle: function () {
127 | const regionMap = {cn: "国服", jp: "日服", tw: "台服"};
128 | for (const area in this.setting.level_by_cycle) {
129 | var last_level_max = this.setting.level_by_cycle[area][0][0]-1;
130 | var has_level_starting_with_1 = false;
131 | for (const level_info of this.setting.level_by_cycle[area]) {
132 | if (level_info[0] !== last_level_max + 1 || level_info[0] > level_info[1])
133 | return [false,`${regionMap[area]}阶段对应周目错误。\n不同阶段的周目范围不能重叠,且下阶段开始周目必须等于上阶段结束周目加一`];
134 | if (level_info[0] === 1)
135 | has_level_starting_with_1 = true;
136 | last_level_max = level_info[1]
137 | }
138 | if (!has_level_starting_with_1)
139 | return [false, `${regionMap[area]}阶段对应周目错误。\n至少要有一个阶段以1周目开始`];
140 | }
141 | return [true,'']
142 | }
143 | },
144 | delimiters: ['[[', ']]'],
145 | })
--------------------------------------------------------------------------------
/src/client/public/static/admin/users.js:
--------------------------------------------------------------------------------
1 | var vm = new Vue({
2 | el: '#app',
3 | data: {
4 | isLoading: true,
5 | moreLoading: false,
6 | userData: [],
7 | querys: {
8 | page: 1,
9 | page_size: 50,
10 | qqid: null,
11 | clan_group_id: null,
12 | authority_group: null,
13 | },
14 | query_input: {
15 | qqid: null,
16 | clan_group_id: null,
17 | authority_group: null,
18 | },
19 | has_more: true,
20 | authtype: [{
21 | value: 100,
22 | label: '成员',
23 | }, {
24 | value: 10,
25 | label: '公会战管理员',
26 | }, {
27 | value: 1,
28 | label: '主人',
29 | }],
30 | },
31 | mounted() {
32 | this.load_more();
33 | },
34 | methods: {
35 | datestr: function (ts) {
36 | if (ts == 0) {
37 | return null;
38 | }
39 | var nd = new Date();
40 | nd.setTime(ts * 1000);
41 | return nd.toLocaleString('chinese', { hour12: false, timeZone: 'asia/shanghai' });
42 | },
43 | search: function (event) {
44 | Object.assign(this.querys, this.query_input);
45 | this.querys.page = 1;
46 | this.isLoading = true;
47 | this.userData = [];
48 | this.load_more();
49 | },
50 | load_more: function (event) {
51 | this.moreLoading = true;
52 | var thisvue = this;
53 | axios.post(api_path, {
54 | action: 'get_data',
55 | querys: thisvue.querys,
56 | csrf_token: csrf_token,
57 | }).then(function (res) {
58 | if (res.data.code == 0) {
59 | thisvue.userData.push(...res.data.data);
60 | thisvue.isLoading = false;
61 | thisvue.moreLoading = false;
62 | if (res.data.data.length < thisvue.querys.page_size) {
63 | thisvue.has_more = false;
64 | } else {
65 | thisvue.querys.page += 1;
66 | }
67 | } else {
68 | thisvue.$alert(res.data.message, '加载数据错误');
69 | }
70 | }).catch(function (error) {
71 | thisvue.$alert(error, '加载数据错误');
72 | });
73 | },
74 | modify: function (scope) {
75 | var thisvue = this;
76 | axios.post(api_path, {
77 | action: 'modify_user',
78 | csrf_token: csrf_token,
79 | data: {
80 | qqid: scope.row.qqid,
81 | authority_group: scope.row.authority_group,
82 | },
83 | }).then(function (res) {
84 | if (res.data.code == 0) {
85 | thisvue.$message({
86 | message: '修改成功',
87 | type: 'success',
88 | });
89 | } else {
90 | thisvue.$message.error('修改失败' + res.data.message);
91 | }
92 | }).catch(function (error) {
93 | thisvue.$message.error(error);
94 | });
95 | },
96 | delete_user: function (scope) {
97 | var thisvue = this;
98 | thisvue.$confirm('是否删除' + scope.row.nickname, '提示', {
99 | confirmButtonText: '确定',
100 | cancelButtonText: '取消',
101 | type: 'danger'
102 | }).then(() => {
103 | axios.post(api_path, {
104 | action: 'delete_user',
105 | csrf_token: csrf_token,
106 | data: {
107 | qqid: scope.row.qqid,
108 | },
109 | }).then(function (res) {
110 | if (res.data.code == 0) {
111 | thisvue.$message({
112 | message: '删除成功',
113 | type: 'success',
114 | });
115 | } else {
116 | thisvue.$message.error('删除失败' + res.data.message);
117 | }
118 | }).catch(function (error) {
119 | thisvue.$message.error(error);
120 | });
121 | }).catch(() => {
122 | thisvue.$message({
123 | type: 'info',
124 | message: '已取消删除'
125 | });
126 | });
127 |
128 |
129 |
130 |
131 | },
132 | },
133 | delimiters: ['[[', ']]'],
134 | })
--------------------------------------------------------------------------------
/src/client/public/static/chara_marks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/static/chara_marks.png
--------------------------------------------------------------------------------
/src/client/public/static/clan/clan-rank.js:
--------------------------------------------------------------------------------
1 | if (!Object.defineProperty) {
2 | alert('浏览器版本过低');
3 | }
4 | var vm = new Vue({
5 | el: '#app',
6 | data: {
7 | activeIndex: "6",
8 | clanRankUrl : "",
9 | iframeHeight : 800,
10 | server: "cn"
11 | },
12 | mounted() {
13 | var thisvue = this;
14 | axios.post("../api/", {
15 | action: 'get_data',
16 | csrf_token: csrf_token,
17 | }).then(function (res) {
18 | if (res.data.code == 0) {
19 | thisvue.server = res.data.groupData.game_server;
20 | thisvue.switchServer()
21 | } else {
22 | thisvue.$alert(res.data.message, '加载数据错误');
23 | }
24 | }).catch(function (error) {
25 | thisvue.$alert(error, '加载数据错误');
26 | });
27 |
28 | window.addEventListener("resize", () => {
29 | thisvue.iframeHeight = document.documentElement.clientHeight - 65;
30 | });
31 |
32 | thisvue.iframeHeight = document.documentElement.clientHeight - 65;
33 | },
34 |
35 | methods: {
36 | handleSelect(key, keyPath) {
37 | switch (key) {
38 | case '1':
39 | window.location = '../';
40 | break;
41 | case '2':
42 | window.location = '../subscribers/';
43 | break;
44 | case '3':
45 | window.location = '../progress/';
46 | break;
47 | case '4':
48 | window.location = '../statistics/';
49 | break;
50 | case '5':
51 | window.location = `../my/`;
52 | break;
53 | case '6':
54 | window.location = `../clan-rank/`;
55 | break;
56 | }
57 | },
58 | switchServer() {
59 | if(this.server == "cn") {
60 | this.clanRankUrl = "https://kyouka.kengxxiao.com/rank/clan";
61 | }else if(this.server == "tw"){
62 | this.clanRankUrl = "https://rank.layvtwt.top/";
63 | }
64 | },
65 | },
66 | delimiters: ['[[', ']]'],
67 | })
--------------------------------------------------------------------------------
/src/client/public/static/clan/setting.js:
--------------------------------------------------------------------------------
1 | if (!Object.defineProperty) {
2 | alert('浏览器版本过低');
3 | }
4 | var vm = new Vue({
5 | el: '#app',
6 | data: {
7 | activeIndex: null,
8 | groupData: {},
9 | battle_id: null,
10 | data_slot_record_count: [],
11 | form: {
12 | game_server: null,
13 | privacy: {
14 | allow_guest: false,
15 | allow_statistics_api: false,
16 | },
17 | notify: {
18 | challenge: false,
19 | undo: false,
20 | apply: false,
21 | cancelapply: false,
22 | subscribe: false,
23 | cancelsubscribe: false,
24 | suspend: false,
25 | cancelsuspend: false,
26 | modify: false,
27 | sl: false,
28 | },
29 | },
30 | switchVisible: false,
31 | confirmVisible: false,
32 | },
33 | mounted() {
34 | var thisvue = this;
35 | axios.post('./api/', {
36 | action: 'get_setting',
37 | csrf_token: csrf_token,
38 | }).then(function (res) {
39 | if (res.data.code == 0) {
40 | thisvue.groupData = res.data.groupData;
41 | thisvue.battle_id = res.data.groupData.battle_id;
42 | thisvue.form.game_server = res.data.groupData.game_server;
43 | thisvue.form.privacy.allow_guest = Boolean(res.data.privacy & 0x1);
44 | thisvue.form.privacy.allow_statistics_api = Boolean(res.data.privacy & 0x2);
45 | document.title = res.data.groupData.group_name + ' - 公会战设置';
46 | var notify_code = res.data.notification;
47 | for (key in thisvue.form.notify) {
48 | thisvue.form.notify[key] = Boolean(notify_code & 1);
49 | notify_code >>= 1;
50 | }
51 | } else {
52 | thisvue.$alert(res.data.message, '加载数据失败');
53 | }
54 | }).catch(function (error) {
55 | thisvue.$alert(error, '加载数据失败');
56 | });
57 | },
58 | methods: {
59 | submit: function (event) {
60 | var thisvue = this;
61 | var privacy = (thisvue.form.privacy.allow_guest * 0x1) + (thisvue.form.privacy.allow_statistics_api * 0x2);
62 | var notify_code = 0;
63 | var magnitude = 1;
64 | for (key in thisvue.form.notify) {
65 | notify_code += thisvue.form.notify[key] * magnitude;
66 | magnitude <<= 1;
67 | }
68 | axios.post('./api/', {
69 | action: 'put_setting',
70 | csrf_token: csrf_token,
71 | game_server: thisvue.form.game_server,
72 | privacy: privacy,
73 | notification: notify_code,
74 | }).then(function (res) {
75 | if (res.data.code == 0) {
76 | thisvue.$notify({
77 | title: '通知',
78 | message: '设置成功',
79 | });
80 | } else {
81 | thisvue.$alert(res.data.message, '保存设置失败');
82 | }
83 | }).catch(function (error) {
84 | thisvue.$alert(error, '保存设置失败');
85 | });
86 | },
87 | export_data: function (event) {
88 | window.location = '../statistics/api/';
89 | },
90 | call_api: function (payload) {
91 | var thisvue = this;
92 | payload.csrf_token = csrf_token;
93 | axios.post('./api/', payload).then(function (res) {
94 | if (res.data.code == 0) {
95 | thisvue.$notify({
96 | title: '通知',
97 | message: '成功',
98 | });
99 | } else {
100 | thisvue.$alert(res.data.message, '失败');
101 | }
102 | }).catch(function (error) {
103 | thisvue.$alert(error, '失败');
104 | });
105 | },
106 | clear_data_slot: function (event) {
107 | this.call_api({
108 | action: 'clear_data_slot',
109 | });
110 | this.confirmVisible = false;
111 | },
112 | // new_data_slot: function (event) {
113 | // this.call_api({
114 | // action: 'new_data_slot',
115 | // });
116 | // },
117 | switch_data_slot: function (event) {
118 | this.call_api({
119 | action: 'switch_data_slot',
120 | battle_id: this.battle_id,
121 | });
122 | this.switchVisible = false;
123 | },
124 | get_data_slot_record_count: function () {
125 | if (this.data_slot_record_count.length !== 0) {
126 | return
127 | }
128 | var thisvue = this;
129 | axios.post('./api/', {
130 | action: 'get_data_slot_record_count',
131 | csrf_token: csrf_token,
132 | }).then(function (res) {
133 | if (res.data.code == 0) {
134 | thisvue.data_slot_record_count = res.data.counts;
135 | } else {
136 | thisvue.$alert(res.data.message, '失败');
137 | }
138 | }).catch(function (error) {
139 | thisvue.$alert(error, '失败');
140 | });
141 | },
142 | handleSelect(key, keyPath) {
143 | switch (key) {
144 | case '1':
145 | window.location = '../';
146 | break;
147 | case '2':
148 | window.location = '../subscribers/';
149 | break;
150 | case '3':
151 | window.location = '../progress/';
152 | break;
153 | case '4':
154 | window.location = '../statistics/';
155 | break;
156 | case '5':
157 | window.location = `../my/`;
158 | break;
159 | case '6':
160 | window.location = `../clan-rank/`;
161 | break;
162 | }
163 | },
164 | },
165 | delimiters: ['[[', ']]'],
166 | })
--------------------------------------------------------------------------------
/src/client/public/static/clan/statistics.js:
--------------------------------------------------------------------------------
1 | if (!Object.defineProperty) {
2 | alert('浏览器版本过低');
3 | }
4 | var vm = new Vue({
5 | el: '#app',
6 | data: {
7 | progressData: [],
8 | members: [],
9 | tailsData: [],
10 | tailsDataVisible: false,
11 | group_name: null,
12 | reportDate: null,
13 | activeIndex: '4',
14 | multipleSelection: [],
15 | sendRemindVisible: false,
16 | send_via_private: false,
17 | dropMemberVisible: false,
18 | today: 0,
19 | },
20 | methods: {
21 | handleTitleSelect(key, keyPath) {
22 | switch (key) {
23 | case '1':
24 | window.location = '../';
25 | break;
26 | case '2':
27 | window.location = '../subscribers/';
28 | break;
29 | case '3':
30 | window.location = '../progress/';
31 | break;
32 | case '4':
33 | window.location = '../statistics/';
34 | break;
35 | case '5':
36 | window.location = `../my/`;
37 | break;
38 | case '6':
39 | window.location = `../clan-rank/`;
40 | break;
41 | }
42 | },
43 | }
44 | })
45 |
46 |
--------------------------------------------------------------------------------
/src/client/public/static/clan/statistics/deviation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/static/clan/statistics/deviation.png
--------------------------------------------------------------------------------
/src/client/public/static/clan/statistics/many.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/static/clan/statistics/many.png
--------------------------------------------------------------------------------
/src/client/public/static/clan/statistics/order.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/static/clan/statistics/order.png
--------------------------------------------------------------------------------
/src/client/public/static/clan/statistics/pie.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/static/clan/statistics/pie.png
--------------------------------------------------------------------------------
/src/client/public/static/clan/subscribers.js:
--------------------------------------------------------------------------------
1 | var vm = new Vue({
2 | el: '#app',
3 | data: {
4 | bosstag: ['预约1', '预约2', '预约3', '预约4', '预约5'],
5 | subscribers: [
6 | [], [], [], [], [],
7 | ],
8 | members: [],
9 | group_name: null,
10 | activeIndex: '2',
11 | },
12 | mounted() {
13 | var thisvue = this;
14 | axios.post('../api/', {
15 | action: 'get_subscribers',
16 | csrf_token: csrf_token,
17 | }).then(function (res) {
18 | if (res.data.code == 0) {
19 | for (sub of res.data.subscribers) {
20 | thisvue.subscribers[sub.boss-1].push(sub);
21 | }
22 | thisvue.group_name = res.data.group_name;
23 | document.title = res.data.group_name + ' - 公会战设置';
24 | } else {
25 | thisvue.$alert(res.data.message, '获取数据失败');
26 | }
27 | }).catch(function (error) {
28 | thisvue.$alert(error, '获取数据失败');
29 | });
30 | axios.post('../api/', {
31 | action: 'get_member_list',
32 | csrf_token: csrf_token,
33 | }).then(function (res) {
34 | if (res.data.code == 0) {
35 | thisvue.members = res.data.members;
36 | } else {
37 | thisvue.$alert(res.data.message, '获取成员失败');
38 | }
39 | }).catch(function (error) {
40 | thisvue.$alert(error, '获取成员失败');
41 | });
42 | },
43 | methods: {
44 | find_name: function (qqid) {
45 | for (m of this.members) {
46 | if (m.qqid == qqid) {
47 | return m.nickname;
48 | }
49 | };
50 | return qqid;
51 | },
52 | handleSelect(key, keyPath) {
53 | switch (key) {
54 | case '1':
55 | window.location = '../';
56 | break;
57 | case '2':
58 | window.location = '../subscribers/';
59 | break;
60 | case '3':
61 | window.location = '../progress/';
62 | break;
63 | case '4':
64 | window.location = '../statistics/';
65 | break;
66 | case '5':
67 | window.location = `../my/`;
68 | break;
69 | case '6':
70 | window.location = `../clan-rank/`;
71 | break;
72 | }
73 | },
74 | },
75 | delimiters: ['[[', ']]'],
76 | })
--------------------------------------------------------------------------------
/src/client/public/static/clan/user.js:
--------------------------------------------------------------------------------
1 | var gs_offset = {
2 | jp: 4,
3 | tw: 5,
4 | kr: 4,
5 | cn: 5
6 | };
7 |
8 | function pad2(num) {
9 | return String(num).padStart(2, '0');
10 | }
11 |
12 | function ts2ds(timestamp) {
13 | var d = new Date();
14 | d.setTime(timestamp * 1000);
15 | return d.getFullYear() + '/' + pad2(d.getMonth() + 1) + '/' + pad2(d.getDate());
16 | }
17 | var vm = new Vue({
18 | el: '#app',
19 | data: {
20 | isLoading: true,
21 | challengeData: [],
22 | activeIndex: '5',
23 | qqid: 0,
24 | nickname: '',
25 | tempList: [0, 1, 2, 3, 4, 5],
26 | members: [],
27 | },
28 | mounted() {
29 | var thisvue = this;
30 | var pathname = window.location.pathname.split('/');
31 | thisvue.qqid = parseInt(pathname[pathname.length - 2]);
32 | axios.all([
33 | axios.post('../api/', {
34 | action: 'get_user_challenge',
35 | csrf_token: csrf_token,
36 | qqid: thisvue.qqid,
37 | }),
38 | axios.post('../api/', {
39 | action: 'get_member_list',
40 | csrf_token: csrf_token,
41 | }),
42 | ]).then(axios.spread(function (res, memres) {
43 | if (res.data.code != 0) {
44 | thisvue.$alert(res.data.message, '获取记录失败');
45 | return;
46 | }
47 | if (memres.data.code != 0) {
48 | thisvue.$alert(memres.data.message, '获取成员失败');
49 | return;
50 | }
51 | thisvue.members = memres.data.members;
52 | thisvue.nickname = res.data.user_info.nickname;
53 | thisvue.refresh(res.data.challenges, res.data.game_server);
54 | thisvue.isLoading = false;
55 | })).catch(function (error) {
56 | thisvue.$alert(error, '获取数据失败');
57 | });
58 | },
59 | methods: {
60 | find_name: function (qqid) {
61 | for (m of this.members) {
62 | if (m.qqid == qqid) {
63 | return m.nickname;
64 | }
65 | };
66 | return qqid;
67 | },
68 | csummary: function (cha) {
69 | if (cha == undefined) {
70 | return '';
71 | }
72 | return `(${cha.cycle}-${cha.boss_num}) ${cha.damage}`;
73 | },
74 | behalf: function (cha) {
75 | if (cha == undefined) {
76 | return '';
77 | }
78 | if (cha.behalf) {
79 | return `${this.find_name(cha.behalf)} 代刀`;
80 | }
81 | },
82 | cdetail: function (cha) {
83 | if (cha == undefined) {
84 | return '';
85 | }
86 | var nd = new Date();
87 | nd.setTime(cha.challenge_time * 1000);
88 | var detailstr = nd.toLocaleString('chinese', {
89 | hour12: false,
90 | timeZone: 'asia/shanghai'
91 | }) + '\n';
92 | detailstr += cha.cycle + '周目' + cha.boss_num + '号boss\n';
93 | detailstr += (cha.health_remain + cha.damage).toLocaleString(options = {
94 | timeZone: 'asia/shanghai'
95 | }) + '→' + cha.health_remain.toLocaleString(options = {
96 | timeZone: 'asia/shanghai'
97 | });
98 | if (cha.message) {
99 | detailstr += '\n留言:' + cha.message;
100 | }
101 | return detailstr;
102 | },
103 | arraySpanMethod: function ({
104 | row,
105 | column,
106 | rowIndex,
107 | columnIndex
108 | }) {
109 | if (columnIndex >= 2) {
110 | if (columnIndex % 2 == 0) {
111 | var detail = row.detail[columnIndex - 2];
112 | if (detail != undefined && detail.health_remain != 0) {
113 | return [1, 2];
114 | }
115 | } else {
116 | var detail = row.detail[columnIndex - 3];
117 | if (detail != undefined && detail.health_remain != 0) {
118 | return [0, 0];
119 | }
120 | }
121 | }
122 | },
123 | refresh: function (challenges, game_server) {
124 | var thisvue = this;
125 | var m = {
126 | pcrdate: -1
127 | };
128 | for (c of challenges) {
129 | var pcrdate = ts2ds(c.challenge_time - (gs_offset[game_server] * 3600));
130 | if (m.pcrdate != pcrdate) {
131 | if (m.pcrdate != -1) {
132 | thisvue.challengeData.push(m);
133 | }
134 | m = {
135 | pcrdate: pcrdate,
136 | finished: 0,
137 | detail: [],
138 | }
139 | }
140 |
141 | for (id of this.tempList) {
142 | if (!m.detail[id]) {
143 | if (id % 2 == 1 && c.is_continue && m.detail[id - 1] && m.detail[id - 1].health_remain == 0) {
144 | m.detail[id] = c;
145 | break;
146 | } else if (id % 2 == 0) {
147 | m.detail[id] = c;
148 | break;
149 | }
150 | }
151 | }
152 |
153 | if (c.is_continue) {
154 | m.finished += 0.5;
155 | } else {
156 | if (c.health_remain != 0) {
157 | m.finished += 1;
158 | } else {
159 | m.finished += 0.5;
160 | }
161 | }
162 | }
163 | if (m.pcrdate != -1) {
164 | thisvue.challengeData.push(m);
165 | }
166 | },
167 | viewInExcel: function () {
168 | var icons = document.getElementsByTagName('span');
169 | while (icons[0]) {
170 | icons[0].remove();
171 | }
172 | var uri = 'data:application/vnd.ms-excel;base64,';
173 | var ctx = '' + document.getElementsByTagName('thead')[0].innerHTML + document.getElementsByTagName('tbody')[0].innerHTML + '
';
174 | window.location.href = uri + window.btoa(unescape(encodeURIComponent(ctx)));
175 | document.documentElement.innerHTML = '请在Excel中查看(如果无法打开,请安装最新版本Excel)\n或者将整个表格复制,粘贴到Excel中使用';
176 | },
177 | handleTitleSelect(key, keyPath) {
178 | switch (key) {
179 | case '1':
180 | window.location = '../';
181 | break;
182 | case '2':
183 | window.location = '../subscribers/';
184 | break;
185 | case '3':
186 | window.location = '../progress/';
187 | break;
188 | case '4':
189 | window.location = '../statistics/';
190 | break;
191 | case '5':
192 | window.location = `../my/`;
193 | break;
194 | case '6':
195 | window.location = `../clan-rank/`;
196 | break;
197 | }
198 | },
199 | },
200 | delimiters: ['[[', ']]'],
201 | })
--------------------------------------------------------------------------------
/src/client/public/static/gacha.js:
--------------------------------------------------------------------------------
1 | var pool = [
2 | [1071, 1061, 1070, 1804, 1012, 1043, 1057, 1028, 1029, 1011, 1030, 1018, 1032, 1053, 1049, 1009, 1047, 1010, 1063, 1036, 1044, 1037, 1056, 1014, 1092, 1094, 1095, 1096, 1107, 1108, 1113, 1114, 1065, 1117, 1122, 1109, 1110, 1075, 1077, 1078, 1079, 1081, 1083, 1084, 1086, 1087, 1088, 1091, 1097, 1099, 1100, 1103, 1104, 1106, 1111, 1115, 1119, 1120, 1124, 1125, 1127, 1128],
3 | [1045, 1048, 1008, 1006, 1046, 1020, 1033, 1031, 1017, 1042, 1051, 1027, 1007, 1038, 1016, 1026, 1023, 1015, 1054, 1005, 1013],
4 | [1003, 1034, 1040, 1022, 1004, 1052, 1025, 1050, 1001, 1021, 1055],
5 | ];
6 | var experience = {
7 | "star3": 0,
8 | "star2": 0,
9 | "star1": 0,
10 | "diamond": 0,
11 | };
12 | var progress = false;
13 | (function () {
14 | var h = localStorage['gacha_experience'];
15 | if (h) {
16 | [experience.star3, experience.star2, experience.star1, experience.diamond] = h.split(',').map(x => +x);
17 | }
18 | })();
19 | function randarr(arr) {
20 | return String(arr[Math.floor(Math.random() * arr.length)]);
21 | }
22 | function pick(i) {
23 | var x = Math.random();
24 | if (x < 0.025) {
25 | experience.star3 += 1;
26 | return randarr(pool[0]) + '31';
27 | } else if (x < 0.205) {
28 | experience.star2 += 1;
29 | return randarr(pool[1]) + '11';
30 | } else if (i == 9) {
31 | experience.star2 += 1;
32 | return randarr(pool[1]) + '11';
33 | }
34 | experience.star1 += 1;
35 | return randarr(pool[2]) + '11';
36 | }
37 | function sleep(time) {
38 | return new Promise((resolve) => setTimeout(resolve, time));
39 | }
40 | async function reload() {
41 | var container = document.getElementById('container');
42 | container.innerHTML = '';
43 | for (i of Array(10).keys()) {
44 | await sleep(200);
45 | let chara = String(pick(i));
46 | let result = document.createElement('img');
47 | result.src = sourcebase + chara + '.jpg';
48 | container.appendChild(result);
49 | if (i === 4) {
50 | container.appendChild(document.createElement('br'));
51 | }
52 | }
53 | experience.diamond += 1500;
54 | }
55 | async function gacha() {
56 | if (progress) {
57 | return;
58 | }
59 | progress = true;
60 | await reload();
61 | document.getElementById('result').innerHTML = `★3: ${experience.star3}
★2: ${experience.star2}
★1: ${experience.star1}
总耗钻: ${experience.diamond}`;
62 | localStorage['gacha_experience'] = [experience.star3, experience.star2, experience.star1, experience.diamond].join(',');
63 | progress = false;
64 | }
--------------------------------------------------------------------------------
/src/client/public/static/gongan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/static/gongan.png
--------------------------------------------------------------------------------
/src/client/public/static/marionette.js:
--------------------------------------------------------------------------------
1 | var vm = new Vue({
2 | el: '#sending',
3 | data: {
4 | message_type: 'group',
5 | user_id: 0,
6 | group_id: 0,
7 | message: '',
8 | },
9 | mounted() {
10 | if (localStorage.message_type) {
11 | this.message_type = localStorage.message_type;
12 | this.user_id = localStorage.user_id;
13 | this.group_id = localStorage.group_id;
14 | this.message = localStorage.message;
15 | }
16 | },
17 | watch: {
18 | message_type: function (newmessage_type) {
19 | localStorage.message_type = newmessage_type;
20 | },
21 | user_id: function (newuser_id) {
22 | localStorage.user_id = newuser_id;
23 | },
24 | group_id: function (newgroup_id) {
25 | localStorage.group_id = newgroup_id;
26 | },
27 | message: function (newmessage) {
28 | localStorage.message = newmessage;
29 | },
30 | },
31 | methods: {
32 | send_msg: function (event) {
33 | axios.post(
34 | api_path,
35 | this.$data,
36 | ).then(function (res) {
37 | if (res.data.code == 0) {
38 | alert('已发送');
39 | } else {
40 | alert('发送失败:' + res.data.message);
41 | }
42 | }).catch(function (error) {
43 | alert(error);
44 | });
45 | },
46 | },
47 | delimiters: ['[[', ']]'],
48 | })
--------------------------------------------------------------------------------
/src/client/public/static/small.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eggggi/yobot_remix/2238675b0d8fc66b9556bac2a674d76c69fec46e/src/client/public/static/small.ico
--------------------------------------------------------------------------------
/src/client/public/template/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 404 Not Found
5 |
6 |
7 |
8 |
9 |
30 |
31 |
32 |
33 |
34 | 404: not found
35 | 这个{{ item }}不存在
36 |
37 |
38 |
39 |

41 |

43 |
44 |
45 |
46 |
47 |
48 |