Merge pull request #172 from bling-yshs/fix-auto-domain

fix: 修复传送并自动秘境无法正常打芬德尼尔之顶(冰本)
This commit is contained in:
辉鸭蛋
2024-12-31 01:17:57 +08:00
committed by GitHub
2 changed files with 15 additions and 13 deletions

View File

@@ -270,19 +270,21 @@
try{ try{
await genshin.tp(domainInfo.position[2], domainInfo.position[0]); await genshin.tp(domainInfo.position[2], domainInfo.position[0]);
await sleep(1000); await sleep(1000);
// 向前走 // 向前走,除非秘境是芬德尼尔之顶
keyDown("w"); if (domainName !== "芬德尼尔之顶") {
await sleep(2500); // 向前走
keyUp("w"); keyDown("w");
await sleep(2500);
await sleep(500); keyUp("w");
await sleep(500);
}
// 执行自动秘境 // 执行自动秘境
await dispatcher.runTask(new SoloTask("AutoDomain")); await dispatcher.runTask(new SoloTask("AutoDomain"));
await sleep(500); await sleep(500);
break; break;
}catch (ex) }catch (ex)
{ {
if (ex.message.includes("检测到复苏界面")) if (ex.message.includes("检测到复苏界面"))
{ {
@@ -293,7 +295,7 @@
{ {
// 如果不包含 "检测到复苏界面",则继续抛出异常 // 如果不包含 "检测到复苏界面",则继续抛出异常
throw ex; throw ex;
} }
} }
} }
})(); })();

View File

@@ -1,7 +1,7 @@
{ {
"manifest_version": 1, "manifest_version": 1,
"name": "传送并自动秘境", "name": "传送并自动秘境",
"version": "1.3", "version": "1.4",
"description": "BetterGI自带脚本用于传送后并执行自动秘境。秘境中角色死亡复活后继续回去战斗。", "description": "BetterGI自带脚本用于传送后并执行自动秘境。秘境中角色死亡复活后继续回去战斗。",
"authors": [ "authors": [
{ {
@@ -11,4 +11,4 @@
], ],
"settings_ui": "settings.json", "settings_ui": "settings.json",
"main": "main.js" "main": "main.js"
} }