From bd5fc7aca560e62c53b42e89e0de5362e04ad3f6 Mon Sep 17 00:00:00 2001 From: this-Fish Date: Sat, 16 Aug 2025 09:41:17 +0800 Subject: [PATCH] =?UTF-8?q?JS=EF=BC=9A=E6=88=98=E6=96=97=E5=A5=BD=E6=84=9F?= =?UTF-8?q?=EF=BC=9A=E8=87=AA=E5=8A=A8=E5=A5=BD=E6=84=9F=E5=BA=A6&?= =?UTF-8?q?=E5=8D=A1=E6=97=B6=E9=97=B4=201.4.2=20(#1602)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v1.4.2新增拾取模式,能选择不拾取 避免每天运行,拾取過多不能分解的掉落物,导至不能分解的掉落物逹致上限 --- repo/js/AutoFriendshipFight/README.md | 5 +++++ .../AutoFriendshipFight/assets/AutoPath/鳄鱼-拾取.json | 8 ++++---- repo/js/AutoFriendshipFight/main.js | 9 +++++++-- repo/js/AutoFriendshipFight/manifest.json | 2 +- repo/js/AutoFriendshipFight/settings.json | 10 ++++++++++ 5 files changed, 27 insertions(+), 7 deletions(-) diff --git a/repo/js/AutoFriendshipFight/README.md b/repo/js/AutoFriendshipFight/README.md index 69574d646..4fb0f25d7 100644 --- a/repo/js/AutoFriendshipFight/README.md +++ b/repo/js/AutoFriendshipFight/README.md @@ -78,6 +78,10 @@ #### **脚本设置** > 通过调度器脚本右键-修改JS自定义配置 + - 拾取模式 + - 缺对应材料时,建议选用:自动拾取 + - 不缺对应材料时,建议选用:不拾取 + - 避免每天运行,拾取過多不能分解的掉落物,导至不能分解的掉落物逹致上限 - 敌人类型: 选择"盗宝团"或"愚人众" - 运行次数: 10次或者50次 - 目标是好感选择10次 @@ -218,6 +222,7 @@ | 版本 | 更新内容 | |------|----------| +| **v1.4.2** | 新增拾取模式,能选择不拾取 | | **v1.3** | 新增愚人众支持,优化敌人类型切换 | | **v1.2** | 战斗触发检测,异步检测战斗结束 | | **v1.1** | 盗宝团重登功能优化,卡时间支持 | diff --git a/repo/js/AutoFriendshipFight/assets/AutoPath/鳄鱼-拾取.json b/repo/js/AutoFriendshipFight/assets/AutoPath/鳄鱼-拾取.json index 7a05b7d98..df20339e5 100644 --- a/repo/js/AutoFriendshipFight/assets/AutoPath/鳄鱼-拾取.json +++ b/repo/js/AutoFriendshipFight/assets/AutoPath/鳄鱼-拾取.json @@ -13,9 +13,9 @@ "id": 1, "x": 3578.08, "y": -500.75, - "action": "", + "action": "combat_script", "move_mode": "dash", - "action_params": "wait(1)", + "action_params": "wait(0.2)", "type": "path" }, { @@ -25,7 +25,7 @@ "type": "path", "move_mode": "walk", "action": "", - "action_params": "wait(0.5)" + "action_params": "" }, { "id": 3, @@ -33,7 +33,7 @@ "y": -502.44, "action": "", "move_mode": "walk", - "action_params": "wait(0.5)", + "action_params": "", "type": "path" } ] diff --git a/repo/js/AutoFriendshipFight/main.js b/repo/js/AutoFriendshipFight/main.js index b921c2ebc..fbb4760bd 100644 --- a/repo/js/AutoFriendshipFight/main.js +++ b/repo/js/AutoFriendshipFight/main.js @@ -6,9 +6,14 @@ const DEFAULT_OCR_TIMEOUT_SECONDS = 10; const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120; (async function () { - // 启用自动拾取的实时任务 const startTime = Date.now(); - dispatcher.addTimer(new RealtimeTimer("AutoPick")); + // 启用自动拾取的实时任务 + if (settings.pickupMode == "自动拾取") { + dispatcher.addTimer(new RealtimeTimer("AutoPick")); + log.info("已 启用 自动拾取任务"); + } else if (settings.pickupMode == "不拾取") { + log.info("已 禁用 自动拾取任务"); + } runTimes = await calulateRunTimes(); await switchPartyIfNeeded(settings.partyName); diff --git a/repo/js/AutoFriendshipFight/manifest.json b/repo/js/AutoFriendshipFight/manifest.json index cf00990d2..819f3bd33 100644 --- a/repo/js/AutoFriendshipFight/manifest.json +++ b/repo/js/AutoFriendshipFight/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "战斗好感:自动好感度&卡时间", - "version": "1.4.1", + "version": "1.4.2", "bgi_version": "0.45.1", "tags": [ "好感", diff --git a/repo/js/AutoFriendshipFight/settings.json b/repo/js/AutoFriendshipFight/settings.json index 7c6cea8cc..83803ea65 100644 --- a/repo/js/AutoFriendshipFight/settings.json +++ b/repo/js/AutoFriendshipFight/settings.json @@ -1,4 +1,14 @@ [ + { + "name": "pickupMode", + "type": "select", + "label": "拾取模式", + "options": [ + "自动拾取", + "不拾取" + ], + "default": "自动拾取" + }, { "name": "enemyType", "type": "select",