feat: 千星点击空白处继续优化 (#2800)

This commit is contained in:
躁动的氨气
2026-01-27 20:07:25 +08:00
committed by GitHub
parent c092d568db
commit 7fa4c1ace9
2 changed files with 21 additions and 6 deletions

View File

@@ -129,6 +129,25 @@ async function findText(text, x, y, w, h, textAttempts = attempts) {
return null;
}
// 升级特殊界面点击
async function findAndClickWhiteSpaceNext() {
const captureRegion = captureGameRegion();
const ro = RecognitionObject.ocr(610, 950, 700, 60);
const results = captureRegion.findMulti(ro);
captureRegion.dispose();
for (let j = 0; j < results.count; j++) {
const region = results[j];
if (region.isExist()) {
const text = region.text.toLowerCase();
if (text.includes("点击") && text.includes("继续")) {
await sleep(duration);
click(610, 950);
}
}
}
}
// 查找图片
async function findImage(imgMat, x, y, w, h, imgAttempts = attempts) {
const searchImg = RecognitionObject.TemplateMatch(imgMat, x, y, w, h);
@@ -410,11 +429,7 @@ async function playMap() {
}
let outputCount = 0;
while (true) {
const whiteText = await findText("空白处", 610, 950, 700, 60, 1);
if (whiteText) {
await sleep(duration);
click(610, 950);
}
await findAndClickWhiteSpaceNext();
const result = await findText("返回大厅", 960, 540, 960, 540, 1);
if (result) {
await sleep(duration);

View File

@@ -1,7 +1,7 @@
{
"manifest_version": 1,
"name": "千星奇域每周成就经验刷取",
"version": "2.5",
"version": "2.6",
"bgi_version": "0.54.0",
"description": "无需自己找图可用于利用成就高经验值刷取经验默认配置每周刷满需要24分钟",
"authors": [