From cbbf4dca19d8f6e911a85d2e9e4e3ac96c52a0e0 Mon Sep 17 00:00:00 2001 From: Jamis Date: Thu, 7 Aug 2025 11:01:25 +0800 Subject: [PATCH] Add support for Bounama's grocery in Natlan (#1496) --- .../assets/Pathing/纳塔杂货铺布纳马.json | 57 +++++++++++++++++++ repo/js/OCR购买食材/main.js | 26 ++++++--- repo/js/OCR购买食材/manifest.json | 6 +- 3 files changed, 77 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..22299c03 --- /dev/null +++ b/repo/js/OCR购买食材/assets/Pathing/纳塔杂货铺布纳马.json @@ -0,0 +1,57 @@ +{ + "info": { + "name": "纳塔杂货铺布纳马", + "type": "collect", + "authors": [ + { + "name": "芝士贝果" + } + ], + "version": "1.0", + "description": "", + "map_name": "Teyvat", + "bgi_version": "0.47.3", + "tags": [], + "last_modified_time": 1754489424074, + "enable_monster_loot_split": false, + "map_match_method": "" + }, + "positions": [ + { + "id": 1, + "action": "", + "move_mode": "walk", + "type": "teleport", + "x": 9060.5419921875, + "y": -1847.5107421875, + "action_params": "" + }, + { + "id": 2, + "x": 9089.0361328125, + "y": -1852.42919921875, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 3, + "x": 9088.6552734375, + "y": -1856.89306640625, + "type": "target", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 4, + "x": 9089.8935546875, + "y": -1857.2724609375, + "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 c764d256..a6b467b4 100644 --- a/repo/js/OCR购买食材/main.js +++ b/repo/js/OCR购买食材/main.js @@ -37,24 +37,25 @@ const sumiCityFishPath = `assets/Pathing/须弥城鱼贩珀姆.json`; const sumiGroceryFilePath = `assets/Pathing/须弥杂货铺哈马维.json`; const omosPortFishPath = `assets/Pathing/须弥奥摩斯港鱼贩布特罗斯.json`; const azaleVillMerPath = `assets/Pathing/须弥阿如村商人阿扎莱.json`; +const natlanGroceryFilePath = `assets/Pathing/纳塔杂货铺布纳马.json`; const ingredientPaths = { "枫达": [fengdanGroceryFilePath, cafeLuzheFilePath], - "盐": [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], + "盐": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath, fengdanGroceryFilePath, natlanGroceryFilePath], + "洋葱": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath, fengdanGroceryFilePath, natlanGroceryFilePath], + "牛奶": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath, fengdanGroceryFilePath, natlanGroceryFilePath], + "番茄": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath, fengdanGroceryFilePath, natlanGroceryFilePath], + "卷心菜": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath, fengdanGroceryFilePath, natlanGroceryFilePath], + "土豆": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath, fengdanGroceryFilePath, natlanGroceryFilePath], + "小麦": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath, fengdanGroceryFilePath, natlanGroceryFilePath], + "胡椒": [mondstadtGroceryFilePath, liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath, fengdanGroceryFilePath, natlanGroceryFilePath], "稻米": [liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath],// "虾仁": [liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath, sumiCityFishPath, omosPortFishPath], "豆腐": [liyueGroceryFilePath, groceryFilePath, sumiGroceryFilePath], "杏仁": [liyueGroceryFilePath, fengdanGroceryFilePath], "鱼肉": [liyueWanminFilePath, charcoalFilePath, sumiCityFishPath, omosPortFishPath, azaleVillMerPath], "螃蟹": [liyueWanminFilePath, charcoalFilePath, sumiCityFishPath, omosPortFishPath], - "秃秃豆": [fengdanGroceryFilePath, azaleVillMerPath], + "秃秃豆": [fengdanGroceryFilePath, azaleVillMerPath, natlanGroceryFilePath], "咖啡豆": [sumiCitycafeFilePath, cafeLuzheFilePath], "香辛料": [azaleVillMerPath], "发酵果实汁": [fengdanGroceryFilePath] @@ -103,6 +104,7 @@ const npcNames = { [omosPortFishPath]: ["布特罗斯"], [azaleVillMerPath]: ["阿扎莱"], [sumiGroceryFilePath]: ["哈马维"], + [natlanGroceryFilePath]: ["布纳马"], }; // 筛选出用户选择的食材及其对应的路径文件和 NPC @@ -297,6 +299,12 @@ async function clickSelectedIngredients(selectedIngredients, filePath, npcNames) await click(1300, 660); await sleep(1000); await click(1300, 660); await sleep(1000); await click(1300, 660); await sleep(1000); + } else if (filePath === natlanGroceryFilePath) { + log.info("执行纳塔杂货商等的点击操作"); + await click(1300, 580); await sleep(1000); + await click(1300, 580); await sleep(1000); + await click(1300, 580); await sleep(1000); + await click(1300, 580); await sleep(1000); } else { log.info("执行其他路径文件的点击操作"); await click(1300, 580); await sleep(500); diff --git a/repo/js/OCR购买食材/manifest.json b/repo/js/OCR购买食材/manifest.json index 1c2a3dc8..dd83effb 100644 --- a/repo/js/OCR购买食材/manifest.json +++ b/repo/js/OCR购买食材/manifest.json @@ -1,8 +1,8 @@ { "manifest_version": 1, "name": "选择购买食材OCR", - "version": "1.30513", - "description": "至少需要0.44版本bgi,对NPC和材料进行文字、图像识别。\n一般食材杂货在蒙德、璃月、稻妻、枫丹杂货商购买。\n10鱼肉、10螃蟹在卯师傅、珀姆、布特罗斯、阿扎莱和志村勘兵卫购买。\n咖啡豆在须弥、枫丹咖啡馆购买。\n增加对话F图像识别,增加个别字识别容错;增加香辛料,在阿扎莱处购买。\nv1.30513修复循环套叠,优化F未识别后的尝试方案。", + "version": "1.30514", + "description": "至少需要0.48版本bgi,对NPC和材料进行文字、图像识别。\n一般食材杂货在蒙德、璃月、稻妻、枫丹杂货商购买。\n10鱼肉、10螃蟹在卯师傅、珀姆、布特罗斯、阿扎莱和志村勘兵卫购买。\n咖啡豆在须弥、枫丹咖啡馆购买。\n增加对话F图像识别,增加个别字识别容错;增加香辛料,在阿扎莱处购买。\nv1.30513修复循环套叠,优化F未识别后的尝试方案。", "authors": [ { "name": "吉吉喵", @@ -16,4 +16,4 @@ ], "settings_ui": "settings.json", "main": "main.js" -} \ No newline at end of file +}