From 7fa4c1ace9649d7579e0566353eb70e3e3c99492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BA=81=E5=8A=A8=E7=9A=84=E6=B0=A8=E6=B0=94?= <131591012+zaodonganqi@users.noreply.github.com> Date: Tue, 27 Jan 2026 20:07:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8D=83=E6=98=9F=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E7=A9=BA=E7=99=BD=E5=A4=84=E7=BB=A7=E7=BB=AD=E4=BC=98=E5=8C=96?= =?UTF-8?q?=20(#2800)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repo/js/WeeklyThousandStarRealm/main.js | 25 +++++++++++++++---- repo/js/WeeklyThousandStarRealm/manifest.json | 2 +- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/repo/js/WeeklyThousandStarRealm/main.js b/repo/js/WeeklyThousandStarRealm/main.js index bd034f8f9..4702becb5 100644 --- a/repo/js/WeeklyThousandStarRealm/main.js +++ b/repo/js/WeeklyThousandStarRealm/main.js @@ -129,6 +129,25 @@ async function findText(text, x, y, w, h, textAttempts = attempts) { return null; } +// 升级特殊界面点击 +async function findAndClickWhiteSpaceNext() { + const captureRegion = captureGameRegion(); + const ro = RecognitionObject.ocr(610, 950, 700, 60); + const results = captureRegion.findMulti(ro); + captureRegion.dispose(); + + for (let j = 0; j < results.count; j++) { + const region = results[j]; + if (region.isExist()) { + const text = region.text.toLowerCase(); + if (text.includes("点击") && text.includes("继续")) { + await sleep(duration); + click(610, 950); + } + } + } +} + // 查找图片 async function findImage(imgMat, x, y, w, h, imgAttempts = attempts) { const searchImg = RecognitionObject.TemplateMatch(imgMat, x, y, w, h); @@ -410,11 +429,7 @@ async function playMap() { } let outputCount = 0; while (true) { - const whiteText = await findText("空白处", 610, 950, 700, 60, 1); - if (whiteText) { - await sleep(duration); - click(610, 950); - } + await findAndClickWhiteSpaceNext(); const result = await findText("返回大厅", 960, 540, 960, 540, 1); if (result) { await sleep(duration); diff --git a/repo/js/WeeklyThousandStarRealm/manifest.json b/repo/js/WeeklyThousandStarRealm/manifest.json index 2da077c00..20365af20 100644 --- a/repo/js/WeeklyThousandStarRealm/manifest.json +++ b/repo/js/WeeklyThousandStarRealm/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "千星奇域每周成就经验刷取", - "version": "2.5", + "version": "2.6", "bgi_version": "0.54.0", "description": "无需自己找图,可用于利用成就高经验值刷取经验,默认配置每周刷满需要24分钟", "authors": [