diff --git a/repo/js/周本10-仆人/main.js b/repo/js/周本10-仆人/main.js index b1bf8bd5..85484121 100644 --- a/repo/js/周本10-仆人/main.js +++ b/repo/js/周本10-仆人/main.js @@ -1,6 +1,30 @@ (async function () {//仆人周本 -await eatFood();//嗑药 +//检测传送结束 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; @@ -192,11 +216,9 @@ await sleep(300); click(1180, 760);//队伍等级偏低、体力不够可能会出弹窗 await sleep(2000); click(1725, 1020);//开始挑战 -await sleep(15000); +await tpEndDetection(); //副本内前往BOSS处 -click(960, 810);//点击任意处 -await sleep(2000); await eatFood();//嗑药 keyPress("1"); await sleep(1000);//切回固定行走位 diff --git a/repo/js/周本10-仆人/manifest.json b/repo/js/周本10-仆人/manifest.json index a381696e..2110de4d 100644 --- a/repo/js/周本10-仆人/manifest.json +++ b/repo/js/周本10-仆人/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "仆人周本自动刷取", - "version": "2.0", + "version": "2.1", "description": "需0.44.6及以上版本,兼容所有正常队伍及战斗策略,但还是建议在JS设置中选择合适的防御料理(推荐骇浪派)。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本原地版q是14s,看情况可以多加一秒,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。演示视频https://www.bilibili.com/video/BV1cpGCz6EWN/?vd_source=9dfaf88af48ecc0ff95a41f1145af7a2。", "authors": [ { diff --git a/repo/js/周本11-火龙/assets/box.png b/repo/js/周本11-火龙/assets/box.png new file mode 100644 index 00000000..521895c4 Binary files /dev/null and b/repo/js/周本11-火龙/assets/box.png differ diff --git a/repo/js/周本11-火龙/assets/recover.json b/repo/js/周本11-火龙/assets/recover.json new file mode 100644 index 00000000..a4e55f13 --- /dev/null +++ b/repo/js/周本11-火龙/assets/recover.json @@ -0,0 +1 @@ +{"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 new file mode 100644 index 00000000..ad79572f --- /dev/null +++ b/repo/js/周本11-火龙/assets/tp.json @@ -0,0 +1,22 @@ +{ + "info": { + "name": "未命名路径", + "type": "collect", + "author": "柒叶子", + "version": "1.0", + "description": "前往周本", + "bgiVersion": "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 new file mode 100644 index 00000000..284a9e16 --- /dev/null +++ b/repo/js/周本11-火龙/main.js @@ -0,0 +1,254 @@ +(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); +}} + +//征讨之花领奖 +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(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) { + challengeNum++; + await sleep(500);//避免切人冷却,导致角色识别失败 + log.info(`执行第${challengeNum}次战斗`); + challengeTime = challengeTime + 205; + + await dispatcher.runTask(new SoloTask("AutoFight")); + } + // 情况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 sleep(10000); + + + +})(); diff --git a/repo/js/周本11-火龙/manifest.json b/repo/js/周本11-火龙/manifest.json new file mode 100644 index 00000000..c3af6234 --- /dev/null +++ b/repo/js/周本11-火龙/manifest.json @@ -0,0 +1,14 @@ +{ + "manifest_version": 1, + "name": "源焰之主周本刷取", + "version": "2.1", + "description": "需0.44.6及以上版本,兼容所有正常队伍及战斗策略(队伍中必须有奶妈),但还是建议在JS设置中选择合适的防御料理(生命料理以及火抗药剂,没错侵蚀效果吃火抗,我自己发现的)。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本原地版q是14s,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。", + "authors": [ + { + "name": "柒叶子", + "link": "https://github.com/511760049" + } + ], + "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 new file mode 100644 index 00000000..e12ee5e8 --- /dev/null +++ b/repo/js/周本11-火龙/settings.json @@ -0,0 +1,7 @@ +[ + { + "name": "foodName", + "type": "input-text", + "label": "请输入料理的正确名称,多个食物用法(黄油鸡-耐热-月亮派) " + }, + ] diff --git a/repo/js/周本11-火龙/周本队原地版q.txt b/repo/js/周本11-火龙/周本队原地版q.txt new file mode 100644 index 00000000..328ca16c --- /dev/null +++ b/repo/js/周本11-火龙/周本队原地版q.txt @@ -0,0 +1,9 @@ +钟离 wait(0.2),e(hold) +芙宁娜 e,q +雷神 e +芭芭拉 e,q,attack(4) + + + + + diff --git a/repo/js/周本11-火龙/周本队火神原地版.txt b/repo/js/周本11-火龙/周本队火神原地版.txt new file mode 100644 index 00000000..6579d72b --- /dev/null +++ b/repo/js/周本11-火龙/周本队火神原地版.txt @@ -0,0 +1,9 @@ +钟离 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 new file mode 100644 index 00000000..521895c4 Binary files /dev/null and b/repo/js/周本12-魔女/assets/box.png differ diff --git a/repo/js/周本12-魔女/assets/recover.json b/repo/js/周本12-魔女/assets/recover.json new file mode 100644 index 00000000..a4e55f13 --- /dev/null +++ b/repo/js/周本12-魔女/assets/recover.json @@ -0,0 +1 @@ +{"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 new file mode 100644 index 00000000..7fe31315 --- /dev/null +++ b/repo/js/周本12-魔女/assets/tp.json @@ -0,0 +1,22 @@ +{ + "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 new file mode 100644 index 00000000..3488cbfd --- /dev/null +++ b/repo/js/周本12-魔女/main.js @@ -0,0 +1,226 @@ +(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){ +log.info("开始吃菜"); +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); +inputText(`${foodName}`); +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); +}} + +//征讨之花领奖 +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(800); + 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) { + challengeNum++; + await sleep(500);//避免切人冷却,导致角色识别失败 + capture = captureGameRegion(); + res1 = capture.find(region1); + res2 = capture.find(region2); + res3 = capture.find(region3); + hasText1 = !res1.isEmpty() && res1.text.trim().length > 0; + hasText2 = !res2.isEmpty() && res2.text.trim().length > 0; + hasText3 = !res3.isEmpty() && res3.text.trim().length > 0; + //二次检测避免无法启动战斗 + if (hasText1 && !hasText2 && hasText3){ + log.info(`执行第${challengeNum}次战斗`); + challengeTime = challengeTime + 205; + await dispatcher.runTask(new SoloTask("AutoFight")); + }} + // 情况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(1200); + keyUp("w"); + 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); +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 sleep(10000); + +})(); diff --git a/repo/js/周本12-魔女/manifest.json b/repo/js/周本12-魔女/manifest.json new file mode 100644 index 00000000..8b8b3ab4 --- /dev/null +++ b/repo/js/周本12-魔女/manifest.json @@ -0,0 +1,14 @@ +{ + "manifest_version": 1, + "name": "魔女周本刷取", + "version": "2.1", + "description": "需0.44.6及以上版本,兼容所有正常队伍(必须要有冻结反应)及战斗策略,但还是建议在JS设置中选择合适的防御料理(推荐骇浪派)。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本队厨神版是14s,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。", + "authors": [ + { + "name": "柒叶子", + "link": "https://github.com/511760049" + } + ], + "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 new file mode 100644 index 00000000..d70d6506 --- /dev/null +++ b/repo/js/周本12-魔女/settings.json @@ -0,0 +1,7 @@ +[ + { + "name": "foodName", + "type": "input-text", + "label": "请输入料理的正确名称 " + }, + ] \ No newline at end of file diff --git a/repo/js/周本12-魔女/周本队厨神版.txt b/repo/js/周本12-魔女/周本队厨神版.txt new file mode 100644 index 00000000..1004c602 --- /dev/null +++ b/repo/js/周本12-魔女/周本队厨神版.txt @@ -0,0 +1,9 @@ +钟离 wait(0.2),e(hold) +芙宁娜 e,q +爱可菲 e,q +芭芭拉 e,q,attack(3) + + + + + diff --git a/repo/js/周本2-风魔龙/main.js b/repo/js/周本2-风魔龙/main.js index 2cc609c8..e61c4995 100644 --- a/repo/js/周本2-风魔龙/main.js +++ b/repo/js/周本2-风魔龙/main.js @@ -1,25 +1,30 @@ (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 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检测结果执行不同操作的循环函数 @@ -60,10 +65,34 @@ async function autoFightAndEndDetection() { await sleep(500); } } + +//通用:前往副本(副本外) +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 tpEndDetection(); + +//副本内前往BOSS处 +keyPress("1"); +await sleep(1000);//切回1号位 +keyDown("w"); +await sleep(4000); +keyUp("w"); await autoFightAndEndDetection();//一直战斗直到检测到结束 + log.info(`等待柱子碎裂`); -await sleep(30000);//等待柱子碎裂 +await sleep(28000);//等待柱子碎裂 keyPress("1"); await sleep(1000);//切回钟离 log.info(`开始领奖`); diff --git a/repo/js/周本2-风魔龙/manifest.json b/repo/js/周本2-风魔龙/manifest.json index a45fada5..f26746f3 100644 --- a/repo/js/周本2-风魔龙/manifest.json +++ b/repo/js/周本2-风魔龙/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "风魔龙自动刷取", - "version": "2.0", + "version": "2.1", "bgi_version": "0.42.0", "description": "需0.44.6及以上版本,配队刚需芙芙等大范围索敌角色,保证战斗脚本没有任何的转向和移动应该可以正常领取。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本原地版q是14s,建议可以比正常单轮时间多个1s,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。演示视频https://www.bilibili.com/video/BV1cpGCz6EWN/?vd_source=9dfaf88af48ecc0ff95a41f1145af7a2。", "authors": [ diff --git a/repo/js/周本3-公子/main.js b/repo/js/周本3-公子/main.js index 863dc37c..3419f9ef 100644 --- a/repo/js/周本3-公子/main.js +++ b/repo/js/周本3-公子/main.js @@ -1,5 +1,28 @@ (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检测结果执行不同操作的循环函数 */ @@ -146,17 +169,16 @@ await sleep(300); click(1180, 760);//队伍等级偏低、体力不够可能会出弹窗 await sleep(2000); click(1725, 1020);//开始挑战 -await sleep(15000); -keyPress("1"); -await sleep(1000);//切回钟离 +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"); @@ -164,8 +186,6 @@ await sleep(2400);//再次校准位置 keyUp("s"); await autoNavigateToReward();//前往地脉之花 - - await sleep(1000); keyPress("F");//领奖 await sleep(1000); diff --git a/repo/js/周本3-公子/manifest.json b/repo/js/周本3-公子/manifest.json index 798cfb1c..0df7ac7a 100644 --- a/repo/js/周本3-公子/manifest.json +++ b/repo/js/周本3-公子/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "黄金屋自动刷取", - "version": "2.0", + "version": "2.1", "description": "需0.44.6及以上版本,兼容大部分正常队伍及战斗策略(禁止大幅度转向和移动技能龙王转圈、纳西达转圈、夜兰e……),但还是建议在JS设置中选择合适的防御料理(推荐骇浪派)。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本原地版q是14s,建议可以比正常单轮时间多个1s,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。演示视频https://www.bilibili.com/video/BV1cpGCz6EWN/?vd_source=9dfaf88af48ecc0ff95a41f1145af7a2。", "authors": [ { diff --git a/repo/js/周本4-若陀/main.js b/repo/js/周本4-若陀/main.js index 4dc0cfa3..1753c4e4 100644 --- a/repo/js/周本4-若陀/main.js +++ b/repo/js/周本4-若陀/main.js @@ -1,5 +1,28 @@ (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; @@ -188,11 +211,9 @@ await sleep(300); click(1180, 760);//队伍等级偏低、体力不够可能会出弹窗 await sleep(2000); click(1725, 1020);//开始挑战 -await sleep(15000); +await tpEndDetection(); //副本内前往BOSS处 -click(960, 810);//点击任意处 -await sleep(2000); await eatFood();//嗑药 keyPress("1"); await sleep(1000);//切回固定行走位 diff --git a/repo/js/周本4-若陀/manifest.json b/repo/js/周本4-若陀/manifest.json index 02faf7d1..442c0d0b 100644 --- a/repo/js/周本4-若陀/manifest.json +++ b/repo/js/周本4-若陀/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "若陀龙王自动刷取", - "version": "2.0", + "version": "2.1", "description": "需0.44.6及以上版本,兼容所有正常队伍及战斗策略,但还是建议在JS设置中选择合适的防御料理(推荐骇浪派)。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本原地版q是14s,看情况可以多加一秒,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。演示视频https://www.bilibili.com/video/BV1cpGCz6EWN/?vd_source=9dfaf88af48ecc0ff95a41f1145af7a2。", "authors": [ { diff --git a/repo/js/周本5-女士/main.js b/repo/js/周本5-女士/main.js index 50f2d47b..add507c7 100644 --- a/repo/js/周本5-女士/main.js +++ b/repo/js/周本5-女士/main.js @@ -1,5 +1,28 @@ (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; @@ -138,11 +161,9 @@ await sleep(300); click(1180, 760);//队伍等级偏低、体力不够可能会出弹窗 await sleep(2000); click(1725, 1020);//开始挑战 -await sleep(15000); +await tpEndDetection(); //副本内前往BOSS处 -click(960, 810);//点击任意处 -await sleep(2000); await eatFood();//嗑药 keyPress("1"); await sleep(1000);//切回固定行走位 diff --git a/repo/js/周本5-女士/manifest.json b/repo/js/周本5-女士/manifest.json index 91b9a0ea..e92099dd 100644 --- a/repo/js/周本5-女士/manifest.json +++ b/repo/js/周本5-女士/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "女士周本刷取", - "version": "2.0", + "version": "2.1", "description": "需0.44.6及以上版本,兼容大部分正常队伍及战斗策略(禁止大幅度转向和移动技能龙王转圈、纳西达转圈、夜兰e……),但还是建议在JS设置中选择合适的防御料理(推荐骇浪派)。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本火神原地版是28s,建议可以比正常单轮时间多个1s,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。演示视频https://www.bilibili.com/video/BV1cpGCz6EWN/?vd_source=9dfaf88af48ecc0ff95a41f1145af7a2。", "authors": [ { diff --git a/repo/js/周本6-雷神/main.js b/repo/js/周本6-雷神/main.js index be62ad58..582b19c7 100644 --- a/repo/js/周本6-雷神/main.js +++ b/repo/js/周本6-雷神/main.js @@ -1,4 +1,28 @@ (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 resurgenceDetectionAndEatFood() { const region1 = RecognitionObject.ocr(1170, 780, 75, 35);// 复活料理区域 @@ -249,11 +273,9 @@ await sleep(300); click(1180, 760);//队伍等级偏低、体力不够可能会出弹窗 await sleep(2000); click(1725, 1020);//开始挑战 -await sleep(15000); +await tpEndDetection(); //副本内前往BOSS处 -click(960, 810);//点击任意处 -await sleep(2000); await eatFood();//嗑药 keyPress("1"); await sleep(1000);//切回固定行走位 diff --git a/repo/js/周本6-雷神/manifest.json b/repo/js/周本6-雷神/manifest.json index d20fca55..1063b57b 100644 --- a/repo/js/周本6-雷神/manifest.json +++ b/repo/js/周本6-雷神/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "雷神周本刷取", - "version": "2.0", + "version": "2.1", "description": "需0.44.6及以上版本,兼容所有正常队伍及战斗策略(禁止大幅度转向和移动技能龙王转圈、纳西达转圈、夜兰e……),但还是建议在JS设置中选择合适的防御料理(推荐骇浪派),另外最重要的是,没有六命老芭,请一定要选择使用复活料理和恢复料理。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本原地版q是14s,建议可以比正常单轮时间多个1s,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。演示视频https://www.bilibili.com/video/BV1cpGCz6EWN/?vd_source=9dfaf88af48ecc0ff95a41f1145af7a2。", "authors": [ { diff --git a/repo/js/周本7-散兵/main.js b/repo/js/周本7-散兵/main.js index f0c7c99e..7540d944 100644 --- a/repo/js/周本7-散兵/main.js +++ b/repo/js/周本7-散兵/main.js @@ -1,5 +1,28 @@ (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 resurgenceDetectionAndEatFood() { const region1 = RecognitionObject.ocr(1170, 780, 75, 35);// 复活料理区域 @@ -251,11 +274,9 @@ await sleep(300); click(1180, 760);//队伍等级偏低、体力不够可能会出弹窗 await sleep(2000); click(1725, 1020);//开始挑战 -await sleep(15000); +await tpEndDetection(); //副本内前往BOSS处 -click(960, 810);//点击任意处 -await sleep(2000); await eatFood();//嗑药 keyPress("1"); await sleep(1000);//切回固定行走位 diff --git a/repo/js/周本7-散兵/manifest.json b/repo/js/周本7-散兵/manifest.json index ea3fb752..425e2d2f 100644 --- a/repo/js/周本7-散兵/manifest.json +++ b/repo/js/周本7-散兵/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "散兵周本刷取", - "version": "2.0", + "version": "2.1", "description": "需0.44.6及以上版本,兼容所有正常队伍及战斗策略(禁止大幅度转向和移动技能龙王转圈、纳西达转圈、夜兰e……),但还是建议在JS设置中选择合适的防御料理(推荐骇浪派),另外最重要的是,没有六命老芭,请一定要选择使用复活料理和恢复料理。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本原地版q是14s,建议可以比正常单轮时间多个1s,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。演示视频https://www.bilibili.com/video/BV1cpGCz6EWN/?vd_source=9dfaf88af48ecc0ff95a41f1145af7a2。", "authors": [ { diff --git a/repo/js/周本8-草龙/main.js b/repo/js/周本8-草龙/main.js index 60b1cac0..11773309 100644 --- a/repo/js/周本8-草龙/main.js +++ b/repo/js/周本8-草龙/main.js @@ -1,5 +1,28 @@ (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; @@ -180,11 +203,9 @@ await sleep(300); click(1180, 760);//队伍等级偏低、体力不够可能会出弹窗 await sleep(2000); click(1725, 1020);//开始挑战 -await sleep(15000); +await tpEndDetection(); //副本内前往BOSS处 -click(960, 810);//点击任意处 -await sleep(2000); await eatFood();//嗑药 keyPress("1"); await sleep(1000);//切回固定行走位 diff --git a/repo/js/周本8-草龙/manifest.json b/repo/js/周本8-草龙/manifest.json index 0fc80a6a..9583a072 100644 --- a/repo/js/周本8-草龙/manifest.json +++ b/repo/js/周本8-草龙/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "阿佩普周本刷取", - "version": "2.0", + "version": "2.1", "description": "需0.44.6及以上版本,兼容所有正常队伍及战斗策略,但还是建议在JS设置中选择合适的防御料理(推荐骇浪派)。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本火神原地版是28s,建议可以比正常单轮时间多个1s,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。演示视频https://www.bilibili.com/video/BV1cpGCz6EWN/?vd_source=9dfaf88af48ecc0ff95a41f1145af7a2。", "authors": [ { diff --git a/repo/js/周本9-鲸鱼/main.js b/repo/js/周本9-鲸鱼/main.js index fc11e6e9..70f7a239 100644 --- a/repo/js/周本9-鲸鱼/main.js +++ b/repo/js/周本9-鲸鱼/main.js @@ -1,5 +1,28 @@ (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; @@ -179,11 +202,9 @@ await sleep(300); click(1180, 760);//队伍等级偏低、体力不够可能会出弹窗 await sleep(2000); click(1725, 1020);//开始挑战 -await sleep(15000); +await tpEndDetection(); //副本内前往BOSS处 -click(960, 810);//点击任意处 -await sleep(2000); await eatFood();//嗑药 keyPress("1"); await sleep(1000);//切回固定行走位 diff --git a/repo/js/周本9-鲸鱼/manifest.json b/repo/js/周本9-鲸鱼/manifest.json index 3eb8fb6b..4825a36a 100644 --- a/repo/js/周本9-鲸鱼/manifest.json +++ b/repo/js/周本9-鲸鱼/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "鲸鱼周本刷取", - "version": "2.0", + "version": "2.1", "description": "需0.44.6及以上版本,兼容所有正常队伍及战斗策略,但还是建议在JS设置中选择合适的防御料理(推荐骇浪派)。脚本需要在调度器设置里开启路径追踪行走配置,选择切换的队伍,打开允许在JsScript中使用,打开战斗配置,选择战斗策略,关闭战斗结束拾取物品和万叶拾取,最后根据战斗脚本一次循环的时间,在战斗超时中填入,比如周本原地版q是14s,建议可以比正常单轮时间多个1s,另外搭配一条龙领奖无树脂脚本使用体验更佳哟。演示视频https://www.bilibili.com/video/BV1cpGCz6EWN/?vd_source=9dfaf88af48ecc0ff95a41f1145af7a2。", "authors": [ {