|
|
|
@ -89,7 +89,7 @@ public class Task_自动野怪 extends BaseTask {
|
|
|
|
|
macro.mouseLeftClick(城镇_关闭面板);
|
|
|
|
|
|
|
|
|
|
Logger.info("定位【野外】");
|
|
|
|
|
ViewRect 野外 = macro.matchLegend("野外", 0.99);
|
|
|
|
|
ViewRect 野外 = macro.matchLegend("野外", 0.8);
|
|
|
|
|
if (野外 == null) {
|
|
|
|
|
Logger.error("定位【野外】失败,刷怪终止");
|
|
|
|
|
return;
|
|
|
|
@ -178,7 +178,7 @@ public class Task_自动野怪 extends BaseTask {
|
|
|
|
|
macro.mouseLeftClick(野外_放大镜搜索);
|
|
|
|
|
|
|
|
|
|
Logger.info("等待搜索面板");
|
|
|
|
|
ViewRect 野外_搜索面板_搜索按钮 = macro.waitAndMatchLegend("野外_搜索面板_搜索按钮", 0.9);
|
|
|
|
|
ViewRect 野外_搜索面板_搜索按钮 = macro.waitAndMatchLegend("野外_搜索面板_搜索按钮", 0.6);
|
|
|
|
|
if (野外_搜索面板_搜索按钮 == null) {
|
|
|
|
|
Logger.error("未检测到【待搜索面板】,采矿终止");
|
|
|
|
|
return false;
|
|
|
|
@ -283,7 +283,7 @@ public class Task_自动野怪 extends BaseTask {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ViewRect 野外_资源搜索 = macro.matchLegend("野外_资源搜索", 0.9);
|
|
|
|
|
ViewRect 野外_资源搜索 = macro.matchLegend("野外_资源搜索", 0.6);
|
|
|
|
|
if (野外_资源搜索 == null) {
|
|
|
|
|
Logger.error("定位【野外_资源搜索】失败,挑战终止");
|
|
|
|
|
return false;
|
|
|
|
@ -293,22 +293,22 @@ public class Task_自动野怪 extends BaseTask {
|
|
|
|
|
macro.mouseLeftClick(野外_资源搜索);
|
|
|
|
|
macro.delay(1500);
|
|
|
|
|
|
|
|
|
|
ViewRect 野外_攻击 = macro.waitAndMatchLegend("野外_攻击", 0.9);
|
|
|
|
|
ViewRect 野外_攻击 = macro.waitAndMatchLegend("野外_攻击", 0.6);
|
|
|
|
|
if (野外_攻击 != null) {
|
|
|
|
|
macro.mouseLeftClick(野外_攻击);
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
|
|
|
|
|
macro.matchLegendAndClick("野外_攻击平均配置", 0.9);
|
|
|
|
|
macro.matchLegendAndClick("野外_攻击平均配置", 0.6);
|
|
|
|
|
macro.delay(1000);
|
|
|
|
|
|
|
|
|
|
boolean 体力不足 = macro.hasColor(macro.of(405, 899, 427, 915), "#f43b3b");
|
|
|
|
|
if (体力不足) {
|
|
|
|
|
Logger.info("体力不足,取消");
|
|
|
|
|
macro.matchLegendAndClick("自动野怪_返回", 0.9);
|
|
|
|
|
macro.matchLegendAndClick("自动野怪_返回", 0.6);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ViewRect[] viewRects = macro.waitAndMatchLegends(macro.of("野外_攻击出征", "野外_资源无对队列"), 0.9);
|
|
|
|
|
ViewRect[] viewRects = macro.waitAndMatchLegends(macro.of("野外_攻击出征", "野外_资源无对队列"), 0.6);
|
|
|
|
|
if (viewRects[0] != null) {
|
|
|
|
|
Logger.info("出征");
|
|
|
|
|
macro.mouseLeftClick(viewRects[0]);
|
|
|
|
|