|
|
|
@ -6,6 +6,54 @@ import xyz.wbsite.jmacro.util.Logger;
|
|
|
|
|
|
|
|
|
|
public class Task_邮件奖励领取 extends BaseTask {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String[] numColor = new String[]{
|
|
|
|
|
"#f15252",
|
|
|
|
|
"#fe3838",
|
|
|
|
|
"#e33335",
|
|
|
|
|
"#f23335",
|
|
|
|
|
"#e12929",
|
|
|
|
|
"#f65455",
|
|
|
|
|
"#d44446",
|
|
|
|
|
"#871829",
|
|
|
|
|
"#c22526",
|
|
|
|
|
"#e92f2f",
|
|
|
|
|
"#d02020",
|
|
|
|
|
"#b64046",
|
|
|
|
|
"#cb4840",
|
|
|
|
|
"#f93a3a",
|
|
|
|
|
"#962433",
|
|
|
|
|
"#f73132",
|
|
|
|
|
"#c82a28",
|
|
|
|
|
"#c21b1d",
|
|
|
|
|
"#e22424",
|
|
|
|
|
"#fd3e3e",
|
|
|
|
|
"#ff3939",
|
|
|
|
|
"#a42e38",
|
|
|
|
|
"#c83532",
|
|
|
|
|
"#f83838",
|
|
|
|
|
"#ccb7c9",
|
|
|
|
|
"#c89dab",
|
|
|
|
|
"#c58794",
|
|
|
|
|
"#c58592",
|
|
|
|
|
"#c68b98",
|
|
|
|
|
"#c699a8",
|
|
|
|
|
"#cab4c4",
|
|
|
|
|
"#c894a1",
|
|
|
|
|
"#c7484c",
|
|
|
|
|
"#c73d40",
|
|
|
|
|
"#c4383a",
|
|
|
|
|
"#c7393a",
|
|
|
|
|
"#c8474b",
|
|
|
|
|
"#c65e64",
|
|
|
|
|
"#ce5252",
|
|
|
|
|
"#c3696b",
|
|
|
|
|
"#fb5d5d",
|
|
|
|
|
"#fe3535",
|
|
|
|
|
"#fe3535",
|
|
|
|
|
"#d4262d",
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
public Task_邮件奖励领取(JMacro macro, ViewRect viewRect) {
|
|
|
|
|
super(macro, viewRect);
|
|
|
|
|
}
|
|
|
|
@ -13,8 +61,9 @@ public class Task_邮件奖励领取 extends BaseTask {
|
|
|
|
|
@Override
|
|
|
|
|
public void task(JMacro macro, ViewRect viewRect) {
|
|
|
|
|
Logger.info("检测邮箱待领取礼包");
|
|
|
|
|
boolean b = macro.matchColor(macro.of(504,751,"#f93838"));
|
|
|
|
|
if (!b) {
|
|
|
|
|
|
|
|
|
|
boolean hasColor = macro.hasColor(macro.of(503,745,518,756), numColor);
|
|
|
|
|
if (!hasColor) {
|
|
|
|
|
Logger.info("邮箱无待领取礼包");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -24,7 +73,7 @@ public class Task_邮件奖励领取 extends BaseTask {
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
|
|
|
|
|
// 战争
|
|
|
|
|
if (!macro.matchColor(macro.of(98,71,"#6c9fd8"))) {
|
|
|
|
|
if (macro.hasColor(macro.of(84,65,106,78), numColor)) {
|
|
|
|
|
macro.mouseLeftClick(macro.of(198,71));
|
|
|
|
|
macro.delay(500);
|
|
|
|
|
|
|
|
|
@ -44,7 +93,7 @@ public class Task_邮件奖励领取 extends BaseTask {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 联盟
|
|
|
|
|
if (!macro.matchColor(macro.of(198,71,"#6c9fd8"))) {
|
|
|
|
|
if (macro.hasColor(macro.of(187,68,209,83), numColor)) {
|
|
|
|
|
macro.mouseLeftClick(macro.of(198,71));
|
|
|
|
|
macro.delay(500);
|
|
|
|
|
|
|
|
|
@ -64,7 +113,7 @@ public class Task_邮件奖励领取 extends BaseTask {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 系统
|
|
|
|
|
if (!macro.matchColor(macro.of(297, 70, "#6c9fd8"))) {
|
|
|
|
|
if (macro.hasColor(macro.of(291,62,311,78), numColor)) {
|
|
|
|
|
macro.mouseLeftClick(macro.of(297, 70));
|
|
|
|
|
macro.delay(500);
|
|
|
|
|
|
|
|
|
@ -84,7 +133,7 @@ public class Task_邮件奖励领取 extends BaseTask {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 报告
|
|
|
|
|
if (!macro.matchColor(macro.of(398, 71, "#6c9fd8"))) {
|
|
|
|
|
if (macro.hasColor(macro.of(390,64,411,77), numColor)) {
|
|
|
|
|
macro.mouseLeftClick(macro.of(398, 71));
|
|
|
|
|
macro.delay(500);
|
|
|
|
|
|
|
|
|
|