diff --git a/repo/js/1000StarsLoop/assets/RecognitionObject/全部奇域.png b/repo/js/1000StarsLoop/assets/RecognitionObject/全部奇域.png deleted file mode 100644 index af9087ae1..000000000 Binary files a/repo/js/1000StarsLoop/assets/RecognitionObject/全部奇域.png and /dev/null differ diff --git a/repo/js/1000StarsLoop/assets/RecognitionObject/前往大厅.png b/repo/js/1000StarsLoop/assets/RecognitionObject/前往大厅.png deleted file mode 100644 index 749b4ad26..000000000 Binary files a/repo/js/1000StarsLoop/assets/RecognitionObject/前往大厅.png and /dev/null differ diff --git a/repo/js/1000StarsLoop/assets/RecognitionObject/开始游戏.png b/repo/js/1000StarsLoop/assets/RecognitionObject/开始游戏.png deleted file mode 100644 index e5f49e31d..000000000 Binary files a/repo/js/1000StarsLoop/assets/RecognitionObject/开始游戏.png and /dev/null differ diff --git a/repo/js/1000StarsLoop/assets/RecognitionObject/搜索.png b/repo/js/1000StarsLoop/assets/RecognitionObject/搜索.png deleted file mode 100644 index d5eba87b2..000000000 Binary files a/repo/js/1000StarsLoop/assets/RecognitionObject/搜索.png and /dev/null differ diff --git a/repo/js/1000StarsLoop/assets/RecognitionObject/搜索奇域.png b/repo/js/1000StarsLoop/assets/RecognitionObject/搜索奇域.png deleted file mode 100644 index 2c1c2faf9..000000000 Binary files a/repo/js/1000StarsLoop/assets/RecognitionObject/搜索奇域.png and /dev/null differ diff --git a/repo/js/1000StarsLoop/assets/RecognitionObject/确认返回.png b/repo/js/1000StarsLoop/assets/RecognitionObject/确认返回.png deleted file mode 100644 index 83dd32b7b..000000000 Binary files a/repo/js/1000StarsLoop/assets/RecognitionObject/确认返回.png and /dev/null differ diff --git a/repo/js/1000StarsLoop/assets/RecognitionObject/返回大厅.png b/repo/js/1000StarsLoop/assets/RecognitionObject/返回大厅.png deleted file mode 100644 index debef5c18..000000000 Binary files a/repo/js/1000StarsLoop/assets/RecognitionObject/返回大厅.png and /dev/null differ diff --git a/repo/js/1000StarsLoop/assets/RecognitionObject/返回提瓦特.png b/repo/js/1000StarsLoop/assets/RecognitionObject/返回提瓦特.png deleted file mode 100644 index 0064ad208..000000000 Binary files a/repo/js/1000StarsLoop/assets/RecognitionObject/返回提瓦特.png and /dev/null differ diff --git a/repo/js/1000StarsLoop/assets/RecognitionObject/进入.png b/repo/js/1000StarsLoop/assets/RecognitionObject/进入.png deleted file mode 100644 index 676bb8683..000000000 Binary files a/repo/js/1000StarsLoop/assets/RecognitionObject/进入.png and /dev/null differ diff --git a/repo/js/1000StarsLoop/main.js b/repo/js/1000StarsLoop/main.js deleted file mode 100644 index 9a24b3158..000000000 --- a/repo/js/1000StarsLoop/main.js +++ /dev/null @@ -1,86 +0,0 @@ -// 主逻辑 -let content = settings.content || "7108700065"; -let maxAttempts = (+settings.maxAttempts) || 15; -let delay = (+settings.delay) || 250; -let attempts = 0; -let entered = false; -(async function () { - - //循环指定次数 - while (attempts < maxAttempts) { - await genshin.returnMainUi(); - attempts++; - log.info(`开始第${attempts}次循环`); - await sleep(2000); - keyPress("F6"); - await sleep(250); - if (!await ClickPNG("全部奇域")) { - await sleep(250); - await genshin.returnMainUi(); - keyPress("F6"); - if (!await ClickPNG("全部奇域")) { - continue; - } - } - await sleep(250); - if (!await ClickPNG("搜索奇域")) continue; - await sleep(250); - log.info(`搜索${content}`); - await sleep(1000); - inputText(content); - await sleep(500); - if (!await ClickPNG("搜索")) continue; - await sleep(250); - const result = await ClickPNG("进入"); - await sleep(250); - //log.info(`结果是${result}`); - if (!result) { - log.warn("未找到标识,尝试点击固定位置"); - click(400, 300); - } - await sleep(250); - if (!entered) { - entered = await ClickPNG("前往大厅"); - if (!await ClickPNG("开始游戏", 600)) { - continue; - } else { - entered = true; - } - } else { - await sleep(250); - await ClickPNG("开始游戏") - } - await sleep(250); - if (!await ClickPNG("返回大厅", 600)) continue; - await sleep(250); - } - if (settings.returnGenshin) { - log.info("勾选了返回提瓦特,开始返回"); - await genshin.returnMainUi(); - await sleep(1000); - keyPress("F2"); - await ClickPNG("返回提瓦特"); - await ClickPNG("确认返回"); - } -})(); - -async function ClickPNG(png, maxAttempts = 40) { - log.info(`尝试找到并点击${png},等待至多${maxAttempts * 50}毫秒`); - moveMouseTo(1920, 1080); - const pngRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync(`assets/RecognitionObject/${png}.png`)); - pngRo.Threshold = 0.95; - pngRo.InitTemplate(); - return await findAndClick(pngRo, maxAttempts); -} - -async function findAndClick(target, maxAttempts = 5) { - for (let i = 0; i < maxAttempts; i++) { - const rg = captureGameRegion(); - try { - const res = rg.find(target); - if (res.isExist()) { await sleep(delay); res.click(); return true; } - } finally { rg.dispose(); } - if (i < maxAttempts - 1) await sleep(50); - } - return false; -} \ No newline at end of file diff --git a/repo/js/1000StarsLoop/manifest.json b/repo/js/1000StarsLoop/manifest.json deleted file mode 100644 index 8265ca948..000000000 --- a/repo/js/1000StarsLoop/manifest.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "manifest_version": 1, - "name": "千星奇域循环", - "version": "1.0", - "description": "重复进入指定千星奇域关卡并循环一定次数", - "authors": [ - { - "name": "mno" - } - ], - "tags": [ - "千星奇域" - ], - "settings_ui": "settings.json", - "main": "main.js" -} diff --git a/repo/js/1000StarsLoop/settings.json b/repo/js/1000StarsLoop/settings.json deleted file mode 100644 index f4ba44322..000000000 --- a/repo/js/1000StarsLoop/settings.json +++ /dev/null @@ -1,25 +0,0 @@ -[ - { - "name": "content", - "type": "input-text", - "label": "输入搜索内容(名称或GUID)" - }, - { - "name": "maxAttempts", - "type": "input-text", - "label": "循环次数", - "default": 15 - }, - { - "name": "returnGenshin", - "type": "checkbox", - "label": "结束后是否返回提瓦特", - "default": true - }, - { - "name": "delay", - "type": "input-text", - "label": "按键延迟(毫秒),观察到卡住时适当调大", - "default": 250 - } -] \ No newline at end of file diff --git a/repo/js/MiliastraExperienceAutomation/main.js b/repo/js/MiliastraExperienceAutomation/main.js index d4ccba899..a8fac2156 100644 --- a/repo/js/MiliastraExperienceAutomation/main.js +++ b/repo/js/MiliastraExperienceAutomation/main.js @@ -275,6 +275,7 @@ var enterRoom = async (room) => { await createRoom(room); }; var startGame = async () => { + let outputCount = 0; await assertRegionAppearing( () => findBottomButton("大厅", true), "等待游戏结束超时", @@ -287,7 +288,10 @@ var startGame = async () => { await assertRegionDisappearing(prepare, "等待加入准备区提示消失超时"); click(770, 275); } else { - log.info("等待本次关卡结束..."); + if (outputCount % 7 === 0 ) { + log.info("等待本次关卡结束..."); + } + outputCount++; } }, { maxAttempts: 120 } @@ -301,7 +305,7 @@ var startGame = async () => { setGameMetrics(1920, 1080, 1.5); await genshin.returnMainUi(); const goToTeyvat = settings.goToTeyvat ?? true; - const room = settings.room || "7015200164"; + const room = settings.room || "7070702264"; const force = settings.force ?? false; const thisAttempts = Math.max(0, Number(settings.thisAttempts || "0")); const expWeeklyLimit = Math.max(1, Number(settings.expWeeklyLimit || "5000")); diff --git a/repo/js/MiliastraExperienceAutomation/manifest.json b/repo/js/MiliastraExperienceAutomation/manifest.json index eab60d90c..7c4c63642 100644 --- a/repo/js/MiliastraExperienceAutomation/manifest.json +++ b/repo/js/MiliastraExperienceAutomation/manifest.json @@ -1,13 +1,17 @@ { "manifest_version": 1, "name": "千星奇域每周刷取经验值", - "version": "0.1.2", - "bgi_version": "0.48.0", + "version": "0.1.3", + "bgi_version": "0.52.0", "description": "千星奇域每周刷取经验值", "authors": [ { "name": "breadgrocery", "link": "https://github.com/breadgrocery" + }, + { + "name": "躁动的氨气", + "link": "https://github.com/zaodonganqi" } ], "main": "main.js", diff --git a/repo/js/MiliastraExperienceAutomation/settings.json b/repo/js/MiliastraExperienceAutomation/settings.json index 96b00ca70..cc3f32649 100644 --- a/repo/js/MiliastraExperienceAutomation/settings.json +++ b/repo/js/MiliastraExperienceAutomation/settings.json @@ -9,7 +9,7 @@ "type": "input-text", "name": "room", "label": "奇域关卡关键词或关卡GUID", - "default": "7015200164" + "default": "7070702264" }, { "type": "checkbox",