|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
package com.example.jmacro.wjdr.demo;
|
|
|
|
|
package com.example.jmacro.wjdr.wjdr;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.convert.Convert;
|
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
@ -6,10 +6,10 @@ import com.example.jmacro.wjdr.JMacro;
|
|
|
|
|
import com.example.jmacro.wjdr.JMainService;
|
|
|
|
|
import com.example.jmacro.wjdr.base.Legend;
|
|
|
|
|
import com.example.jmacro.wjdr.base.ViewRect;
|
|
|
|
|
import com.example.jmacro.wjdr.demo.task.Task_探险领取;
|
|
|
|
|
import com.example.jmacro.wjdr.demo.task.Task_收留避难者;
|
|
|
|
|
import com.example.jmacro.wjdr.demo.task.Task_离线收益;
|
|
|
|
|
import com.example.jmacro.wjdr.demo.task.Task_采矿被攻击;
|
|
|
|
|
import com.example.jmacro.wjdr.wjdr.task.Task_探险领取;
|
|
|
|
|
import com.example.jmacro.wjdr.wjdr.task.Task_收留避难者;
|
|
|
|
|
import com.example.jmacro.wjdr.wjdr.task.Task_离线收益;
|
|
|
|
|
import com.example.jmacro.wjdr.wjdr.task.Task_采矿被攻击;
|
|
|
|
|
import com.example.jmacro.wjdr.util.Logger;
|
|
|
|
|
import com.example.jmacro.wjdr.util.TaskUtil;
|
|
|
|
|
|
|
|
|
@ -80,14 +80,14 @@ public class MacroForWJDR extends JMacro {
|
|
|
|
|
// 定位城镇
|
|
|
|
|
Boolean inMain = TaskUtil.retryTask(() -> {
|
|
|
|
|
{ // 定位弹框,关闭弹框
|
|
|
|
|
ViewRect rect = waitAndMatchLegend("城镇_充值", 0.8d);
|
|
|
|
|
ViewRect rect = matchLegend("城镇_充值", 0.8d);
|
|
|
|
|
if (rect != null) {
|
|
|
|
|
mouseLeftClick(rect);
|
|
|
|
|
Logger.info("检测到充值广告弹框,关闭弹框");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
{// 定位离线收益
|
|
|
|
|
ViewRect rect = waitAndMatchLegend("城镇_离线收益", 0.9);
|
|
|
|
|
ViewRect rect = matchLegend("城镇_离线收益", 0.9);
|
|
|
|
|
if (rect != null) {
|
|
|
|
|
mouseLeftClick(rect);
|
|
|
|
|
Logger.info("检测到离线收益弹框,关闭弹框");
|
|
|
|
@ -95,7 +95,7 @@ public class MacroForWJDR extends JMacro {
|
|
|
|
|
}
|
|
|
|
|
// 定位城镇
|
|
|
|
|
{
|
|
|
|
|
ViewRect rect = waitAndMatchLegend("城镇", 0.9);
|
|
|
|
|
ViewRect rect = matchLegend("城镇", 0.9);
|
|
|
|
|
if (rect != null) {
|
|
|
|
|
Logger.info("当前区域【野外】");
|
|
|
|
|
Logger.info("返回区域【城镇】");
|
|
|
|
@ -104,14 +104,14 @@ public class MacroForWJDR extends JMacro {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
{// 定位野外
|
|
|
|
|
ViewRect rect = waitAndMatchLegend("野外", 0.9);
|
|
|
|
|
ViewRect rect = matchLegend("野外", 0.9);
|
|
|
|
|
if (rect != null) {
|
|
|
|
|
Logger.info("当前区域【城镇】");
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}, 10, 10);
|
|
|
|
|
}, 10, 1000);
|
|
|
|
|
|
|
|
|
|
if (!Convert.toBool(inMain, false)) {
|
|
|
|
|
Logger.info("未进入城镇:退出线程");
|