diff --git a/repo/js/AutoPickLitter/README.md b/repo/js/AutoPickLitter/README.md index d5ccdf634..4405d2e33 100644 --- a/repo/js/AutoPickLitter/README.md +++ b/repo/js/AutoPickLitter/README.md @@ -31,6 +31,9 @@ ## 更新 +### 版本:2.0.1 +1.精修识别对话区域 + ### 版本:2.0 1.添加长对话方法 2.添加糖雕 @@ -79,4 +82,5 @@ 1.优化相关功能的点击时间 2.优化背包滑动(感谢吉吉喵!!) 3.更新御神签的识别,以及修复挂签bug -4.输出福利餐得到的食物,以及幸运签的内容到本地,后续还会加入其他东西 \ No newline at end of file + +4.输出福利餐得到的食物,以及幸运签的内容到本地,后续还会加入其他东西 diff --git a/repo/js/AutoPickLitter/main.js b/repo/js/AutoPickLitter/main.js index 3f9f32eea..6d0fb7589 100644 --- a/repo/js/AutoPickLitter/main.js +++ b/repo/js/AutoPickLitter/main.js @@ -1,6 +1,6 @@ // 初始化相关变量 let gameRegion; // 游戏截图区域 -const dialogZone = { x: { min: 900, max: 1700 }, y: { min: 420, max: 880 } }; // 对话识别区域 +const dialogZone = { x: { min: 900, max: 1700 }, y: { min: 450, max: 880 } }; // 对话识别区域 let record = {}; // record 记录内容 let recordsNum = 0; // 写入内容次数 let sticksTime = false; // 判定是否可以上香 @@ -915,6 +915,7 @@ async function checkExpire() { let figure = 0; if (settings.selectDragonEggModel == "随机模式") { figure = Math.floor((Math.random() + Date.now() % 1) * 6); + nowDragonEggs[figure]++; } else if (settings.selectDragonEggModel == "指定模式") { switch (settings.pickupDragonEgg) { case "闪闪礼蛋·山之血": @@ -939,6 +940,7 @@ async function checkExpire() { log.warn("嘘,快踢作者屁股,修bug!!!"); break; }; + nowDragonEggs[figure]++; }else { const now = new Date(); const weekNumber = now.getDay() @@ -949,7 +951,7 @@ async function checkExpire() { nowDragonEggs[figure]++; } else { // 周一到周六:第n个元素 +n(1-6) const index = weekNumber - 1; // 周一对应索引0,...,周六对应索引5 - nowDragonEggs[index] += weekNumber; + nowDragonEggs[index]++; }; } else { // 元素不同时:给低于平均数且最小的元素+1,直到趋于平均 @@ -994,18 +996,13 @@ async function checkExpire() { log.warn("嘘,快踢作者屁股,修bug!!!"); break; }; - - moveMouseTo(coordinates[figure - 1][0],coordinates[figure - 1][1]); - nowDragonEggs[figure]++; if (settings.notify) { notification.Send(`背包龙蛋数目: 【山之血:${nowDragonEggs[0]},太阳的轰鸣:${nowDragonEggs[1]},圣龙君临:${nowDragonEggs[2]},菲耶蒂娜:${nowDragonEggs[3]},献给小酒杯:${nowDragonEggs[4]},飞澜鲨鲨:${nowDragonEggs[5]}】`); }; // 更新记录 record.lastDragonEggsNum = `【山之血:${nowDragonEggs[0]},太阳的轰鸣:${nowDragonEggs[1]},圣龙君临:${nowDragonEggs[2]},菲耶蒂娜:${nowDragonEggs[3]},献给小酒杯:${nowDragonEggs[4]},飞澜鲨鲨:${nowDragonEggs[5]}】`; await recordForFile(false); - - moveMouseTo(coordinates[figure - 1][0],coordinates[figure - 1][1]); - + moveMouseTo(coordinates[figure][0],coordinates[figure][1]); await sleep(100); leftButtonClick(); await sleep(3000); diff --git a/repo/js/AutoPickLitter/manifest.json b/repo/js/AutoPickLitter/manifest.json index 1e731a882..f11f6524a 100644 --- a/repo/js/AutoPickLitter/manifest.json +++ b/repo/js/AutoPickLitter/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "提瓦特杂事(收集)", - "version": "2.0", + "version": "2.0.1", "tags": [ "玄学", "收集", @@ -19,4 +19,5 @@ ], "settings_ui": "settings.json", "main": "main.js" -} \ No newline at end of file + +}