mirror of
https://github.com/babalae/bettergi-scripts-list.git
synced 2026-04-14 20:54:13 +08:00
chore: 适配「月之六」UI变动 (#3087)
This commit is contained in:
@@ -327,6 +327,13 @@ const deepMerge = (...objects) => {
|
||||
}, result);
|
||||
}, {});
|
||||
};
|
||||
/**
|
||||
* 同步休眠执行指定时长
|
||||
* @param duration - 休眠时长(毫秒)
|
||||
*/
|
||||
const sleepSync = (duration) => {
|
||||
duration > 0 && Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, duration);
|
||||
};
|
||||
|
||||
//#endregion
|
||||
//#region node_modules/@bettergi/utils/dist/time.js
|
||||
@@ -533,6 +540,7 @@ export {
|
||||
getNextDay4AM,
|
||||
getNextMonday4AM,
|
||||
isHostException,
|
||||
sleepSync,
|
||||
useStoreWithDefaults,
|
||||
waitForAction,
|
||||
};
|
||||
|
||||
@@ -91,7 +91,7 @@ const findSearchWonderlandThrottleMsg = () => {
|
||||
//! 房间:查找第一个奇域搜索结果名称
|
||||
const findFirstSearchResultText = () => {
|
||||
const ir = captureGameRegion();
|
||||
const ro = RecognitionObject.ocr(240, 390, 300, 50);
|
||||
const ro = RecognitionObject.ocr(240, 475, 300, 50);
|
||||
return (() => {
|
||||
const list = ir.findMulti(ro);
|
||||
for (let i = 0; i < list.count; i++) if (list[i] && list[i].isExist()) return list[i].text;
|
||||
@@ -99,7 +99,7 @@ const findFirstSearchResultText = () => {
|
||||
};
|
||||
//! 房间:点击选择第一个搜索结果位置
|
||||
const clickToChooseFirstSearchResult = () => {
|
||||
click(330, 365);
|
||||
click(265, 390);
|
||||
};
|
||||
//! 房间:查找进入房间快捷键按钮
|
||||
const findEnterRoomShortcut = () => {
|
||||
@@ -119,7 +119,7 @@ const findGoToLobbyBtn = () => {
|
||||
};
|
||||
//! 房间:查找创建房间按钮
|
||||
const findCreateRoomBtn = () => {
|
||||
return findTextWithinBounds("房间", 960, 140, 960, 70, { contains: true });
|
||||
return findTextWithinBounds("房间", 960, 95, 960, 70, { contains: true });
|
||||
};
|
||||
//! 房间:点击加入准备区位置
|
||||
const clickToPrepare = () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { __name } from "../rolldown-runtime.js";
|
||||
import { assertRegionAppearing, waitForAction } from "../@bettergi+utils.js";
|
||||
import { assertRegionAppearing, sleepSync, waitForAction } from "../@bettergi+utils.js";
|
||||
import {
|
||||
clickToChooseFirstSearchResult,
|
||||
findAllWonderlandsBtn,
|
||||
@@ -73,6 +73,7 @@ const createRoom = async (room) => {
|
||||
//! 检测搜索过于频繁提示
|
||||
if (findSearchWonderlandThrottleMsg()) return true;
|
||||
//! 检测搜索结果是否变化
|
||||
sleepSync(1e3);
|
||||
return fswnt.toLocaleLowerCase().trim() !== iwnt.toLocaleLowerCase().trim();
|
||||
},
|
||||
async () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"manifest_version": 1,
|
||||
"name": "千星奇域·每周经验刷取(回放通关版)",
|
||||
"version": "0.1.14",
|
||||
"version": "0.1.15",
|
||||
"bgi_version": "0.54.0",
|
||||
"description": "千星奇域·每周经验刷取(回放通关版)",
|
||||
"authors": [
|
||||
|
||||
Reference in New Issue
Block a user