JS脚本:周本和打牌 bug 修复 (#716)
* 测试 * 你的提交信息 * 周本全2.0更新以及打牌更新 * Update manifest.json * Update manifest.json * Update manifest.json * Update manifest.json * Update manifest.json * Update manifest.json * Update manifest.json * Update manifest.json * Update manifest.json * 打牌、周本bug 修复
This commit is contained in:
@@ -152,12 +152,12 @@ const autoNavigateToReward = async () => {
|
||||
log.info("已到达领奖点,检测到文字: " + rewardResult.text);
|
||||
return;
|
||||
}
|
||||
else if(advanceNum > 30){
|
||||
else if(advanceNum > 20){
|
||||
throw new Error('前进时间超时');
|
||||
}
|
||||
// 前进一小步
|
||||
keyDown("w");
|
||||
await sleep(700);
|
||||
await sleep(500);
|
||||
keyUp("w");
|
||||
await sleep(100); // 等待角色移动稳定
|
||||
}
|
||||
@@ -189,11 +189,19 @@ async function autoFightAndEndDetection() {
|
||||
keyDown("s");
|
||||
await sleep(1800);
|
||||
keyUp("s");
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user