From b6d0b78751f41af22a2572d6487cbd44be35bfe6 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: Wed, 8 Apr 2026 20:04:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8D=83=E6=98=9F?= =?UTF-8?q?=E5=87=86=E5=A4=87=E7=8A=B6=E6=80=81=E6=A0=A1=E9=AA=8C=20(#3090?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repo/js/WeeklyThousandStarRealm/main.js | 53 ++++++++----------- repo/js/WeeklyThousandStarRealm/manifest.json | 2 +- 2 files changed, 24 insertions(+), 31 deletions(-) diff --git a/repo/js/WeeklyThousandStarRealm/main.js b/repo/js/WeeklyThousandStarRealm/main.js index 56853b789..c679746a3 100644 --- a/repo/js/WeeklyThousandStarRealm/main.js +++ b/repo/js/WeeklyThousandStarRealm/main.js @@ -206,26 +206,31 @@ async function deleteSource() { await genshin.returnMainUi(); } +// 退出房间 +async function exitRoom() { + keyPress("VK_P"); + await waitUntilTextAppear( + "确认", + async () => { + await findImgAndClick(exit_room, 960, 0, 960, 540, 5000); + }, + 960, + 600, + 960, + 400, + 50, + 100 + ); + await findTextAndClick("确认", 960, 600, 960, 400, 50); + await genshin.returnMainUi(); +} + // 进入千星奇域的全部奇域页面 async function enterSourcePage() { // 1. 检测是否在房间内,在则退出 const inRoom = await findText("房间", 1500, 0, 420, 500, 5, 100); if (inRoom) { - keyPress("VK_P"); - await waitUntilTextAppear( - "确认", - async () => { - await findImgAndClick(exit_room, 960, 0, 960, 540, 5000); - }, - 960, - 600, - 960, - 400, - 50, - 100 - ); - await findTextAndClick("确认", 960, 600, 960, 400, 50); - await genshin.returnMainUi(); + await exitRoom(); keyPress("VK_F6"); } else { keyPress("VK_F6"); @@ -238,20 +243,7 @@ async function enterStarSourcePage() { // 1. 检测是否在房间内,在则退出 const inRoom = await findText("房间", 1500, 0, 420, 500, 5, 100); if (inRoom) { - keyPress("VK_P"); - await waitUntilTextAppear( - "确认", - async () => { - await findImgAndClick(exit_room, 960, 0, 960, 540, 500); - }, - 960, - 600, - 960, - 400, - 100 - ); - await findTextAndClick("确认", 960, 600, 960, 400); - await genshin.returnMainUi(); + await exitRoom(); keyPress("VK_B"); } else { keyPress("VK_F6"); @@ -297,8 +289,9 @@ async function createRoom() { await findText("开始游戏", 960, 540, 960, 540); click(770, 275); // 校验点击状态 + await sleep(duration); let is_ready = await findImg(room_ready, 600, 170, 350, 230); - while (!is_ready.isExist()) { + while (!is_ready) { await sleep(duration); click(770, 275); is_ready = await findImg(room_ready, 600, 170, 350, 230); diff --git a/repo/js/WeeklyThousandStarRealm/manifest.json b/repo/js/WeeklyThousandStarRealm/manifest.json index b274368e8..efd571759 100644 --- a/repo/js/WeeklyThousandStarRealm/manifest.json +++ b/repo/js/WeeklyThousandStarRealm/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "千星奇域每周成就经验刷取", - "version": "3.3", + "version": "3.4", "bgi_version": "0.57.0", "description": "无需自己找图,可用于利用成就高经验值刷取经验,默认配置每周刷满需要22分钟,秒刷图仅需9分钟", "authors": [