修复龙蛋在最后一页,就跳出循环 (#2343)

* Update README.md

* Update print statement from 'Hello' to 'Goodbye'

* 更新 manifest.json
This commit is contained in:
古又
2025-11-12 17:10:49 +08:00
committed by GitHub
parent e9e4ccd1aa
commit 9b842ce0ab
3 changed files with 15 additions and 4 deletions

View File

@@ -31,6 +31,9 @@
## 更新
### 版本:2.0.2
1.修改龙蛋滑动小段,直接跳出问题
### 版本:2.0.1
1.精修识别对话区域
@@ -84,3 +87,4 @@
3.更新御神签的识别以及修复挂签bug
4.输出福利餐得到的食物,以及幸运签的内容到本地,后续还会加入其他东西

View File

@@ -425,12 +425,12 @@ async function chcekDragonEggs() {
if (DragonEgg.success) {
let ocrEggNum = await performOcr("",
{ min: DragonEgg.coordinates[0]-46, max: DragonEgg.coordinates[0]+34 }, { min: DragonEgg.coordinates[1]+56, max: DragonEgg.coordinates[1]+83 }, true);
log.info(`第一次识别到的数字:${ocrEggNum.text}`);
// log.info(`第一次识别到的数字:${ocrEggNum.text}`);
if (ocrEggNum.text == "") {
await sleep(500);
ocrEggNum = await performOcr("",
{ min: DragonEgg.coordinates[0]-46, max: DragonEgg.coordinates[0]+34 }, { min: DragonEgg.coordinates[1]+56, max: DragonEgg.coordinates[1]+83 }, true);
log.info(`第二次识别到的数字:${ocrEggNum.text}`);
// log.info(`第二次识别到的数字:${ocrEggNum.text}`);
};
DragonEggs[index] = Number(ocrEggNum.text);
}else{
@@ -477,6 +477,12 @@ async function chcekDragonEggs() {
await scrollPage(300, 10, 5);
await sleep(1000);
judgeEgg = 1;
// 判断是否为最后一页
let sliderBottom = await findImgIcon("assets/RecognitionObject/SliderBottom.png", { min: 1284, max: 1293 }, { min: 916, max: 942 }, false);
if (sliderBottom.success) {
log.info("孤零零的龙蛋在最后一页!");
continue;
};
};
// 判断是否到底
@@ -1204,4 +1210,5 @@ async function checkExpire() {
await fakeLog("AutoPickLitter脚本", true, false, 2333);
})();
})();

View File

@@ -1,7 +1,7 @@
{
"manifest_version": 1,
"name": "提瓦特杂事(收集)",
"version": "2.0.1",
"version": "2.0.2",
"tags": [
"玄学",
"收集",