You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.3 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.example.jmacro.wjdr.task;
import com.example.jmacro.wjdr.JMacro;
import com.example.jmacro.wjdr.base.ScreenRect;
import com.example.jmacro.wjdr.util.Logger;
public class TaskRewards extends BaseTask {
public TaskRewards(JMacro jMacro, ScreenRect screenRect) {
super(jMacro, screenRect);
}
@Override
public void run() {
Logger.info("》》》探险奖励领取开始》》》");
Logger.info("定位【探险】按钮");
ScreenRect TAB_ = jMacro.waitAndMatchPic(this.screenRect, "L35,881-TAB_探险", 0.9);
if (TAB_ == null) {
return;
}
Logger.info("点击【探险】按钮");
jMacro.mouseLeftClick(TAB_);
ScreenRect _ = jMacro.waitAndMatchPic(this.screenRect, "L240,854-探险_按钮", 0.9);
if (_ == null) {
Logger.info("进入探险界面失败");
return;
}
Logger.info("进入探险界面成功");
Logger.info("定位领取按钮");
ScreenRect _ = jMacro.waitAndMatchPic(this.screenRect, "L426,667-探险_领取", 0.8);
if (_ == null) {
Logger.error("未检测到【探险_领取】领取终止");
return;
}
Logger.info("定位领取按钮成功,准备领取:{}", _.toString());
jMacro.mouseLeftClick(_);
ScreenRect _2 = jMacro.waitAndMatchPic(this.screenRect, "L230,664-探险_领取2", 0.8);
if (_2 == null) {
Logger.error("任务终止");
return;
}
jMacro.mouseLeftClick(_2);
ScreenRect _ = jMacro.waitAndMatchPic(this.screenRect, "L196,218-探险_获得奖励", 0.8);
if (_ == null) {
Logger.error("任务终止");
return;
}
jMacro.mouseLeftClick(_);
ScreenRect _ = jMacro.waitAndMatchPic(this.screenRect, "L4,4-探险_返回", 0.8);
if (_ == null) {
Logger.error("任务终止");
return;
}
jMacro.mouseLeftClick(_);
Logger.info("》》》探险奖励领取结束,返回城镇》》》");
}
}

Powered by TurnKey Linux.