fix 强制拾取 (#653)

This commit is contained in:
起个名字好难的喵
2025-04-27 11:28:29 +08:00
committed by GitHub
parent 1e33d089e6
commit ae2ff070fd
4 changed files with 12 additions and 6 deletions

View File

@@ -220,6 +220,9 @@
log.info(filePath);
await pathingScript.runFile(filePath);
// 配置强制拾取为关闭状态
dispatcher.addTimer(new RealtimeTimer("AutoPick", { "forceInteraction": false }));
// 地图缩放按键同某些地图标识重叠,导致识别失败(bgi[v0.43.0]后引入)
// // 完成路径后,放大地图,脚本中调用就近传送。仍可能被缩小回去。不可行
// let shouldResizeMap_after = filePath.search("~m") != -1;

View File

@@ -1,7 +1,7 @@
{
"manifest_version": 1,
"name": "狗粮ABE路线自动拾取分解",
"version": "2.5.2",
"version": "2.5.3",
"bgi_version": "0.42.0",
"description": "圣遗物狗粮AB及额外路线自动轮换自动分解就近恢复。",
"authors": [

View File

@@ -82,10 +82,7 @@
await sleep(delayTime);
notification.send(`已抵达突发任务(张牙舞爪的恶党)触发位置`);
}
// 开启急速拾取
dispatcher.addTimer(new RealtimeTimer("AutoPick", {
"forceInteraction": true
}));
await genshin.relogin();
// OCR识别是否触发任务
@@ -95,7 +92,7 @@
let resList = captureRegion.findMulti(RecognitionObject.ocr(0, 200, 300, 300));
for (let o = 0; o < resList.count; o++) {
let res = resList[o];
if (res.text.includes("打倒") || res.text.includes("所有") || res.text.includes("") || res.text.includes("") || res.text.includes("张牙") || res.text.includes("舞爪") || res.text.includes("的") || res.text.includes("恶党")) {
if (res.text.includes("张牙") || res.text.includes("舞爪") || res.text.includes("恶党") || res.text.includes("打倒") || res.text.includes("所有") || res.text.includes("鳄鱼")) {
ocrStatus = true;
break;
}
@@ -104,6 +101,10 @@
if (ocrStatus) {
log.info(`当前次数:${i + 1}/${runTimes}`);
// 开启急速拾取
dispatcher.addTimer(new RealtimeTimer("AutoPick", {
"forceInteraction": true
}));
await AutoPath(`好感-张牙舞爪的恶党-循环${GetMeatMode ? '(二净甸刷肉版)' : '(二净甸)'}`);
// 关闭急速拾取
dispatcher.addTimer(new RealtimeTimer("AutoPick", {
@@ -117,6 +118,7 @@
log.warn(`判定本轮循环执行失败,退回本轮执行次数:${i + 1}/${runTimes}`);
}
} else {
notification.send(`未识别到突发任务(张牙舞爪的恶党),兽肉好感结束`);
break;
}
const estimatedCompletion = calculateEstimatedCompletion(startTime, i + 1, runTimes);

View File

@@ -2,6 +2,7 @@
"manifest_version": 1,
"name": "兽肉好感:自动好感度&刷两只鳄鱼兽肉&卡时间",
"version": "1.3.4",
"bgi_version": "0.44.6",
"description": "通过突发事件:张牙舞爪的恶党刷兽肉并顺带获取好感度好感度超过10次后不再获取请使用满员好感度队伍并为全体队伍角色配置相应的战斗策略",
"authors": [
{