fix a severe issue causing a stuck state

This commit is contained in:
Yang-z
2024-11-30 12:12:01 +08:00
parent a6cd222fc4
commit 243c351e77
11 changed files with 93 additions and 51 deletions

View File

@@ -176,6 +176,18 @@
"type": "target",
"move_mode": "walk",
"#": "12"
},
{
"x": 9834.365234375,
"y": -563.93701171875,
"type": "path",
"move_mode": "walk"
},
{
"x": 9831.587890625,
"y": -563.4140625,
"type": "path",
"move_mode": "walk"
}
]
}

View File

@@ -11,6 +11,12 @@
"type": "teleport",
"move_mode": "walk"
},
{
"x": 4176.16455078125,
"y": -2726.15234375,
"type": "path",
"move_mode": "run"
},
{
"x": 4166.1396484375,
"y": -2730.453125,

View File

@@ -131,7 +131,6 @@
"action": "stop_flying"
},
{
"x": 4200.22802734375,
"y": -2047.04541015625,
@@ -149,8 +148,6 @@
"#": "3"
},
{
"x": 4212.25146484375,
"y": -2026.8671875,
@@ -158,15 +155,21 @@
"move_mode": "walk"
},
{
"x": 4215.18701171875,
"y": -2025.05859375,
"x": 4215.06982421875,
"y": -2024.91357421875,
"type": "target",
"move_mode": "walk",
"action": "",
"#": "4"
},
{
"x": 4215.0322265625,
"y": -2024.9189453125,
"type": "target",
"move_mode": "walk",
"action": "",
"#": "4"
}
]
}

View File

@@ -126,20 +126,22 @@
"move_mode": "fly"
},
{
"x": 5638.16845703125,
"y": 893.82373046875,
"x": 5639.48388671875,
"y": 893.79638671875,
"type": "target",
"move_mode": "walk",
"action": ""
"action": "",
"#": 3
},
{
"x": 5641.98193359375,
"y": 892.064453125,
"x": 5639.455078125,
"y": 893.81201171875,
"type": "target",
"move_mode": "walk"
"move_mode": "walk",
"action": "",
"#": 3
},
{
"x": 5603.14794921875,
"y": 890.646484375,
@@ -148,7 +150,6 @@
"action": "stop_flying"
},
{
"x": 5546.05126953125,
"y": 938.8857421875,
@@ -172,7 +173,8 @@
"y": 913.49169921875,
"type": "target",
"move_mode": "walk",
"action": ""
"action": "",
"#": 4
}
]
}

View File

@@ -29,8 +29,7 @@
"(恢复)狗粮-稻妻-神无冢.json",
"【收尾】狗粮-稻妻-神无冢-踏鞴砂①-6个21个.json",
"【收尾】狗粮-稻妻-神无冢-踏鞴砂②-7个21个.json",
"【收尾】狗粮-稻妻-神无冢-踏鞴砂③-8个21个.json",
"(恢复)狗粮-稻妻-神无冢.json"
"【收尾】狗粮-稻妻-神无冢-踏鞴砂③-8个21个.json"
]; // 97+21个
const pathingB = [
@@ -62,8 +61,7 @@
"狗粮-稻妻-鹤观-东偏中-2个.json",
"狗粮-稻妻-鹤观-南-2个.json",
"(恢复)狗粮-稻妻-清籁岛.json",
"【收尾】狗粮-稻妻-清籁岛-清籁丸-20个.json",
"(恢复)狗粮-稻妻-清籁岛.json",
"【收尾】狗粮-稻妻-清籁岛-清籁丸-20个.json"
]; // 97+20个
const pathingE = [
@@ -91,10 +89,11 @@
}
// 准备
async function init() {
async function init(resizeMap = true) {
// restore and alignment
await genshin.tp("253.146484375", "1285.14306640625"); await sleep(3000);
if (resizeMap) {
// zoom map to 75%
keyPress("M"); await sleep(1000);
for (let i = 0; i < 5; i++) {
@@ -104,6 +103,8 @@
keyPress("M"); await sleep(1000);
}
}
// 分解圣遗物
async function salvage() {
keyPress("B"); await sleep(2000);
@@ -153,14 +154,15 @@
// main
determinePath();
await init();
// A or B
await init();
log.info(`开始执行${path}线路。`);
if (path == 'A') await batch(folderA, pathingA);
else await batch(folderB, pathingB);
// Extra
await init(false);
log.info(`开始执行额外线路。`);
await batch(folderE, pathingE, true); // 强制交互

View File

@@ -1,7 +1,7 @@
{
"manifest_version": 1,
"name": "狗粮ABE路线自动拾取分解",
"version": "1.5",
"version": "1.5.1",
"bgi_version": "0.37.1",
"description": "圣遗物狗粮AB路线自动轮换及额外点位拾取途中自动分解。更新纳塔5.2优质点位。",
"authors": [

View File

@@ -1,10 +1,4 @@
[
// bgi已捕获可预期异常并设置重试次数
// {
// "name": "tryTimes",
// "type": "input-text",
// "label": "尝试次数"
// },
{
"name": "path",

View File

@@ -176,6 +176,18 @@
"type": "target",
"move_mode": "walk",
"#": "12"
},
{
"x": 9834.365234375,
"y": -563.93701171875,
"type": "path",
"move_mode": "walk"
},
{
"x": 9831.587890625,
"y": -563.4140625,
"type": "path",
"move_mode": "walk"
}
]
}

View File

@@ -11,6 +11,12 @@
"type": "teleport",
"move_mode": "walk"
},
{
"x": 4176.16455078125,
"y": -2726.15234375,
"type": "path",
"move_mode": "run"
},
{
"x": 4166.1396484375,
"y": -2730.453125,

View File

@@ -131,7 +131,6 @@
"action": "stop_flying"
},
{
"x": 4200.22802734375,
"y": -2047.04541015625,
@@ -149,8 +148,6 @@
"#": "3"
},
{
"x": 4212.25146484375,
"y": -2026.8671875,
@@ -158,15 +155,21 @@
"move_mode": "walk"
},
{
"x": 4215.18701171875,
"y": -2025.05859375,
"x": 4215.06982421875,
"y": -2024.91357421875,
"type": "target",
"move_mode": "walk",
"action": "",
"#": "4"
},
{
"x": 4215.0322265625,
"y": -2024.9189453125,
"type": "target",
"move_mode": "walk",
"action": "",
"#": "4"
}
]
}

View File

@@ -126,20 +126,22 @@
"move_mode": "fly"
},
{
"x": 5638.16845703125,
"y": 893.82373046875,
"x": 5639.48388671875,
"y": 893.79638671875,
"type": "target",
"move_mode": "walk",
"action": ""
"action": "",
"#": 3
},
{
"x": 5641.98193359375,
"y": 892.064453125,
"x": 5639.455078125,
"y": 893.81201171875,
"type": "target",
"move_mode": "walk"
"move_mode": "walk",
"action": "",
"#": 3
},
{
"x": 5603.14794921875,
"y": 890.646484375,
@@ -148,7 +150,6 @@
"action": "stop_flying"
},
{
"x": 5546.05126953125,
"y": 938.8857421875,
@@ -172,7 +173,8 @@
"y": 913.49169921875,
"type": "target",
"move_mode": "walk",
"action": ""
"action": "",
"#": 4
}
]
}