From 757e7bd9ef0914d24f766e5be0a712c2888d4c17 Mon Sep 17 00:00:00 2001 From: jiwos hi Date: Mon, 10 Aug 2026 22:21:33 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repo/js/AutoFishingTeyvat/main.js | 38 +++++++++++++++++++++---- repo/js/AutoFishingTeyvat/manifest.json | 2 +- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/repo/js/AutoFishingTeyvat/main.js b/repo/js/AutoFishingTeyvat/main.js index a42e529935..6667d8365f 100644 --- a/repo/js/AutoFishingTeyvat/main.js +++ b/repo/js/AutoFishingTeyvat/main.js @@ -617,7 +617,7 @@ } } - async function run_file(path_msg, time_out_throw, time_out_whole, is_con, developer_log, block_gcm, block_fight, block_tsurumi, tsurumi_method, auto_skip, fishing_cd, uid, is_time_kill, time_target, kill_hour, kill_minute) { + async function run_file(path_msg, time_out_throw, time_out_whole, is_con, developer_log, block_gcm, block_fight, block_tsurumi, tsurumi_method, auto_skip, fishing_cd, uid, is_time_kill, time_target, kill_hour, kill_minute, notification_msg) { const base_path_pathing = "assets/pathing/"; const base_path_gcm = "assets/KeyMouseScript/"; const base_path_statues = "assets/pathing_others/"; @@ -741,6 +741,9 @@ if (is_time_kill && new Date() >= time_target) { let time_now_str = `${new Date().getHours()}:${new Date().getMinutes()}`; log.info(`预定时间(${kill_hour}:${kill_minute})已到(当前时间:${time_now_str}),终止运行...`); + if (settings.notification) { + notification.send(`预定时间(${kill_hour}:${kill_minute})已到(当前时间:${time_now_str}),终止运行...`); + } return "time_kill"; // 返回特殊标记 } @@ -760,10 +763,16 @@ if (now < critical_time) { log.info(`该垂钓点(白天)处于冷却状态,剩余时间: ${formatTimeDifference(critical_time - now)}`); log.info(`${file_name}(白天) 已跳过...`); + // if (settings.notification) { + // notification.send(`该垂钓点(白天)处于冷却状态,剩余时间: ${formatTimeDifference(critical_time - now)}\n${file_name}(白天) 已跳过...`); + // } daytime = false; fishing_time = "夜晚"; } else { log.info(`该垂钓点(白天)未处于冷却状态,闲置时间: ${formatTimeDifference(now - critical_time)}`); + if (settings.notification) { + notification.send(`${notification_msg}\n该垂钓点(全天)未处于冷却状态,闲置时间: ${formatTimeDifference(now - critical_time)}`); + } } } @@ -773,6 +782,9 @@ if (now < critical_time) { log.info(`该垂钓点(夜晚)处于冷却状态,剩余时间: ${formatTimeDifference(critical_time - now)}`); log.info(`${file_name}(夜晚) 已跳过...`); + // if (settings.notification) { + // notification.send(`该垂钓点(夜晚)处于冷却状态,剩余时间: ${formatTimeDifference(critical_time - now)}\n${file_name}(夜晚) 已跳过...`); + // } if (daytime) { fishing_time = "白天"; } else { @@ -780,6 +792,9 @@ } } else { log.info(`该垂钓点(夜晚)未处于冷却状态,闲置时间: ${formatTimeDifference(now - critical_time)}`); + // if (settings.notification) { + // notification.send(`${notification_msg}\n该垂钓点(夜晚)未处于冷却状态,闲置时间: ${formatTimeDifference(now - critical_time)}`); + // } } } } else if (fishing_time === "白天") { @@ -789,9 +804,15 @@ if (now < critical_time) { log.info(`该垂钓点(白天)处于冷却状态,剩余时间: ${formatTimeDifference(critical_time - now)}`); log.info(`${file_name}(白天) 已跳过...`); + // if (settings.notification) { + // notification.send(`该垂钓点(白天)处于冷却状态,剩余时间: ${formatTimeDifference(critical_time - now)}\n${file_name}(白天) 已跳过...`); + // } return null; } else { log.info(`该垂钓点(白天)未处于冷却状态,闲置时间: ${formatTimeDifference(now - critical_time)}`); + if (settings.notification) { + notification.send(`${notification_msg}\n该垂钓点(白天)未处于冷却状态,闲置时间: ${formatTimeDifference(now - critical_time)}`); + } } } } else if (fishing_time === "夜晚") { @@ -801,14 +822,23 @@ if (now < critical_time) { log.info(`该垂钓点(夜晚)处于冷却状态,剩余时间: ${formatTimeDifference(critical_time - now)}`); log.info(`${file_name}(夜晚) 已跳过...`); + // if (settings.notification) { + // notification.send(`该垂钓点(夜晚)处于冷却状态,剩余时间: ${formatTimeDifference(critical_time - now)}\n${file_name}(夜晚) 已跳过...`); + // } return null; } else { log.info(`该垂钓点(夜晚)未处于冷却状态,闲置时间: ${formatTimeDifference(now - critical_time)}`); + if (settings.notification) { + notification.send(`${notification_msg}\n该垂钓点(夜晚)未处于冷却状态,闲置时间: ${formatTimeDifference(now - critical_time)}`); + } } } } } else { log.info(`本地不存在该垂钓点的CD记录: ${file_name}(${uid})\n该垂钓点将不会跳过...`); + if (settings.notification) { + notification.send(`${notification_msg}\n本地不存在该垂钓点的CD记录: ${file_name}(${uid})\n该垂钓点将不会跳过...`); + } } } @@ -1113,10 +1143,8 @@ const path_msg = get_pathing_msg(path_filter[i]); let current_msg = `${path_msg["area"]}-${path_msg["detail"]}` + let notification_msg = `当前垂钓点: ${current_msg}(进度: ${i + 1}/${path_filter.length})`; log.info(`当前垂钓点: ${current_msg}(进度: ${i + 1}/${path_filter.length})`); - if (settings.notification) { - notification.send(`当前垂钓点: ${current_msg}(进度: ${i + 1}/${path_filter.length})`); - } // For ABGI only log.debug(`当前进度:${current_msg}(进度: ${i + 1}/${path_filter.length})`); if (path_continue === current_msg) { @@ -1129,7 +1157,7 @@ continue; } - const run_result = await run_file(path_msg, time_out_throw, time_out_whole, is_con, developer_log, block_gcm, block_fight, block_tsurumi, tsurumi_method, auto_skip, fishing_cd, uid, is_time_kill, time_target, kill_hour, kill_minute); + const run_result = await run_file(path_msg, time_out_throw, time_out_whole, is_con, developer_log, block_gcm, block_fight, block_tsurumi, tsurumi_method, auto_skip, fishing_cd, uid, is_time_kill, time_target, kill_hour, kill_minute, notification_msg); // 新增:检查 run_file 是否因为到达终止时间而返回特殊标记 if (run_result === "time_kill") { diff --git a/repo/js/AutoFishingTeyvat/manifest.json b/repo/js/AutoFishingTeyvat/manifest.json index ecc45103f4..a5772afea8 100644 --- a/repo/js/AutoFishingTeyvat/manifest.json +++ b/repo/js/AutoFishingTeyvat/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "提瓦特自动钓鱼(全流程+自选)", - "version": "2.4.8", + "version": "2.4.9", "bgi_version": "0.60.1", "description": "支持自动追踪并垂钓bgi支持的全提瓦特垂钓点", "authors": [ From 30b2baf18f797a21e3b8308ca02797afb5f826c3 Mon Sep 17 00:00:00 2001 From: jiwos hi Date: Tue, 11 Aug 2026 23:49:05 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 确保发送通知时已经到达对应的垂钓点 --- repo/js/AutoFishingTeyvat/main.js | 30 +++++++++---------------- repo/js/AutoFishingTeyvat/manifest.json | 2 +- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/repo/js/AutoFishingTeyvat/main.js b/repo/js/AutoFishingTeyvat/main.js index 6667d8365f..da172c630b 100644 --- a/repo/js/AutoFishingTeyvat/main.js +++ b/repo/js/AutoFishingTeyvat/main.js @@ -763,15 +763,12 @@ if (now < critical_time) { log.info(`该垂钓点(白天)处于冷却状态,剩余时间: ${formatTimeDifference(critical_time - now)}`); log.info(`${file_name}(白天) 已跳过...`); - // if (settings.notification) { - // notification.send(`该垂钓点(白天)处于冷却状态,剩余时间: ${formatTimeDifference(critical_time - now)}\n${file_name}(白天) 已跳过...`); - // } daytime = false; fishing_time = "夜晚"; } else { log.info(`该垂钓点(白天)未处于冷却状态,闲置时间: ${formatTimeDifference(now - critical_time)}`); - if (settings.notification) { - notification.send(`${notification_msg}\n该垂钓点(全天)未处于冷却状态,闲置时间: ${formatTimeDifference(now - critical_time)}`); + if (settings.notification) { // 全天时仅发送一次通知,将通知内容改为全天而非单独的白天和夜晚 + notification_msg = `${notification_msg}\n该垂钓点(全天)未处于冷却状态,闲置时间: ${formatTimeDifference(now - critical_time)}`; } } } @@ -782,9 +779,6 @@ if (now < critical_time) { log.info(`该垂钓点(夜晚)处于冷却状态,剩余时间: ${formatTimeDifference(critical_time - now)}`); log.info(`${file_name}(夜晚) 已跳过...`); - // if (settings.notification) { - // notification.send(`该垂钓点(夜晚)处于冷却状态,剩余时间: ${formatTimeDifference(critical_time - now)}\n${file_name}(夜晚) 已跳过...`); - // } if (daytime) { fishing_time = "白天"; } else { @@ -792,9 +786,6 @@ } } else { log.info(`该垂钓点(夜晚)未处于冷却状态,闲置时间: ${formatTimeDifference(now - critical_time)}`); - // if (settings.notification) { - // notification.send(`${notification_msg}\n该垂钓点(夜晚)未处于冷却状态,闲置时间: ${formatTimeDifference(now - critical_time)}`); - // } } } } else if (fishing_time === "白天") { @@ -804,14 +795,11 @@ if (now < critical_time) { log.info(`该垂钓点(白天)处于冷却状态,剩余时间: ${formatTimeDifference(critical_time - now)}`); log.info(`${file_name}(白天) 已跳过...`); - // if (settings.notification) { - // notification.send(`该垂钓点(白天)处于冷却状态,剩余时间: ${formatTimeDifference(critical_time - now)}\n${file_name}(白天) 已跳过...`); - // } return null; } else { log.info(`该垂钓点(白天)未处于冷却状态,闲置时间: ${formatTimeDifference(now - critical_time)}`); if (settings.notification) { - notification.send(`${notification_msg}\n该垂钓点(白天)未处于冷却状态,闲置时间: ${formatTimeDifference(now - critical_time)}`); + notification_msg = `${notification_msg}\n该垂钓点(白天)未处于冷却状态,闲置时间: ${formatTimeDifference(now - critical_time)}`; } } } @@ -822,14 +810,11 @@ if (now < critical_time) { log.info(`该垂钓点(夜晚)处于冷却状态,剩余时间: ${formatTimeDifference(critical_time - now)}`); log.info(`${file_name}(夜晚) 已跳过...`); - // if (settings.notification) { - // notification.send(`该垂钓点(夜晚)处于冷却状态,剩余时间: ${formatTimeDifference(critical_time - now)}\n${file_name}(夜晚) 已跳过...`); - // } return null; } else { log.info(`该垂钓点(夜晚)未处于冷却状态,闲置时间: ${formatTimeDifference(now - critical_time)}`); if (settings.notification) { - notification.send(`${notification_msg}\n该垂钓点(夜晚)未处于冷却状态,闲置时间: ${formatTimeDifference(now - critical_time)}`); + notification_msg = `${notification_msg}\n该垂钓点(夜晚)未处于冷却状态,闲置时间: ${formatTimeDifference(now - critical_time)}`; } } } @@ -837,7 +822,7 @@ } else { log.info(`本地不存在该垂钓点的CD记录: ${file_name}(${uid})\n该垂钓点将不会跳过...`); if (settings.notification) { - notification.send(`${notification_msg}\n本地不存在该垂钓点的CD记录: ${file_name}(${uid})\n该垂钓点将不会跳过...`); + notification_msg = `${notification_msg}\n本地不存在该垂钓点的CD记录: ${file_name}(${uid})\n该垂钓点将不会跳过...`; } } } @@ -963,6 +948,11 @@ // 回到主界面 await genshin.returnMainUi(); + // 发送通知 + if (settings.notification) { + notification.send(`${notification_msg}`); + } + // 记录钓鱼开始时间 const time_start_fishing = Date.now(); diff --git a/repo/js/AutoFishingTeyvat/manifest.json b/repo/js/AutoFishingTeyvat/manifest.json index a5772afea8..344ae8511a 100644 --- a/repo/js/AutoFishingTeyvat/manifest.json +++ b/repo/js/AutoFishingTeyvat/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "提瓦特自动钓鱼(全流程+自选)", - "version": "2.4.9", + "version": "2.4.10", "bgi_version": "0.60.1", "description": "支持自动追踪并垂钓bgi支持的全提瓦特垂钓点", "authors": [ From 5594acc3b5c39c4b4e01953bad264705c12fdbbc Mon Sep 17 00:00:00 2001 From: jiwos hi Date: Tue, 11 Aug 2026 23:53:03 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E9=80=82=E9=85=8D=E9=B9=A4=E8=A7=82?= =?UTF-8?q?=E7=89=B9=E6=AE=8A=E5=9E=82=E9=92=93=E7=82=B9=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repo/js/AutoFishingTeyvat/main.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/repo/js/AutoFishingTeyvat/main.js b/repo/js/AutoFishingTeyvat/main.js index da172c630b..a7b777f611 100644 --- a/repo/js/AutoFishingTeyvat/main.js +++ b/repo/js/AutoFishingTeyvat/main.js @@ -891,6 +891,9 @@ page_state = scroll_pages_main("down", 1); if (page_state === false) { // [DEBUG]未拥有奇特的羽毛的情况暂未测试(不确定滑到底部未找到是否能触发) log.warn("未找到小道具:奇特的羽毛,该点位已跳过..."); + if (settings.notification) { + notification.error(`${notification_msg}\n未找到小道具:奇特的羽毛,该点位已跳过...`); + } } return false; } @@ -919,6 +922,9 @@ keyPress("Z"); // 关闭快捷道具界面 await sleep(1000); log.warn("快捷更换栏未找到小道具:奇特的羽毛,该点位已跳过..."); + if (settings.notification) { + notification.error(`${notification_msg}\n快捷更换栏未找到小道具:奇特的羽毛,该点位已跳过...`); + } return false; } } From ec73de67f941edec8d7690fd007cf54935e99149 Mon Sep 17 00:00:00 2001 From: jiwos hi Date: Tue, 11 Aug 2026 23:55:53 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=92=93=E9=B1=BC?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E7=9B=B8=E5=85=B3=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repo/js/AutoFishingTeyvat/main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/repo/js/AutoFishingTeyvat/main.js b/repo/js/AutoFishingTeyvat/main.js index a7b777f611..45617de4bc 100644 --- a/repo/js/AutoFishingTeyvat/main.js +++ b/repo/js/AutoFishingTeyvat/main.js @@ -990,6 +990,9 @@ write_archive(file_name, fishing_time, Date.now(), uid); } else if (fishing_cd && !flag) { log.warn(`本次钓鱼异常,不计算垂钓点CD`); + if (settings.notification) { + notification.error(`本次钓鱼异常,不计算垂钓点CD`); + } } } From b8bebaa2bb128294e81575711ff8390f452adeb0 Mon Sep 17 00:00:00 2001 From: jiwos hi Date: Wed, 12 Aug 2026 00:14:19 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repo/js/AutoFishingTeyvat/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/repo/js/AutoFishingTeyvat/main.js b/repo/js/AutoFishingTeyvat/main.js index f3e356b3bd..8d052ef715 100644 --- a/repo/js/AutoFishingTeyvat/main.js +++ b/repo/js/AutoFishingTeyvat/main.js @@ -1,6 +1,6 @@ (async function () { // CD计算仍有优化空间、多人模式非房主记录的CD无法确定时间 - const area_list = ['蒙德', '璃月', '稻妻', '须弥', '枫丹', '纳塔', '至冬', '挪德卡莱', '层岩巨渊·地下矿区', '渊下宫', '远古圣山'] + const area_list = ['蒙德', '璃月', '稻妻', '须弥', '枫丹', '纳塔', '至冬', '挪德卡莱', '层岩巨渊·地下矿区', '渊下宫', '远古圣山', '霜月'] const fish_list = ['花鳉', '波波心羽鲈', '烘烘心羽鲈', '维护机关·水域清理者', '维护机关·态势控制者', '维护机关·澄金领队型', '海涛斧枪鱼', '维护机关·初始能力型', '维护机关·白金典藏型', '吹沙角鲀', '甜甜花鳉', '擒霞客', '水晶宴', '斗棘鱼', '炮鲀', '流纹褐蝶鱼', '锖假龙', '金赤假龙', '玉玉心羽鲈', '赤魔王', '长生仙', '苦炮鲀', '肺棘鱼', '流纹京紫蝶鱼', '琉璃花鳉', '伪装鲨鲨独角鱼', '繁花斗士急流鱼', '深潜斗士急流鱼', '晚霞翻车鲀', '青浪翻车鲀', '拟似燃素独角鱼', '炽岩斗士急流鱼', '蓝染花鳉', '鸩棘鱼', '流纹茶蝶鱼', '雪中君', '真果角鲀', '青金斧枪鱼', '暮云角鲀', '翡玉斧枪鱼', '沉波蜜桃', '雷鸣仙', '佛玛洛鳐', '迪芙妲鳐', '秘源机关·巡戒使', '蓝昼明眼鱼', '冷冽巨斧鱼', '夜色明眼鱼', '炽铁巨斧鱼', '虹光凶凶鲨', '无奇巨斧鱼', '素素凶凶鲨', '綦假龙'] const bait_list = ['果酿饵', '酸桔饵', '维护机关频闪诱饵', '甘露饵', '赤糜饵', '飞蝇假饵', '蠕虫假饵', '澄晶果粒饵', '温火饵', '槲梭饵', '清白饵'] const material_msg = { @@ -174,7 +174,8 @@ '挪德卡莱-垂钓点-希汐岛霜月之坊西-花鳉_蓝昼明眼鱼_夜色明眼鱼-果酿饵_清白饵-战斗', '挪德卡莱-垂钓点-虚海望噩影泽地东北-花鳉_素素凶凶鲨_虹光凶凶鲨_蓝昼明眼鱼-果酿饵_清白饵-普通', '挪德卡莱-垂钓点-虚海望皮拉米达城南-花鳉_无奇巨斧鱼_冷冽巨斧鱼_素素凶凶鲨_虹光凶凶鲨-果酿饵_槲梭饵_清白饵-普通', - '挪德卡莱-垂钓点-烟硌山峰望崖营壁西-无奇巨斧鱼_冷冽巨斧鱼_素素凶凶鲨_虹光凶凶鲨_蓝昼明眼鱼_夜色明眼鱼-槲梭饵_清白饵-普通' + '挪德卡莱-垂钓点-烟硌山峰望崖营壁西-无奇巨斧鱼_冷冽巨斧鱼_素素凶凶鲨_虹光凶凶鲨_蓝昼明眼鱼_夜色明眼鱼-槲梭饵_清白饵-普通', + '霜月-垂钓点-乌吉恩圈-花鳉_冷冽巨斧鱼_蓝昼明眼鱼_夜色明眼鱼-果酿饵_槲梭饵_清白饵-普通' ] const fishing_time_dic = { "全天": {"name": "All", "param": 0}, From c5e87078a16f8bd2563ef60734e33c9a8fdc934c Mon Sep 17 00:00:00 2001 From: jiwos hi Date: Wed, 12 Aug 2026 00:17:01 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repo/js/AutoFishingTeyvat/main.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/repo/js/AutoFishingTeyvat/main.js b/repo/js/AutoFishingTeyvat/main.js index 8d052ef715..11dd3fbdd7 100644 --- a/repo/js/AutoFishingTeyvat/main.js +++ b/repo/js/AutoFishingTeyvat/main.js @@ -1043,15 +1043,14 @@ const player1Ro = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/1P.png")); let imageExitRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/Exit.png")); - genshin.returnMainUi(); - await sleep(1000); - keyPress("G"); - while (!(captureGameRegion().Find(imageExitRo).isExist())) { // [DEBUG] 可能陷入死循环? - await sleep(500); - log.debug("等待直到进入教程界面"); - } - if (settings.archive_force === "") { + genshin.returnMainUi(); + await sleep(1000); + keyPress("G"); + while (!(captureGameRegion().Find(imageExitRo).isExist())) { // [DEBUG] 可能陷入死循环? + await sleep(500); + log.debug("等待直到进入教程界面"); + } let ocrUid = await Ocr(1679, 1048, 200, 28); if (ocrUid && ocrUid.text !== "") uid = ocrUid.text.replace(/\D/g, ''); } else {