|
|
|
@ -48,6 +48,7 @@ public class Task_自动练兵 extends BaseTask {
|
|
|
|
|
Logger.info("训练完成,去领取");
|
|
|
|
|
macro.mouseLeftClick(viewRects2[0]);
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
|
|
|
|
|
Logger.info("点击领取");
|
|
|
|
|
macro.mouseLeftClick(macro.of(268, 431));
|
|
|
|
|
macro.delay(1000);
|
|
|
|
@ -63,7 +64,7 @@ public class Task_自动练兵 extends BaseTask {
|
|
|
|
|
Logger.info("检测任意位置继续");
|
|
|
|
|
ViewRect 兵营_任意位置继续 = macro.waitAndMatchLegend("兵营_任意位置继续", 0.9, 2);
|
|
|
|
|
if (兵营_任意位置继续 != null) {
|
|
|
|
|
Logger.error("点击继续");
|
|
|
|
|
Logger.info("点击继续");
|
|
|
|
|
macro.mouseLeftClick(兵营_任意位置继续);
|
|
|
|
|
macro.delay(1500);
|
|
|
|
|
}
|
|
|
|
@ -71,14 +72,16 @@ public class Task_自动练兵 extends BaseTask {
|
|
|
|
|
ViewRect 兵营_训练 = macro.waitAndMatchLegend("兵营_训练", 0.9, 2);
|
|
|
|
|
if (兵营_训练 == null) {
|
|
|
|
|
Logger.error("训练失败,未检测到兵营训练");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Logger.error("确认训练");
|
|
|
|
|
Logger.info("确认训练");
|
|
|
|
|
macro.mouseLeftClick(兵营_训练);
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
|
|
|
|
|
ViewRect 兵营_返回 = macro.matchLegend("兵营_返回", 0.9D);
|
|
|
|
|
if (兵营_返回 == null) {
|
|
|
|
|
Logger.error("兵营返回失败");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
macro.mouseLeftClick(兵营_返回);
|
|
|
|
|
macro.delay(1000);
|
|
|
|
@ -86,18 +89,20 @@ public class Task_自动练兵 extends BaseTask {
|
|
|
|
|
if (viewRects2[1] != null) {
|
|
|
|
|
Logger.info("兵营空闲,去练兵");
|
|
|
|
|
macro.mouseLeftClick(viewRects2[1]);
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
|
|
|
|
|
Logger.info("点击训练");
|
|
|
|
|
macro.mouseLeftClick(macro.of(355, 632));
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
|
|
|
|
|
Logger.error("确认训练");
|
|
|
|
|
Logger.info("确认训练");
|
|
|
|
|
macro.mouseLeftClick(macro.of(396, 885));
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
|
|
|
|
|
ViewRect 兵营_返回 = macro.matchLegend("兵营_返回", 0.9D);
|
|
|
|
|
if (兵营_返回 == null) {
|
|
|
|
|
Logger.error("兵营返回失败");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
macro.mouseLeftClick(兵营_返回);
|
|
|
|
|
macro.delay(1000);
|
|
|
|
@ -109,6 +114,7 @@ public class Task_自动练兵 extends BaseTask {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
macro.mouseLeftClick(rect);
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -143,6 +149,7 @@ public class Task_自动练兵 extends BaseTask {
|
|
|
|
|
Logger.info("训练完成,去领取");
|
|
|
|
|
macro.mouseLeftClick(viewRects2[0]);
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
|
|
|
|
|
Logger.info("点击领取");
|
|
|
|
|
macro.mouseLeftClick(macro.of(268, 431));
|
|
|
|
|
macro.delay(1000);
|
|
|
|
@ -158,7 +165,7 @@ public class Task_自动练兵 extends BaseTask {
|
|
|
|
|
Logger.info("检测任意位置继续");
|
|
|
|
|
ViewRect 兵营_任意位置继续 = macro.waitAndMatchLegend("兵营_任意位置继续", 0.9, 2);
|
|
|
|
|
if (兵营_任意位置继续 != null) {
|
|
|
|
|
Logger.error("点击继续");
|
|
|
|
|
Logger.info("点击继续");
|
|
|
|
|
macro.mouseLeftClick(兵营_任意位置继续);
|
|
|
|
|
macro.delay(1500);
|
|
|
|
|
}
|
|
|
|
@ -166,14 +173,16 @@ public class Task_自动练兵 extends BaseTask {
|
|
|
|
|
ViewRect 兵营_训练 = macro.waitAndMatchLegend("兵营_训练", 0.9, 2);
|
|
|
|
|
if (兵营_训练 == null) {
|
|
|
|
|
Logger.error("训练失败,未检测到兵营训练");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Logger.error("确认训练");
|
|
|
|
|
Logger.info("确认训练");
|
|
|
|
|
macro.mouseLeftClick(兵营_训练);
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
|
|
|
|
|
ViewRect 兵营_返回 = macro.matchLegend("兵营_返回", 0.9D);
|
|
|
|
|
if (兵营_返回 == null) {
|
|
|
|
|
Logger.error("兵营返回失败");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
macro.mouseLeftClick(兵营_返回);
|
|
|
|
|
macro.delay(1000);
|
|
|
|
@ -181,18 +190,20 @@ public class Task_自动练兵 extends BaseTask {
|
|
|
|
|
if (viewRects2[1] != null) {
|
|
|
|
|
Logger.info("兵营空闲,去练兵");
|
|
|
|
|
macro.mouseLeftClick(viewRects2[1]);
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
|
|
|
|
|
Logger.info("点击训练");
|
|
|
|
|
macro.mouseLeftClick(macro.of(355, 632));
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
|
|
|
|
|
Logger.error("确认训练");
|
|
|
|
|
Logger.info("确认训练");
|
|
|
|
|
macro.mouseLeftClick(macro.of(396, 885));
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
|
|
|
|
|
ViewRect 兵营_返回 = macro.matchLegend("兵营_返回", 0.9D);
|
|
|
|
|
if (兵营_返回 == null) {
|
|
|
|
|
Logger.error("兵营返回失败");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
macro.mouseLeftClick(兵营_返回);
|
|
|
|
|
macro.delay(1000);
|
|
|
|
@ -201,9 +212,11 @@ public class Task_自动练兵 extends BaseTask {
|
|
|
|
|
Logger.info("关闭面板");
|
|
|
|
|
ViewRect rect = macro.matchLegend("城镇_关闭面板", 0.6);
|
|
|
|
|
if (rect == null) {
|
|
|
|
|
Logger.error("关闭面板失败");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
macro.mouseLeftClick(rect);
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -238,6 +251,7 @@ public class Task_自动练兵 extends BaseTask {
|
|
|
|
|
Logger.info("训练完成,去领取");
|
|
|
|
|
macro.mouseLeftClick(viewRects2[0]);
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
|
|
|
|
|
Logger.info("点击领取");
|
|
|
|
|
macro.mouseLeftClick(macro.of(268, 431));
|
|
|
|
|
macro.delay(1000);
|
|
|
|
@ -253,7 +267,7 @@ public class Task_自动练兵 extends BaseTask {
|
|
|
|
|
Logger.info("检测任意位置继续");
|
|
|
|
|
ViewRect 兵营_任意位置继续 = macro.waitAndMatchLegend("兵营_任意位置继续", 0.9, 2);
|
|
|
|
|
if (兵营_任意位置继续 != null) {
|
|
|
|
|
Logger.error("点击继续");
|
|
|
|
|
Logger.info("点击继续");
|
|
|
|
|
macro.mouseLeftClick(兵营_任意位置继续);
|
|
|
|
|
macro.delay(1500);
|
|
|
|
|
}
|
|
|
|
@ -262,13 +276,14 @@ public class Task_自动练兵 extends BaseTask {
|
|
|
|
|
if (兵营_训练 == null) {
|
|
|
|
|
Logger.error("训练失败,未检测到兵营训练");
|
|
|
|
|
}
|
|
|
|
|
Logger.error("确认训练");
|
|
|
|
|
Logger.info("确认训练");
|
|
|
|
|
macro.mouseLeftClick(兵营_训练);
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
|
|
|
|
|
ViewRect 兵营_返回 = macro.matchLegend("兵营_返回", 0.9D);
|
|
|
|
|
if (兵营_返回 == null) {
|
|
|
|
|
Logger.error("兵营返回失败");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
macro.mouseLeftClick(兵营_返回);
|
|
|
|
|
macro.delay(1000);
|
|
|
|
@ -276,18 +291,20 @@ public class Task_自动练兵 extends BaseTask {
|
|
|
|
|
if (viewRects2[1] != null) {
|
|
|
|
|
Logger.info("兵营空闲,去练兵");
|
|
|
|
|
macro.mouseLeftClick(viewRects2[1]);
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
|
|
|
|
|
Logger.info("点击训练");
|
|
|
|
|
macro.mouseLeftClick(macro.of(355, 632));
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
|
|
|
|
|
Logger.error("确认训练");
|
|
|
|
|
Logger.info("确认训练");
|
|
|
|
|
macro.mouseLeftClick(macro.of(396, 885));
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
|
|
|
|
|
ViewRect 兵营_返回 = macro.matchLegend("兵营_返回", 0.9D);
|
|
|
|
|
if (兵营_返回 == null) {
|
|
|
|
|
Logger.error("兵营返回失败");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
macro.mouseLeftClick(兵营_返回);
|
|
|
|
|
macro.delay(1000);
|
|
|
|
@ -299,6 +316,7 @@ public class Task_自动练兵 extends BaseTask {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
macro.mouseLeftClick(rect);
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|