diff --git a/repo/js/周本10-仆人/assets/box.png b/repo/js/WeeklyBoss/assets/box.png similarity index 100% rename from repo/js/周本10-仆人/assets/box.png rename to repo/js/WeeklyBoss/assets/box.png diff --git a/repo/js/周本一条龙/assets/paimon_menu.png b/repo/js/WeeklyBoss/assets/paimon_menu.png similarity index 100% rename from repo/js/周本一条龙/assets/paimon_menu.png rename to repo/js/WeeklyBoss/assets/paimon_menu.png diff --git a/repo/js/周本一条龙/assets/team1.png b/repo/js/WeeklyBoss/assets/team1.png similarity index 100% rename from repo/js/周本一条龙/assets/team1.png rename to repo/js/WeeklyBoss/assets/team1.png diff --git a/repo/js/周本一条龙/assets/team2.png b/repo/js/WeeklyBoss/assets/team2.png similarity index 100% rename from repo/js/周本一条龙/assets/team2.png rename to repo/js/WeeklyBoss/assets/team2.png diff --git a/repo/js/周本1-王狼/assets/前往狼王.json b/repo/js/WeeklyBoss/assets/前往狼王.json similarity index 100% rename from repo/js/周本1-王狼/assets/前往狼王.json rename to repo/js/WeeklyBoss/assets/前往狼王.json diff --git a/repo/js/周本一条龙/main.js b/repo/js/WeeklyBoss/main.js similarity index 95% rename from repo/js/周本一条龙/main.js rename to repo/js/WeeklyBoss/main.js index 7cd014ab..8bd00f80 100644 --- a/repo/js/周本一条龙/main.js +++ b/repo/js/WeeklyBoss/main.js @@ -1,72 +1,72 @@ -eval(file.readTextSync("utils.js")); -(async function () { - -function validateChallengeTime(challengeTime) { - - - // 检查是否为正数 - if (challengeTime <= 0) { -throw new Error('challengeTime 必须是一个正数'); - } - - // 检查是否小于60 - if (challengeTime >= 60) { -throw new Error('challengeTime 必须小于60'); - } - - // 检查小数点位数是否不多于两位 - const decimalPart = challengeTime.toString().split('.')[1]; - if (decimalPart && decimalPart.length > 2) { -throw new Error('challengeTime 的小数点位数不能多于两位'); - } -} - - -validateChallengeTime(settings.challengeTime); - -if(!settings.unfairContractTerms) throw new Error('未签署霸王条款,无法使用'); - -//执行不同的周本 -switch (settings.monsterName) { - case "北风狼": - await utils.weeklyBoss1(); - break; - case "风魔龙": - await utils.weeklyBoss2(); - break; - case "公子": - await utils.weeklyBoss3(); - break; - case "若陀龙王": - await utils.weeklyBoss4(); - break; - case "女士": - await utils.weeklyBoss5(); - break; - case "雷神": - await utils.weeklyBoss6(); - break; - case "散兵": - await utils.weeklyBoss7(); - break; - case "阿佩普": - await utils.weeklyBoss8(); - break; - case "吞星之鲸": - await utils.weeklyBoss9(); - break; - case "仆人": - await utils.weeklyBoss10(); - break; - case "源焰之主": - await utils.weeklyBoss11(); - break; - case "门扉前的弈局": - await utils.weeklyBoss12(); - break; - default: - break; -} - - -})(); +eval(file.readTextSync("utils.js")); +(async function () { + +function validateChallengeTime(challengeTime) { + + + // 检查是否为正数 + if (challengeTime <= 0) { +throw new Error('challengeTime 必须是一个正数'); + } + + // 检查是否小于60 + if (challengeTime >= 60) { +throw new Error('challengeTime 必须小于60'); + } + + // 检查小数点位数是否不多于两位 + const decimalPart = challengeTime.toString().split('.')[1]; + if (decimalPart && decimalPart.length > 2) { +throw new Error('challengeTime 的小数点位数不能多于两位'); + } +} + + +validateChallengeTime(settings.challengeTime); + +if(!settings.unfairContractTerms) throw new Error('未签署霸王条款,无法使用'); + +//执行不同的周本 +switch (settings.monsterName) { + case "北风狼": + await utils.weeklyBoss1(); + break; + case "风魔龙": + await utils.weeklyBoss2(); + break; + case "公子": + await utils.weeklyBoss3(); + break; + case "若陀龙王": + await utils.weeklyBoss4(); + break; + case "女士": + await utils.weeklyBoss5(); + break; + case "雷神": + await utils.weeklyBoss6(); + break; + case "散兵": + await utils.weeklyBoss7(); + break; + case "阿佩普": + await utils.weeklyBoss8(); + break; + case "吞星之鲸": + await utils.weeklyBoss9(); + break; + case "仆人": + await utils.weeklyBoss10(); + break; + case "源焰之主": + await utils.weeklyBoss11(); + break; + case "门扉前的弈局": + await utils.weeklyBoss12(); + break; + default: + break; +} + + +})(); diff --git a/repo/js/周本一条龙/manifest.json b/repo/js/WeeklyBoss/manifest.json similarity index 100% rename from repo/js/周本一条龙/manifest.json rename to repo/js/WeeklyBoss/manifest.json diff --git a/repo/js/周本一条龙/settings.json b/repo/js/WeeklyBoss/settings.json similarity index 100% rename from repo/js/周本一条龙/settings.json rename to repo/js/WeeklyBoss/settings.json diff --git a/repo/js/周本一条龙/utils.js b/repo/js/WeeklyBoss/utils.js similarity index 100% rename from repo/js/周本一条龙/utils.js rename to repo/js/WeeklyBoss/utils.js diff --git a/repo/js/周本1-王狼/assets/领取奖励.json b/repo/js/周本1-王狼/assets/领取奖励.json deleted file mode 100644 index 581caceb..00000000 --- a/repo/js/周本1-王狼/assets/领取奖励.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "info": { - "name": "未命名路径", - "type": "collect", - "author": "柒叶子", - "version": "1.0", - "description": "领取狼王奖励", - "bgi_version": "0.35.1" - }, - "positions": [ - - { - "id": 1, - "x": -264.44921875, - "y": 1991.2685546875, - "type": "path", - "move_mode": "dash", - "action": "", - "action_params": "" - }, - { - "id": 2, - "x": -248.8486328125, - "y": 1984.78125, - "type": "target", - "move_mode": "dash", - "action": "", - "action_params": "" - } - ] -} \ No newline at end of file diff --git a/repo/js/周本1-王狼/main.js b/repo/js/周本1-王狼/main.js deleted file mode 100644 index 333a0ee1..00000000 --- a/repo/js/周本1-王狼/main.js +++ /dev/null @@ -1,50 +0,0 @@ -(async function () { - -//吃料理 -async function eatFood() { -let foodName = settings.foodName ?? 0; -if(foodName){ -const foodSum = foodName.split('-'); -log.info("开始吃菜"); -await sleep(1000); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -for(let i = 0; i < foodSum.length; i++){ -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(1000); -inputText(foodSum[i]); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -} -keyPress("ESCAPE"); -await sleep(1500); -}} - - - -await pathingScript.runFile("assets/前往狼王.json"); -await sleep(1000); -await eatFood();//嗑药 -keyPress("F"); -await sleep(13000); -await dispatcher.runTask(new SoloTask("AutoFight")); -await sleep(1000); -await pathingScript.runFile("assets/领取奖励.json"); -keyPress("F"); -await sleep(1000); -click(968, 759);//消耗树脂领取 -await sleep(5000); -click(975, 1000);//点击空白区域 -await sleep(1000); -})(); diff --git a/repo/js/周本1-王狼/manifest.json b/repo/js/周本1-王狼/manifest.json deleted file mode 100644 index 0352eaf4..00000000 --- a/repo/js/周本1-王狼/manifest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "manifest_version": 1, - "name": "王狼自动刷取", - "version": "2.2", - "description": "建议钟离、芙芙和优质后台(精通雷神、草神等),另外看情况更改自动战斗的超时时间", - "authors": [ - { - "name": "柒叶子", - "links": "https://github.com/5117600049" - } - ], - "settings_ui": "settings.json", - "main": "main.js" -} \ No newline at end of file diff --git a/repo/js/周本1-王狼/settings.json b/repo/js/周本1-王狼/settings.json deleted file mode 100644 index 44a05476..00000000 --- a/repo/js/周本1-王狼/settings.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "name": "foodName", - "type": "input-text", - "label": "请输入料理名称,多食物用法(攻击-药剂-防御)" - } - ] diff --git a/repo/js/周本1-王狼/周本队原地版q.txt b/repo/js/周本1-王狼/周本队原地版q.txt deleted file mode 100644 index 328ca16c..00000000 --- a/repo/js/周本1-王狼/周本队原地版q.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 wait(0.2),e(hold) -芙宁娜 e,q -雷神 e -芭芭拉 e,q,attack(4) - - - - - diff --git a/repo/js/周本1-王狼/周本队火神原地版.txt b/repo/js/周本1-王狼/周本队火神原地版.txt deleted file mode 100644 index 6579d72b..00000000 --- a/repo/js/周本1-王狼/周本队火神原地版.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 e(hold) -芙宁娜 q,e -玛薇卡 e -芭芭拉 e,attack(5.5) -钟离 e(hold) -芭芭拉 e,attack(10) - - - diff --git a/repo/js/周本10-仆人/assets/recover.json b/repo/js/周本10-仆人/assets/recover.json deleted file mode 100644 index a4e55f13..00000000 --- a/repo/js/周本10-仆人/assets/recover.json +++ /dev/null @@ -1 +0,0 @@ -{"info":{"name":"","type":""},"positions":[{"x":2297.6201171875,"y":-824.5869140625,"type":"teleport","move_mode":"walk"},{"x":2292.62109375,"y":-826.0419921875,"type":"path","move_mode":"walk"}]} \ No newline at end of file diff --git a/repo/js/周本10-仆人/assets/tp.json b/repo/js/周本10-仆人/assets/tp.json deleted file mode 100644 index 7d5f1178..00000000 --- a/repo/js/周本10-仆人/assets/tp.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "info": { - "name": "未命名路径", - "type": "collect", - "author": "柒叶子", - "version": "1.0", - "description": "前往周本", - "bgi_version": "0.35.1" - }, - "positions": [ - - { - "id": 1, - "x": 4935.07861328125, - "y": 4183.38818359375, - "type": "teleport", - "move_mode": "walk", - "action": "", - "action_params": "" - }, - ] -} \ No newline at end of file diff --git a/repo/js/周本10-仆人/assets/老版本.js b/repo/js/周本10-仆人/assets/老版本.js deleted file mode 100644 index 1c41c1c5..00000000 --- a/repo/js/周本10-仆人/assets/老版本.js +++ /dev/null @@ -1,75 +0,0 @@ -(async function () { -const food = 'yueliang'; - await sleep(1000); -await pathingScript.runFile("assets/recover.json"); -await sleep(5000); -await pathingScript.runFile("assets/tp.json"); -await sleep(1000); -keyDown("w"); -await sleep(2000); -keyUp("w"); -await sleep(1000); -keyPress("F"); -await sleep(2000); -click(1725, 1020);//单人挑战 -await sleep(2000); -click(1725, 1020);//开始挑战 -await sleep(15000); -keyPress("ESCAPE");//点击任意处 -await sleep(2000); -keyPress("1"); -await sleep(1000); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(1000); -for (const char of food) { - keyPress(char); - await sleep(500); -} -keyPress("SPACE"); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -keyPress("ESCAPE"); -await sleep(1500); -keyDown("w"); -await sleep(7600); -keyUp("w"); -await dispatcher.runTask(new SoloTask("AutoFight")); -await sleep(30000);//等待柱子碎裂 -keyPress("1"); -await sleep(1000);//切回钟离 - - -keyDown("w");//居中大法 -keyDown("d"); -await sleep(12500); -keyUp("d"); -await sleep(12500); -keyUp("w"); -keyDown("s"); -await sleep(25000); -keyUp("s"); -keyDown("w"); -await sleep(4300); -keyUp("w"); - -await sleep(1000); -keyPress("F");//领奖 -await sleep(1000); -click(950, 750);//使用树脂 -await sleep(6000); -click(975, 1000);//退出秘境 -await sleep(10000); -})(); diff --git a/repo/js/周本10-仆人/main.js b/repo/js/周本10-仆人/main.js deleted file mode 100644 index 60ebc42a..00000000 --- a/repo/js/周本10-仆人/main.js +++ /dev/null @@ -1,363 +0,0 @@ -(async function () {//仆人周本 - -//检测传送结束 await tpEndDetection(); -async function tpEndDetection() { - const region1 = RecognitionObject.ocr(1690, 230, 75, 350);// 队伍名称区域 - const region2 = RecognitionObject.ocr(872, 681, 180, 30);// 点击任意处关闭 - let tpTime = 0; - await sleep(1500);//点击传送后等待一段时间避免误判 - //最多30秒传送时间 - while (tpTime < 300) { - - let capture = captureGameRegion(); - let res1 = capture.find(region1); - let res2 = capture.find(region2); - if (!res1.isEmpty()|| !res2.isEmpty()){ - log.info("传送完成"); - await sleep(1000);//传送结束后有僵直 - click(960, 810);//点击任意处 - await sleep(500); - return; - } - tpTime++; - await sleep(100); - } - throw new Error('传送时间超时'); -} - -//吃料理 -async function eatFood() { -let foodName = settings.foodName ?? 0; -if(foodName){ -const foodSum = foodName.split('-'); -log.info("开始吃菜"); -await sleep(1000); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -for(let i = 0; i < foodSum.length; i++){ -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(1000); -inputText(foodSum[i]); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -} -keyPress("ESCAPE"); -await sleep(1500); -}} -//检测角色是否阵亡,并前往吃药复活 -async function resurgenceDetectionAndEatFood() { -const region1 = RecognitionObject.ocr(1170, 780, 75, 35);// 复活料理区域 -const region2 = RecognitionObject.ocr(545, 360, 800, 45);// 料理冷却区域 -let recoveryFoodName = settings.recoveryFoodName ?? 0; -let resurgenceFoodName = settings.resurgenceFoodName ?? 0; -if(resurgenceFoodName && recoveryFoodName){ -keyPress("1"); -await sleep(100); -keyPress("2"); -await sleep(100); -keyPress("3"); -await sleep(100); -keyPress("4"); -await sleep(200); -let capture = captureGameRegion(); -let res1 = capture.find(region1); -let res2 = capture.find(region2); - if (res1.isEmpty()){ - return; - } - else if (!res1.isEmpty() && !res2.isEmpty()) { - log.info("复活料理处于冷却中"); - keyPress("ESCAPE"); - await sleep(1000); - await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 - throw new Error('战斗失败'); - return; - } - else if (!res1.isEmpty() && res2.isEmpty()) { - log.info("检测到阵亡角色……复活吧!我的爱人!!!"); - keyPress("ESCAPE"); - await eatResurgenceFood();//满血复活 - return; - } -}} - -//吃料理复活 -async function eatResurgenceFood() { -let recoveryFoodName = settings.recoveryFoodName ?? 0; -let resurgenceFoodName = settings.resurgenceFoodName ?? 0; -const region = RecognitionObject.ocr(800, 200, 315, 32);// 复活对象检测 -const clickPositions = [ - { x: 760, y: 440 }, // 角色1 - { x: 900, y: 440 }, // 角色2 - { x: 1040, y: 440 }, // 角色3 - { x: 1180, y: 440 } // 角色4 -]; -if(resurgenceFoodName && recoveryFoodName){ -log.info("开始吃菜"); -await sleep(500); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(200); -click(110, 110); -await sleep(1000); -inputText(`${resurgenceFoodName}`); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -// 使用 for 循环点击每个位置 -for (let i = 0; i < clickPositions.length; i++) { - const position = clickPositions[i]; - click(position.x, position.y); - await sleep(800); - click(1200,770);//确认 - await sleep(800); - let capture = captureGameRegion(); - let res = capture.find(region); - if (res.isEmpty()){ - keyPress("ESCAPE"); - await sleep(1000); - click(170, 1020);//筛选 - await sleep(1000); - click(195, 1020);//重置 - await sleep(1000); - click(110, 110);//输入名字 - await sleep(1000); - inputText(`${recoveryFoodName}`); - await sleep(500); - click(490, 1020);//确认筛选 - await sleep(1000); - click(180, 180);//选择第一个食物 - await sleep(1000); - click(1690, 1015);//使用 - await sleep(500); - click(position.x, position.y); - await sleep(500); - click(1200,770);//吃第一个 - await sleep(500); - click(1200,770);//吃第二个 - await sleep(500); - click(1350,290);//退出 - await sleep(500); - keyPress("ESCAPE"); - await sleep(400); - log.info("我又好了,嘿嘿"); - break; - } - await sleep(1000); - } - } -} - -//征讨之花领奖 -const autoNavigateToReward = async () => { - // 定义识别对象 - const boxIconRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/box.png")); - const rewardTextRo = RecognitionObject.Ocr(1210, 515, 200, 50);//领奖区域检测 - - let advanceNum = 0;//前进次数 - //调整为俯视视野 - middleButtonClick(); - await sleep(800); - moveMouseBy(0, 1030); - await sleep(400); - moveMouseBy(0, 920); - await sleep(400); - moveMouseBy(0, 710); - log.info("开始领奖"); - while (true) { - // 1. 优先检查是否已到达领奖点 - let captureRegion = captureGameRegion(); - let rewardTextArea = captureRegion.DeriveCrop(1210, 515, 200, 50); - let rewardResult = rewardTextArea.find(RecognitionObject.ocrThis); - // 检测到特点文字则结束!!! - if (rewardResult.text == "接触征讨之花") { - log.info("已到达领奖点,检测到文字: " + rewardResult.text); - return; - } - else if(advanceNum > 20){ - throw new Error('前进时间超时'); - } - // 2. 未到达领奖点,则调整视野 - for(let i = 0; i < 100; i++){ - captureRegion = captureGameRegion(); - let iconRes = captureRegion.Find(boxIconRo); - let climbTextArea = captureRegion.DeriveCrop(1808, 1030, 25, 25); - let climbResult = climbTextArea.find(RecognitionObject.ocrThis); - // 检查是否处于攀爬状态 - if (climbResult.isEmpty()){ - log.info("检侧进入攀爬状态,尝试脱离"); - keyPress("x"); - await sleep(1000); - keyDown("a"); - await sleep(800); - keyUp("a"); - keyDown("w"); - await sleep(800); - keyUp("w"); - } - if (iconRes.x >= 920 && iconRes.x <= 980 && iconRes.y <= 540) { - advanceNum++; - log.info(`视野已调正,前进第${advanceNum}次`); - break; - } else { - // 小幅度调整 - if(iconRes.y >= 520) moveMouseBy(0, 920); - let adjustAmount = iconRes.x < 920 ? -20 : 20; - let distanceToCenter = Math.abs(iconRes.x - 920); // 计算与920的距离 - let scaleFactor = Math.max(1, Math.floor(distanceToCenter / 50)); // 根据距离缩放,最小为1 - let adjustAmount2 = iconRes.y < 540 ? scaleFactor : 10; - moveMouseBy(adjustAmount * adjustAmount2, 0); - await sleep(100); - } - if(i > 97) throw new Error('视野调整超时'); - } - // 3. 前进一小步 - keyDown("w"); - await sleep(500); - keyUp("w"); - await sleep(200); // 等待角色移动稳定 - } -} - -//执行战斗并检测结束 -async function autoFightAndEndDetection() { - // 定义两个检测区域 - const region1 = RecognitionObject.ocr(750, 0, 420, 110);//区域一 BOSS名称 - const region2 = RecognitionObject.ocr(840, 935, 230, 40);//区域二 成功倒计时 - const region3 = RecognitionObject.ocr(1690, 230, 75, 350);//区域三 队伍名称 - let challengeTime = 0; - let challengeNum = 0; - //12分钟兜底 - while (challengeTime < 6000) { - // 捕获游戏区域 - let capture = captureGameRegion(); - // 检测两个区域的OCR结果 - let res1 = capture.find(region1); - let res2 = capture.find(region2); - let res3 = capture.find(region3); - let hasText1 = !res1.isEmpty() && res1.text.trim().length > 0; - let hasText2 = !res2.isEmpty() && res2.text.trim().length > 0; - let hasText3 = !res3.isEmpty() && res3.text.trim().length > 0; - // 情况1: 区域1有文字 且 区域2无文字 且 区域3有文字 → 执行AutoFight - if (hasText1 && !hasText2 && hasText3) { - await resurgenceDetectionAndEatFood(); - challengeNum++; - await sleep(800);//避免切人冷却,导致角色识别失败 - log.info(`执行第${challengeNum}次战斗`); - challengeTime = challengeTime + 205; - try { - await dispatcher.runTask(new SoloTask("AutoFight")); - } catch (error) { - log.info("启动战斗失败,尝试重新启动"); - await sleep(500); - } - } - // 情况2: 区域2有文字 且 区域1无文字 且 区域3有文字 → 结束循环 - else if (hasText2 && !hasText1 && hasText3) { - log.info("检测到挑战成功"); - break; - } - // 情况3: 区域2无文字区域1无文字区域3有文字 →BOSS二阶段,需要移动触发 - else if (!hasText2 && !hasText1 && hasText3) { - log.info("检测到BOSS进入二阶段"); - keyDown("w"); - await sleep(1000); - keyDown("VK_SHIFT"); - await sleep(200); - keyUp("VK_SHIFT"); - await sleep(200); - keyDown("VK_SHIFT"); - await sleep(200); - keyUp("VK_SHIFT"); - keyUp("w"); - try { - await dispatcher.runTask(new SoloTask("AutoFight")); - } catch (error) { - log.info("启动战斗失败,尝试重新启动"); - await sleep(500); - } - } - // 情况4: 三个区域均无文字,可能处于转场动画,尝试点击快进 - else if (!hasText1 && !hasText2 && !hasText3){ - log.info("进入过场动画尝试快进"); - await sleep(400); - click(1765, 55); - await sleep(400); - click(1765, 55); - await sleep(1000); - } - - challengeTime = challengeTime + 1; - // 每次检测间隔100毫秒,避免CPU占用过高 - await sleep(100); - } -} - - - -//通用:前往副本(副本外) -await sleep(1000); -await pathingScript.runFile("assets/recover.json"); -await sleep(5000); -await pathingScript.runFile("assets/tp.json"); -await sleep(1000); -keyDown("w"); -await sleep(2000); -keyUp("w"); -await sleep(1000); -keyPress("F"); -await sleep(2000); -click(1725, 1020);//单人挑战 -await sleep(300); -click(1180, 760);//队伍等级偏低、体力不够可能会出弹窗 -await sleep(2000); -click(1725, 1020);//开始挑战 -await tpEndDetection(); - -//副本内前往BOSS处 -await eatFood();//嗑药 -keyPress("1"); -await sleep(1000);//切回固定行走位 -keyDown("w"); -await sleep(9200); -keyUp("w"); -await autoFightAndEndDetection();//一直战斗直到检测到结束 - -//领奖并退出 -await autoNavigateToReward();//前往地脉之花 -await sleep(1000); -keyPress("F");//领奖 -await sleep(1000); -click(950, 750);//使用树脂 -await sleep(6000); -click(975, 1000);//退出秘境 -await tpEndDetection(); -await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 -await sleep(1000); -keyPress("M");//展示剩余体力 -await sleep(1000); -notification.send('挑战完成'); - -})(); diff --git a/repo/js/周本10-仆人/manifest.json b/repo/js/周本10-仆人/manifest.json deleted file mode 100644 index eaf1279d..00000000 --- a/repo/js/周本10-仆人/manifest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "manifest_version": 1, - "name": "仆人周本自动刷取", - "version": "2.2", - "description": "需0.44.6及以上版本,兼容所有正常队伍及战斗策略,但还是建议在JS设置中选择合适的防御料理(推荐骇浪派)。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本原地版q是14s,看情况可以多加一秒,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。演示视频https://www.bilibili.com/video/BV1cpGCz6EWN/?vd_source=9dfaf88af48ecc0ff95a41f1145af7a2。", - "authors": [ - { - "name": "柒叶子", - "links": "https://github.com/5117600049" - } - ], - "settings_ui": "settings.json", - "main": "main.js" -} \ No newline at end of file diff --git a/repo/js/周本10-仆人/settings.json b/repo/js/周本10-仆人/settings.json deleted file mode 100644 index da73a045..00000000 --- a/repo/js/周本10-仆人/settings.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "name": "foodName", - "type": "input-text", - "label": "请输入料理名称,多食物用法(攻击-药剂-防御)" - }, - { - "name": "resurgenceFoodName", - "type": "input-text", - "label": "请输入复活料理名称 " - }, - { - "name": "recoveryFoodName", - "type": "input-text", - "label": "请输入回血料理名称 " - } - ] diff --git a/repo/js/周本10-仆人/周本队原地版q.txt b/repo/js/周本10-仆人/周本队原地版q.txt deleted file mode 100644 index 328ca16c..00000000 --- a/repo/js/周本10-仆人/周本队原地版q.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 wait(0.2),e(hold) -芙宁娜 e,q -雷神 e -芭芭拉 e,q,attack(4) - - - - - diff --git a/repo/js/周本10-仆人/周本队火神原地版.txt b/repo/js/周本10-仆人/周本队火神原地版.txt deleted file mode 100644 index 6579d72b..00000000 --- a/repo/js/周本10-仆人/周本队火神原地版.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 e(hold) -芙宁娜 q,e -玛薇卡 e -芭芭拉 e,attack(5.5) -钟离 e(hold) -芭芭拉 e,attack(10) - - - diff --git a/repo/js/周本11-火龙/assets/box.png b/repo/js/周本11-火龙/assets/box.png deleted file mode 100644 index 521895c4..00000000 Binary files a/repo/js/周本11-火龙/assets/box.png and /dev/null differ diff --git a/repo/js/周本11-火龙/assets/recover.json b/repo/js/周本11-火龙/assets/recover.json deleted file mode 100644 index a4e55f13..00000000 --- a/repo/js/周本11-火龙/assets/recover.json +++ /dev/null @@ -1 +0,0 @@ -{"info":{"name":"","type":""},"positions":[{"x":2297.6201171875,"y":-824.5869140625,"type":"teleport","move_mode":"walk"},{"x":2292.62109375,"y":-826.0419921875,"type":"path","move_mode":"walk"}]} \ No newline at end of file diff --git a/repo/js/周本11-火龙/assets/tp.json b/repo/js/周本11-火龙/assets/tp.json deleted file mode 100644 index 8184d392..00000000 --- a/repo/js/周本11-火龙/assets/tp.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "info": { - "name": "未命名路径", - "type": "collect", - "author": "柒叶子", - "version": "1.0", - "description": "前往周本", - "bgi_version": "0.35.1" - }, - "positions": [ - - { - "id": 1, - "x": 9481.6123046875, - "y": -1931.45166015625, - "type": "teleport", - "move_mode": "walk", - "action": "", - "action_params": "" - }, - ] -} \ No newline at end of file diff --git a/repo/js/周本11-火龙/main.js b/repo/js/周本11-火龙/main.js deleted file mode 100644 index 4039a08f..00000000 --- a/repo/js/周本11-火龙/main.js +++ /dev/null @@ -1,375 +0,0 @@ -(async function () {//火龙 - -//检测传送结束 await tpEndDetection(); -async function tpEndDetection() { - const region1 = RecognitionObject.ocr(1690, 230, 75, 350);// 队伍名称区域 - const region2 = RecognitionObject.ocr(872, 681, 180, 30);// 点击任意处关闭 - let tpTime = 0; - await sleep(1500);//点击传送后等待一段时间避免误判 - //最多30秒传送时间 - while (tpTime < 300) { - - let capture = captureGameRegion(); - let res1 = capture.find(region1); - let res2 = capture.find(region2); - if (!res1.isEmpty()|| !res2.isEmpty()){ - log.info("传送完成"); - await sleep(1000);//传送结束后有僵直 - click(960, 810);//点击任意处 - await sleep(500); - return; - } - tpTime++; - await sleep(100); - } - throw new Error('传送时间超时'); -} - -//吃料理 -async function eatFood() { -let foodName = settings.foodName ?? 0; -if(foodName){ -const foodSum = foodName.split('-'); -log.info("开始吃菜"); -await sleep(1000); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -for(let i = 0; i < foodSum.length; i++){ -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(1000); -inputText(foodSum[i]); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -} -keyPress("ESCAPE"); -await sleep(1500); -}} -//检测角色是否阵亡,并前往吃药复活 -async function resurgenceDetectionAndEatFood() { -const region1 = RecognitionObject.ocr(1170, 780, 75, 35);// 复活料理区域 -const region2 = RecognitionObject.ocr(545, 360, 800, 45);// 料理冷却区域 -let recoveryFoodName = settings.recoveryFoodName ?? 0; -let resurgenceFoodName = settings.resurgenceFoodName ?? 0; -if(resurgenceFoodName && recoveryFoodName){ -keyPress("1"); -await sleep(100); -keyPress("2"); -await sleep(100); -keyPress("3"); -await sleep(100); -keyPress("4"); -await sleep(200); -let capture = captureGameRegion(); -let res1 = capture.find(region1); -let res2 = capture.find(region2); - if (res1.isEmpty()){ - return; - } - else if (!res1.isEmpty() && !res2.isEmpty()) { - log.info("复活料理处于冷却中"); - keyPress("ESCAPE"); - await sleep(1000); - await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 - throw new Error('战斗失败'); - return; - } - else if (!res1.isEmpty() && res2.isEmpty()) { - log.info("检测到阵亡角色……复活吧!我的爱人!!!"); - keyPress("ESCAPE"); - await eatResurgenceFood();//满血复活 - return; - } -}} - -//吃料理复活 -async function eatResurgenceFood() { -let recoveryFoodName = settings.recoveryFoodName ?? 0; -let resurgenceFoodName = settings.resurgenceFoodName ?? 0; -const region = RecognitionObject.ocr(800, 200, 315, 32);// 复活对象检测 -const clickPositions = [ - { x: 760, y: 440 }, // 角色1 - { x: 900, y: 440 }, // 角色2 - { x: 1040, y: 440 }, // 角色3 - { x: 1180, y: 440 } // 角色4 -]; -if(resurgenceFoodName && recoveryFoodName){ -log.info("开始吃菜"); -await sleep(500); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(200); -click(110, 110); -await sleep(1000); -inputText(`${resurgenceFoodName}`); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -// 使用 for 循环点击每个位置 -for (let i = 0; i < clickPositions.length; i++) { - const position = clickPositions[i]; - click(position.x, position.y); - await sleep(800); - click(1200,770);//确认 - await sleep(800); - let capture = captureGameRegion(); - let res = capture.find(region); - if (res.isEmpty()){ - keyPress("ESCAPE"); - await sleep(1000); - click(170, 1020);//筛选 - await sleep(1000); - click(195, 1020);//重置 - await sleep(1000); - click(110, 110);//输入名字 - await sleep(1000); - inputText(`${recoveryFoodName}`); - await sleep(500); - click(490, 1020);//确认筛选 - await sleep(1000); - click(180, 180);//选择第一个食物 - await sleep(1000); - click(1690, 1015);//使用 - await sleep(500); - click(position.x, position.y); - await sleep(500); - click(1200,770);//吃第一个 - await sleep(500); - click(1200,770);//吃第二个 - await sleep(500); - click(1350,290);//退出 - await sleep(500); - keyPress("ESCAPE"); - await sleep(400); - log.info("我又好了,嘿嘿"); - break; - } - await sleep(1000); - } - } -} - - - -//征讨之花领奖 -const autoNavigateToReward = async () => { - // 定义识别对象 - const boxIconRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/box.png")); - const rewardTextRo = RecognitionObject.Ocr(1210, 515, 200, 50);//领奖区域检测 - - let advanceNum = 0;//前进次数 - //调整为俯视视野 - middleButtonClick(); - await sleep(800); - moveMouseBy(0, 1030); - await sleep(400); - moveMouseBy(0, 920); - await sleep(400); - moveMouseBy(0, 710); - log.info("开始领奖"); - while (true) { - // 1. 优先检查是否已到达领奖点 - let captureRegion = captureGameRegion(); - let rewardTextArea = captureRegion.DeriveCrop(1210, 515, 200, 50); - let rewardResult = rewardTextArea.find(RecognitionObject.ocrThis); - // 检测到特点文字则结束!!! - if (rewardResult.text == "接触征讨之花") { - log.info("已到达领奖点,检测到文字: " + rewardResult.text); - return; - } - else if(advanceNum > 30){ - throw new Error('前进时间超时'); - } - // 2. 未到达领奖点,则调整视野 - for(let i = 0; i < 100; i++){ - captureRegion = captureGameRegion(); - let iconRes = captureRegion.Find(boxIconRo); - let climbTextArea = captureRegion.DeriveCrop(1808, 1030, 25, 25); - let climbResult = climbTextArea.find(RecognitionObject.ocrThis); - // 检查是否处于攀爬状态 - if (climbResult.isEmpty()){ - log.info("检侧进入攀爬状态,尝试脱离"); - keyPress("x"); - await sleep(1000); - keyDown("a"); - await sleep(800); - keyUp("a"); - keyDown("w"); - await sleep(800); - keyUp("w"); - } - if (iconRes.x >= 920 && iconRes.x <= 980 && iconRes.y <= 540) { - advanceNum++; - log.info(`视野已调正,前进第${advanceNum}次`); - break; - } else { - // 小幅度调整 - if(iconRes.y >= 520) moveMouseBy(0, 920); - let adjustAmount = iconRes.x < 920 ? -20 : 20; - let distanceToCenter = Math.abs(iconRes.x - 920); // 计算与920的距离 - let scaleFactor = Math.max(1, Math.floor(distanceToCenter / 50)); // 根据距离缩放,最小为1 - let adjustAmount2 = iconRes.y < 540 ? scaleFactor : 10; - moveMouseBy(adjustAmount * adjustAmount2, 0); - await sleep(100); - } - if(i > 97) throw new Error('视野调整超时'); - } - // 3. 前进一小步 - keyDown("w"); - await sleep(500); - keyUp("w"); - await sleep(200); // 等待角色移动稳定 - } -} - -//执行战斗并检测结束 -async function autoFightAndEndDetection() { - // 定义两个检测区域 - const region1 = RecognitionObject.ocr(750, 0, 420, 110);//区域一 BOSS名称 - const region2 = RecognitionObject.ocr(840, 935, 230, 40);//区域二 成功倒计时 - const region3 = RecognitionObject.ocr(1690, 230, 75, 350);//区域三 队伍名称 - let challengeTime = 0; - let challengeNum = 0; - //12分钟兜底 - while (challengeTime < 6000) { - // 捕获游戏区域 - let capture = captureGameRegion(); - // 检测两个区域的OCR结果 - let res1 = capture.find(region1); - let res2 = capture.find(region2); - let res3 = capture.find(region3); - let hasText1 = !res1.isEmpty() && res1.text.trim().length > 0; - let hasText2 = !res2.isEmpty() && res2.text.trim().length > 0; - let hasText3 = !res3.isEmpty() && res3.text.trim().length > 0; - // 情况1: 区域1有文字 且 区域2无文字 且 区域3有文字 → 执行AutoFight - if (hasText1 && !hasText2 && hasText3) { - await resurgenceDetectionAndEatFood(); - challengeNum++; - await sleep(800);//避免切人冷却,导致角色识别失败 - log.info(`执行第${challengeNum}次战斗`); - challengeTime = challengeTime + 205; - try { - await dispatcher.runTask(new SoloTask("AutoFight")); - } catch (error) { - log.info("启动战斗失败,尝试重新启动"); - await sleep(500); - } - } - // 情况2: 区域2有文字 且 区域1无文字 且 区域3有文字 → 结束循环 - else if (hasText2 && !hasText1 && hasText3) { - log.info("检测到挑战成功"); - break; - } -/* - // 情况3: 区域2无文字区域1无文字区域3有文字 →BOSS二阶段,需要移动触发 - else if (!hasText2 && !hasText1 && hasText3) { - log.info("检测到BOSS进入二阶段"); - await dispatcher.runTask(new SoloTask("AutoFight")); - } - // 情况4: 三个区域均无文字,可能处于转场动画,尝试点击快进 - else if (!hasText1 && !hasText2 && !hasText3){ - log.info("进入过场动画尝试快进"); - await sleep(400); - click(1765, 55); - await sleep(400); - click(1765, 55); - } -*/ - challengeTime = challengeTime + 1; - // 每次检测间隔100毫秒,避免CPU占用过高 - await sleep(100); - } -} - - -//通用:前往副本(副本外) -await sleep(1000); -await pathingScript.runFile("assets/recover.json"); -await sleep(5000); -await pathingScript.runFile("assets/tp.json"); -await sleep(1000); -keyDown("w"); -await sleep(2000); -keyUp("w"); -await sleep(1000); -keyPress("F"); -await sleep(2000); -click(1725, 1020);//单人挑战 -await sleep(300); -click(1180, 760);//队伍等级偏低、体力不够可能会出弹窗 -await sleep(2000); -click(1725, 1020);//开始挑战 -await tpEndDetection(); - -//副本内前往BOSS处 -await eatFood();//嗑药 -keyPress("1"); -await sleep(1000);//切回固定行走位 -keyDown("s"); -await sleep(200); -keyUp("s"); -keyDown("e"); -await sleep(1000); -keyDown("e"); -keyDown("w"); -await sleep(1000); -keyDown("VK_SHIFT"); -await sleep(200); -keyUp("VK_SHIFT"); -await sleep(1000); -keyDown("VK_SHIFT"); -await sleep(200); -keyUp("VK_SHIFT"); -await sleep(1000); -keyDown("VK_SHIFT"); -await sleep(200); -keyUp("VK_SHIFT"); -await sleep(1000); -keyDown("VK_SHIFT"); -await sleep(200); -keyUp("VK_SHIFT"); -await sleep(1000); -keyUp("w"); -keyDown("d"); -await sleep(500); -keyUp("d"); -await autoFightAndEndDetection();//一直战斗直到检测到结束 - - -//领奖并退出 -await autoNavigateToReward();//前往地脉之花 -await sleep(1000); -keyPress("F");//领奖 -await sleep(1000); -click(950, 750);//使用树脂 -await sleep(6000); -click(975, 1000);//退出秘境 -await tpEndDetection(); -await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 -await sleep(1000); -keyPress("M");//展示剩余体力 -await sleep(1000); -notification.send('挑战完成'); - -})(); diff --git a/repo/js/周本11-火龙/manifest.json b/repo/js/周本11-火龙/manifest.json deleted file mode 100644 index 85cf75ef..00000000 --- a/repo/js/周本11-火龙/manifest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "manifest_version": 1, - "name": "源焰之主周本刷取", - "version": "2.2", - "description": "需0.44.6及以上版本,兼容所有正常队伍及战斗策略(队伍中必须有奶妈),但还是建议在JS设置中选择合适的防御料理(生命料理以及火抗药剂,没错侵蚀效果吃火抗,我自己发现的)。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本原地版q是14s,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。", - "authors": [ - { - "name": "柒叶子", - "links": "https://github.com/5117600049" - } - ], - "settings_ui": "settings.json", - "main": "main.js" -} \ No newline at end of file diff --git a/repo/js/周本11-火龙/settings.json b/repo/js/周本11-火龙/settings.json deleted file mode 100644 index da73a045..00000000 --- a/repo/js/周本11-火龙/settings.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "name": "foodName", - "type": "input-text", - "label": "请输入料理名称,多食物用法(攻击-药剂-防御)" - }, - { - "name": "resurgenceFoodName", - "type": "input-text", - "label": "请输入复活料理名称 " - }, - { - "name": "recoveryFoodName", - "type": "input-text", - "label": "请输入回血料理名称 " - } - ] diff --git a/repo/js/周本11-火龙/周本队原地版q.txt b/repo/js/周本11-火龙/周本队原地版q.txt deleted file mode 100644 index 328ca16c..00000000 --- a/repo/js/周本11-火龙/周本队原地版q.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 wait(0.2),e(hold) -芙宁娜 e,q -雷神 e -芭芭拉 e,q,attack(4) - - - - - diff --git a/repo/js/周本11-火龙/周本队火神原地版.txt b/repo/js/周本11-火龙/周本队火神原地版.txt deleted file mode 100644 index 6579d72b..00000000 --- a/repo/js/周本11-火龙/周本队火神原地版.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 e(hold) -芙宁娜 q,e -玛薇卡 e -芭芭拉 e,attack(5.5) -钟离 e(hold) -芭芭拉 e,attack(10) - - - diff --git a/repo/js/周本12-魔女/assets/box.png b/repo/js/周本12-魔女/assets/box.png deleted file mode 100644 index 521895c4..00000000 Binary files a/repo/js/周本12-魔女/assets/box.png and /dev/null differ diff --git a/repo/js/周本12-魔女/assets/recover.json b/repo/js/周本12-魔女/assets/recover.json deleted file mode 100644 index a4e55f13..00000000 --- a/repo/js/周本12-魔女/assets/recover.json +++ /dev/null @@ -1 +0,0 @@ -{"info":{"name":"","type":""},"positions":[{"x":2297.6201171875,"y":-824.5869140625,"type":"teleport","move_mode":"walk"},{"x":2292.62109375,"y":-826.0419921875,"type":"path","move_mode":"walk"}]} \ No newline at end of file diff --git a/repo/js/周本12-魔女/assets/tp.json b/repo/js/周本12-魔女/assets/tp.json deleted file mode 100644 index 7fe31315..00000000 --- a/repo/js/周本12-魔女/assets/tp.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "info": { - "name": "tp", - "type": "collect", - "author": "柒叶子", - "version": "1.0", - "description": "前往魔女周本", - "map_name": "Teyvat", - "bgi_version": "0.45.0" - }, - "positions": [ - { - "id": 1, - "action": "force_tp", - "move_mode": "walk", - "type": "teleport", - "x": -1608.205078125, - "y": 1730.2724609375, - "action_params": "" - } - ] -} \ No newline at end of file diff --git a/repo/js/周本12-魔女/main.js b/repo/js/周本12-魔女/main.js deleted file mode 100644 index e0e600d3..00000000 --- a/repo/js/周本12-魔女/main.js +++ /dev/null @@ -1,349 +0,0 @@ -(async function () {//魔女周本 - -//检测传送结束 await tpEndDetection(); -async function tpEndDetection() { - const region1 = RecognitionObject.ocr(1690, 230, 75, 350);// 队伍名称区域 - const region2 = RecognitionObject.ocr(872, 681, 180, 30);// 点击任意处关闭 - let tpTime = 0; - await sleep(1500);//点击传送后等待一段时间避免误判 - //最多30秒传送时间 - while (tpTime < 300) { - - let capture = captureGameRegion(); - let res1 = capture.find(region1); - let res2 = capture.find(region2); - if (!res1.isEmpty()|| !res2.isEmpty()){ - log.info("传送完成"); - await sleep(1000);//传送结束后有僵直 - click(960, 810);//点击任意处 - await sleep(500); - return; - } - tpTime++; - await sleep(100); - } - throw new Error('传送时间超时'); -} -//吃料理 -async function eatFood() { -let foodName = settings.foodName ?? 0; -if(foodName){ -const foodSum = foodName.split('-'); -log.info("开始吃菜"); -await sleep(1000); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -for(let i = 0; i < foodSum.length; i++){ -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(1000); -inputText(foodSum[i]); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -} -keyPress("ESCAPE"); -await sleep(1500); -}} -//检测角色是否阵亡,并前往吃药复活 -async function resurgenceDetectionAndEatFood() { -const region1 = RecognitionObject.ocr(1170, 780, 75, 35);// 复活料理区域 -const region2 = RecognitionObject.ocr(545, 360, 800, 45);// 料理冷却区域 -let recoveryFoodName = settings.recoveryFoodName ?? 0; -let resurgenceFoodName = settings.resurgenceFoodName ?? 0; -if(resurgenceFoodName && recoveryFoodName){ -keyPress("1"); -await sleep(100); -keyPress("2"); -await sleep(100); -keyPress("3"); -await sleep(100); -keyPress("4"); -await sleep(200); -let capture = captureGameRegion(); -let res1 = capture.find(region1); -let res2 = capture.find(region2); - if (res1.isEmpty()){ - return; - } - else if (!res1.isEmpty() && !res2.isEmpty()) { - log.info("复活料理处于冷却中"); - keyPress("ESCAPE"); - await sleep(1000); - await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 - throw new Error('战斗失败'); - return; - } - else if (!res1.isEmpty() && res2.isEmpty()) { - log.info("检测到阵亡角色……复活吧!我的爱人!!!"); - keyPress("ESCAPE"); - await eatResurgenceFood();//满血复活 - return; - } -}} - -//吃料理复活 -async function eatResurgenceFood() { -let recoveryFoodName = settings.recoveryFoodName ?? 0; -let resurgenceFoodName = settings.resurgenceFoodName ?? 0; -const region = RecognitionObject.ocr(800, 200, 315, 32);// 复活对象检测 -const clickPositions = [ - { x: 760, y: 440 }, // 角色1 - { x: 900, y: 440 }, // 角色2 - { x: 1040, y: 440 }, // 角色3 - { x: 1180, y: 440 } // 角色4 -]; -if(resurgenceFoodName && recoveryFoodName){ -log.info("开始吃菜"); -await sleep(500); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(200); -click(110, 110); -await sleep(1000); -inputText(`${resurgenceFoodName}`); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -// 使用 for 循环点击每个位置 -for (let i = 0; i < clickPositions.length; i++) { - const position = clickPositions[i]; - click(position.x, position.y); - await sleep(800); - click(1200,770);//确认 - await sleep(800); - let capture = captureGameRegion(); - let res = capture.find(region); - if (res.isEmpty()){ - keyPress("ESCAPE"); - await sleep(1000); - click(170, 1020);//筛选 - await sleep(1000); - click(195, 1020);//重置 - await sleep(1000); - click(110, 110);//输入名字 - await sleep(1000); - inputText(`${recoveryFoodName}`); - await sleep(500); - click(490, 1020);//确认筛选 - await sleep(1000); - click(180, 180);//选择第一个食物 - await sleep(1000); - click(1690, 1015);//使用 - await sleep(500); - click(position.x, position.y); - await sleep(500); - click(1200,770);//吃第一个 - await sleep(500); - click(1200,770);//吃第二个 - await sleep(500); - click(1350,290);//退出 - await sleep(500); - keyPress("ESCAPE"); - await sleep(400); - log.info("我又好了,嘿嘿"); - break; - } - await sleep(1000); - } - } -} - -//征讨之花领奖 -const autoNavigateToReward = async () => { - // 定义识别对象 - const boxIconRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/box.png")); - const rewardTextRo = RecognitionObject.Ocr(1210, 515, 200, 50);//领奖区域检测 - - let advanceNum = 0;//前进次数 - //调整为俯视视野 - middleButtonClick(); - await sleep(800); - moveMouseBy(0, 1030); - await sleep(400); - moveMouseBy(0, 920); - await sleep(400); - moveMouseBy(0, 710); - log.info("开始领奖"); - while (true) { - // 1. 优先检查是否已到达领奖点 - let captureRegion = captureGameRegion(); - let rewardTextArea = captureRegion.DeriveCrop(1210, 515, 200, 50); - let rewardResult = rewardTextArea.find(RecognitionObject.ocrThis); - // 检测到特点文字则结束!!! - if (rewardResult.text == "接触征讨之花") { - log.info("已到达领奖点,检测到文字: " + rewardResult.text); - return; - } - else if(advanceNum > 30){ - throw new Error('前进时间超时'); - } - // 2. 未到达领奖点,则调整视野 - for(let i = 0; i < 100; i++){ - captureRegion = captureGameRegion(); - let iconRes = captureRegion.Find(boxIconRo); - let climbTextArea = captureRegion.DeriveCrop(1808, 1030, 25, 25); - let climbResult = climbTextArea.find(RecognitionObject.ocrThis); - // 检查是否处于攀爬状态 - if (climbResult.isEmpty()){ - log.info("检侧进入攀爬状态,尝试脱离"); - keyPress("x"); - await sleep(1000); - keyDown("a"); - await sleep(800); - keyUp("a"); - keyDown("w"); - await sleep(800); - keyUp("w"); - } - if (iconRes.x >= 920 && iconRes.x <= 980 && iconRes.y <= 540) { - advanceNum++; - log.info(`视野已调正,前进第${advanceNum}次`); - break; - } else { - // 小幅度调整 - if(iconRes.y >= 520) moveMouseBy(0, 920); - let adjustAmount = iconRes.x < 920 ? -20 : 20; - let distanceToCenter = Math.abs(iconRes.x - 920); // 计算与920的距离 - let scaleFactor = Math.max(1, Math.floor(distanceToCenter / 50)); // 根据距离缩放,最小为1 - let adjustAmount2 = iconRes.y < 540 ? scaleFactor : 10; - moveMouseBy(adjustAmount * adjustAmount2, 0); - await sleep(100); - } - if(i > 97) throw new Error('视野调整超时'); - } - // 3. 前进一小步 - keyDown("w"); - await sleep(500); - keyUp("w"); - await sleep(200); // 等待角色移动稳定 - } -} - -//执行战斗并检测结束 -async function autoFightAndEndDetection() { - // 定义两个检测区域 - const region1 = RecognitionObject.ocr(750, 0, 420, 110);//区域一 BOSS名称 - const region2 = RecognitionObject.ocr(840, 935, 230, 40);//区域二 成功倒计时 - const region3 = RecognitionObject.ocr(1690, 230, 75, 350);//区域三 队伍名称 - let challengeTime = 0; - let challengeNum = 0; - //12分钟兜底 - while (challengeTime < 6000) { - // 捕获游戏区域 - let capture = captureGameRegion(); - // 检测两个区域的OCR结果 - let res1 = capture.find(region1); - let res2 = capture.find(region2); - let res3 = capture.find(region3); - let hasText1 = !res1.isEmpty() && res1.text.trim().length > 0; - let hasText2 = !res2.isEmpty() && res2.text.trim().length > 0; - let hasText3 = !res3.isEmpty() && res3.text.trim().length > 0; - // 情况1: 区域1有文字 且 区域2无文字 且 区域3有文字 → 执行AutoFight - if (hasText1 && !hasText2 && hasText3) { - await resurgenceDetectionAndEatFood(); - challengeNum++; - await sleep(800);//避免切人冷却,导致角色识别失败 - log.info(`执行第${challengeNum}次战斗`); - challengeTime = challengeTime + 205; - try { - await dispatcher.runTask(new SoloTask("AutoFight")); - } catch (error) { - log.info("启动战斗失败,尝试重新启动"); - await sleep(500); - } - } - // 情况2: 区域2有文字 且 区域1无文字 且 区域3有文字 → 结束循环 - else if (hasText2 && !hasText1 && hasText3) { - log.info("检测到挑战成功"); - break; - } - // 情况3: 区域2无文字区域1无文字区域3有文字 →BOSS二阶段,需要移动触发 - else if (!hasText2 && !hasText1 && hasText3) { - log.info("检测到BOSS进入二阶段"); - keyDown("w"); - await sleep(3000);//多前进一段位置,避免无法触发冻结反应 - keyUp("w"); - try { - await dispatcher.runTask(new SoloTask("AutoFight")); - } catch (error) { - log.info("启动战斗失败,尝试重新启动"); - await sleep(500); - } - } - // 情况4: 三个区域均无文字,可能处于转场动画,尝试点击快进 - else if (!hasText1 && !hasText2 && !hasText3){ - log.info("进入过场动画尝试快进"); - await sleep(400); - click(1765, 55); - await sleep(400); - click(1765, 55); - } - - challengeTime = challengeTime + 1; - // 每次检测间隔100毫秒,避免CPU占用过高 - await sleep(100); - } -} - - -//通用:前往副本(副本外) -await sleep(1000); -await pathingScript.runFile("assets/recover.json"); -await sleep(5000); -await pathingScript.runFile("assets/tp.json"); -await sleep(1000); -keyPress("F"); -await sleep(2000); -click(1725, 1020);//单人挑战 -await sleep(300); -click(1180, 760);//队伍等级偏低、体力不够可能会出弹窗 -await sleep(2000); -click(1725, 1020);//开始挑战 -await tpEndDetection(); - -//副本内前往BOSS处 -await eatFood();//嗑药 -keyPress("1"); -await sleep(1000);//切回固定行走位 -keyDown("w"); -await sleep(2000); -keyUp("w"); -await autoFightAndEndDetection();//一直战斗直到检测到结束 - -//领奖并退出 -await autoNavigateToReward();//前往地脉之花 -await sleep(1000); -keyPress("F");//领奖 -await sleep(1000); -click(950, 750);//使用树脂 -await sleep(6000); -click(975, 1000);//退出秘境 -await tpEndDetection(); -await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 -await sleep(1000); -keyPress("M");//展示剩余体力 -await sleep(1000); -notification.send('挑战完成'); - -})(); diff --git a/repo/js/周本12-魔女/manifest.json b/repo/js/周本12-魔女/manifest.json deleted file mode 100644 index 72d177f7..00000000 --- a/repo/js/周本12-魔女/manifest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "manifest_version": 1, - "name": "魔女周本刷取", - "version": "2.2", - "description": "需0.44.6及以上版本,兼容所有正常队伍(必须要有冻结反应)及战斗策略,但还是建议在JS设置中选择合适的防御料理(推荐骇浪派)。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本队厨神版是14s,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。", - "authors": [ - { - "name": "柒叶子", - "links": "https://github.com/5117600049" - } - ], - "settings_ui": "settings.json", - "main": "main.js" -} \ No newline at end of file diff --git a/repo/js/周本12-魔女/settings.json b/repo/js/周本12-魔女/settings.json deleted file mode 100644 index da73a045..00000000 --- a/repo/js/周本12-魔女/settings.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "name": "foodName", - "type": "input-text", - "label": "请输入料理名称,多食物用法(攻击-药剂-防御)" - }, - { - "name": "resurgenceFoodName", - "type": "input-text", - "label": "请输入复活料理名称 " - }, - { - "name": "recoveryFoodName", - "type": "input-text", - "label": "请输入回血料理名称 " - } - ] diff --git a/repo/js/周本12-魔女/周本队厨神版.txt b/repo/js/周本12-魔女/周本队厨神版.txt deleted file mode 100644 index 1004c602..00000000 --- a/repo/js/周本12-魔女/周本队厨神版.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 wait(0.2),e(hold) -芙宁娜 e,q -爱可菲 e,q -芭芭拉 e,q,attack(3) - - - - - diff --git a/repo/js/周本2-风魔龙/assets/recover.json b/repo/js/周本2-风魔龙/assets/recover.json deleted file mode 100644 index a4e55f13..00000000 --- a/repo/js/周本2-风魔龙/assets/recover.json +++ /dev/null @@ -1 +0,0 @@ -{"info":{"name":"","type":""},"positions":[{"x":2297.6201171875,"y":-824.5869140625,"type":"teleport","move_mode":"walk"},{"x":2292.62109375,"y":-826.0419921875,"type":"path","move_mode":"walk"}]} \ No newline at end of file diff --git a/repo/js/周本2-风魔龙/assets/tp.json b/repo/js/周本2-风魔龙/assets/tp.json deleted file mode 100644 index e8273e81..00000000 --- a/repo/js/周本2-风魔龙/assets/tp.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "info": { - "name": "未命名路径", - "type": "collect", - "author": "柒叶子", - "version": "1.0", - "description": "前往周本", - "bgi_version": "0.35.1" - }, - "positions": [ - - { - "id": 1, - "x": 122.6259765625, - "y": 2657.634521484375, - "type": "teleport", - "move_mode": "walk", - "action": "", - "action_params": "" - }, - ] -} \ No newline at end of file diff --git a/repo/js/周本2-风魔龙/assets/老版本.js b/repo/js/周本2-风魔龙/assets/老版本.js deleted file mode 100644 index 9e590903..00000000 --- a/repo/js/周本2-风魔龙/assets/老版本.js +++ /dev/null @@ -1,43 +0,0 @@ - -(async function () { - - - await sleep(1000); -await pathingScript.runFile("assets/recover.json"); -await sleep(5000); -await pathingScript.runFile("assets/tp.json"); -await sleep(1000); -keyDown("w"); -await sleep(2000); -keyUp("w"); -keyPress("F"); -await sleep(9000); -click(1725, 1020);//单人挑战 -await sleep(2000); -click(1725, 1020);//开始挑战 -await sleep(15000); -keyPress("1"); -await sleep(1000);//切回钟离 -keyDown("w"); -await sleep(4000); -keyUp("w"); -await dispatcher.runTask(new SoloTask("AutoFight")); - -await sleep(30000);//等待柱子碎裂 -keyPress("1"); -await sleep(1000);//切回钟离 - -keyDown("w"); -await sleep(5000); -keyUp("w"); -keyDown("s"); -await sleep(1400); -keyUp("s"); -await sleep(1000); -keyPress("F");//领奖 -await sleep(1000); -click(950, 750);//使用树脂 -await sleep(6000); -click(975, 1000);//退出秘境 -await sleep(10000); -})(); diff --git a/repo/js/周本2-风魔龙/main.js b/repo/js/周本2-风魔龙/main.js deleted file mode 100644 index 0c99f309..00000000 --- a/repo/js/周本2-风魔龙/main.js +++ /dev/null @@ -1,298 +0,0 @@ - -(async function () {//风魔龙 - -//征讨之花领奖(无图标前进检测) -const autoNavigateToReward = async () => { - const rewardTextRo = RecognitionObject.Ocr(1210, 515, 200, 50);//领奖区域检测 - let advanceNum = 0; - while (true) { - // 1. 优先检查是否已到达领奖点 - let captureRegion = captureGameRegion(); - let rewardTextArea = captureRegion.DeriveCrop(1210, 515, 200, 50); - let rewardResult = rewardTextArea.find(RecognitionObject.ocrThis); - // 检测到特点文字则结束!!! - if (rewardResult.text == "接触征讨之花") { - log.info("已到达领奖点,检测到文字: " + rewardResult.text); - return; - } - else if(advanceNum > 10){ - throw new Error('前进时间超时'); - } - // 前进一小步 - keyDown("w"); - await sleep(500); - keyUp("w"); - await sleep(200); // 等待角色移动稳定 - advanceNum++; - } -} - -//吃料理 -async function eatFood() { -let foodName = settings.foodName ?? 0; -if(foodName){ -const foodSum = foodName.split('-'); -log.info("开始吃菜"); -await sleep(1000); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -for(let i = 0; i < foodSum.length; i++){ -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(1000); -inputText(foodSum[i]); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -} -keyPress("ESCAPE"); -await sleep(1500); -}} - -//检测角色是否阵亡,并前往吃药复活 -async function resurgenceDetectionAndEatFood() { -let recoveryFoodName = settings.recoveryFoodName ?? 0; -let resurgenceFoodName = settings.resurgenceFoodName ?? 0; -if(resurgenceFoodName && recoveryFoodName){ -const region1 = RecognitionObject.ocr(1170, 780, 75, 35);// 复活料理区域 -const region2 = RecognitionObject.ocr(545, 360, 800, 45);// 料理冷却区域 -keyPress("1"); -await sleep(100); -keyPress("2"); -await sleep(100); -keyPress("3"); -await sleep(100); -keyPress("4"); -await sleep(200); -let capture = captureGameRegion(); -let res1 = capture.find(region1); -let res2 = capture.find(region2); - if (res1.isEmpty()){ - return; - } - else if (!res1.isEmpty() && !res2.isEmpty()) { - log.info("复活料理处于冷却中"); - keyPress("ESCAPE"); - await sleep(1000); - await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 - throw new Error('战斗失败'); - return; - } - else if (!res1.isEmpty() && res2.isEmpty()) { - log.info("检测到阵亡角色……复活吧!我的爱人!!!"); - keyPress("ESCAPE"); - await eatResurgenceFood();//满血复活 - return; - } -} -} - -//吃料理复活 -async function eatResurgenceFood() { -let recoveryFoodName = settings.recoveryFoodName ?? 0; -let resurgenceFoodName = settings.resurgenceFoodName ?? 0; -const region = RecognitionObject.ocr(800, 200, 315, 32);// 复活对象检测 -const clickPositions = [ - { x: 760, y: 440 }, // 角色1 - { x: 900, y: 440 }, // 角色2 - { x: 1040, y: 440 }, // 角色3 - { x: 1180, y: 440 } // 角色4 -]; -if(resurgenceFoodName && recoveryFoodName){ -log.info("开始吃菜"); -await sleep(500); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(200); -click(110, 110); -await sleep(1000); -inputText(`${resurgenceFoodName}`); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -// 使用 for 循环点击每个位置 -for (let i = 0; i < clickPositions.length; i++) { - const position = clickPositions[i]; - click(position.x, position.y); - await sleep(800); - click(1200,770);//确认 - await sleep(800); - let capture = captureGameRegion(); - let res = capture.find(region); - if (res.isEmpty()){ - keyPress("ESCAPE"); - await sleep(1000); - click(170, 1020);//筛选 - await sleep(1000); - click(195, 1020);//重置 - await sleep(1000); - click(110, 110);//输入名字 - await sleep(1000); - inputText(`${recoveryFoodName}`); - await sleep(500); - click(490, 1020);//确认筛选 - await sleep(1000); - click(180, 180);//选择第一个食物 - await sleep(1000); - click(1690, 1015);//使用 - await sleep(500); - click(position.x, position.y); - await sleep(500); - click(1200,770);//吃第一个 - await sleep(500); - click(1200,770);//吃第二个 - await sleep(500); - click(1350,290);//退出 - await sleep(500); - keyPress("ESCAPE"); - await sleep(400); - log.info("我又好了,嘿嘿"); - break; - } - await sleep(1000); - } - } -} - -//检测传送结束 await tpEndDetection(); -async function tpEndDetection() { - const region1 = RecognitionObject.ocr(1690, 230, 75, 350);// 队伍名称区域 - const region2 = RecognitionObject.ocr(872, 681, 180, 30);// 点击任意处关闭 - let tpTime = 0; - await sleep(1500);//点击传送后等待一段时间避免误判 - //最多30秒传送时间 - while (tpTime < 300) { - - let capture = captureGameRegion(); - let res1 = capture.find(region1); - let res2 = capture.find(region2); - if (!res1.isEmpty()|| !res2.isEmpty()){ - log.info("传送完成"); - await sleep(1000);//传送结束后有僵直 - click(960, 810);//点击任意处 - await sleep(500); - return; - } - tpTime++; - await sleep(100); - } - - throw new Error('传送时间超时'); -} - -/** - * 根据两个区域的OCR检测结果执行不同操作的循环函数 - */ -async function autoFightAndEndDetection() { - // 定义两个检测区域 - const region1 = RecognitionObject.ocr(750, 0, 420, 110);//区域一 BOSS名称 - const region2 = RecognitionObject.ocr(840, 935, 230, 40);//区域二 成功倒计时 - const region3 = RecognitionObject.ocr(1690, 230, 75, 350);//区域三 队伍名称 - let challengeTime = 0; - let challengeNum = 0; - //6分钟兜底 - while (challengeTime < 8000) { - // 捕获游戏区域 - let capture = captureGameRegion(); - // 检测两个区域的OCR结果 - let res1 = capture.find(region1); - let res2 = capture.find(region2); - let res3 = capture.find(region3); - let hasText1 = !res1.isEmpty() && res1.text.trim().length > 0; - let hasText2 = !res2.isEmpty() && res2.text.trim().length > 0; - let hasText3 = !res3.isEmpty() && res3.text.trim().length > 0; - // 情况1: 区域1有文字 且 区域2无文字 且 区域3有文字 → 执行AutoFight - if (hasText1 && !hasText2 && hasText3) { - await resurgenceDetectionAndEatFood(); - await sleep(500); - challengeNum++; - log.info(`执行第${challengeNum}次战斗`); - challengeTime = challengeTime + 200; - try { - await dispatcher.runTask(new SoloTask("AutoFight")); - } catch (error) { - log.info("启动战斗失败,尝试重新启动"); - await sleep(500); - } - } - // 情况2: 区域2有文字 且 区域1无文字 且 区域3有文字 → 结束循环 - else if (hasText2 && !hasText1 && hasText3) { - log.info("检测到挑战成功"); - break; - } - // 其他情况: 什么都不做 - challengeTime = challengeTime + 1; - // 每次检测间隔100毫秒,避免CPU占用过高 - await sleep(100); - } -} - -//前往副本(副本外) -await sleep(1000); -await pathingScript.runFile("assets/recover.json"); -await sleep(5000); -await pathingScript.runFile("assets/tp.json"); -await sleep(1000); -keyDown("w"); -await sleep(2000); -keyUp("w"); -keyPress("F"); -await sleep(9000); -click(1725, 1020);//单人挑战 -await sleep(300); -click(1180, 760);//队伍等级偏低、体力不够可能会出弹窗 -await sleep(2000); -click(1725, 1020);//开始挑战 -await tpEndDetection(); - -//副本内前往BOSS处 -keyPress("1"); -await sleep(1000);//切回1号位 -await eatFood();//嗑药 -keyDown("w"); -await sleep(4000); -keyUp("w"); -await autoFightAndEndDetection();//一直战斗直到检测到结束 - - -//领奖并退出 -keyDown("s"); -await sleep(1000); -keyUp("s"); -keyDown("d"); -await sleep(400); -keyUp("d"); -await autoNavigateToReward();//前往地脉之花 -await sleep(1000); -keyPress("F");//领奖 -await sleep(1000); -click(950, 750);//使用树脂 -await sleep(6000); -click(975, 1000);//退出秘境 -await tpEndDetection(); -await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 -await sleep(1000); -keyPress("M");//展示剩余体力 -await sleep(1000); -notification.send('挑战完成'); -})(); diff --git a/repo/js/周本2-风魔龙/manifest.json b/repo/js/周本2-风魔龙/manifest.json deleted file mode 100644 index c9263ff4..00000000 --- a/repo/js/周本2-风魔龙/manifest.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "manifest_version": 1, - "name": "风魔龙自动刷取", - "version": "2.2", - "bgi_version": "0.42.0", - "description": "需0.44.6及以上版本,配队刚需芙芙等大范围索敌角色,保证战斗脚本没有任何的转向和移动应该可以正常领取。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本原地版q是14s,建议可以比正常单轮时间多个1s,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。演示视频https://www.bilibili.com/video/BV1cpGCz6EWN/?vd_source=9dfaf88af48ecc0ff95a41f1145af7a2。", - "authors": [ - { - "name": "柒叶子", - "links": "https://github.com/5117600049" - } - ], - "settings_ui": "settings.json", - "main": "main.js" -} \ No newline at end of file diff --git a/repo/js/周本2-风魔龙/settings.json b/repo/js/周本2-风魔龙/settings.json deleted file mode 100644 index da73a045..00000000 --- a/repo/js/周本2-风魔龙/settings.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "name": "foodName", - "type": "input-text", - "label": "请输入料理名称,多食物用法(攻击-药剂-防御)" - }, - { - "name": "resurgenceFoodName", - "type": "input-text", - "label": "请输入复活料理名称 " - }, - { - "name": "recoveryFoodName", - "type": "input-text", - "label": "请输入回血料理名称 " - } - ] diff --git a/repo/js/周本2-风魔龙/周本队原地版q.txt b/repo/js/周本2-风魔龙/周本队原地版q.txt deleted file mode 100644 index 328ca16c..00000000 --- a/repo/js/周本2-风魔龙/周本队原地版q.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 wait(0.2),e(hold) -芙宁娜 e,q -雷神 e -芭芭拉 e,q,attack(4) - - - - - diff --git a/repo/js/周本2-风魔龙/周本队火神原地版.txt b/repo/js/周本2-风魔龙/周本队火神原地版.txt deleted file mode 100644 index 6579d72b..00000000 --- a/repo/js/周本2-风魔龙/周本队火神原地版.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 e(hold) -芙宁娜 q,e -玛薇卡 e -芭芭拉 e,attack(5.5) -钟离 e(hold) -芭芭拉 e,attack(10) - - - diff --git a/repo/js/周本3-公子/assets/recover.json b/repo/js/周本3-公子/assets/recover.json deleted file mode 100644 index a4e55f13..00000000 --- a/repo/js/周本3-公子/assets/recover.json +++ /dev/null @@ -1 +0,0 @@ -{"info":{"name":"","type":""},"positions":[{"x":2297.6201171875,"y":-824.5869140625,"type":"teleport","move_mode":"walk"},{"x":2292.62109375,"y":-826.0419921875,"type":"path","move_mode":"walk"}]} \ No newline at end of file diff --git a/repo/js/周本3-公子/assets/tp.json b/repo/js/周本3-公子/assets/tp.json deleted file mode 100644 index 8c48d54b..00000000 --- a/repo/js/周本3-公子/assets/tp.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "info": { - "name": "未命名路径", - "type": "collect", - "author": "柒叶子", - "version": "1.0", - "description": "前往周本", - "bgi_version": "0.35.1" - }, - "positions": [ - - { - "id": 1, - "x": 254.453125, - "y": -904.5771484375, - "type": "teleport", - "move_mode": "walk", - "action": "", - "action_params": "" - }, - ] -} \ No newline at end of file diff --git a/repo/js/周本3-公子/assets/老版本.js b/repo/js/周本3-公子/assets/老版本.js deleted file mode 100644 index 8db186ba..00000000 --- a/repo/js/周本3-公子/assets/老版本.js +++ /dev/null @@ -1,68 +0,0 @@ -(async function () { -const food = 'yueliang'; - await sleep(1000); -await pathingScript.runFile("assets/recover.json"); -await sleep(5000); -await pathingScript.runFile("assets/tp.json"); -await sleep(1000); -keyDown("w"); -await sleep(2000); -keyUp("w"); -await sleep(1000); -keyPress("F"); -await sleep(2000); -click(1725, 1020);//单人挑战 -await sleep(2000); -click(1725, 1020);//开始挑战 -await sleep(15000); -keyPress("1"); -await sleep(1000);//切回钟离 -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(1000); -for (const char of food) { - keyPress(char); - await sleep(500); -} -keyPress("SPACE"); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -keyPress("ESCAPE"); -await sleep(1500); - -await dispatcher.runTask(new SoloTask("AutoFight")); -keyPress("1"); -await sleep(1000);//切回钟离 -keyDown("s"); -await sleep(2400);//再次校准位置 -keyUp("s"); -keyDown("w"); -await sleep(2400); -keyUp("w"); -await sleep(1000); -keyPress("F");//领奖 -await sleep(1000); -click(950, 750);//使用树脂 -await sleep(6000); -click(975, 1000);//退出秘境 -await sleep(1000); -keyPress("ESCAPE");//退出秘境:避免挑战失败无法退出 -await sleep(500); -click(950, 750);//点击确认:避免挑战失败无法退出 -await sleep(3500); -keyPress("ESCAPE");//退出秘境:避免挑战失败无法退出 -await sleep(7500); - -})(); diff --git a/repo/js/周本3-公子/main.js b/repo/js/周本3-公子/main.js deleted file mode 100644 index 7e6c0001..00000000 --- a/repo/js/周本3-公子/main.js +++ /dev/null @@ -1,330 +0,0 @@ -(async function () {//公子 -//检测传送结束 await tpEndDetection(); -async function tpEndDetection() { - const region1 = RecognitionObject.ocr(1690, 230, 75, 350);// 队伍名称区域 - const region2 = RecognitionObject.ocr(872, 681, 180, 30);// 点击任意处关闭 - let tpTime = 0; - await sleep(1500);//点击传送后等待一段时间避免误判 - //最多30秒传送时间 - while (tpTime < 300) { - - let capture = captureGameRegion(); - let res1 = capture.find(region1); - let res2 = capture.find(region2); - if (!res1.isEmpty()|| !res2.isEmpty()){ - log.info("传送完成"); - await sleep(1000);//传送结束后有僵直 - click(960, 810);//点击任意处 - await sleep(500); - return; - } - tpTime++; - await sleep(100); - } - throw new Error('传送时间超时'); -} -/** - * 根据两个区域的OCR检测结果执行不同操作的循环函数 - */ -async function autoFightAndEndDetection() { - // 定义两个检测区域 - const region1 = RecognitionObject.ocr(750, 0, 420, 110);//区域一 BOSS名称 - const region2 = RecognitionObject.ocr(840, 935, 230, 40);//区域二 成功倒计时 - const region3 = RecognitionObject.ocr(1690, 230, 75, 350);//区域三 队伍名称 - let challengeTime = 0; - let challengeNum = 0; - //12分钟兜底 - while (challengeTime < 8000) { - // 捕获游戏区域 - let capture = captureGameRegion(); - // 检测两个区域的OCR结果 - let res1 = capture.find(region1); - let res2 = capture.find(region2); - let res3 = capture.find(region3); - let hasText1 = !res1.isEmpty() && res1.text.trim().length > 0; - let hasText2 = !res2.isEmpty() && res2.text.trim().length > 0; - let hasText3 = !res3.isEmpty() && res3.text.trim().length > 0; - // 情况1: 区域1有文字 且 区域2无文字 且 区域3有文字 → 执行AutoFight - if (hasText1 && !hasText2 && hasText3) { - await resurgenceDetectionAndEatFood(); - keyDown("s"); - await sleep(1800); - keyUp("s"); - challengeNum++; - log.info(`执行第${challengeNum}次战斗`); - challengeTime = challengeTime + 200; - try { - await dispatcher.runTask(new SoloTask("AutoFight")); - } catch (error) { - log.info("启动战斗失败,尝试重新启动"); - await sleep(500); - } - } - // 情况2: 区域2有文字 且 区域1无文字 且 区域3有文字 → 结束循环 - else if (hasText2 && !hasText1 && hasText3) { - log.info("检测到挑战成功"); - break; - } - // 情况3: 区域2无文字区域1无文字区域3有文字 →BOSS二阶段,需要移动触发 - else if (!hasText2 && !hasText1 && hasText3) { - log.info("检测到BOSS进入二阶段"); - keyDown("s"); - await sleep(1000); - keyUp("s"); - try { - await dispatcher.runTask(new SoloTask("AutoFight")); - } catch (error) { - log.info("启动战斗失败,尝试重新启动"); - await sleep(500); - } - } - // 其他情况: 可能处于转场动画,尝试点击快进 - else { - log.info("进入过场动画尝试快进"); - await sleep(400); - click(1765, 55); - await sleep(400); - click(1765, 55); - await sleep(400); - click(1765, 55); - } - - challengeTime = challengeTime + 1; - // 每次检测间隔500毫秒,避免CPU占用过高 - await sleep(100); - } -} - - -//征讨之花领奖(无图标前进检测) -const autoNavigateToReward = async () => { - const rewardTextRo = RecognitionObject.Ocr(1210, 515, 200, 50);//领奖区域检测 - let advanceNum = 0; - while (true) { - // 1. 优先检查是否已到达领奖点 - let captureRegion = captureGameRegion(); - let rewardTextArea = captureRegion.DeriveCrop(1210, 515, 200, 50); - let rewardResult = rewardTextArea.find(RecognitionObject.ocrThis); - // 检测到特点文字则结束!!! - if (rewardResult.text == "接触征讨之花") { - log.info("已到达领奖点,检测到文字: " + rewardResult.text); - return; - } - else if(advanceNum > 700){ - await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 - throw new Error('前进时间超时'); - } - // 前进一小步 - if((advanceNum%70)<34){ - keyDown("w"); - await sleep(500); - keyUp("w"); - await sleep(200); // 等待角色移动稳定 - } - else if((advanceNum%70)>34){ - keyDown("s"); - await sleep(500); - keyUp("s"); - await sleep(200); // 等待角色移动稳定 - } - else { - keyDown("d"); - await sleep(500); - keyUp("d"); - - } - advanceNum++; - } -} - -//吃料理 -async function eatFood() { -let foodName = settings.foodName ?? 0; -if(foodName){ -const foodSum = foodName.split('-'); -log.info("开始吃菜"); -await sleep(1000); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -for(let i = 0; i < foodSum.length; i++){ -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(1000); -inputText(foodSum[i]); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -} -keyPress("ESCAPE"); -await sleep(1500); -}} -//检测角色是否阵亡,并前往吃药复活 -async function resurgenceDetectionAndEatFood() { -const region1 = RecognitionObject.ocr(1170, 780, 75, 35);// 复活料理区域 -const region2 = RecognitionObject.ocr(545, 360, 800, 45);// 料理冷却区域 -keyPress("1"); -await sleep(100); -keyPress("2"); -await sleep(100); -keyPress("3"); -await sleep(100); -keyPress("4"); -await sleep(200); -let capture = captureGameRegion(); -let res1 = capture.find(region1); -let res2 = capture.find(region2); - if (res1.isEmpty()){ - return; - } - else if (!res1.isEmpty() && !res2.isEmpty()) { - log.info("复活料理处于冷却中"); - keyPress("ESCAPE"); - await sleep(1000); - await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 - throw new Error('战斗失败'); - } - else if (!res1.isEmpty() && res2.isEmpty()) { - log.info("检测到阵亡角色……复活吧!我的爱人!!!"); - keyPress("ESCAPE"); - await eatResurgenceFood();//满血复活 - return; - } -} - -//吃料理复活 -async function eatResurgenceFood() { -let recoveryFoodName = settings.recoveryFoodName ?? 0; -let resurgenceFoodName = settings.resurgenceFoodName ?? 0; -const region = RecognitionObject.ocr(800, 200, 315, 32);// 复活对象检测 -const clickPositions = [ - { x: 760, y: 440 }, // 角色1 - { x: 900, y: 440 }, // 角色2 - { x: 1040, y: 440 }, // 角色3 - { x: 1180, y: 440 } // 角色4 -]; -if(resurgenceFoodName && recoveryFoodName){ -log.info("开始吃菜"); -await sleep(500); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(200); -click(110, 110); -await sleep(1000); -inputText(`${resurgenceFoodName}`); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -// 使用 for 循环点击每个位置 -for (let i = 0; i < clickPositions.length; i++) { - const position = clickPositions[i]; - click(position.x, position.y); - await sleep(800); - click(1200,770);//确认 - await sleep(800); - let capture = captureGameRegion(); - let res = capture.find(region); - if (res.isEmpty()){ - keyPress("ESCAPE"); - await sleep(1000); - click(170, 1020);//筛选 - await sleep(1000); - click(195, 1020);//重置 - await sleep(1000); - click(110, 110);//输入名字 - await sleep(1000); - inputText(`${recoveryFoodName}`); - await sleep(500); - click(490, 1020);//确认筛选 - await sleep(1000); - click(180, 180);//选择第一个食物 - await sleep(1000); - click(1690, 1015);//使用 - await sleep(500); - click(position.x, position.y); - await sleep(500); - click(1200,770);//吃第一个 - await sleep(500); - click(1200,770);//吃第二个 - await sleep(500); - click(1350,290);//退出 - await sleep(500); - keyPress("ESCAPE"); - await sleep(400); - log.info("我又好了,嘿嘿"); - break; - } - await sleep(1000); - } - } -} - - -//通用:前往副本(副本外) -await sleep(1000); -await pathingScript.runFile("assets/recover.json"); -await sleep(5000); -await pathingScript.runFile("assets/tp.json"); -await sleep(1000); -keyDown("w"); -await sleep(2000); -keyUp("w"); -await sleep(1000); -keyPress("F"); -await sleep(2000); -click(1725, 1020);//单人挑战 -await sleep(300); -click(1180, 760);//队伍等级偏低、体力不够可能会出弹窗 -await sleep(2000); -click(1725, 1020);//开始挑战 -await tpEndDetection(); - -//副本内前往BOSS处 -await eatFood();//嗑药 -keyPress("1"); -await sleep(1000);//切1号位 -keyDown("s"); -await sleep(2400); -keyUp("s"); -await autoFightAndEndDetection();//一直战斗直到检测到结束 -keyPress("1"); -await sleep(1000);//切回钟离 -keyDown("s"); -await sleep(2400);//再次校准位置 -keyUp("s"); - - -//领奖并退出 -await autoNavigateToReward();//前往地脉之花 -await sleep(1000); -keyPress("F");//领奖 -await sleep(1000); -click(950, 750);//使用树脂 -await sleep(6000); -click(975, 1000);//退出秘境 -await tpEndDetection(); -await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 -await sleep(1000); -keyPress("M");//展示剩余体力 -await sleep(1000); -notification.send('挑战完成'); -})(); diff --git a/repo/js/周本3-公子/manifest.json b/repo/js/周本3-公子/manifest.json deleted file mode 100644 index 291388e2..00000000 --- a/repo/js/周本3-公子/manifest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "manifest_version": 1, - "name": "黄金屋自动刷取", - "version": "2.2", - "description": "需0.44.6及以上版本,兼容大部分正常队伍及战斗策略(禁止大幅度转向和移动技能龙王转圈、纳西达转圈、夜兰e……),但还是建议在JS设置中选择合适的防御料理(推荐骇浪派)。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本原地版q是14s,建议可以比正常单轮时间多个1s,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。演示视频https://www.bilibili.com/video/BV1cpGCz6EWN/?vd_source=9dfaf88af48ecc0ff95a41f1145af7a2。", - "authors": [ - { - "name": "柒叶子", - "links": "https://github.com/5117600049" - } - ], - "settings_ui": "settings.json", - "main": "main.js" -} \ No newline at end of file diff --git a/repo/js/周本3-公子/settings.json b/repo/js/周本3-公子/settings.json deleted file mode 100644 index da73a045..00000000 --- a/repo/js/周本3-公子/settings.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "name": "foodName", - "type": "input-text", - "label": "请输入料理名称,多食物用法(攻击-药剂-防御)" - }, - { - "name": "resurgenceFoodName", - "type": "input-text", - "label": "请输入复活料理名称 " - }, - { - "name": "recoveryFoodName", - "type": "input-text", - "label": "请输入回血料理名称 " - } - ] diff --git a/repo/js/周本3-公子/周本队原地版q.txt b/repo/js/周本3-公子/周本队原地版q.txt deleted file mode 100644 index 328ca16c..00000000 --- a/repo/js/周本3-公子/周本队原地版q.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 wait(0.2),e(hold) -芙宁娜 e,q -雷神 e -芭芭拉 e,q,attack(4) - - - - - diff --git a/repo/js/周本3-公子/周本队火神原地版.txt b/repo/js/周本3-公子/周本队火神原地版.txt deleted file mode 100644 index 6579d72b..00000000 --- a/repo/js/周本3-公子/周本队火神原地版.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 e(hold) -芙宁娜 q,e -玛薇卡 e -芭芭拉 e,attack(5.5) -钟离 e(hold) -芭芭拉 e,attack(10) - - - diff --git a/repo/js/周本4-若陀/assets/box.png b/repo/js/周本4-若陀/assets/box.png deleted file mode 100644 index 521895c4..00000000 Binary files a/repo/js/周本4-若陀/assets/box.png and /dev/null differ diff --git a/repo/js/周本4-若陀/assets/recover.json b/repo/js/周本4-若陀/assets/recover.json deleted file mode 100644 index a4e55f13..00000000 --- a/repo/js/周本4-若陀/assets/recover.json +++ /dev/null @@ -1 +0,0 @@ -{"info":{"name":"","type":""},"positions":[{"x":2297.6201171875,"y":-824.5869140625,"type":"teleport","move_mode":"walk"},{"x":2292.62109375,"y":-826.0419921875,"type":"path","move_mode":"walk"}]} \ No newline at end of file diff --git a/repo/js/周本4-若陀/assets/tp.json b/repo/js/周本4-若陀/assets/tp.json deleted file mode 100644 index 3d0c03fa..00000000 --- a/repo/js/周本4-若陀/assets/tp.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "info": { - "name": "未命名路径", - "type": "collect", - "author": "柒叶子", - "version": "1.0", - "description": "前往周本", - "bgi_version": "0.35.1" - }, - "positions": [ - - { - "id": 1, - "x": 1754.267578125, - "y": 607.91943359375, - "type": "teleport", - "move_mode": "walk", - "action": "", - "action_params": "" - }, - ] -} \ No newline at end of file diff --git a/repo/js/周本4-若陀/assets/老版本.js b/repo/js/周本4-若陀/assets/老版本.js deleted file mode 100644 index 6002e222..00000000 --- a/repo/js/周本4-若陀/assets/老版本.js +++ /dev/null @@ -1,77 +0,0 @@ -(async function () { -const food = 'yueliang'; - await sleep(1000); -await pathingScript.runFile("assets/recover.json"); -await sleep(5000); -await pathingScript.runFile("assets/tp.json"); -await sleep(1000); -keyDown("w"); -await sleep(2000); -keyUp("w"); -await sleep(1000); -keyPress("F"); -await sleep(2000); -click(1725, 1020);//单人挑战 -await sleep(2000); -click(1725, 1020);//开始挑战 -await sleep(15000); -keyPress("ESCAPE");//点击任意处 -await sleep(2000); -keyPress("1"); -await sleep(1000);//切回钟离 -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(1000); -for (const char of food) { - keyPress(char); - await sleep(500); -} -keyPress("SPACE"); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -keyPress("ESCAPE"); -await sleep(1500); -keyDown("w"); -await sleep(2000); -keyUp("w"); -await sleep(10000); -keyDown("s"); -await sleep(500); -keyDown("SHIFT"); -await sleep(1000); -keyUp("SHIFT"); -await sleep(500); -keyUp("s"); -await dispatcher.runTask(new SoloTask("AutoFight")); -keyPress("1"); -await sleep(1000);//切回钟离 -keyDown("s"); -await sleep(2400);//再次校准位置 -keyUp("s"); -keyDown("w"); -await sleep(8300); -keyUp("w"); -await sleep(1000); -keyDown("a"); -await sleep(2200); -keyUp("a"); -await sleep(1000); -keyPress("F");//领奖 -await sleep(1000); -click(950, 750);//使用树脂 -await sleep(6000); -click(975, 1000);//退出秘境 -await sleep(10000); -})(); diff --git a/repo/js/周本4-若陀/main.js b/repo/js/周本4-若陀/main.js deleted file mode 100644 index 275167bf..00000000 --- a/repo/js/周本4-若陀/main.js +++ /dev/null @@ -1,356 +0,0 @@ -(async function () {//坨子 -//检测传送结束 await tpEndDetection(); -async function tpEndDetection() { - const region1 = RecognitionObject.ocr(1690, 230, 75, 350);// 队伍名称区域 - const region2 = RecognitionObject.ocr(872, 681, 180, 30);// 点击任意处关闭 - let tpTime = 0; - await sleep(1500);//点击传送后等待一段时间避免误判 - //最多30秒传送时间 - while (tpTime < 300) { - - let capture = captureGameRegion(); - let res1 = capture.find(region1); - let res2 = capture.find(region2); - if (!res1.isEmpty()|| !res2.isEmpty()){ - log.info("传送完成"); - await sleep(1000);//传送结束后有僵直 - click(960, 810);//点击任意处 - await sleep(500); - return; - } - tpTime++; - await sleep(100); - } - throw new Error('传送时间超时'); -} -//吃料理 -async function eatFood() { -let foodName = settings.foodName ?? 0; -if(foodName){ -const foodSum = foodName.split('-'); -log.info("开始吃菜"); -await sleep(1000); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -for(let i = 0; i < foodSum.length; i++){ -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(1000); -inputText(foodSum[i]); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -} -keyPress("ESCAPE"); -await sleep(1500); -}} -//检测角色是否阵亡,并前往吃药复活 -async function resurgenceDetectionAndEatFood() { -const region1 = RecognitionObject.ocr(1170, 780, 75, 35);// 复活料理区域 -const region2 = RecognitionObject.ocr(545, 360, 800, 45);// 料理冷却区域 -let recoveryFoodName = settings.recoveryFoodName ?? 0; -let resurgenceFoodName = settings.resurgenceFoodName ?? 0; -if(resurgenceFoodName && recoveryFoodName){ -keyPress("1"); -await sleep(100); -keyPress("2"); -await sleep(100); -keyPress("3"); -await sleep(100); -keyPress("4"); -await sleep(200); -let capture = captureGameRegion(); -let res1 = capture.find(region1); -let res2 = capture.find(region2); - if (res1.isEmpty()){ - return; - } - else if (!res1.isEmpty() && !res2.isEmpty()) { - log.info("复活料理处于冷却中"); - keyPress("ESCAPE"); - await sleep(1000); - await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 - throw new Error('战斗失败'); - return; - } - else if (!res1.isEmpty() && res2.isEmpty()) { - log.info("检测到阵亡角色……复活吧!我的爱人!!!"); - keyPress("ESCAPE"); - await eatResurgenceFood();//满血复活 - return; - } -}} - -//吃料理复活 -async function eatResurgenceFood() { -let recoveryFoodName = settings.recoveryFoodName ?? 0; -let resurgenceFoodName = settings.resurgenceFoodName ?? 0; -const region = RecognitionObject.ocr(800, 200, 315, 32);// 复活对象检测 -const clickPositions = [ - { x: 760, y: 440 }, // 角色1 - { x: 900, y: 440 }, // 角色2 - { x: 1040, y: 440 }, // 角色3 - { x: 1180, y: 440 } // 角色4 -]; -if(resurgenceFoodName && recoveryFoodName){ -log.info("开始吃菜"); -await sleep(500); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(200); -click(110, 110); -await sleep(1000); -inputText(`${resurgenceFoodName}`); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -// 使用 for 循环点击每个位置 -for (let i = 0; i < clickPositions.length; i++) { - const position = clickPositions[i]; - click(position.x, position.y); - await sleep(800); - click(1200,770);//确认 - await sleep(800); - let capture = captureGameRegion(); - let res = capture.find(region); - if (res.isEmpty()){ - keyPress("ESCAPE"); - await sleep(1000); - click(170, 1020);//筛选 - await sleep(1000); - click(195, 1020);//重置 - await sleep(1000); - click(110, 110);//输入名字 - await sleep(1000); - inputText(`${recoveryFoodName}`); - await sleep(500); - click(490, 1020);//确认筛选 - await sleep(1000); - click(180, 180);//选择第一个食物 - await sleep(1000); - click(1690, 1015);//使用 - await sleep(500); - click(position.x, position.y); - await sleep(500); - click(1200,770);//吃第一个 - await sleep(500); - click(1200,770);//吃第二个 - await sleep(500); - click(1350,290);//退出 - await sleep(500); - keyPress("ESCAPE"); - await sleep(400); - log.info("我又好了,嘿嘿"); - break; - } - await sleep(1000); - } - } -} - -//征讨之花领奖 -const autoNavigateToReward = async () => { - // 定义识别对象 - const boxIconRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/box.png")); - const rewardTextRo = RecognitionObject.Ocr(1210, 515, 200, 50);//领奖区域检测 - - let advanceNum = 0;//前进次数 - //调整为俯视视野 - middleButtonClick(); - await sleep(800); - moveMouseBy(0, 1030); - await sleep(400); - moveMouseBy(0, 920); - await sleep(400); - moveMouseBy(0, 710); - log.info("开始领奖"); - while (true) { - // 1. 优先检查是否已到达领奖点 - let captureRegion = captureGameRegion(); - let rewardTextArea = captureRegion.DeriveCrop(1210, 515, 200, 50); - let rewardResult = rewardTextArea.find(RecognitionObject.ocrThis); - // 检测到特点文字则结束!!! - if (rewardResult.text == "接触征讨之花") { - log.info("已到达领奖点,检测到文字: " + rewardResult.text); - return; - } - else if(advanceNum > 30){ - throw new Error('前进时间超时'); - } - // 2. 未到达领奖点,则调整视野 - for(let i = 0; i < 100; i++){ - captureRegion = captureGameRegion(); - let iconRes = captureRegion.Find(boxIconRo); - let climbTextArea = captureRegion.DeriveCrop(1808, 1030, 25, 25); - let climbResult = climbTextArea.find(RecognitionObject.ocrThis); - // 检查是否处于攀爬状态 - if (climbResult.isEmpty()){ - log.info("检侧进入攀爬状态,尝试脱离"); - keyPress("x"); - await sleep(1000); - keyDown("a"); - await sleep(800); - keyUp("a"); - keyDown("w"); - await sleep(800); - keyUp("w"); - } - if (iconRes.x >= 920 && iconRes.x <= 980 && iconRes.y <= 540) { - advanceNum++; - log.info(`视野已调正,前进第${advanceNum}次`); - break; - } else { - // 小幅度调整 - if(iconRes.y >= 520) moveMouseBy(0, 920); - let adjustAmount = iconRes.x < 920 ? -20 : 20; - let distanceToCenter = Math.abs(iconRes.x - 920); // 计算与920的距离 - let scaleFactor = Math.max(1, Math.floor(distanceToCenter / 50)); // 根据距离缩放,最小为1 - let adjustAmount2 = iconRes.y < 540 ? scaleFactor : 10; - moveMouseBy(adjustAmount * adjustAmount2, 0); - await sleep(100); - } - if(i > 97) throw new Error('视野调整超时'); - } - // 3. 前进一小步 - keyDown("w"); - await sleep(500); - keyUp("w"); - await sleep(200); // 等待角色移动稳定 - } -} - -//执行战斗并检测结束 -async function autoFightAndEndDetection() { - // 定义两个检测区域 - const region1 = RecognitionObject.ocr(750, 0, 420, 110);//区域一 BOSS名称 - const region2 = RecognitionObject.ocr(840, 935, 230, 40);//区域二 成功倒计时 - const region3 = RecognitionObject.ocr(1690, 230, 75, 350);//区域三 队伍名称 - let challengeTime = 0; - let challengeNum = 0; - //12分钟兜底 - while (challengeTime < 6000) { - // 捕获游戏区域 - let capture = captureGameRegion(); - // 检测两个区域的OCR结果 - let res1 = capture.find(region1); - let res2 = capture.find(region2); - let res3 = capture.find(region3); - let hasText1 = !res1.isEmpty() && res1.text.trim().length > 0; - let hasText2 = !res2.isEmpty() && res2.text.trim().length > 0; - let hasText3 = !res3.isEmpty() && res3.text.trim().length > 0; - // 情况1: 区域1有文字 且 区域2无文字 且 区域3有文字 → 执行AutoFight - if (hasText1 && !hasText2 && hasText3) { - await resurgenceDetectionAndEatFood(); - challengeNum++; - await sleep(800);//避免切人冷却,导致角色识别失败 - challengeTime = challengeTime + 205; - log.info(`执行第${challengeNum}次战斗`); - try { - await dispatcher.runTask(new SoloTask("AutoFight")); - } catch (error) { - log.info("启动战斗失败,尝试重新启动"); - await sleep(500); - } - } - // 情况2: 区域2有文字 且 区域1无文字 且 区域3有文字 → 结束循环 - else if (hasText2 && !hasText1 && hasText3) { - log.info("检测到挑战成功"); - break; - } - // 情况3: 区域2无文字区域1无文字区域3有文字 →BOSS二阶段,需要移动触发 - else if (!hasText2 && !hasText1 && hasText3) { -/* - log.info("检测到BOSS进入二阶段"); - await dispatcher.runTask(new SoloTask("AutoFight")); -*/ - } - // 情况4: 三个区域均无文字,可能处于转场动画,尝试点击快进 - else if (!hasText1 && !hasText2 && !hasText3){ -/* - log.info("进入过场动画尝试快进"); - await sleep(400); - click(1765, 55); - await sleep(400); - click(1765, 55); -*/ - } - - challengeTime = challengeTime + 1; - // 每次检测间隔100毫秒,避免CPU占用过高 - await sleep(100); - } -} - - -//通用:前往副本(副本外) -await sleep(1000); -await pathingScript.runFile("assets/recover.json"); -await sleep(5000); -await pathingScript.runFile("assets/tp.json"); -await sleep(1000); -keyDown("w"); -await sleep(2000); -keyUp("w"); -await sleep(1000); -keyPress("F"); -await sleep(2000); -click(1725, 1020);//单人挑战 -await sleep(300); -click(1180, 760);//队伍等级偏低、体力不够可能会出弹窗 -await sleep(2000); -click(1725, 1020);//开始挑战 -await tpEndDetection(); - -//副本内前往BOSS处 -await eatFood();//嗑药 -keyPress("1"); -await sleep(1000);//切回固定行走位 -keyDown("w"); -await sleep(2000); -keyUp("w"); -await sleep(10000); -keyDown("s"); -await sleep(500); -keyDown("SHIFT"); -await sleep(1000); -keyUp("SHIFT"); -await sleep(500); -keyUp("s"); -await autoFightAndEndDetection();//一直战斗直到检测到结束 - - -//领奖并退出 -await autoNavigateToReward();//前往地脉之花 -await sleep(1000); -keyPress("F");//领奖 -await sleep(1000); -click(950, 750);//使用树脂 -await sleep(6000); -click(975, 1000);//退出秘境 -await tpEndDetection(); -await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 -await sleep(1000); -keyPress("M");//展示剩余体力 -await sleep(1000); -notification.send('挑战完成'); -})(); diff --git a/repo/js/周本4-若陀/manifest.json b/repo/js/周本4-若陀/manifest.json deleted file mode 100644 index 21111c0b..00000000 --- a/repo/js/周本4-若陀/manifest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "manifest_version": 1, - "name": "若陀龙王自动刷取", - "version": "2.2", - "description": "需0.44.6及以上版本,兼容所有正常队伍及战斗策略,但还是建议在JS设置中选择合适的防御料理(推荐骇浪派)。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本原地版q是14s,看情况可以多加一秒,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。演示视频https://www.bilibili.com/video/BV1cpGCz6EWN/?vd_source=9dfaf88af48ecc0ff95a41f1145af7a2。", - "authors": [ - { - "name": "柒叶子", - "links": "https://github.com/5117600049" - } - ], - "settings_ui": "settings.json", - "main": "main.js" -} \ No newline at end of file diff --git a/repo/js/周本4-若陀/settings.json b/repo/js/周本4-若陀/settings.json deleted file mode 100644 index da73a045..00000000 --- a/repo/js/周本4-若陀/settings.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "name": "foodName", - "type": "input-text", - "label": "请输入料理名称,多食物用法(攻击-药剂-防御)" - }, - { - "name": "resurgenceFoodName", - "type": "input-text", - "label": "请输入复活料理名称 " - }, - { - "name": "recoveryFoodName", - "type": "input-text", - "label": "请输入回血料理名称 " - } - ] diff --git a/repo/js/周本4-若陀/周本队原地版q.txt b/repo/js/周本4-若陀/周本队原地版q.txt deleted file mode 100644 index 328ca16c..00000000 --- a/repo/js/周本4-若陀/周本队原地版q.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 wait(0.2),e(hold) -芙宁娜 e,q -雷神 e -芭芭拉 e,q,attack(4) - - - - - diff --git a/repo/js/周本4-若陀/周本队火神原地版.txt b/repo/js/周本4-若陀/周本队火神原地版.txt deleted file mode 100644 index 6579d72b..00000000 --- a/repo/js/周本4-若陀/周本队火神原地版.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 e(hold) -芙宁娜 q,e -玛薇卡 e -芭芭拉 e,attack(5.5) -钟离 e(hold) -芭芭拉 e,attack(10) - - - diff --git a/repo/js/周本5-女士/assets/recover.json b/repo/js/周本5-女士/assets/recover.json deleted file mode 100644 index a4e55f13..00000000 --- a/repo/js/周本5-女士/assets/recover.json +++ /dev/null @@ -1 +0,0 @@ -{"info":{"name":"","type":""},"positions":[{"x":2297.6201171875,"y":-824.5869140625,"type":"teleport","move_mode":"walk"},{"x":2292.62109375,"y":-826.0419921875,"type":"path","move_mode":"walk"}]} \ No newline at end of file diff --git a/repo/js/周本5-女士/assets/tp.json b/repo/js/周本5-女士/assets/tp.json deleted file mode 100644 index 16dab206..00000000 --- a/repo/js/周本5-女士/assets/tp.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "info": { - "name": "未命名路径", - "type": "collect", - "author": "柒叶子", - "version": "1.0", - "description": "前往周本", - "bgi_version": "0.35.1" - }, - "positions": [ - - { - "id": 1, - "x": -4561.248046875, - "y": -3353.7587890625, - "type": "teleport", - "move_mode": "walk", - "action": "", - "action_params": "" - }, - ] -} \ No newline at end of file diff --git a/repo/js/周本5-女士/main.js b/repo/js/周本5-女士/main.js deleted file mode 100644 index ebb420e2..00000000 --- a/repo/js/周本5-女士/main.js +++ /dev/null @@ -1,341 +0,0 @@ -(async function () {//女士 -//检测传送结束 await tpEndDetection(); -async function tpEndDetection() { - const region1 = RecognitionObject.ocr(1690, 230, 75, 350);// 队伍名称区域 - const region2 = RecognitionObject.ocr(872, 681, 180, 30);// 点击任意处关闭 - let tpTime = 0; - await sleep(1500);//点击传送后等待一段时间避免误判 - //最多30秒传送时间 - while (tpTime < 300) { - - let capture = captureGameRegion(); - let res1 = capture.find(region1); - let res2 = capture.find(region2); - if (!res1.isEmpty()|| !res2.isEmpty()){ - log.info("传送完成"); - await sleep(1000);//传送结束后有僵直 - click(960, 810);//点击任意处 - await sleep(500); - return; - } - tpTime++; - await sleep(100); - } - throw new Error('传送时间超时'); -} -//吃料理 -async function eatFood() { -let foodName = settings.foodName ?? 0; -if(foodName){ -const foodSum = foodName.split('-'); -log.info("开始吃菜"); -await sleep(1000); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -for(let i = 0; i < foodSum.length; i++){ -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(1000); -inputText(foodSum[i]); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -} -keyPress("ESCAPE"); -await sleep(1500); -}} -//检测角色是否阵亡,并前往吃药复活 -async function resurgenceDetectionAndEatFood() { -const region1 = RecognitionObject.ocr(1170, 780, 75, 35);// 复活料理区域 -const region2 = RecognitionObject.ocr(545, 360, 800, 45);// 料理冷却区域 -let recoveryFoodName = settings.recoveryFoodName ?? 0; -let resurgenceFoodName = settings.resurgenceFoodName ?? 0; -if(resurgenceFoodName && recoveryFoodName){ -keyPress("1"); -await sleep(100); -keyPress("2"); -await sleep(100); -keyPress("3"); -await sleep(100); -keyPress("4"); -await sleep(200); -let capture = captureGameRegion(); -let res1 = capture.find(region1); -let res2 = capture.find(region2); - if (res1.isEmpty()){ - return; - } - else if (!res1.isEmpty() && !res2.isEmpty()) { - log.info("复活料理处于冷却中"); - keyPress("ESCAPE"); - await sleep(1000); - await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 - throw new Error('战斗失败'); - return; - } - else if (!res1.isEmpty() && res2.isEmpty()) { - log.info("检测到阵亡角色……复活吧!我的爱人!!!"); - keyPress("ESCAPE"); - await eatResurgenceFood();//满血复活 - return; - } -}} - -//吃料理复活 -async function eatResurgenceFood() { -let recoveryFoodName = settings.recoveryFoodName ?? 0; -let resurgenceFoodName = settings.resurgenceFoodName ?? 0; -const region = RecognitionObject.ocr(800, 200, 315, 32);// 复活对象检测 -const clickPositions = [ - { x: 760, y: 440 }, // 角色1 - { x: 900, y: 440 }, // 角色2 - { x: 1040, y: 440 }, // 角色3 - { x: 1180, y: 440 } // 角色4 -]; -if(resurgenceFoodName && recoveryFoodName){ -log.info("开始吃菜"); -await sleep(500); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(200); -click(110, 110); -await sleep(1000); -inputText(`${resurgenceFoodName}`); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -// 使用 for 循环点击每个位置 -for (let i = 0; i < clickPositions.length; i++) { - const position = clickPositions[i]; - click(position.x, position.y); - await sleep(800); - click(1200,770);//确认 - await sleep(800); - let capture = captureGameRegion(); - let res = capture.find(region); - if (res.isEmpty()){ - keyPress("ESCAPE"); - await sleep(1000); - click(170, 1020);//筛选 - await sleep(1000); - click(195, 1020);//重置 - await sleep(1000); - click(110, 110);//输入名字 - await sleep(1000); - inputText(`${recoveryFoodName}`); - await sleep(500); - click(490, 1020);//确认筛选 - await sleep(1000); - click(180, 180);//选择第一个食物 - await sleep(1000); - click(1690, 1015);//使用 - await sleep(500); - click(position.x, position.y); - await sleep(500); - click(1200,770);//吃第一个 - await sleep(500); - click(1200,770);//吃第二个 - await sleep(500); - click(1350,290);//退出 - await sleep(500); - keyPress("ESCAPE"); - await sleep(400); - log.info("我又好了,嘿嘿"); - break; - } - await sleep(1000); - } - } -} - -//征讨之花领奖(无图标前进检测) -const autoNavigateToReward = async () => { - const rewardTextRo = RecognitionObject.Ocr(1210, 515, 200, 50);//领奖区域检测 - let advanceNum = 0; - while (true) { - // 1. 优先检查是否已到达领奖点 - let captureRegion = captureGameRegion(); - let rewardTextArea = captureRegion.DeriveCrop(1210, 515, 200, 50); - let rewardResult = rewardTextArea.find(RecognitionObject.ocrThis); - // 检测到特点文字则结束!!! - if (rewardResult.text == "接触征讨之花") { - log.info("已到达领奖点,检测到文字: " + rewardResult.text); - return; - } - else if(advanceNum > 500){ - await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 - throw new Error('前进时间超时'); - - } - // 前进一小步 - if((advanceNum%50)<24){ - keyDown("w"); - await sleep(500); - keyUp("w"); - await sleep(200); // 等待角色移动稳定 - } - else if((advanceNum%50)>24){ - keyDown("s"); - await sleep(500); - keyUp("s"); - await sleep(200); // 等待角色移动稳定 - } - else { - keyDown("d"); - await sleep(500); - keyUp("d"); - - } - advanceNum++; - } -} - -//执行战斗并检测结束 -async function autoFightAndEndDetection() { - // 定义两个检测区域 - const region1 = RecognitionObject.ocr(750, 0, 420, 110);//区域一 BOSS名称 - const region2 = RecognitionObject.ocr(840, 935, 230, 40);//区域二 成功倒计时 - const region3 = RecognitionObject.ocr(1690, 230, 75, 350);//区域三 队伍名称 - let challengeTime = 0; - let challengeNum = 0; - //12分钟兜底 - while (challengeTime < 6000) { - // 捕获游戏区域 - let capture = captureGameRegion(); - // 检测两个区域的OCR结果 - let res1 = capture.find(region1); - let res2 = capture.find(region2); - let res3 = capture.find(region3); - let hasText1 = !res1.isEmpty() && res1.text.trim().length > 0; - let hasText2 = !res2.isEmpty() && res2.text.trim().length > 0; - let hasText3 = !res3.isEmpty() && res3.text.trim().length > 0; - // 情况1: 区域1有文字 且 区域2无文字 且 区域3有文字 → 执行AutoFight - if (hasText1 && !hasText2 && hasText3) { - await resurgenceDetectionAndEatFood(); - challengeNum++; - keyDown("s"); - await sleep(1200); - keyUp("s"); - log.info(`执行第${challengeNum}次战斗`); - challengeTime = challengeTime + 205; - try { - await dispatcher.runTask(new SoloTask("AutoFight")); - } catch (error) { - log.info("启动战斗失败,尝试重新启动"); - await sleep(500); - } - } - // 情况2: 区域2有文字 且 区域1无文字 且 区域3有文字 → 结束循环 - else if (hasText2 && !hasText1 && hasText3) { - log.info("检测到挑战成功"); - break; - } - // 情况3: 区域2无文字区域1无文字区域3有文字 →BOSS二阶段,需要移动触发 - else if (!hasText2 && !hasText1 && hasText3) { - log.info("检测到BOSS进入二阶段"); - keyDown("s"); - await sleep(2500); - keyUp("s"); - try { - await dispatcher.runTask(new SoloTask("AutoFight")); - } catch (error) { - log.info("启动战斗失败,尝试重新启动"); - await sleep(500); - } - } - // 情况4: 三个区域均无文字,可能处于转场动画,尝试点击快进 - else if (!hasText1 && !hasText2 && !hasText3){ - log.info("进入过场动画尝试快进"); - await sleep(400); - click(1765, 55); - await sleep(400); - click(1765, 55); - } - - challengeTime = challengeTime + 1; - // 每次检测间隔100毫秒,避免CPU占用过高 - await sleep(100); - } -} - - -//通用:前往副本(副本外) -await sleep(1000); -await pathingScript.runFile("assets/recover.json"); -await sleep(5000); -await pathingScript.runFile("assets/tp.json"); -await sleep(1000); -keyDown("w"); -await sleep(2000); -keyUp("w"); -await sleep(1000); -keyPress("F"); -await sleep(2000); -click(1725, 1020);//单人挑战 -await sleep(300); -click(1180, 760);//队伍等级偏低、体力不够可能会出弹窗 -await sleep(2000); -click(1725, 1020);//开始挑战 -await tpEndDetection(); - -//副本内前往BOSS处 -await eatFood();//嗑药 -keyPress("1"); -await sleep(1000);//切回固定行走位 -keyDown("w"); -await sleep(1500); -keyUp("w"); -await sleep(8500); -keyDown("s"); -await sleep(200); -keyDown("SHIFT"); -await sleep(300); -keyUp("SHIFT"); -await sleep(200); -keyUp("s"); -await autoFightAndEndDetection();//一直战斗直到检测到结束 - -//领奖并退出 -await sleep(4000); -keyDown("s"); -await sleep(4000); -keyUp("s"); -await sleep(4000); -keyDown("a"); -await sleep(300); -keyUp("a"); -await autoNavigateToReward();//前往地脉之花 -await sleep(1000); -keyPress("F");//领奖 -await sleep(1000); -click(950, 750);//使用树脂 -await sleep(6000); -click(975, 1000);//退出秘境 -await tpEndDetection(); -await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 -await sleep(1000); -keyPress("M");//展示剩余体力 -await sleep(1000); -notification.send('挑战完成'); - -})(); diff --git a/repo/js/周本5-女士/manifest.json b/repo/js/周本5-女士/manifest.json deleted file mode 100644 index dd7608f3..00000000 --- a/repo/js/周本5-女士/manifest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "manifest_version": 1, - "name": "女士周本刷取", - "version": "2.2", - "description": "需0.44.6及以上版本,兼容大部分正常队伍及战斗策略(禁止大幅度转向和移动技能龙王转圈、纳西达转圈、夜兰e……),但还是建议在JS设置中选择合适的防御料理(推荐骇浪派)。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本火神原地版是28s,建议可以比正常单轮时间多个1s,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。演示视频https://www.bilibili.com/video/BV1cpGCz6EWN/?vd_source=9dfaf88af48ecc0ff95a41f1145af7a2。", - "authors": [ - { - "name": "柒叶子", - "links": "https://github.com/5117600049" - } - ], - "settings_ui": "settings.json", - "main": "main.js" -} \ No newline at end of file diff --git a/repo/js/周本5-女士/settings.json b/repo/js/周本5-女士/settings.json deleted file mode 100644 index da73a045..00000000 --- a/repo/js/周本5-女士/settings.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "name": "foodName", - "type": "input-text", - "label": "请输入料理名称,多食物用法(攻击-药剂-防御)" - }, - { - "name": "resurgenceFoodName", - "type": "input-text", - "label": "请输入复活料理名称 " - }, - { - "name": "recoveryFoodName", - "type": "input-text", - "label": "请输入回血料理名称 " - } - ] diff --git a/repo/js/周本5-女士/周本队原地版q.txt b/repo/js/周本5-女士/周本队原地版q.txt deleted file mode 100644 index 328ca16c..00000000 --- a/repo/js/周本5-女士/周本队原地版q.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 wait(0.2),e(hold) -芙宁娜 e,q -雷神 e -芭芭拉 e,q,attack(4) - - - - - diff --git a/repo/js/周本5-女士/周本队火神原地版.txt b/repo/js/周本5-女士/周本队火神原地版.txt deleted file mode 100644 index 6579d72b..00000000 --- a/repo/js/周本5-女士/周本队火神原地版.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 e(hold) -芙宁娜 q,e -玛薇卡 e -芭芭拉 e,attack(5.5) -钟离 e(hold) -芭芭拉 e,attack(10) - - - diff --git a/repo/js/周本6-雷神/assets/recover.json b/repo/js/周本6-雷神/assets/recover.json deleted file mode 100644 index a4e55f13..00000000 --- a/repo/js/周本6-雷神/assets/recover.json +++ /dev/null @@ -1 +0,0 @@ -{"info":{"name":"","type":""},"positions":[{"x":2297.6201171875,"y":-824.5869140625,"type":"teleport","move_mode":"walk"},{"x":2292.62109375,"y":-826.0419921875,"type":"path","move_mode":"walk"}]} \ No newline at end of file diff --git a/repo/js/周本6-雷神/assets/tp.json b/repo/js/周本6-雷神/assets/tp.json deleted file mode 100644 index 7363cd1a..00000000 --- a/repo/js/周本6-雷神/assets/tp.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "info": { - "name": "未命名路径", - "type": "collect", - "author": "柒叶子", - "version": "1.0", - "description": "前往周本", - "bgi_version": "0.35.1" - }, - "positions": [ - - { - "id": 1, - "x": -4403.830078125, - "y": -2481.962890625, - "type": "teleport", - "move_mode": "walk", - "action": "", - "action_params": "" - }, - ] -} \ No newline at end of file diff --git a/repo/js/周本6-雷神/main.js b/repo/js/周本6-雷神/main.js deleted file mode 100644 index cf4293ce..00000000 --- a/repo/js/周本6-雷神/main.js +++ /dev/null @@ -1,332 +0,0 @@ -(async function () {//雷神 -//检测传送结束 await tpEndDetection(); -async function tpEndDetection() { - const region1 = RecognitionObject.ocr(1690, 230, 75, 350);// 队伍名称区域 - const region2 = RecognitionObject.ocr(872, 681, 180, 30);// 点击任意处关闭 - let tpTime = 0; - await sleep(1500);//点击传送后等待一段时间避免误判 - //最多30秒传送时间 - while (tpTime < 300) { - - let capture = captureGameRegion(); - let res1 = capture.find(region1); - let res2 = capture.find(region2); - if (!res1.isEmpty()|| !res2.isEmpty()){ - log.info("传送完成"); - await sleep(1000);//传送结束后有僵直 - click(960, 810);//点击任意处 - await sleep(500); - return; - } - tpTime++; - await sleep(100); - } - throw new Error('传送时间超时'); -} -//吃料理 -async function eatFood() { -let foodName = settings.foodName ?? 0; -if(foodName){ -const foodSum = foodName.split('-'); -log.info("开始吃菜"); -await sleep(1000); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -for(let i = 0; i < foodSum.length; i++){ -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(1000); -inputText(foodSum[i]); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -} -keyPress("ESCAPE"); -await sleep(1500); -}} -//检测角色是否阵亡,并前往吃药复活 -async function resurgenceDetectionAndEatFood() { -const region1 = RecognitionObject.ocr(1170, 780, 75, 35);// 复活料理区域 -const region2 = RecognitionObject.ocr(545, 360, 800, 45);// 料理冷却区域 -let recoveryFoodName = settings.recoveryFoodName ?? 0; -let resurgenceFoodName = settings.resurgenceFoodName ?? 0; -if(resurgenceFoodName && recoveryFoodName){ -keyPress("1"); -await sleep(100); -keyPress("2"); -await sleep(100); -keyPress("3"); -await sleep(100); -keyPress("4"); -await sleep(200); -let capture = captureGameRegion(); -let res1 = capture.find(region1); -let res2 = capture.find(region2); - if (res1.isEmpty()){ - return; - } - else if (!res1.isEmpty() && !res2.isEmpty()) { - log.info("复活料理处于冷却中"); - keyPress("ESCAPE"); - await sleep(1000); - await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 - throw new Error('战斗失败'); - return; - } - else if (!res1.isEmpty() && res2.isEmpty()) { - log.info("检测到阵亡角色……复活吧!我的爱人!!!"); - keyPress("ESCAPE"); - await eatResurgenceFood();//满血复活 - return; - } -}} - -//吃料理复活 -async function eatResurgenceFood() { -let recoveryFoodName = settings.recoveryFoodName ?? 0; -let resurgenceFoodName = settings.resurgenceFoodName ?? 0; -const region = RecognitionObject.ocr(800, 200, 315, 32);// 复活对象检测 -const clickPositions = [ - { x: 760, y: 440 }, // 角色1 - { x: 900, y: 440 }, // 角色2 - { x: 1040, y: 440 }, // 角色3 - { x: 1180, y: 440 } // 角色4 -]; -if(resurgenceFoodName && recoveryFoodName){ -log.info("开始吃菜"); -await sleep(500); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(200); -click(110, 110); -await sleep(1000); -inputText(`${resurgenceFoodName}`); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -// 使用 for 循环点击每个位置 -for (let i = 0; i < clickPositions.length; i++) { - const position = clickPositions[i]; - click(position.x, position.y); - await sleep(800); - click(1200,770);//确认 - await sleep(800); - let capture = captureGameRegion(); - let res = capture.find(region); - if (res.isEmpty()){ - keyPress("ESCAPE"); - await sleep(1000); - click(170, 1020);//筛选 - await sleep(1000); - click(195, 1020);//重置 - await sleep(1000); - click(110, 110);//输入名字 - await sleep(1000); - inputText(`${recoveryFoodName}`); - await sleep(500); - click(490, 1020);//确认筛选 - await sleep(1000); - click(180, 180);//选择第一个食物 - await sleep(1000); - click(1690, 1015);//使用 - await sleep(500); - click(position.x, position.y); - await sleep(500); - click(1200,770);//吃第一个 - await sleep(500); - click(1200,770);//吃第二个 - await sleep(500); - click(1350,290);//退出 - await sleep(500); - keyPress("ESCAPE"); - await sleep(400); - log.info("我又好了,嘿嘿"); - break; - } - await sleep(1000); - } - } -} - -//征讨之花领奖(无图标前进检测) -const autoNavigateToReward = async () => { - const rewardTextRo = RecognitionObject.Ocr(1210, 515, 200, 50);//领奖区域检测 - let advanceNum = 0; - while (true) { - // 1. 优先检查是否已到达领奖点 - let captureRegion = captureGameRegion(); - let rewardTextArea = captureRegion.DeriveCrop(1210, 515, 200, 50); - let rewardResult = rewardTextArea.find(RecognitionObject.ocrThis); - // 检测到特点文字则结束!!! - if (rewardResult.text == "接触征讨之花") { - log.info("已到达领奖点,检测到文字: " + rewardResult.text); - return; - } - else if(advanceNum > 700){ - await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 - throw new Error('前进时间超时'); - } - // 前进一小步 - if((advanceNum%70)<34){ - keyDown("w"); - await sleep(500); - keyUp("w"); - await sleep(200); // 等待角色移动稳定 - } - else if((advanceNum%70)>34){ - keyDown("s"); - await sleep(500); - keyUp("s"); - await sleep(200); // 等待角色移动稳定 - } - else { - keyDown("d"); - await sleep(500); - keyUp("d"); - - } - advanceNum++; - } -} - -//执行战斗并检测结束 -async function autoFightAndEndDetection() { - // 定义两个检测区域 - const region1 = RecognitionObject.ocr(750, 0, 420, 110);//区域一 BOSS名称 - const region2 = RecognitionObject.ocr(840, 935, 230, 40);//区域二 成功倒计时 - const region3 = RecognitionObject.ocr(1690, 230, 75, 350);//区域三 队伍名称 - let challengeTime = 0; - let challengeNum = 0; - //12分钟兜底 - while (challengeTime < 6000) { - // 捕获游戏区域 - let capture = captureGameRegion(); - // 检测两个区域的OCR结果 - let res1 = capture.find(region1); - let res2 = capture.find(region2); - let res3 = capture.find(region3); - let hasText1 = !res1.isEmpty() && res1.text.trim().length > 0; - let hasText2 = !res2.isEmpty() && res2.text.trim().length > 0; - let hasText3 = !res3.isEmpty() && res3.text.trim().length > 0; - // 情况1: 区域1有文字 且 区域2无文字 且 区域3有文字 → 执行AutoFight - if (hasText1 && !hasText2 && hasText3) { - await resurgenceDetectionAndEatFood(); - challengeNum++; - keyDown("s"); - await sleep(1800); - keyUp("s"); - log.info(`执行第${challengeNum}次战斗`); - challengeTime = challengeTime + 205; - try { - await dispatcher.runTask(new SoloTask("AutoFight")); - } catch (error) { - log.info("启动战斗失败,尝试重新启动"); - await sleep(500); - } - - } - // 情况2: 区域2有文字 且 区域1无文字 且 区域3有文字 → 结束循环 - else if (hasText2 && !hasText1 && hasText3) { - log.info("检测到挑战成功"); - break; - } - // 情况3: 区域2无文字区域1无文字区域3有文字 →BOSS二阶段,需要移动触发 - else if (!hasText2 && !hasText1 && hasText3) { -/* - log.info("检测到BOSS进入二阶段"); - keyDown("s"); - await sleep(2500); - keyUp("s"); - await dispatcher.runTask(new SoloTask("AutoFight")); -*/ - } - // 情况4: 三个区域均无文字,可能处于转场动画,尝试点击快进 - else if (!hasText1 && !hasText2 && !hasText3){ -/* - log.info("进入过场动画尝试快进"); - await sleep(400); - click(1765, 55); - await sleep(400); - click(1765, 55); -*/ - } - - challengeTime = challengeTime + 1; - // 每次检测间隔100毫秒,避免CPU占用过高 - await sleep(100); - } -} - - -//通用:前往副本(副本外) -await sleep(1000); -await pathingScript.runFile("assets/recover.json"); -await sleep(5000); -await pathingScript.runFile("assets/tp.json"); -await sleep(1000); -keyDown("w"); -await sleep(2000); -keyUp("w"); -await sleep(1000); -keyPress("F"); -await sleep(2000); -click(1725, 1020);//单人挑战 -await sleep(300); -click(1180, 760);//队伍等级偏低、体力不够可能会出弹窗 -await sleep(2000); -click(1725, 1020);//开始挑战 -await tpEndDetection(); - -//副本内前往BOSS处 -await eatFood();//嗑药 -keyPress("1"); -await sleep(1000);//切回固定行走位 -keyDown("s"); -await sleep(300); -keyDown("SHIFT"); -await sleep(300); -keyUp("SHIFT"); -await sleep(500); -keyUp("s"); -await autoFightAndEndDetection();//一直战斗直到检测到结束 - -//领奖并退出 -keyDown("s"); -await sleep(4000); -keyUp("s"); -await autoNavigateToReward();//前往地脉之花 -await sleep(1000); -keyPress("F");//领奖 -await sleep(1000); -click(950, 750);//使用树脂 -await sleep(6000); -click(975, 1000);//退出秘境 -await tpEndDetection(); -await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 -await sleep(1000); -keyPress("M");//展示剩余体力 -await sleep(1000); -notification.send('挑战完成'); - - -})(); diff --git a/repo/js/周本6-雷神/manifest.json b/repo/js/周本6-雷神/manifest.json deleted file mode 100644 index 4e895077..00000000 --- a/repo/js/周本6-雷神/manifest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "manifest_version": 1, - "name": "雷神周本刷取", - "version": "2.2", - "description": "需0.44.6及以上版本,兼容所有正常队伍及战斗策略(禁止大幅度转向和移动技能龙王转圈、纳西达转圈、夜兰e……),但还是建议在JS设置中选择合适的防御料理(推荐骇浪派),另外最重要的是,没有六命老芭,请一定要选择使用复活料理和恢复料理。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本原地版q是14s,建议可以比正常单轮时间多个1s,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。演示视频https://www.bilibili.com/video/BV1cpGCz6EWN/?vd_source=9dfaf88af48ecc0ff95a41f1145af7a2。", - "authors": [ - { - "name": "柒叶子", - "links": "https://github.com/5117600049" - } - ], - "settings_ui": "settings.json", - "main": "main.js" -} \ No newline at end of file diff --git a/repo/js/周本6-雷神/settings.json b/repo/js/周本6-雷神/settings.json deleted file mode 100644 index da73a045..00000000 --- a/repo/js/周本6-雷神/settings.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "name": "foodName", - "type": "input-text", - "label": "请输入料理名称,多食物用法(攻击-药剂-防御)" - }, - { - "name": "resurgenceFoodName", - "type": "input-text", - "label": "请输入复活料理名称 " - }, - { - "name": "recoveryFoodName", - "type": "input-text", - "label": "请输入回血料理名称 " - } - ] diff --git a/repo/js/周本6-雷神/周本队原地版q.txt b/repo/js/周本6-雷神/周本队原地版q.txt deleted file mode 100644 index 328ca16c..00000000 --- a/repo/js/周本6-雷神/周本队原地版q.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 wait(0.2),e(hold) -芙宁娜 e,q -雷神 e -芭芭拉 e,q,attack(4) - - - - - diff --git a/repo/js/周本6-雷神/周本队火神原地版.txt b/repo/js/周本6-雷神/周本队火神原地版.txt deleted file mode 100644 index 6579d72b..00000000 --- a/repo/js/周本6-雷神/周本队火神原地版.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 e(hold) -芙宁娜 q,e -玛薇卡 e -芭芭拉 e,attack(5.5) -钟离 e(hold) -芭芭拉 e,attack(10) - - - diff --git a/repo/js/周本7-散兵/assets/recover.json b/repo/js/周本7-散兵/assets/recover.json deleted file mode 100644 index a4e55f13..00000000 --- a/repo/js/周本7-散兵/assets/recover.json +++ /dev/null @@ -1 +0,0 @@ -{"info":{"name":"","type":""},"positions":[{"x":2297.6201171875,"y":-824.5869140625,"type":"teleport","move_mode":"walk"},{"x":2292.62109375,"y":-826.0419921875,"type":"path","move_mode":"walk"}]} \ No newline at end of file diff --git a/repo/js/周本7-散兵/assets/tp.json b/repo/js/周本7-散兵/assets/tp.json deleted file mode 100644 index 33fe7825..00000000 --- a/repo/js/周本7-散兵/assets/tp.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "info": { - "name": "未命名路径", - "type": "collect", - "author": "柒叶子", - "version": "1.0", - "description": "前往周本", - "bgi_version": "0.35.1" - }, - "positions": [ - - { - "id": 1, - "x": 2537.869140625, - "y": -522.9033203125, - "type": "teleport", - "move_mode": "walk", - "action": "", - "action_params": "" - }, - ] -} \ No newline at end of file diff --git a/repo/js/周本7-散兵/main.js b/repo/js/周本7-散兵/main.js deleted file mode 100644 index edbc549c..00000000 --- a/repo/js/周本7-散兵/main.js +++ /dev/null @@ -1,321 +0,0 @@ -(async function () {//散兵 -//检测传送结束 await tpEndDetection(); -async function tpEndDetection() { - const region1 = RecognitionObject.ocr(1690, 230, 75, 350);// 队伍名称区域 - const region2 = RecognitionObject.ocr(872, 681, 180, 30);// 点击任意处关闭 - let tpTime = 0; - await sleep(1500);//点击传送后等待一段时间避免误判 - //最多30秒传送时间 - while (tpTime < 300) { - - let capture = captureGameRegion(); - let res1 = capture.find(region1); - let res2 = capture.find(region2); - if (!res1.isEmpty()|| !res2.isEmpty()){ - log.info("传送完成"); - await sleep(1000);//传送结束后有僵直 - click(960, 810);//点击任意处 - await sleep(500); - return; - } - tpTime++; - await sleep(100); - } - throw new Error('传送时间超时'); -} - -//吃料理 -async function eatFood() { -let foodName = settings.foodName ?? 0; -if(foodName){ -const foodSum = foodName.split('-'); -log.info("开始吃菜"); -await sleep(1000); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -for(let i = 0; i < foodSum.length; i++){ -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(1000); -inputText(foodSum[i]); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -} -keyPress("ESCAPE"); -await sleep(1500); -}} -//检测角色是否阵亡,并前往吃药复活 -async function resurgenceDetectionAndEatFood() { -const region1 = RecognitionObject.ocr(1170, 780, 75, 35);// 复活料理区域 -const region2 = RecognitionObject.ocr(545, 360, 800, 45);// 料理冷却区域 -let recoveryFoodName = settings.recoveryFoodName ?? 0; -let resurgenceFoodName = settings.resurgenceFoodName ?? 0; -if(resurgenceFoodName && recoveryFoodName){ -keyPress("1"); -await sleep(100); -keyPress("2"); -await sleep(100); -keyPress("3"); -await sleep(100); -keyPress("4"); -await sleep(200); -let capture = captureGameRegion(); -let res1 = capture.find(region1); -let res2 = capture.find(region2); - if (res1.isEmpty()){ - return; - } - else if (!res1.isEmpty() && !res2.isEmpty()) { - log.info("复活料理处于冷却中"); - keyPress("ESCAPE"); - await sleep(1000); - await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 - throw new Error('战斗失败'); - return; - } - else if (!res1.isEmpty() && res2.isEmpty()) { - log.info("检测到阵亡角色……复活吧!我的爱人!!!"); - keyPress("ESCAPE"); - await eatResurgenceFood();//满血复活 - return; - } -}} - -//吃料理复活 -async function eatResurgenceFood() { -let recoveryFoodName = settings.recoveryFoodName ?? 0; -let resurgenceFoodName = settings.resurgenceFoodName ?? 0; -const region = RecognitionObject.ocr(800, 200, 315, 32);// 复活对象检测 -const clickPositions = [ - { x: 760, y: 440 }, // 角色1 - { x: 900, y: 440 }, // 角色2 - { x: 1040, y: 440 }, // 角色3 - { x: 1180, y: 440 } // 角色4 -]; -if(resurgenceFoodName && recoveryFoodName){ -log.info("开始吃菜"); -await sleep(500); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(200); -click(110, 110); -await sleep(1000); -inputText(`${resurgenceFoodName}`); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -// 使用 for 循环点击每个位置 -for (let i = 0; i < clickPositions.length; i++) { - const position = clickPositions[i]; - click(position.x, position.y); - await sleep(800); - click(1200,770);//确认 - await sleep(800); - let capture = captureGameRegion(); - let res = capture.find(region); - if (res.isEmpty()){ - keyPress("ESCAPE"); - await sleep(1000); - click(170, 1020);//筛选 - await sleep(1000); - click(195, 1020);//重置 - await sleep(1000); - click(110, 110);//输入名字 - await sleep(1000); - inputText(`${recoveryFoodName}`); - await sleep(500); - click(490, 1020);//确认筛选 - await sleep(1000); - click(180, 180);//选择第一个食物 - await sleep(1000); - click(1690, 1015);//使用 - await sleep(500); - click(position.x, position.y); - await sleep(500); - click(1200,770);//吃第一个 - await sleep(500); - click(1200,770);//吃第二个 - await sleep(500); - click(1350,290);//退出 - await sleep(500); - keyPress("ESCAPE"); - await sleep(400); - log.info("我又好了,嘿嘿"); - break; - } - await sleep(1000); - } - } -} - - -//征讨之花领奖(无图标前进检测) -const autoNavigateToReward = async () => { - const rewardTextRo = RecognitionObject.Ocr(1210, 515, 200, 50);//领奖区域检测 - let advanceNum = 0; - while (true) { - // 1. 优先检查是否已到达领奖点 - let captureRegion = captureGameRegion(); - let rewardTextArea = captureRegion.DeriveCrop(1210, 515, 200, 50); - let rewardResult = rewardTextArea.find(RecognitionObject.ocrThis); - // 检测到特点文字则结束!!! - if (rewardResult.text == "接触征讨之花") { - log.info("已到达领奖点,检测到文字: " + rewardResult.text); - return; - } - else if(advanceNum > 25){ - throw new Error('前进时间超时'); - } - // 前进一小步 - keyDown("w"); - await sleep(500); - keyUp("w"); - await sleep(100); // 等待角色移动稳定 - } -} - -//执行战斗并检测结束 -async function autoFightAndEndDetection() { - // 定义两个检测区域 - const region1 = RecognitionObject.ocr(750, 0, 420, 110);//区域一 BOSS名称 - const region2 = RecognitionObject.ocr(840, 935, 230, 40);//区域二 成功倒计时 - const region3 = RecognitionObject.ocr(1690, 230, 75, 350);//区域三 队伍名称 - let challengeTime = 0; - let challengeNum = 0; - //12分钟兜底 - while (challengeTime < 6000) { - // 捕获游戏区域 - let capture = captureGameRegion(); - // 检测两个区域的OCR结果 - let res1 = capture.find(region1); - let res2 = capture.find(region2); - let res3 = capture.find(region3); - let hasText1 = !res1.isEmpty() && res1.text.trim().length > 0; - let hasText2 = !res2.isEmpty() && res2.text.trim().length > 0; - let hasText3 = !res3.isEmpty() && res3.text.trim().length > 0; - // 情况1: 区域1有文字 且 区域2无文字 且 区域3有文字 → 执行AutoFight - if (hasText1 && !hasText2 && hasText3) { - await resurgenceDetectionAndEatFood(); - challengeNum++; - keyDown("s"); - await sleep(1500); - keyUp("s"); - log.info(`执行第${challengeNum}次战斗`); - challengeTime = challengeTime + 200; - try { - await dispatcher.runTask(new SoloTask("AutoFight")); - } catch (error) { - log.info("启动战斗失败,尝试重新启动"); - await sleep(500); - } - } - // 情况2: 区域2有文字 且 区域1无文字 且 区域3有文字 → 结束循环 - else if (hasText2 && !hasText1 && hasText3) { - log.info("检测到挑战成功"); - break; - } - // 情况3: 区域2无文字区域1无文字区域3有文字 →BOSS二阶段,需要移动触发 - else if (!hasText2 && !hasText1 && hasText3) { - log.info("检测到BOSS进入二阶段"); - keyDown("s"); - await sleep(2500); - keyUp("s"); - try { - await dispatcher.runTask(new SoloTask("AutoFight")); - } catch (error) { - log.info("启动战斗失败,尝试重新启动"); - await sleep(500); - } - } - // 情况4: 三个区域均无文字,可能处于转场动画,尝试点击快进 - else if (!hasText1 && !hasText2 && !hasText3){ - log.info("进入过场动画尝试快进"); - await sleep(400); - click(1765, 55); - await sleep(400); - click(1765, 55); - } - challengeTime = challengeTime + 1; - // 每次检测间隔100毫秒,避免CPU占用过高 - await sleep(100); - } -} - - -//前往副本(副本外) -await sleep(1000); -await pathingScript.runFile("assets/recover.json"); -await sleep(5000); -await pathingScript.runFile("assets/tp.json"); -await sleep(1000); -keyDown("w"); -await sleep(1000); -keyUp("w"); -await sleep(1000); -keyPress("F"); -await sleep(2000); -click(1725, 1020);//单人挑战 -await sleep(300); -click(1180, 760);//队伍等级偏低、体力不够可能会出弹窗 -await sleep(2000); -click(1725, 1020);//开始挑战 -await tpEndDetection(); - -//副本内前往BOSS处 -await eatFood();//嗑药 -keyPress("1"); -await sleep(1000);//切回固定行走位 -keyDown("w"); -await sleep(11000); -keyUp("w"); -await sleep(7000); -keyDown("s"); -await sleep(200); -keyDown("SHIFT"); -await sleep(300); -keyUp("SHIFT"); -await sleep(200); -keyUp("s"); -await autoFightAndEndDetection();//一直战斗直到检测到结束 - - -//领奖并退出 -keyDown("s"); -await sleep(10000); -keyUp("s"); -await autoNavigateToReward();//前往地脉之花 -await sleep(1000); -keyPress("F");//领奖 -await sleep(1000); -click(950, 750);//使用树脂 -await sleep(6000); -click(975, 1000);//退出秘境 -await tpEndDetection(); -await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 -await sleep(1000); -keyPress("M");//展示剩余体力 -await sleep(1000); -notification.send('挑战完成'); - -})(); diff --git a/repo/js/周本7-散兵/manifest.json b/repo/js/周本7-散兵/manifest.json deleted file mode 100644 index b06865fe..00000000 --- a/repo/js/周本7-散兵/manifest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "manifest_version": 1, - "name": "散兵周本刷取", - "version": "2.2", - "description": "需0.44.6及以上版本,兼容所有正常队伍及战斗策略(禁止大幅度转向和移动技能龙王转圈、纳西达转圈、夜兰e……),但还是建议在JS设置中选择合适的防御料理(推荐骇浪派),另外最重要的是,没有六命老芭,请一定要选择使用复活料理和恢复料理。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本原地版q是14s,建议可以比正常单轮时间多个1s,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。演示视频https://www.bilibili.com/video/BV1cpGCz6EWN/?vd_source=9dfaf88af48ecc0ff95a41f1145af7a2。", - "authors": [ - { - "name": "柒叶子", - "links": "https://github.com/5117600049" - } - ], - "settings_ui": "settings.json", - "main": "main.js" -} \ No newline at end of file diff --git a/repo/js/周本7-散兵/settings.json b/repo/js/周本7-散兵/settings.json deleted file mode 100644 index da73a045..00000000 --- a/repo/js/周本7-散兵/settings.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "name": "foodName", - "type": "input-text", - "label": "请输入料理名称,多食物用法(攻击-药剂-防御)" - }, - { - "name": "resurgenceFoodName", - "type": "input-text", - "label": "请输入复活料理名称 " - }, - { - "name": "recoveryFoodName", - "type": "input-text", - "label": "请输入回血料理名称 " - } - ] diff --git a/repo/js/周本7-散兵/周本队原地版q.txt b/repo/js/周本7-散兵/周本队原地版q.txt deleted file mode 100644 index 328ca16c..00000000 --- a/repo/js/周本7-散兵/周本队原地版q.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 wait(0.2),e(hold) -芙宁娜 e,q -雷神 e -芭芭拉 e,q,attack(4) - - - - - diff --git a/repo/js/周本7-散兵/周本队火神原地版.txt b/repo/js/周本7-散兵/周本队火神原地版.txt deleted file mode 100644 index 6579d72b..00000000 --- a/repo/js/周本7-散兵/周本队火神原地版.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 e(hold) -芙宁娜 q,e -玛薇卡 e -芭芭拉 e,attack(5.5) -钟离 e(hold) -芭芭拉 e,attack(10) - - - diff --git a/repo/js/周本8-草龙/assets/box.png b/repo/js/周本8-草龙/assets/box.png deleted file mode 100644 index 521895c4..00000000 Binary files a/repo/js/周本8-草龙/assets/box.png and /dev/null differ diff --git a/repo/js/周本8-草龙/assets/recover.json b/repo/js/周本8-草龙/assets/recover.json deleted file mode 100644 index a4e55f13..00000000 --- a/repo/js/周本8-草龙/assets/recover.json +++ /dev/null @@ -1 +0,0 @@ -{"info":{"name":"","type":""},"positions":[{"x":2297.6201171875,"y":-824.5869140625,"type":"teleport","move_mode":"walk"},{"x":2292.62109375,"y":-826.0419921875,"type":"path","move_mode":"walk"}]} \ No newline at end of file diff --git a/repo/js/周本8-草龙/assets/tp.json b/repo/js/周本8-草龙/assets/tp.json deleted file mode 100644 index a5debf66..00000000 --- a/repo/js/周本8-草龙/assets/tp.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "info": { - "name": "未命名路径", - "type": "collect", - "author": "柒叶子", - "version": "1.0", - "description": "前往周本", - "bgi_version": "0.35.1" - }, - "positions": [ - - { - "id": 1, - "x": 5747.71533203125, - "y": -210.318359375, - "type": "teleport", - "move_mode": "walk", - "action": "", - "action_params": "" - }, - ] -} \ No newline at end of file diff --git a/repo/js/周本8-草龙/main.js b/repo/js/周本8-草龙/main.js deleted file mode 100644 index ca39d470..00000000 --- a/repo/js/周本8-草龙/main.js +++ /dev/null @@ -1,364 +0,0 @@ -(async function () {//草龙 -//检测传送结束 await tpEndDetection(); -async function tpEndDetection() { - const region1 = RecognitionObject.ocr(1690, 230, 75, 350);// 队伍名称区域 - const region2 = RecognitionObject.ocr(872, 681, 180, 30);// 点击任意处关闭 - let tpTime = 0; - await sleep(1500);//点击传送后等待一段时间避免误判 - //最多30秒传送时间 - while (tpTime < 300) { - - let capture = captureGameRegion(); - let res1 = capture.find(region1); - let res2 = capture.find(region2); - if (!res1.isEmpty()|| !res2.isEmpty()){ - log.info("传送完成"); - await sleep(1000);//传送结束后有僵直 - click(960, 810);//点击任意处 - await sleep(500); - return; - } - tpTime++; - await sleep(100); - } - throw new Error('传送时间超时'); -} -//吃料理 -async function eatFood() { -let foodName = settings.foodName ?? 0; -if(foodName){ -const foodSum = foodName.split('-'); -log.info("开始吃菜"); -await sleep(1000); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -for(let i = 0; i < foodSum.length; i++){ -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(1000); -inputText(foodSum[i]); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -} -keyPress("ESCAPE"); -await sleep(1500); -}} -//检测角色是否阵亡,并前往吃药复活 -async function resurgenceDetectionAndEatFood() { -const region1 = RecognitionObject.ocr(1170, 780, 75, 35);// 复活料理区域 -const region2 = RecognitionObject.ocr(545, 360, 800, 45);// 料理冷却区域 -let recoveryFoodName = settings.recoveryFoodName ?? 0; -let resurgenceFoodName = settings.resurgenceFoodName ?? 0; -if(resurgenceFoodName && recoveryFoodName){ -keyPress("1"); -await sleep(100); -keyPress("2"); -await sleep(100); -keyPress("3"); -await sleep(100); -keyPress("4"); -await sleep(200); -let capture = captureGameRegion(); -let res1 = capture.find(region1); -let res2 = capture.find(region2); - if (res1.isEmpty()){ - return; - } - else if (!res1.isEmpty() && !res2.isEmpty()) { - log.info("复活料理处于冷却中"); - keyPress("ESCAPE"); - await sleep(1000); - await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 - throw new Error('战斗失败'); - return; - } - else if (!res1.isEmpty() && res2.isEmpty()) { - log.info("检测到阵亡角色……复活吧!我的爱人!!!"); - keyPress("ESCAPE"); - await eatResurgenceFood();//满血复活 - return; - } -}} - -//吃料理复活 -async function eatResurgenceFood() { -let recoveryFoodName = settings.recoveryFoodName ?? 0; -let resurgenceFoodName = settings.resurgenceFoodName ?? 0; -const region = RecognitionObject.ocr(800, 200, 315, 32);// 复活对象检测 -const clickPositions = [ - { x: 760, y: 440 }, // 角色1 - { x: 900, y: 440 }, // 角色2 - { x: 1040, y: 440 }, // 角色3 - { x: 1180, y: 440 } // 角色4 -]; -if(resurgenceFoodName && recoveryFoodName){ -log.info("开始吃菜"); -await sleep(500); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(200); -click(110, 110); -await sleep(1000); -inputText(`${resurgenceFoodName}`); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -// 使用 for 循环点击每个位置 -for (let i = 0; i < clickPositions.length; i++) { - const position = clickPositions[i]; - click(position.x, position.y); - await sleep(800); - click(1200,770);//确认 - await sleep(800); - let capture = captureGameRegion(); - let res = capture.find(region); - if (res.isEmpty()){ - keyPress("ESCAPE"); - await sleep(1000); - click(170, 1020);//筛选 - await sleep(1000); - click(195, 1020);//重置 - await sleep(1000); - click(110, 110);//输入名字 - await sleep(1000); - inputText(`${recoveryFoodName}`); - await sleep(500); - click(490, 1020);//确认筛选 - await sleep(1000); - click(180, 180);//选择第一个食物 - await sleep(1000); - click(1690, 1015);//使用 - await sleep(500); - click(position.x, position.y); - await sleep(500); - click(1200,770);//吃第一个 - await sleep(500); - click(1200,770);//吃第二个 - await sleep(500); - click(1350,290);//退出 - await sleep(500); - keyPress("ESCAPE"); - await sleep(400); - log.info("我又好了,嘿嘿"); - break; - } - await sleep(1000); - } - } -} - -//征讨之花领奖 -const autoNavigateToReward = async () => { - // 定义识别对象 - const boxIconRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/box.png")); - const rewardTextRo = RecognitionObject.Ocr(1210, 515, 200, 50);//领奖区域检测 - - let advanceNum = 0;//前进次数 - //调整为俯视视野 - middleButtonClick(); - await sleep(800); - moveMouseBy(0, 1030); - await sleep(400); - moveMouseBy(0, 920); - await sleep(400); - moveMouseBy(0, 710); - log.info("开始领奖"); - while (true) { - // 1. 优先检查是否已到达领奖点 - let captureRegion = captureGameRegion(); - let rewardTextArea = captureRegion.DeriveCrop(1210, 515, 200, 50); - let rewardResult = rewardTextArea.find(RecognitionObject.ocrThis); - // 检测到特点文字则结束!!! - if (rewardResult.text == "接触征讨之花") { - log.info("已到达领奖点,检测到文字: " + rewardResult.text); - return; - } - else if(advanceNum > 20){ - throw new Error('前进时间超时'); - } - // 2. 未到达领奖点,则调整视野 - for(let i = 0; i < 100; i++){ - captureRegion = captureGameRegion(); - let iconRes = captureRegion.Find(boxIconRo); - let climbTextArea = captureRegion.DeriveCrop(1808, 1030, 25, 25); - let climbResult = climbTextArea.find(RecognitionObject.ocrThis); - // 检查是否处于攀爬状态 - if (climbResult.isEmpty()){ - log.info("检侧进入攀爬状态,尝试脱离"); - keyPress("x"); - await sleep(1000); - keyDown("a"); - await sleep(800); - keyUp("a"); - keyDown("w"); - await sleep(500); - keyUp("w"); - } - if (iconRes.x >= 920 && iconRes.x <= 980 && iconRes.y <= 540) { - advanceNum++; - log.info(`视野已调正,前进第${advanceNum}次`); - break; - } else { - // 小幅度调整 - if(iconRes.y >= 520) moveMouseBy(0, 920); - let adjustAmount = iconRes.x < 920 ? -20 : 20; - let distanceToCenter = Math.abs(iconRes.x - 920); // 计算与920的距离 - let scaleFactor = Math.max(1, Math.floor(distanceToCenter / 50)); // 根据距离缩放,最小为1 - let adjustAmount2 = iconRes.y < 540 ? scaleFactor : 10; - moveMouseBy(adjustAmount * adjustAmount2, 0); - await sleep(100); - } - if(i > 97) throw new Error('视野调整超时'); - } - // 3. 前进一小步 - keyDown("w"); - await sleep(500); - keyUp("w"); - await sleep(200); // 等待角色移动稳定 - } -} - -//执行战斗并检测结束 -async function autoFightAndEndDetection() { - // 定义两个检测区域 - const region1 = RecognitionObject.ocr(750, 0, 420, 110);//区域一 BOSS名称 - const region2 = RecognitionObject.ocr(840, 935, 230, 40);//区域二 成功倒计时 - const region3 = RecognitionObject.ocr(1690, 230, 75, 350);//区域三 队伍名称 - let challengeTime = 0; - let challengeNum = 0; - //12分钟兜底 - while (challengeTime < 6000) { - // 捕获游戏区域 - let capture = captureGameRegion(); - // 检测两个区域的OCR结果 - let res1 = capture.find(region1); - let res2 = capture.find(region2); - let res3 = capture.find(region3); - let hasText1 = !res1.isEmpty() && res1.text.trim().length > 0; - let hasText2 = !res2.isEmpty() && res2.text.trim().length > 0; - let hasText3 = !res3.isEmpty() && res3.text.trim().length > 0; - // 情况1: 区域1有文字 且 区域2无文字 且 区域3有文字 → 执行AutoFight - if (hasText1 && !hasText2 && hasText3) { - await resurgenceDetectionAndEatFood(); - challengeNum++; - await sleep(800);//避免切人冷却,导致角色识别失败 - log.info(`执行第${challengeNum}次战斗`); - challengeTime = challengeTime + 205; - try { - await dispatcher.runTask(new SoloTask("AutoFight")); - } catch (error) { - log.info("启动战斗失败,尝试重新启动"); - await sleep(500); - } - } - // 情况2: 区域2有文字 且 区域1无文字 且 区域3有文字 → 结束循环 - else if (hasText2 && !hasText1 && hasText3) { - log.info("检测到挑战成功"); - break; - } - // 情况3: 区域2无文字区域1无文字区域3有文字 →BOSS二阶段,需要移动触发 - else if (!hasText2 && !hasText1 && hasText3) { - log.info("检测到BOSS进入二阶段"); - try { - await dispatcher.runTask(new SoloTask("AutoFight")); - } catch (error) { - log.info("启动战斗失败,尝试重新启动"); - await sleep(500); - } - } - // 情况4: 三个区域均无文字,可能处于转场动画,尝试点击快进 - else if (!hasText1 && !hasText2 && !hasText3){ - - log.info("进入过场动画尝试快进"); - await sleep(400); - click(1765, 55); - await sleep(400); - click(1765, 55); - } - - challengeTime = challengeTime + 1; - // 每次检测间隔100毫秒,避免CPU占用过高 - await sleep(100); - } -} - - -//通用:前往副本(副本外) -await sleep(1000); -await pathingScript.runFile("assets/recover.json"); -await sleep(5000); -await pathingScript.runFile("assets/tp.json"); -await sleep(1000); -keyDown("w"); -await sleep(2000); -keyUp("w"); -await sleep(1000); -keyPress("F"); -await sleep(2000); -click(1725, 1020);//单人挑战 -await sleep(300); -click(1180, 760);//队伍等级偏低、体力不够可能会出弹窗 -await sleep(2000); -click(1725, 1020);//开始挑战 -await tpEndDetection(); - -//副本内前往BOSS处 -await eatFood();//嗑药 -keyPress("1"); -await sleep(1000);//切回固定行走位 -keyDown("w"); -await sleep(8500); -keyUp("w"); -await sleep(6500); -keyDown("e"); -await sleep(1000);//钟离开盾 -keyUp("e"); -keyDown("a"); -await sleep(2000); -keyUp("a"); -keyDown("w"); -await sleep(3500); -keyUp("w"); -keyDown("d"); -await sleep(3500); -keyUp("d"); -await autoFightAndEndDetection();//一直战斗直到检测到结束 - -//领奖并退出 -await autoNavigateToReward();//前往地脉之花 -await sleep(1000); -keyPress("F");//领奖 -await sleep(1000); -click(950, 750);//使用树脂 -await sleep(6000); -click(975, 1000);//退出秘境 -await tpEndDetection(); -await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 -await sleep(1000); -keyPress("M");//展示剩余体力 -await sleep(1000); -notification.send('挑战完成'); - - -})(); diff --git a/repo/js/周本8-草龙/manifest.json b/repo/js/周本8-草龙/manifest.json deleted file mode 100644 index 21ef627e..00000000 --- a/repo/js/周本8-草龙/manifest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "manifest_version": 1, - "name": "阿佩普周本刷取", - "version": "2.2", - "description": "需0.44.6及以上版本,兼容所有正常队伍及战斗策略,但还是建议在JS设置中选择合适的防御料理(推荐骇浪派)。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本火神原地版是28s,建议可以比正常单轮时间多个1s,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。演示视频https://www.bilibili.com/video/BV1cpGCz6EWN/?vd_source=9dfaf88af48ecc0ff95a41f1145af7a2。", - "authors": [ - { - "name": "柒叶子", - "links": "https://github.com/5117600049" - } - ], - "settings_ui": "settings.json", - "main": "main.js" -} \ No newline at end of file diff --git a/repo/js/周本8-草龙/settings.json b/repo/js/周本8-草龙/settings.json deleted file mode 100644 index da73a045..00000000 --- a/repo/js/周本8-草龙/settings.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "name": "foodName", - "type": "input-text", - "label": "请输入料理名称,多食物用法(攻击-药剂-防御)" - }, - { - "name": "resurgenceFoodName", - "type": "input-text", - "label": "请输入复活料理名称 " - }, - { - "name": "recoveryFoodName", - "type": "input-text", - "label": "请输入回血料理名称 " - } - ] diff --git a/repo/js/周本8-草龙/周本队原地版q.txt b/repo/js/周本8-草龙/周本队原地版q.txt deleted file mode 100644 index 328ca16c..00000000 --- a/repo/js/周本8-草龙/周本队原地版q.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 wait(0.2),e(hold) -芙宁娜 e,q -雷神 e -芭芭拉 e,q,attack(4) - - - - - diff --git a/repo/js/周本8-草龙/周本队火神原地版.txt b/repo/js/周本8-草龙/周本队火神原地版.txt deleted file mode 100644 index 6579d72b..00000000 --- a/repo/js/周本8-草龙/周本队火神原地版.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 e(hold) -芙宁娜 q,e -玛薇卡 e -芭芭拉 e,attack(5.5) -钟离 e(hold) -芭芭拉 e,attack(10) - - - diff --git a/repo/js/周本9-鲸鱼/assets/box.png b/repo/js/周本9-鲸鱼/assets/box.png deleted file mode 100644 index 521895c4..00000000 Binary files a/repo/js/周本9-鲸鱼/assets/box.png and /dev/null differ diff --git a/repo/js/周本9-鲸鱼/assets/recover.json b/repo/js/周本9-鲸鱼/assets/recover.json deleted file mode 100644 index a4e55f13..00000000 --- a/repo/js/周本9-鲸鱼/assets/recover.json +++ /dev/null @@ -1 +0,0 @@ -{"info":{"name":"","type":""},"positions":[{"x":2297.6201171875,"y":-824.5869140625,"type":"teleport","move_mode":"walk"},{"x":2292.62109375,"y":-826.0419921875,"type":"path","move_mode":"walk"}]} \ No newline at end of file diff --git a/repo/js/周本9-鲸鱼/assets/tp.json b/repo/js/周本9-鲸鱼/assets/tp.json deleted file mode 100644 index 3f522431..00000000 --- a/repo/js/周本9-鲸鱼/assets/tp.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "info": { - "name": "未命名路径", - "type": "collect", - "author": "柒叶子", - "version": "1.0", - "description": "前往周本", - "bgi_version": "0.35.1" - }, - "positions": [ - - { - "id": 1, - "x": 4022.01171875, - "y": 3063.54931640625, - "type": "teleport", - "move_mode": "walk", - "action": "", - "action_params": "" - }, - ] -} \ No newline at end of file diff --git a/repo/js/周本9-鲸鱼/main.js b/repo/js/周本9-鲸鱼/main.js deleted file mode 100644 index 6c5eb19c..00000000 --- a/repo/js/周本9-鲸鱼/main.js +++ /dev/null @@ -1,350 +0,0 @@ -(async function () {//鲸鱼周本 -//检测传送结束 await tpEndDetection(); -async function tpEndDetection() { - const region1 = RecognitionObject.ocr(1690, 230, 75, 350);// 队伍名称区域 - const region2 = RecognitionObject.ocr(872, 681, 180, 30);// 点击任意处关闭 - let tpTime = 0; - await sleep(1500);//点击传送后等待一段时间避免误判 - //最多30秒传送时间 - while (tpTime < 300) { - - let capture = captureGameRegion(); - let res1 = capture.find(region1); - let res2 = capture.find(region2); - if (!res1.isEmpty()|| !res2.isEmpty()){ - log.info("传送完成"); - await sleep(1000);//传送结束后有僵直 - click(960, 810);//点击任意处 - await sleep(500); - return; - } - tpTime++; - await sleep(100); - } - throw new Error('传送时间超时'); -} -//吃料理 -async function eatFood() { -let foodName = settings.foodName ?? 0; -if(foodName){ -const foodSum = foodName.split('-'); -log.info("开始吃菜"); -await sleep(1000); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -for(let i = 0; i < foodSum.length; i++){ -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(1000); -inputText(foodSum[i]); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -} -keyPress("ESCAPE"); -await sleep(1500); -}} -//检测角色是否阵亡,并前往吃药复活 -async function resurgenceDetectionAndEatFood() { -const region1 = RecognitionObject.ocr(1170, 780, 75, 35);// 复活料理区域 -const region2 = RecognitionObject.ocr(545, 360, 800, 45);// 料理冷却区域 -let recoveryFoodName = settings.recoveryFoodName ?? 0; -let resurgenceFoodName = settings.resurgenceFoodName ?? 0; -if(resurgenceFoodName && recoveryFoodName){ -keyPress("1"); -await sleep(100); -keyPress("2"); -await sleep(100); -keyPress("3"); -await sleep(100); -keyPress("4"); -await sleep(200); -let capture = captureGameRegion(); -let res1 = capture.find(region1); -let res2 = capture.find(region2); - if (res1.isEmpty()){ - return; - } - else if (!res1.isEmpty() && !res2.isEmpty()) { - log.info("复活料理处于冷却中"); - keyPress("ESCAPE"); - await sleep(1000); - await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 - throw new Error('战斗失败'); - return; - } - else if (!res1.isEmpty() && res2.isEmpty()) { - log.info("检测到阵亡角色……复活吧!我的爱人!!!"); - keyPress("ESCAPE"); - await eatResurgenceFood();//满血复活 - return; - } -}} - -//吃料理复活 -async function eatResurgenceFood() { -let recoveryFoodName = settings.recoveryFoodName ?? 0; -let resurgenceFoodName = settings.resurgenceFoodName ?? 0; -const region = RecognitionObject.ocr(800, 200, 315, 32);// 复活对象检测 -const clickPositions = [ - { x: 760, y: 440 }, // 角色1 - { x: 900, y: 440 }, // 角色2 - { x: 1040, y: 440 }, // 角色3 - { x: 1180, y: 440 } // 角色4 -]; -if(resurgenceFoodName && recoveryFoodName){ -log.info("开始吃菜"); -await sleep(500); -keyPress("B");//打开背包 -await sleep(2000); -click(863, 51);//选择食物 -await sleep(1000); -click(170, 1020);//筛选 -await sleep(1000); -click(195, 1020);//重置 -await sleep(1000); -click(110, 110);//输入名字 -await sleep(200); -click(110, 110); -await sleep(1000); -inputText(`${resurgenceFoodName}`); -await sleep(500); -click(490, 1020);//确认筛选 -await sleep(1000); -click(180, 180);//选择第一个食物 -await sleep(1000); -click(1690, 1015);//使用 -await sleep(1000); -// 使用 for 循环点击每个位置 -for (let i = 0; i < clickPositions.length; i++) { - const position = clickPositions[i]; - click(position.x, position.y); - await sleep(800); - click(1200,770);//确认 - await sleep(800); - let capture = captureGameRegion(); - let res = capture.find(region); - if (res.isEmpty()){ - keyPress("ESCAPE"); - await sleep(1000); - click(170, 1020);//筛选 - await sleep(1000); - click(195, 1020);//重置 - await sleep(1000); - click(110, 110);//输入名字 - await sleep(1000); - inputText(`${recoveryFoodName}`); - await sleep(500); - click(490, 1020);//确认筛选 - await sleep(1000); - click(180, 180);//选择第一个食物 - await sleep(1000); - click(1690, 1015);//使用 - await sleep(500); - click(position.x, position.y); - await sleep(500); - click(1200,770);//吃第一个 - await sleep(500); - click(1200,770);//吃第二个 - await sleep(500); - click(1350,290);//退出 - await sleep(500); - keyPress("ESCAPE"); - await sleep(400); - log.info("我又好了,嘿嘿"); - break; - } - await sleep(1000); - } - } -} - -//征讨之花领奖 -const autoNavigateToReward = async () => { - // 定义识别对象 - const boxIconRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/box.png")); - const rewardTextRo = RecognitionObject.Ocr(1210, 515, 200, 50);//领奖区域检测 - - let advanceNum = 0;//前进次数 - //调整为俯视视野 - middleButtonClick(); - await sleep(800); - moveMouseBy(0, 1030); - await sleep(400); - moveMouseBy(0, 920); - await sleep(400); - moveMouseBy(0, 710); - log.info("开始领奖"); - while (true) { - // 1. 优先检查是否已到达领奖点 - let captureRegion = captureGameRegion(); - let rewardTextArea = captureRegion.DeriveCrop(1210, 515, 200, 50); - let rewardResult = rewardTextArea.find(RecognitionObject.ocrThis); - // 检测到特点文字则结束!!! - if (rewardResult.text == "接触征讨之花") { - log.info("已到达领奖点,检测到文字: " + rewardResult.text); - return; - } - else if(advanceNum > 30){ - throw new Error('前进时间超时'); - } - // 2. 未到达领奖点,则调整视野 - for(let i = 0; i < 100; i++){ - captureRegion = captureGameRegion(); - let iconRes = captureRegion.Find(boxIconRo); - let climbTextArea = captureRegion.DeriveCrop(1808, 1030, 25, 25); - let climbResult = climbTextArea.find(RecognitionObject.ocrThis); - // 检查是否处于攀爬状态 - if (climbResult.isEmpty()){ - log.info("检侧进入攀爬状态,尝试脱离"); - keyPress("x"); - await sleep(1000); - keyDown("a"); - await sleep(800); - keyUp("a"); - keyDown("w"); - await sleep(800); - keyUp("w"); - } - if (iconRes.x >= 920 && iconRes.x <= 980 && iconRes.y <= 540) { - advanceNum++; - log.info(`视野已调正,前进第${advanceNum}次`); - break; - } else { - // 小幅度调整 - if(iconRes.y >= 520) moveMouseBy(0, 920); - let adjustAmount = iconRes.x < 920 ? -20 : 20; - let distanceToCenter = Math.abs(iconRes.x - 920); // 计算与920的距离 - let scaleFactor = Math.max(1, Math.floor(distanceToCenter / 50)); // 根据距离缩放,最小为1 - let adjustAmount2 = iconRes.y < 540 ? scaleFactor : 10; - moveMouseBy(adjustAmount * adjustAmount2, 0); - await sleep(100); - } - if(i > 97) throw new Error('视野调整超时'); - } - // 3. 前进一小步 - keyDown("w"); - await sleep(500); - keyUp("w"); - await sleep(200); // 等待角色移动稳定 - } -} - -//执行战斗并检测结束 -async function autoFightAndEndDetection() { - // 定义两个检测区域 - const region1 = RecognitionObject.ocr(750, 0, 420, 110);//区域一 BOSS名称 - const region2 = RecognitionObject.ocr(840, 935, 230, 40);//区域二 成功倒计时 - const region3 = RecognitionObject.ocr(1690, 230, 75, 350);//区域三 队伍名称 - let challengeTime = 0; - let challengeNum = 0; - //12分钟兜底 - while (challengeTime < 6000) { - // 捕获游戏区域 - let capture = captureGameRegion(); - // 检测两个区域的OCR结果 - let res1 = capture.find(region1); - let res2 = capture.find(region2); - let res3 = capture.find(region3); - let hasText1 = !res1.isEmpty() && res1.text.trim().length > 0; - let hasText2 = !res2.isEmpty() && res2.text.trim().length > 0; - let hasText3 = !res3.isEmpty() && res3.text.trim().length > 0; - // 情况1: 区域1有文字 且 区域2无文字 且 区域3有文字 → 执行AutoFight - if (hasText1 && !hasText2 && hasText3) { - await resurgenceDetectionAndEatFood(); - challengeNum++; - await sleep(800);//避免切人冷却,导致角色识别失败 - log.info(`执行第${challengeNum}次战斗`); - challengeTime = challengeTime + 205; - try { - await dispatcher.runTask(new SoloTask("AutoFight")); - } catch (error) { - log.info("启动战斗失败,尝试重新启动"); - await sleep(500); - } - } - // 情况2: 区域2有文字 且 区域1无文字 且 区域3有文字 → 结束循环 - else if (hasText2 && !hasText1 && hasText3) { - log.info("检测到挑战成功"); - break; - } - // 情况3: 区域2无文字区域1无文字区域3有文字 →BOSS二阶段,需要移动触发 - else if (!hasText2 && !hasText1 && hasText3) { -/* - log.info("检测到BOSS进入二阶段"); - try { - await dispatcher.runTask(new SoloTask("AutoFight")); - } catch (error) { - log.info("启动战斗失败,尝试重新启动"); - await sleep(500); - } -*/ - } - // 情况4: 三个区域均无文字,可能处于转场动画,尝试点击快进 - else if (!hasText1 && !hasText2 && !hasText3){ -/* - log.info("进入过场动画尝试快进"); - await sleep(400); - click(1765, 55); - await sleep(400); - click(1765, 55); -*/ - } - - challengeTime = challengeTime + 1; - // 每次检测间隔100毫秒,避免CPU占用过高 - await sleep(100); - } -} - - -//通用:前往副本(副本外) -await sleep(1000); -await pathingScript.runFile("assets/recover.json"); -await sleep(5000); -await pathingScript.runFile("assets/tp.json"); -await sleep(1000); -keyDown("w"); -await sleep(2000); -keyUp("w"); -await sleep(1000); -keyPress("F"); -await sleep(2000); -click(1725, 1020);//单人挑战 -await sleep(300); -click(1180, 760);//队伍等级偏低、体力不够可能会出弹窗 -await sleep(2000); -click(1725, 1020);//开始挑战 -await tpEndDetection(); - -//副本内前往BOSS处 -await eatFood();//嗑药 -keyPress("1"); -await sleep(1000);//切回固定行走位 -await autoFightAndEndDetection();//一直战斗直到检测到结束 - -//领奖并退出 -await autoNavigateToReward();//前往地脉之花 -await sleep(1000); -keyPress("F");//领奖 -await sleep(1000); -click(950, 750);//使用树脂 -await sleep(6000); -click(975, 1000);//退出秘境 -await tpEndDetection(); -await genshin.tp(2297.6201171875,-824.5869140625);//传送到神像回血 -await sleep(1000); -keyPress("M");//展示剩余体力 -await sleep(1000); -notification.send('挑战完成'); - -})(); diff --git a/repo/js/周本9-鲸鱼/manifest.json b/repo/js/周本9-鲸鱼/manifest.json deleted file mode 100644 index 577f698d..00000000 --- a/repo/js/周本9-鲸鱼/manifest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "manifest_version": 1, - "name": "鲸鱼周本刷取", - "version": "2.2", - "description": "需0.44.6及以上版本,兼容所有正常队伍及战斗策略,但还是建议在JS设置中选择合适的防御料理(推荐骇浪派)。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本原地版q是14s,建议可以比正常单轮时间多个1s,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。演示视频https://www.bilibili.com/video/BV1cpGCz6EWN/?vd_source=9dfaf88af48ecc0ff95a41f1145af7a2。", - "authors": [ - { - "name": "柒叶子", - "links": "https://github.com/5117600049" - } - ], - "settings_ui": "settings.json", - "main": "main.js" -} \ No newline at end of file diff --git a/repo/js/周本9-鲸鱼/settings.json b/repo/js/周本9-鲸鱼/settings.json deleted file mode 100644 index da73a045..00000000 --- a/repo/js/周本9-鲸鱼/settings.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "name": "foodName", - "type": "input-text", - "label": "请输入料理名称,多食物用法(攻击-药剂-防御)" - }, - { - "name": "resurgenceFoodName", - "type": "input-text", - "label": "请输入复活料理名称 " - }, - { - "name": "recoveryFoodName", - "type": "input-text", - "label": "请输入回血料理名称 " - } - ] diff --git a/repo/js/周本9-鲸鱼/周本队原地版q.txt b/repo/js/周本9-鲸鱼/周本队原地版q.txt deleted file mode 100644 index 328ca16c..00000000 --- a/repo/js/周本9-鲸鱼/周本队原地版q.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 wait(0.2),e(hold) -芙宁娜 e,q -雷神 e -芭芭拉 e,q,attack(4) - - - - - diff --git a/repo/js/周本9-鲸鱼/周本队火神原地版.txt b/repo/js/周本9-鲸鱼/周本队火神原地版.txt deleted file mode 100644 index 6579d72b..00000000 --- a/repo/js/周本9-鲸鱼/周本队火神原地版.txt +++ /dev/null @@ -1,9 +0,0 @@ -钟离 e(hold) -芙宁娜 q,e -玛薇卡 e -芭芭拉 e,attack(5.5) -钟离 e(hold) -芭芭拉 e,attack(10) - - - diff --git a/repo/js/周本一条龙/assets/box.png b/repo/js/周本一条龙/assets/box.png deleted file mode 100644 index 521895c4..00000000 Binary files a/repo/js/周本一条龙/assets/box.png and /dev/null differ diff --git a/repo/js/周本一条龙/assets/weeklyBoss1.txt b/repo/js/周本一条龙/assets/weeklyBoss1.txt deleted file mode 100644 index cfe6d61a..00000000 --- a/repo/js/周本一条龙/assets/weeklyBoss1.txt +++ /dev/null @@ -1 +0,0 @@ -2025-07-14T00:31:54.692Z \ No newline at end of file diff --git a/repo/js/周本一条龙/assets/weeklyBoss10.txt b/repo/js/周本一条龙/assets/weeklyBoss10.txt deleted file mode 100644 index 2ce6f9e3..00000000 --- a/repo/js/周本一条龙/assets/weeklyBoss10.txt +++ /dev/null @@ -1 +0,0 @@ -2025-06-20T01:05:51.480Z \ No newline at end of file diff --git a/repo/js/周本一条龙/assets/weeklyBoss11.txt b/repo/js/周本一条龙/assets/weeklyBoss11.txt deleted file mode 100644 index 1ddb57f9..00000000 --- a/repo/js/周本一条龙/assets/weeklyBoss11.txt +++ /dev/null @@ -1 +0,0 @@ -2025-07-14T00:46:28.393Z \ No newline at end of file diff --git a/repo/js/周本一条龙/assets/weeklyBoss12.txt b/repo/js/周本一条龙/assets/weeklyBoss12.txt deleted file mode 100644 index 507bc520..00000000 --- a/repo/js/周本一条龙/assets/weeklyBoss12.txt +++ /dev/null @@ -1 +0,0 @@ -2025-07-14T00:38:22.021Z \ No newline at end of file diff --git a/repo/js/周本一条龙/assets/weeklyBoss13.txt b/repo/js/周本一条龙/assets/weeklyBoss13.txt deleted file mode 100644 index 2ce6f9e3..00000000 --- a/repo/js/周本一条龙/assets/weeklyBoss13.txt +++ /dev/null @@ -1 +0,0 @@ -2025-06-20T01:05:51.480Z \ No newline at end of file diff --git a/repo/js/周本一条龙/assets/weeklyBoss14.txt b/repo/js/周本一条龙/assets/weeklyBoss14.txt deleted file mode 100644 index 2ce6f9e3..00000000 --- a/repo/js/周本一条龙/assets/weeklyBoss14.txt +++ /dev/null @@ -1 +0,0 @@ -2025-06-20T01:05:51.480Z \ No newline at end of file diff --git a/repo/js/周本一条龙/assets/weeklyBoss2.txt b/repo/js/周本一条龙/assets/weeklyBoss2.txt deleted file mode 100644 index 5fed3e7f..00000000 --- a/repo/js/周本一条龙/assets/weeklyBoss2.txt +++ /dev/null @@ -1 +0,0 @@ -2025-07-14T01:16:36.740Z \ No newline at end of file diff --git a/repo/js/周本一条龙/assets/weeklyBoss3.txt b/repo/js/周本一条龙/assets/weeklyBoss3.txt deleted file mode 100644 index 2ce6f9e3..00000000 --- a/repo/js/周本一条龙/assets/weeklyBoss3.txt +++ /dev/null @@ -1 +0,0 @@ -2025-06-20T01:05:51.480Z \ No newline at end of file diff --git a/repo/js/周本一条龙/assets/weeklyBoss4.txt b/repo/js/周本一条龙/assets/weeklyBoss4.txt deleted file mode 100644 index 9c37376a..00000000 --- a/repo/js/周本一条龙/assets/weeklyBoss4.txt +++ /dev/null @@ -1 +0,0 @@ -2025-07-10T07:11:27.005Z \ No newline at end of file diff --git a/repo/js/周本一条龙/assets/weeklyBoss5.txt b/repo/js/周本一条龙/assets/weeklyBoss5.txt deleted file mode 100644 index 98379d77..00000000 --- a/repo/js/周本一条龙/assets/weeklyBoss5.txt +++ /dev/null @@ -1 +0,0 @@ -2025-07-10T07:22:55.711Z \ No newline at end of file diff --git a/repo/js/周本一条龙/assets/weeklyBoss6.txt b/repo/js/周本一条龙/assets/weeklyBoss6.txt deleted file mode 100644 index 2ce6f9e3..00000000 --- a/repo/js/周本一条龙/assets/weeklyBoss6.txt +++ /dev/null @@ -1 +0,0 @@ -2025-06-20T01:05:51.480Z \ No newline at end of file diff --git a/repo/js/周本一条龙/assets/weeklyBoss7.txt b/repo/js/周本一条龙/assets/weeklyBoss7.txt deleted file mode 100644 index 2ce6f9e3..00000000 --- a/repo/js/周本一条龙/assets/weeklyBoss7.txt +++ /dev/null @@ -1 +0,0 @@ -2025-06-20T01:05:51.480Z \ No newline at end of file diff --git a/repo/js/周本一条龙/assets/weeklyBoss8.txt b/repo/js/周本一条龙/assets/weeklyBoss8.txt deleted file mode 100644 index 02cda928..00000000 --- a/repo/js/周本一条龙/assets/weeklyBoss8.txt +++ /dev/null @@ -1 +0,0 @@ -2025-07-10T13:17:51.013Z \ No newline at end of file diff --git a/repo/js/周本一条龙/assets/weeklyBoss9.txt b/repo/js/周本一条龙/assets/weeklyBoss9.txt deleted file mode 100644 index 2ce6f9e3..00000000 --- a/repo/js/周本一条龙/assets/weeklyBoss9.txt +++ /dev/null @@ -1 +0,0 @@ -2025-06-20T01:05:51.480Z \ No newline at end of file diff --git a/repo/js/周本一条龙/assets/前往狼王.json b/repo/js/周本一条龙/assets/前往狼王.json deleted file mode 100644 index cd2d6e95..00000000 --- a/repo/js/周本一条龙/assets/前往狼王.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "info": { - "name": "未命名路径", - "type": "collect", - "author": "柒叶子", - "version": "1.0", - "description": "前往狼王", - "bgi_version": "0.35.1" - }, - "positions": [ - { - "id": 1, - "action": "", - "move_mode": "walk", - "type": "teleport", - "x": -251.5966796875, - "y": 2256.586181640625, - "action_params": "" - }, - { - "id": 2, - "x": -239.8662109375, - "y": 2235.255859375, - "type": "path", - "move_mode": "dash", - "action": "", - "action_params": "" - }, - { - "id": 3, - "x": -243.6318359375, - "y": 2219.89599609375, - "type": "path", - "move_mode": "dash", - "action": "", - "action_params": "" - }, - { - "id": 4, - "x": -250.318359375, - "y": 2200.3515625, - "type": "path", - "move_mode": "fly", - "action": "", - "action_params": "" - }, - { - "id": 5, - "x": -263.7783203125, - "y": 2142.494140625, - "type": "path", - "move_mode": "dash", - "action": "", - "action_params": "" - }, - { - "id": 6, - "x": -266.06640625, - "y": 2100.711669921875, - "type": "path", - "move_mode": "dash", - "action": "", - "action_params": "" - }, - { - "id": 7, - "x": -273.099609375, - "y": 2053.126220703125, - "type": "path", - "move_mode": "walk", - "action": "", - "action_params": "" - }, - { - "id": 8, - "x": -276.521484375, - "y": 2028.33837890625, - "type": "path", - "move_mode": "fly", - "action": "stop_flying", - "action_params": "" - }, - { - "id": 9, - "x": -280.3447265625, - "y": 1999.419921875, - "type": "target", - "move_mode": "dash", - "action": "", - "action_params": "" - } - ] -} \ No newline at end of file diff --git a/repo/js/周本一条龙/readme.txt b/repo/js/周本一条龙/readme.txt deleted file mode 100644 index ad139d77..00000000 --- a/repo/js/周本一条龙/readme.txt +++ /dev/null @@ -1,41 +0,0 @@ - -配置组设置注意事项 -1、开启地图追踪行走配置 -2、关闭自动拾取 -3、开启战斗配置 -4、战斗策略选择"根据队伍自动选择" -5、关闭自动拾取 - -JS配置注意事项 -1、必须同时填写复活料理和恢复料理,才能正常复活 -2、战斗脚本中最好每个角色只上场一次,避免复活检测失效 -3、单轮战斗时长是指战斗脚本运行一轮所需要的时间,填写战斗时长可以精确到小数点后两位,我最常用的周本队大约是13.5秒 -4、战斗中只有四类料理可以生效,重复使用相同类型的料理会覆盖掉上一个,四类料理分别为攻击类、防御类、药剂类、冒险类 -5、需要勾选最后的用户协议才能正常运行 - -部分周本需要额外开盾,请将队伍中的护盾角色放在一号位!!! - -各周本注意事项: -"北风狼":避免使用风系和冰系的角色 - -"风魔龙":无 - -"公子":压力大时推荐护盾类料理 - -"若陀龙王":boss伤害较高,强烈建议填写护盾类料理 - -"女士":必须携带火后台才能挑战成功 - -"雷神":存在必杀机制,建议填写复活料理 - -"散兵":存在必杀机制,建议填写复活料理 - -"阿佩普":二阶段击杀小怪的时候,可能遇到草盾怪物,建议使用优先使用火后台, - -"吞星之鲸":无 - -"仆人":压力大时推荐护盾类料理,火抗药剂 - -"源焰之主":BOSS存在侵蚀机制,角色容易蒸发,关卡难度较大,强烈建议额外使用生命类料理和火抗药剂并填写复活料理 - -"门扉前的弈局":存在必杀机制,建议填写复活料理。此外boss开局可能进入撞棋子的模式,导致无法造成伤害,强烈建议开启满能量模式并吃点攻击料理,争取第一轮带走 boss避免挑战失败。 \ No newline at end of file