From 4d4e20b78688f294ac4c1f1b7cf638b8ee7d7fd8 Mon Sep 17 00:00:00 2001 From: this-Fish Date: Sat, 16 Aug 2025 09:42:41 +0800 Subject: [PATCH] =?UTF-8?q?JS=20:=20Auto=20Theft=20NPC=20&=20=E5=8E=9F?= =?UTF-8?q?=E9=A3=9F=20=E5=84=AA=E5=8C=96=E7=B4=8D=E5=A1=94=E5=95=86?= =?UTF-8?q?=E4=BA=BA=E4=BA=A4=E4=BA=92=20(#11)=20(#1599)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 優化納塔商人交互布纳马 --- repo/js/Auto Theft NPC & 原食/main.js | 13 +++++++++---- repo/js/Auto Theft NPC & 原食/manifest.json | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/repo/js/Auto Theft NPC & 原食/main.js b/repo/js/Auto Theft NPC & 原食/main.js index 1ed9fe61c..bdf815b55 100644 --- a/repo/js/Auto Theft NPC & 原食/main.js +++ b/repo/js/Auto Theft NPC & 原食/main.js @@ -411,10 +411,11 @@ async function spikChat(npcName) { count = 5 await sleep(1000); if (npcName == "布纳马") { + await sleep(1000); // 交互 for (let i = 0; i < 3; i++) { keyPress("VK_F"); - await sleep(1300); + await sleep(1500); } // 点击有什么卖的 @@ -422,17 +423,21 @@ async function spikChat(npcName) { let resList = captureRegion.findMulti(RecognitionObject.ocrThis); for (let i = 0; i < resList.count; i++) { if (resList[i].text.includes("有什么卖的")) { + await sleep(500); click(resList[i].x + 30, resList[i].y + 30); // 点击有什么卖的 + await sleep(500); + // 使用完后释放资源 captureRegion.dispose(); } } - await sleep(1300); + await sleep(1500); keyPress("VK_F"); - await sleep(1300); + await sleep(1500); + keyPress("VK_F"); + await sleep(1500); } else { - for (let i = 0; i < count; i++) { keyPress("VK_F"); await sleep(1300); diff --git a/repo/js/Auto Theft NPC & 原食/manifest.json b/repo/js/Auto Theft NPC & 原食/manifest.json index 40ff73332..59842bab5 100644 --- a/repo/js/Auto Theft NPC & 原食/manifest.json +++ b/repo/js/Auto Theft NPC & 原食/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "购买NPC食材-图像识别", - "version": "2.0.1", + "version": "2.0.2", "description": "原食脚本: 基于图像识别的购买NPC商品, 可选择性购买商品, 按地区顺序购买, 节省大量时间.", "authors": [ {