From 9cc7c3ff7afe5b280b9d9101e84075f6d6f5d090 Mon Sep 17 00:00:00 2001 From: kaedelcb <57870068+kaedelcb@users.noreply.github.com> Date: Thu, 7 Aug 2025 08:45:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E8=87=AA=E5=8A=A8=E6=9E=AB=E4=B8=B9?= =?UTF-8?q?=E5=9C=B0=E8=84=89=E8=8A=B1=20v.3.4=E7=89=88=E6=9C=AC=EF=BC=9A2?= =?UTF-8?q?0250807=20(#1491)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Delete repo/js/AutoFontaineLeyLine directory * 全自动枫丹地脉花 v.3.4 版本:20250807 ### v.3.4版本:20250807 - **新功能**: - **优化**: 1. 优化打开冒险之证的时序,减少冒险之证打开失败的几率。 2. 切换队伍失败后添加返回函数,防止卡在切换界面。 3. 领奖时切换队伍失败或找不到时,通过地图追踪重新寻找一次。 4. 优化JS设置的默认显示和顺序。 5. 优化第六线路第二朵花战斗地点,避免游泳。 --- repo/js/AutoFontaineLeyLine/README.md | 11 +++++ .../枫丹地脉花-路线6 芒索斯山东麓-2:锚点右1_特殊处理.json | 19 ++++++++ repo/js/AutoFontaineLeyLine/main.js | 32 +++++++++---- repo/js/AutoFontaineLeyLine/manifest.json | 2 +- repo/js/AutoFontaineLeyLine/settings.json | 47 +++++++++++-------- 5 files changed, 83 insertions(+), 28 deletions(-) create mode 100644 repo/js/AutoFontaineLeyLine/assets/枫丹地脉花-路线6 芒索斯山东麓/线路修复/枫丹地脉花-路线6 芒索斯山东麓-2:锚点右1_特殊处理.json diff --git a/repo/js/AutoFontaineLeyLine/README.md b/repo/js/AutoFontaineLeyLine/README.md index fcf65354..b114e1e6 100644 --- a/repo/js/AutoFontaineLeyLine/README.md +++ b/repo/js/AutoFontaineLeyLine/README.md @@ -26,6 +26,17 @@ ## 三、更新说明 +### v.3.4版本:20250807 + +- **新功能**: + +- **优化**: +1. 优化打开冒险之证的时序,减少冒险之证打开失败的几率。 +2. 切换队伍失败后添加返回函数,防止卡在切换界面。 +3. 领奖时切换队伍失败或找不到时,通过地图追踪重新寻找一次。 +4. 优化JS设置的默认显示和顺序。 +5. 优化第六线路第二朵花战斗地点,避免游泳。 + ### v.3.3版本:20250716 - **新功能**: diff --git a/repo/js/AutoFontaineLeyLine/assets/枫丹地脉花-路线6 芒索斯山东麓/线路修复/枫丹地脉花-路线6 芒索斯山东麓-2:锚点右1_特殊处理.json b/repo/js/AutoFontaineLeyLine/assets/枫丹地脉花-路线6 芒索斯山东麓/线路修复/枫丹地脉花-路线6 芒索斯山东麓-2:锚点右1_特殊处理.json new file mode 100644 index 00000000..af67945b --- /dev/null +++ b/repo/js/AutoFontaineLeyLine/assets/枫丹地脉花-路线6 芒索斯山东麓/线路修复/枫丹地脉花-路线6 芒索斯山东麓-2:锚点右1_特殊处理.json @@ -0,0 +1,19 @@ +{ + "info": { + "name": "枫丹地脉花-路线6 芒索斯山东麓-2:锚点右1_特殊处理", + "type": "collect", + "author": "平面镜&LCB茶包", + "version": "1.0", + "description": "", + "bgi_version": "0.44.3" + }, + "positions": [ + { + "id": 1, + "x": 4971.0547, + "y": 4465.7285, + "move_mode": "walk", + "type": "path" + } + ] +} \ No newline at end of file diff --git a/repo/js/AutoFontaineLeyLine/main.js b/repo/js/AutoFontaineLeyLine/main.js index 5c752c57..f20f8c22 100644 --- a/repo/js/AutoFontaineLeyLine/main.js +++ b/repo/js/AutoFontaineLeyLine/main.js @@ -72,7 +72,7 @@ } else{ ii=8; - if(x !== 840 && x !== 1188){ + if(x !== 840 && x !== 1188 && x !== 113 ){ keyPress("w") }; } @@ -81,7 +81,7 @@ } //初始化 - var SMODEL = settings.SMODEL ? settings.SMODEL : false; // false 公版BETTERGI,true 自编译版本LCB + var SMODEL = settings.SMODEL ? settings.SMODEL : true; var SHUOVER=0 //0初始状态,1队伍配置标志,2结束线路,3线路出错 var haoganq=0 //0初始状态,1好感队伍配置标志 var Rewards = settings.Rewards ? settings.Rewards : false; // ture 领取冒险点奖励,false 不领取冒险点奖励 @@ -146,7 +146,7 @@ } var timesConfig = { value: timesValue }; - log.warn(`全自动枫丹地脉花: v3.3 - ${SHUV}.${color}.${rawTimes}`);//调试LOG + log.warn(`全自动枫丹地脉花: v3.4 - ${SHUV}.${color}.${rawTimes}`);//调试LOG log.warn(`使用树脂类型数量:${rewards.length}`); log.warn(`使用树脂顺序:${golbalRewardText.join(" ->")}`); @@ -329,7 +329,7 @@ await genshin.returnMainUi(); for(let i = 0;i<5;i++){ - await sleep(700); + await sleep(1100); await keyPress("VK_ESCAPE"); await sleep(300); @@ -686,7 +686,7 @@ } //定义领取动作,好感队伍是否添加? - async function claimRewards() { + async function claimRewards( Rewardspath = null ) { await genshin.returnMainUi(); log.info(`尝试领取奖励,优先${onerewards}'`); let SHUN01 = await Textocr("接触地脉之花",1.5,2,0,1187,358,200,400); @@ -708,7 +708,14 @@ } } - await Textocr("地脉之花", 1, 1, 0, 840,225, 230, 125); + let dimai = await Textocr("地脉之花", 1, 1, 0, 840,225, 230, 125); + if (!dimai.found) { + let pathDic = JSON.parse(file.readTextSync(Rewardspath)); + pathDic["positions"][0]["type"] = "path"; + await pathingScript.run(JSON.stringify(pathDic)); + await keyPress("F");await keyPress("F") + } + await sleep(500); for (let j = 0;j < 2;j++) { @@ -1126,6 +1133,8 @@ if(position.line==2 && (i+position.flower*2-2)==8){ await pathingScript.runFile("assets/枫丹地脉花-路线2 秋分山西侧锚点左下/线路修复/枫丹地脉花-路线2 秋分山西侧锚点左下-5:秋分山左左下下_特殊处理.json"); + }else if (position.line==6 && (i+position.flower*2-2)==2){ + await pathingScript.runFile("assets/枫丹地脉花-路线6 芒索斯山东麓/线路修复/枫丹地脉花-路线6 芒索斯山东麓-2:锚点右1_特殊处理.json"); } await sleep(1000); @@ -1186,14 +1195,21 @@ } shouldContinueChecking = false; await sleep(500); - if (!(await claimRewards())) { + if (!(await claimRewards( `${selectedFolder}${jsonFile2}` ))) { log.warn("树脂消耗完毕,结束任务"); dispatcher.addTimer(new RealtimeTimer("AutoPick", { forceInteraction: false })); await genshin.returnMainUi(); return true; // 条件2触发:树脂耗尽================ } Lastexecution=true; - if (haoganq==1){log.info(`切换战斗队伍:'${settings.n}'`);await genshin.returnMainUi(); await sleep(1000);await genshin.SwitchParty(settings.n);} + if (haoganq==1){ + log.info(`切换战斗队伍:'${settings.n}'`); + await genshin.returnMainUi(); + await sleep(1000); + if (!await genshin.SwitchParty(settings.n)){ + await genshin.returnMainUi(); + } + } dispatcher.addTimer(new RealtimeTimer("AutoPick", { forceInteraction: false })); // 冷却等待(可选) await sleep(1000); diff --git a/repo/js/AutoFontaineLeyLine/manifest.json b/repo/js/AutoFontaineLeyLine/manifest.json index b05b4f46..ba0f0335 100644 --- a/repo/js/AutoFontaineLeyLine/manifest.json +++ b/repo/js/AutoFontaineLeyLine/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "全自动枫丹地脉花", - "version": "3.3", + "version": "3.4", "bgi_version": "0.44.8", "description": "枫丹地脉花,蓝花金花通用。生存压力大,请带盾奶;避免纯水输出,请注意说明文件。如有BUG请联系作者QQ:119996800", "tags": [ diff --git a/repo/js/AutoFontaineLeyLine/settings.json b/repo/js/AutoFontaineLeyLine/settings.json index 441e877c..910b71b4 100644 --- a/repo/js/AutoFontaineLeyLine/settings.json +++ b/repo/js/AutoFontaineLeyLine/settings.json @@ -6,7 +6,8 @@ "options": [ "冒险之证", "拖动地图" - ] + ], + "default": "冒险之证" }, { "name": "n", @@ -21,7 +22,8 @@ { "name": "times", "type": "input-text", - "label": "选填:按刷取次数,默认6次,最多99次,树脂耗尽模式下无效" + "label": "选填:按刷取次数,默认6次,最多99次,树脂耗尽模式下无效", + "default": "6" }, { "name": "shuv", @@ -30,7 +32,8 @@ "options": [ "1-次数刷取", "2-树脂耗尽" - ] + ], + "default": "1-次数刷取" }, { "name": "color", @@ -39,17 +42,33 @@ "options": [ "1-蓝花(经验花)", "2-黄花(摩拉花)" - ] + ], + "default": "1-蓝花(经验花)" }, { "name": "Rewardsuse", "type": "input-text", - "label": "树脂设定:1=浓缩/2=原粹/3=脆弱/4=须臾\n用`/`隔开:填写对应的树脂<数字>即可\n默认:1/2 (表示先用浓缩后原粹,直至用完,不填的不使用)" + "label": "树脂设定:1=浓缩/2=原粹/3=脆弱/4=须臾\n用`/`隔开:填写对应的树脂<数字>即可\n默认:1/2 (表示先用浓缩后原粹,直至用完,不填的不使用)", + "default": "1/2" }, { - "name": "nowuid", + "name": "Fightquick", + "type": "checkbox", + "label": "默认开启:异步检测战斗结束,即地脉花长出后马上停止战斗\n开启后,建议关闭配置组中的<自动检测战斗结束>选项\n不启用:使用传统<打开队伍界面>进行判断战斗结束", + "default": "true" + + }, + { + "name": "timeout", "type": "input-text", - "label": "禁止特定UID刷地脉花,用 / 隔开,如12345/99999" + "label": "战斗超时,启用<异步检测战斗结束>开启后,下方填写的超时时间才有效\n默认180秒,建议和配置组的战斗超时一致", + "default": "180" + }, + { + "name": "SMODEL", + "type": "checkbox", + "label": "直跑模式:如下个花近,直跑过去,不传送,要求44.8版本以上", + "default": "true" }, { "name": "Rewards", @@ -57,18 +76,8 @@ "label": "勾选后,打完地脉花后,领取历练点并提交每日任务" }, { - "name": "SMODEL", - "type": "checkbox", - "label": "直跑模式:如下个花近,直跑过去,不传送,要求44.8版本!" - }, - { - "name": "Fightquick", - "type": "checkbox", - "label": "默认开启:异步检测战斗结束,即地脉花长出后马上停止战斗\n开启后,建议关闭配置组中的<自动检测战斗结束>选项\n不启用:使用传统<打开队伍界面>进行判断战斗结束" - }, - { - "name": "timeout", + "name": "nowuid", "type": "input-text", - "label": "启用<异步检测战斗结束>开启后,下方填写的超时时间才有效\n默认180秒,建议和配置组的战斗超时一致" + "label": "禁止特定UID刷地脉花,用 / 隔开,如12345/99999" } ] \ No newline at end of file