From 7f00c7329bdaa20dbb160b438512a0404e712f19 Mon Sep 17 00:00:00 2001 From: Jamis Date: Sun, 27 Jul 2025 21:43:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=98=BF=E6=89=8E=E8=8E=B1?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E8=BF=9B=E5=85=A5=E8=B4=AD=E4=B9=B0=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=94=AF=E6=8C=81=E9=A1=BB?= =?UTF-8?q?=E5=BC=A5=E6=9D=82=E8=B4=A7=E9=93=BA=E5=93=88=E9=A9=AC=E7=BB=B4?= =?UTF-8?q?=20(#1425)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/Pathing/须弥杂货铺哈马维.json | 60 +++++++++++++++++++ repo/js/OCR购买食材/main.js | 32 ++++++---- 2 files changed, 80 insertions(+), 12 deletions(-) create mode 100644 repo/js/OCR购买食材/assets/Pathing/须弥杂货铺哈马维.json diff --git a/repo/js/OCR购买食材/assets/Pathing/须弥杂货铺哈马维.json b/repo/js/OCR购买食材/assets/Pathing/须弥杂货铺哈马维.json new file mode 100644 index 00000000..2ce25aa8 --- /dev/null +++ b/repo/js/OCR购买食材/assets/Pathing/须弥杂货铺哈马维.json @@ -0,0 +1,60 @@ +{ + "info": { + "name": "须弥杂货铺哈马维", + "type": "collect", + "author": "芝士贝果", + "version": "1.0", + "description": "", + "map_name": "Teyvat", + "bgi_version": "0.45.0", + "tags": [], + "last_modified_time": 1753610573272 + }, + "positions": [ + { + "id": 1, + "action": "", + "move_mode": "walk", + "type": "teleport", + "x": 2787.0009765625, + "y": -503.10791015625, + "action_params": "" + }, + { + "id": 2, + "x": 2786.90234375, + "y": -486.3369140625, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 3, + "x": 2769.814453125, + "y": -476.9345703125, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 4, + "x": 2765.4072265625, + "y": -446.25, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 5, + "x": 2778.7431640625, + "y": -430.505859375, + "type": "target", + "move_mode": "walk", + "action": "", + "action_params": "" + } + ] +} \ No newline at end of file diff --git a/repo/js/OCR购买食材/main.js b/repo/js/OCR购买食材/main.js index 99e6674a..c764d256 100644 --- a/repo/js/OCR购买食材/main.js +++ b/repo/js/OCR购买食材/main.js @@ -34,22 +34,23 @@ const fengdanGroceryFilePath = `assets/Pathing/枫丹达莫维百货店主布希 const cafeLuzheFilePath = `assets/Pathing/枫丹咖啡厅露泽店主阿鲁埃.json`; const sumiCitycafeFilePath = `assets/Pathing/须弥城咖啡馆代理店长恩忒卡.json`; const sumiCityFishPath = `assets/Pathing/须弥城鱼贩珀姆.json`; +const sumiGroceryFilePath = `assets/Pathing/须弥杂货铺哈马维.json`; const omosPortFishPath = `assets/Pathing/须弥奥摩斯港鱼贩布特罗斯.json`; const azaleVillMerPath = `assets/Pathing/须弥阿如村商人阿扎莱.json`; const ingredientPaths = { "枫达": [fengdanGroceryFilePath, cafeLuzheFilePath], - "盐": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, fengdanGroceryFilePath], - "洋葱": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, fengdanGroceryFilePath], - "牛奶": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, fengdanGroceryFilePath], - "番茄": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, fengdanGroceryFilePath], - "卷心菜": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, fengdanGroceryFilePath], - "土豆": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, fengdanGroceryFilePath], - "小麦": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, fengdanGroceryFilePath], - "胡椒": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, fengdanGroceryFilePath], - "稻米": [liyueGroceryFilePath, groceryFilePath],// - "虾仁": [liyueGroceryFilePath, groceryFilePath, sumiCityFishPath, omosPortFishPath], - "豆腐": [liyueGroceryFilePath, groceryFilePath], + "盐": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath, fengdanGroceryFilePath], + "洋葱": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath, fengdanGroceryFilePath], + "牛奶": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath, fengdanGroceryFilePath], + "番茄": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath, fengdanGroceryFilePath], + "卷心菜": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath, fengdanGroceryFilePath], + "土豆": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath, fengdanGroceryFilePath], + "小麦": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath, fengdanGroceryFilePath], + "胡椒": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath, fengdanGroceryFilePath], + "稻米": [liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath],// + "虾仁": [liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath, sumiCityFishPath, omosPortFishPath], + "豆腐": [liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath], "杏仁": [liyueGroceryFilePath, fengdanGroceryFilePath], "鱼肉": [liyueWanminFilePath, charcoalFilePath, sumiCityFishPath, omosPortFishPath, azaleVillMerPath], "螃蟹": [liyueWanminFilePath, charcoalFilePath, sumiCityFishPath, omosPortFishPath], @@ -100,7 +101,8 @@ const npcNames = { [sumiCityFishPath]: ["珀姆"], [sumiCitycafeFilePath]: ["恩忒卡"], [omosPortFishPath]: ["布特罗斯"], - [azaleVillMerPath]: ["阿扎莱"] + [azaleVillMerPath]: ["阿扎莱"], + [sumiGroceryFilePath]: ["哈马维"], }; // 筛选出用户选择的食材及其对应的路径文件和 NPC @@ -289,6 +291,12 @@ async function clickSelectedIngredients(selectedIngredients, filePath, npcNames) await click(1300, 650); await sleep(500); await click(1300, 650); await sleep(1000); await click(1320, 780); await sleep(1000); + } else if (filePath === azaleVillMerPath || filePath === sumiGroceryFilePath) { + log.info("执行须弥杂货商等的点击操作"); + await click(1300, 660); await sleep(1000); + await click(1300, 660); await sleep(1000); + await click(1300, 660); await sleep(1000); + await click(1300, 660); await sleep(1000); } else { log.info("执行其他路径文件的点击操作"); await click(1300, 580); await sleep(500);