|
|
|
@ -60,7 +60,7 @@ public class Task_任务奖励领取 extends BaseTask {
|
|
|
|
|
@Override
|
|
|
|
|
public void task(JMacro macro, ViewRect viewRect) {
|
|
|
|
|
Logger.info("检测任务奖励");
|
|
|
|
|
boolean hasColor = macro.hasColor(macro.of(38, 752, 58, 764), numColor);
|
|
|
|
|
boolean hasColor = macro.hasColor(macro.of(38,751,56,765), numColor);
|
|
|
|
|
if (!hasColor) {
|
|
|
|
|
Logger.info("无任务奖励,跳过");
|
|
|
|
|
return;
|
|
|
|
@ -132,6 +132,42 @@ public class Task_任务奖励领取 extends BaseTask {
|
|
|
|
|
} while (领取 != null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Logger.info("检测成长任务2");
|
|
|
|
|
boolean 成长任务2 = macro.hasColor(macro.of(241,845,257,860), numColor);
|
|
|
|
|
if (成长任务2) {
|
|
|
|
|
Logger.info("领取成长任务");
|
|
|
|
|
macro.mouseLeftClick(macro.of(241,845,257,860));
|
|
|
|
|
macro.delay(500);
|
|
|
|
|
ViewRect 领取;
|
|
|
|
|
do {
|
|
|
|
|
领取 = macro.matchLegend("任务奖励_领取按钮", 0.9);
|
|
|
|
|
if (领取 != null) {
|
|
|
|
|
macro.mouseLeftClick(领取);
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
}
|
|
|
|
|
} while (领取 != null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Logger.info("检测每日任务2");
|
|
|
|
|
boolean 每日任务2 = macro.hasColor(macro.of(414,845,430,859), numColor);
|
|
|
|
|
if (每日任务2) {
|
|
|
|
|
Logger.info("领取每日任务");
|
|
|
|
|
macro.mouseLeftClick(macro.of(414,845,430,859));
|
|
|
|
|
macro.delay(500);
|
|
|
|
|
ViewRect 领取;
|
|
|
|
|
do {
|
|
|
|
|
领取 = macro.matchLegend("任务奖励_领取按钮", 0.9);
|
|
|
|
|
if (领取 != null) {
|
|
|
|
|
macro.mouseLeftClick(领取);
|
|
|
|
|
ViewRect 任务奖励_点击退出 = macro.waitAndMatchLegend("任务奖励_点击退出", 0.5, 2);
|
|
|
|
|
if (任务奖励_点击退出 != null) {
|
|
|
|
|
macro.mouseLeftClick(任务奖励_点击退出);
|
|
|
|
|
macro.delay(500);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} while (领取 != null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ViewRect legend = macro.matchLegend("任务奖励_关闭", 0.9);
|
|
|
|
|
if (legend != null) {
|
|
|
|
|
Logger.info("关闭任务奖励面板");
|
|
|
|
|