开放联机换房间功能,添加红血检测 (#3004)

注:这里的红血检测是ABGI的功能,通过ABGI检测血条来按Z回血,且需要你把ABGI的版本更新最新版
This commit is contained in:
古又
2026-03-16 20:24:38 +08:00
committed by GitHub
parent be6d25cb4f
commit 92a25db61e
4 changed files with 36 additions and 29 deletions

View File

@@ -3,7 +3,7 @@
#### 该脚本是搭配auto-bgi软件使用的
#### 不了解的可以去BetterGI的QQ频道搜索【auto-bgi】
#### 也可以电脑点击【[ABGI](https://gitee.com/wangjian0327/auto-bgi/blob/ginVue/README.md)】进行学习了解以及加入QQ群215053644
##### 可启动的功能有
##### 可启动的功能有调用不起作用请更新abgi如果没起作用艾特我
"一条龙", [参数为一条龙名字Ps【默认配置】]
"配置组", [参数为配置组名字Ps【锄地】]
"一条龙(关闭原神)", [参数为一条龙名字Ps【默认配置】]
@@ -20,9 +20,9 @@
"米游社签到" [需要自己配置相关文件]
"启动bat脚本"[参数为bat脚本路径Ps【E:\ABGI\重启.bat】]
"联机更换ABGI的账号信息"[参数为uid-namePs【1*******-原神大王】]
<!-- "更换联机房间"[参数为:房间名字+vip密钥Ps:【古叉别断网-GUYOUSHIGEHAOREN】] -->
"更换联机房间"[参数为:房间名字+任意密钥Ps:【古叉别断网-GUYOUSHIGEHAOREN】]
"等待时间"[参数为多少秒Ps:【5000】]
"红血检测"[参数为:启动/关闭Ps:【启动】]
------
#### 原理解释

View File

@@ -99,12 +99,12 @@ async function compareVersion(version1, version2) {
await sleep(outTime);
return;
case "联机更换ABGI的账号信息":
result = await compareVersion(settings.versionABGI, "3.4.12");
if (result == -1) {
log.error("无法调用该任务请更新ABGI至3.4.12版本或更高版本");
await sleep(outTime);
return;
};
// result = await compareVersion(settings.versionABGI, "3.4.12");
// if (result == -1) {
// log.error("无法调用该任务请更新ABGI至3.4.12版本或更高版本");
// await sleep(outTime);
// return;
// };
await sleep(500);
log.info("ABGI启动联机换号"+`${settings.inputText}`);
await sleep(outTime);
@@ -114,22 +114,27 @@ async function compareVersion(version1, version2) {
// log.info(`ABGI启动${settings.selectTask}`+"");
// await sleep(outTime);
// return;
// case "更换联机房间":
// result = await compareVersion(settings.versionABGI, "3.5.25");
// if (result == -1) {
// log.error("无法调用该任务请更新ABGI至3.5.25版本或更高版本");
// await sleep(outTime);
// return;
// };
// await sleep(500);
// log.info(`ABGI启动更换房间`+`${settings.inputText}`);
// await sleep(outTime);
// return;
case "更换联机房间":
// result = await compareVersion(settings.versionABGI, "3.5.25");
// if (result == -1) {
// log.error("无法调用该任务请更新ABGI至3.5.25版本或更高版本");
// await sleep(outTime);
// return;
// };
await sleep(500);
log.info(`ABGI启动更换房间`+`${settings.inputText}`);
await sleep(outTime);
return;
case "等待时间(单位为秒)":
const pureDigitStr = String(settings.inputText).replace(/\D/g, "");
await sleep(pureDigitStr*1000);
await sleep(outTime);
return;
case "红血检测":
await sleep(500);
log.info(`ABGI启动关闭红血检测`+`${settings.inputText}`);
await sleep(outTime);
return;
default:
log.error(`ABGI不支持的任务${settings.selectTask}`);
await sleep(outTime);

View File

@@ -1,7 +1,7 @@
{
"manifest_version": 1,
"name": "老王妙妙屋",
"version": "0.9.1",
"version": "1.0",
"tags": [
"abgi"
],

View File

@@ -20,8 +20,9 @@
"米游社签到",
"bat脚本",
"联机更换ABGI的账号信息",
// "更换联机房间",
"等待时间(单位为秒)"
"更换联机房间",
"等待时间(单位为秒)",
"红血检测"
],
"default": ""
},
@@ -36,11 +37,12 @@
"type": "input-text",
"label": " 结束延时(可改) \n 默认一秒,可以设置延时时间,单位毫秒",
"default": "1000"
},
{
"name": "versionABGI",
"type": "input-text",
"label": " 本地ABGI版本(别改) \n 本地ABGI自动修改版本号不用改",
"default": "3.4.12"
}
// ,
// {
// "name": "versionABGI",
// "type": "input-text",
// "label": " 本地ABGI版本(别改) \n 本地ABGI自动修改版本号不用改",
// "default": "3.6.53"
// }
]