mirror of
https://github.com/babalae/bettergi-scripts-list.git
synced 2026-03-15 03:23:22 +08:00
feat: 千星点击空白处继续优化 (#2800)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"manifest_version": 1,
|
||||
"name": "千星奇域每周成就经验刷取",
|
||||
"version": "2.5",
|
||||
"version": "2.6",
|
||||
"bgi_version": "0.54.0",
|
||||
"description": "无需自己找图,可用于利用成就高经验值刷取经验,默认配置每周刷满需要24分钟",
|
||||
"authors": [
|
||||
|
||||
Reference in New Issue
Block a user