自动采集

wjdr
wangbing 12 months ago
parent 8323b3e0fc
commit c103ce8350

@ -91,12 +91,29 @@ public class Task_自动练兵 extends BaseTask {
macro.mouseLeftClick(viewRects2[1]);
macro.delay(1000);
Logger.info("点击兵营");
macro.mouseLeftClick(macro.of(268, 431));
macro.delay(1000);
Logger.info("点击训练");
macro.mouseLeftClick(macro.of(355, 632));
macro.delay(1000);
Logger.info("检测任意位置继续");
ViewRect _ = macro.waitAndMatchLegend("兵营_任意位置继续", 0.9, 2);
if (_ != null) {
Logger.info("点击继续");
macro.mouseLeftClick(_);
macro.delay(1500);
}
ViewRect _ = macro.waitAndMatchLegend("兵营_训练", 0.9, 2);
if (_ == null) {
Logger.error("训练失败,未检测到兵营训练");
return;
}
Logger.info("确认训练");
macro.mouseLeftClick(macro.of(396, 885));
macro.mouseLeftClick(_);
macro.delay(1000);
ViewRect _ = macro.matchLegend("兵营_返回", 0.9D);
@ -192,12 +209,29 @@ public class Task_自动练兵 extends BaseTask {
macro.mouseLeftClick(viewRects2[1]);
macro.delay(1000);
Logger.info("点击兵营");
macro.mouseLeftClick(macro.of(268, 431));
macro.delay(1000);
Logger.info("点击训练");
macro.mouseLeftClick(macro.of(355, 632));
macro.delay(1000);
Logger.info("检测任意位置继续");
ViewRect _ = macro.waitAndMatchLegend("兵营_任意位置继续", 0.9, 2);
if (_ != null) {
Logger.info("点击继续");
macro.mouseLeftClick(_);
macro.delay(1500);
}
ViewRect _ = macro.waitAndMatchLegend("兵营_训练", 0.9, 2);
if (_ == null) {
Logger.error("训练失败,未检测到兵营训练");
return;
}
Logger.info("确认训练");
macro.mouseLeftClick(macro.of(396, 885));
macro.mouseLeftClick(_);
macro.delay(1000);
ViewRect _ = macro.matchLegend("兵营_返回", 0.9D);
@ -293,12 +327,29 @@ public class Task_自动练兵 extends BaseTask {
macro.mouseLeftClick(viewRects2[1]);
macro.delay(1000);
Logger.info("点击兵营");
macro.mouseLeftClick(macro.of(268, 431));
macro.delay(1000);
Logger.info("点击训练");
macro.mouseLeftClick(macro.of(355, 632));
macro.delay(1000);
Logger.info("检测任意位置继续");
ViewRect _ = macro.waitAndMatchLegend("兵营_任意位置继续", 0.9, 2);
if (_ != null) {
Logger.info("点击继续");
macro.mouseLeftClick(_);
macro.delay(1500);
}
ViewRect _ = macro.waitAndMatchLegend("兵营_训练", 0.9, 2);
if (_ == null) {
Logger.error("训练失败,未检测到兵营训练");
return;
}
Logger.info("确认训练");
macro.mouseLeftClick(macro.of(396, 885));
macro.mouseLeftClick(_);
macro.delay(1000);
ViewRect _ = macro.matchLegend("兵营_返回", 0.9D);

Loading…
Cancel
Save

Powered by TurnKey Linux.