diff --git a/repo/js/AutoLeyLineOutcrop/README.md b/repo/js/AutoLeyLineOutcrop/README.md index 7deeeb7e4..b363cd2ce 100644 --- a/repo/js/AutoLeyLineOutcrop/README.md +++ b/repo/js/AutoLeyLineOutcrop/README.md @@ -47,6 +47,8 @@ wgc的bug,请使用bitblt截图方式,脚本只支持这个 打开大地图,点击左下角设置,开启自定义标记。 脚本非正常结束运行时会出现该问题。 ## 更新日志 +### 4.1 +通过冒险之证找花 - 测试 ### 4.0 - 适配原神5.7版本更新 - 修复打开自定义标记的bug diff --git a/repo/js/AutoLeyLineOutcrop/main.js b/repo/js/AutoLeyLineOutcrop/main.js index 615e696da..0251a8e19 100644 --- a/repo/js/AutoLeyLineOutcrop/main.js +++ b/repo/js/AutoLeyLineOutcrop/main.js @@ -42,6 +42,7 @@ const ocrRoThis = RecognitionObject.ocrThis; } finally { if (!marksStatus) { + // 任何时候都确保自定义标记处于打开状态 await openCustomMarks(); } log.info("全自动地脉花运行结束"); diff --git a/repo/js/AutoLeyLineOutcrop/manifest.json b/repo/js/AutoLeyLineOutcrop/manifest.json index 553636b8e..4cc0f3b06 100644 --- a/repo/js/AutoLeyLineOutcrop/manifest.json +++ b/repo/js/AutoLeyLineOutcrop/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "全自动地脉花", - "version": "4.1.1", + "version": "4.1.2", "tags": ["地脉花"], "bgi_version": "0.44.7", "description": "基于OCR图像识别的全自动刷取地脉花。\n💡更多信息请查看在线手册:https://hcnsvf0s8d0s.feishu.cn/wiki/Tb1twpThLi7UlykqcYOcuccTnjJ \n\n----------注意事项----------\n●仅支持BetterGI 0.44.7 及以上版本!\n●部分地脉花因特殊原因不支持全自动,具体的点位请在手册中查看。\n●树脂使用的优先级:2倍原粹树脂 > 浓缩树脂 > 原粹树脂。\n●运行时会传送到七天神像设置中设置的七天神像,需要关闭七天神像设置中的“是否就近七天神像恢复血量”,并指定七天神像。\n●战斗策略注意调度器设置中地图追踪行走配置里的“允许在JsSpript中使用”和“覆盖JS中的自动战斗配置”,只有在都打开的情况下脚本才会使用下面的战斗配置,否则会使用独立任务中的战斗策略。战斗超时时间不能大于脚本自定义配置中的时间。\n\n如果遇到问题,请先参照手册中的方法进行解决。", diff --git a/repo/js/AutoLeyLineOutcrop/settings.json b/repo/js/AutoLeyLineOutcrop/settings.json index 4c65cdc19..744ccca22 100644 --- a/repo/js/AutoLeyLineOutcrop/settings.json +++ b/repo/js/AutoLeyLineOutcrop/settings.json @@ -58,7 +58,7 @@ { "name": "useAdventurerHandbook", "type": "checkbox", - "label": "是否使用冒险之证寻找地脉花\n开发中,请勿使用!" + "label": "是否使用冒险之证寻找地脉花\n【测试中】" }, { "name": "isNotification", diff --git a/repo/js/AutoLeyLineOutcrop/utils/findLeyLineOutcropByBook.js b/repo/js/AutoLeyLineOutcrop/utils/findLeyLineOutcropByBook.js index 7ebbeb869..5acbc9cac 100644 --- a/repo/js/AutoLeyLineOutcrop/utils/findLeyLineOutcropByBook.js +++ b/repo/js/AutoLeyLineOutcrop/utils/findLeyLineOutcropByBook.js @@ -1,15 +1,17 @@ /** - * 通过冒险之证查找地脉花位置 - 制作中 + * 通过冒险之证查找地脉花位置 - 【测试中】 * @param {string} country - 国家名称 * @param {string} type - 地脉花类型 * @returns {Promise} - */this.findLeyLineOutcropByBook = -async function (country, type) { + */ +this.findLeyLineOutcropByBook = async function (country, type) { + await genshin.returnMainUi(); + await sleep(1000); log.info("使用冒险之证寻找地脉花"); //确保运行时位于主界面 keyPress("F1"); await sleep(1000); - click(300,550); //点击讨伐 + click(300, 550); //点击讨伐 await sleep(1000); click(500, 200); //点击筛选 await sleep(1000); @@ -37,5 +39,8 @@ async function (country, type) { await sleep(1000); //获取地脉花位置 const center = genshin.getPositionFromBigMap(); + leyLineX = center.x; + leyLineY = center.y; log.info(`找到地脉花的坐标:(${center.x}, ${center.y})`); + return center; } \ No newline at end of file