parent
7a029ee49c
commit
ddc422c658
After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 570 KiB |
@ -0,0 +1,57 @@
|
||||
package xyz.wbsite.jmacro.wjdr.task;
|
||||
|
||||
import xyz.wbsite.jmacro.JMacro;
|
||||
import xyz.wbsite.jmacro.base.ViewRect;
|
||||
import xyz.wbsite.jmacro.util.Logger;
|
||||
|
||||
public class Task_邮箱礼包领取 extends BaseTask {
|
||||
|
||||
public Task_邮箱礼包领取(JMacro macro, ViewRect viewRect) {
|
||||
super(macro, viewRect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void task(JMacro macro, ViewRect viewRect) {
|
||||
Logger.info("检测邮箱待领取礼包");
|
||||
boolean b = macro.matchColor(macro.of(505, 750, "#fd3939"));
|
||||
if (!b) {
|
||||
Logger.info("邮箱无待领取礼包");
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.info("点击邮箱");
|
||||
macro.mouseLeftClick(macro.of(505, 750));
|
||||
macro.delay(1000);
|
||||
|
||||
// todo 战争
|
||||
// todo 联盟
|
||||
// todo 系统
|
||||
|
||||
// 报告
|
||||
if (macro.matchColor(macro.of(398,71,"#ff3a3a"))){
|
||||
macro.mouseLeftClick(macro.of(398, 71));
|
||||
macro.delay(500);
|
||||
|
||||
ViewRect 一键已读领取 = macro.waitAndMatchLegend("一键已读领取", 0.9);
|
||||
if (一键已读领取 == null) {
|
||||
Logger.info("异常结束");
|
||||
return;
|
||||
}
|
||||
macro.mouseLeftClick(一键已读领取);
|
||||
|
||||
ViewRect 点击任意位置退出 = macro.waitAndMatchLegend("点击任意位置退出", 0.9);
|
||||
|
||||
if (点击任意位置退出 == null) {
|
||||
Logger.info("异常结束");
|
||||
return;
|
||||
}
|
||||
macro.mouseLeftClick(点击任意位置退出);
|
||||
}
|
||||
|
||||
ViewRect rect = macro.matchLegend("返回", 0.9);
|
||||
if (rect != null) {
|
||||
macro.mouseLeftClick(rect);
|
||||
Logger.info("返回城镇");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in new issue