From 3677e62b2a4e11b693f77171ecce45f168300859 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, 30 Dec 2025 20:41:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=97=B6=E9=97=B4=E4=BD=BF?= =?UTF-8?q?=E7=94=A8bgi=E6=8E=A5=E5=8F=A3=20(#2596)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repo/js/DeerGameMeat/main.js | 80 +----------------------------- repo/js/DeerGameMeat/manifest.json | 4 +- 2 files changed, 3 insertions(+), 81 deletions(-) diff --git a/repo/js/DeerGameMeat/main.js b/repo/js/DeerGameMeat/main.js index 349c48b42..84261d7b6 100644 --- a/repo/js/DeerGameMeat/main.js +++ b/repo/js/DeerGameMeat/main.js @@ -196,91 +196,13 @@ } } - // 设置游戏时间 - async function setTime(hour, minute) { - setGameMetrics(1920, 1080, 2); // 设置游戏窗口大小和DPI - try { - //拖动鼠标 - async function moveMouseSmoothly(x1, y1, x2, y2) { - const deltaX = x2 - x1; - const deltaY = y2 - y1; - const steps = Math.max(Math.abs(deltaX), Math.abs(deltaY)); - const stepX = deltaX / steps; - const stepY = deltaY / steps; - await moveMouseTo(x1, y1); - await leftButtonDown(); - for (let i = 1; i <= steps; i++) { - const newX = x1 + stepX * i; - const newY = y1 + stepY * i; - const validX = Math.round(newX); - const validY = Math.round(newY); - await moveMouseTo(validX, validY); - await sleep(10); - } - await leftButtonUp(); - } - //设定时间 - async function settime(time) { - const centerX = 1441; - const centerY = 501; - const radius = 100; - let angle; - angle = (90 + time * 15) % 360; - angle = angle >= 0 ? angle : 360 + angle; - const angle1 = (angle + 90) % 360; - const angle2 = (angle + 180) % 360; - const angle3 = (angle + 270) % 360; - const radians = angle * (Math.PI / 180); - const radians1 = angle1 * (Math.PI / 180); - const radians2 = angle2 * (Math.PI / 180); - const radians3 = angle3 * (Math.PI / 180); - const x = centerX + radius * Math.cos(radians); - const y = centerY + radius * Math.sin(radians); - const x1 = centerX + radius * Math.cos(radians1); - const y1 = centerY + radius * Math.sin(radians1); - const x2 = centerX + radius * Math.cos(radians2); - const y2 = centerY + radius * Math.sin(radians2); - const x3 = centerX + radius * Math.cos(radians3); - const y3 = centerY + radius * Math.sin(radians3); - - // 输出最终的坐标 - await sleep(2000); - await moveMouseSmoothly(centerX,centerY, x1,y1); - await sleep(2000); - await moveMouseSmoothly(centerX,centerY, x2,y2); - await sleep(2000); - await moveMouseSmoothly(centerX,centerY, x3,y3); - await sleep(2000); - await moveMouseSmoothly(centerX,centerY, x,y); - } - //设置时间 - log.info('设置时间到6点'); - await sleep(1000) - await keyPress("Escape"); - await sleep(1000); - await click(50,700); - await sleep(2000); - await settime(6) - await sleep(3000); - await click(1500,1000);//确认 - await sleep(20000); - await keyPress("Escape"); - await sleep(2000); - await keyPress("Escape"); - await sleep(2000); - } finally { - // 恢复为脚本既定基准 - setGameMetrics(1920, 1080, 1); - } - } - // 循环检测并调整潮湿状态 async function handleDampStatus() { let attempts = 0; while (attempts < maxWaitAttempts) { if (await checkDampStatus()) { log.info(`检测到潮湿状态,第${attempts + 1}次调整时间`); - await setTime(6, 0); + await genshin.setTime(6, 0); await sleep(3000); // 等待调时间生效 } else { log.info("潮湿状态已解除"); diff --git a/repo/js/DeerGameMeat/manifest.json b/repo/js/DeerGameMeat/manifest.json index 875c64f7c..e6c9f3705 100644 --- a/repo/js/DeerGameMeat/manifest.json +++ b/repo/js/DeerGameMeat/manifest.json @@ -1,8 +1,8 @@ { "manifest_version": 1, "name": "菈乌玛兽肉", - "version": "1.2", - "bgi_version": "0.52.0", + "version": "1.3", + "bgi_version": "0.54.0", "description": "菈乌玛兽肉路线脚本,支持潮湿状态检测和自动调时间功能", "authors": [ {