diff --git a/repo/js/烹饪熟练度一键拉满/main.js b/repo/js/烹饪熟练度一键拉满/main.js index 21793421..f0870a29 100644 --- a/repo/js/烹饪熟练度一键拉满/main.js +++ b/repo/js/烹饪熟练度一键拉满/main.js @@ -3,10 +3,11 @@ -//OCR得到烹制时间 +//模板匹配得到烹制时间 async function getPerfectCookingWaitTime() { -let extraTime = settings.extraTime || 0; // 如果转换失败,默认 0 +let extraTime = settings.extraTime || 0; // +let threshold0 = Number(settings.threshold0) || 0.9; extraTime = extraTime+300; const checkPoints = [ {x: 741, y: 772}, // 原始点1 @@ -54,11 +55,11 @@ extraTime = extraTime+300; const templateRo0 = RecognitionObject.templateMatch(templateMat0); const templateRo1 = RecognitionObject.templateMatch(templateMat1); const templateRo2 = RecognitionObject.templateMatch(templateMat2); - templateRo0.threshold = 0.9; + templateRo0.threshold = threshold0; templateRo0.Use3Channels = true; - templateRo1.threshold = 0.9; + templateRo1.threshold = threshold0; templateRo1.Use3Channels = true; - templateRo2.threshold = 0.9; + templateRo2.threshold = threshold0; templateRo2.Use3Channels = true; // 捕获游戏区域 const gameRegion = captureGameRegion(); @@ -110,6 +111,8 @@ throw new Error("人家才不是错误呢>_<"); //主要流程 + + await sleep(1000); await pathingScript.runFile("assets/前往蒙德灶台.json"); keyPress("F"); @@ -141,6 +144,8 @@ log.info(`第${sum+1}次烹饪`); await sleep(1000); click(975, 900);//确认 await sleep(500); +click(215, 1015);//重新排序 +await sleep(500); click(1700, 1020);//制作 await sleep(500); click(1700, 1020);//制作 diff --git a/repo/js/烹饪熟练度一键拉满/manifest.json b/repo/js/烹饪熟练度一键拉满/manifest.json index e64d3cb8..32ea0693 100644 --- a/repo/js/烹饪熟练度一键拉满/manifest.json +++ b/repo/js/烹饪熟练度一键拉满/manifest.json @@ -1,8 +1,8 @@ { "manifest_version": 1, "name": "烹饪熟练度一键拉满", - "version": "1.0", - "description": "每个电脑都会有一定的误差,如果总是差一点,请自行在js设置中加减合适的时间,此外感谢万民堂对本脚本的大力支持。下面是一段广告:亲朋聚宴哪家强?吃虎岩找万民堂!璃月厨王掌厨房,菜品质量有保障!服务热情更在行,欢声笑语聚满堂!", + "version": "1.1", + "description": "如果总是差一点,请自行在js设置中加减合适的时间,烹饪不可用的时候,请选择合适的置信度。此外感谢万民堂对本脚本的大力支持。下面是一段广告:亲朋聚宴哪家强?吃虎岩找万民堂!璃月厨王掌厨房,菜品质量有保障!服务热情更在行,欢声笑语聚满堂!", "authors": [ { "name": "柒叶子", diff --git a/repo/js/烹饪熟练度一键拉满/settings.json b/repo/js/烹饪熟练度一键拉满/settings.json index 98387421..be189e25 100644 --- a/repo/js/烹饪熟练度一键拉满/settings.json +++ b/repo/js/烹饪熟练度一键拉满/settings.json @@ -5,6 +5,16 @@ "name": "extraTime", "type": "input-text", "label": "额外的烹饪时间(ms)" - } + }, -] \ No newline at end of file + + { + "name": "threshold0", + "type": "select", + "label": "不能正常烹饪的时候,请选择合适的置信度", + "options": [ + "0.85", + "0.8" + ] + } +]