ICe 4 месяцев назад
Родитель
Сommit
7de59af094

+ 4 - 2
conf/config.properties

@@ -13,7 +13,7 @@ SceneMain = {"data":{"isDone":false,"count":0,"done":false},"nextResetTime":1716
 SceneMain_Challenge = {"data":{"isDone":false,"count":0,"done":false},"nextResetTime":1716411600000,"resetType":"DAILY"}
 SceneMain_Challenge_Extreme = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1716411600000,"resetType":"DAILY"}
 SceneMain_Energy = {"data":{"isDone":false,"count":0,"done":false},"nextResetTime":1716411600000,"resetType":"DAILY"}
-SceneMain_Energy_Free = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1716364800000,"resetType":"SPECIAL_RULES"}
+SceneMain_Energy_Free = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1716379200000,"resetType":"SPECIAL_RULES"}
 SceneMain_Energy_Friend = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1716411600000,"resetType":"DAILY"}
 SceneMain_Energy_Home = {"data":{"isDone":false,"count":2,"done":false},"nextResetTime":1716411600000,"resetType":"DAILY"}
 SceneMain_Energy_Home_Select = {"data":{"isDone":false,"count":6,"done":false},"nextResetTime":1716411600000,"resetType":"DAILY"}
@@ -27,6 +27,7 @@ SceneMain_Explore_King_hell = {"data":{"isDone":true,"count":0,"done":true},"nex
 SceneMain_Explore_King_kings = {"data":{"isDone":false,"count":9,"done":false},"nextResetTime":1716411600000,"resetType":"DAILY"}
 SceneMain_Explore_Leader = {"data":{"isDone":false,"count":0,"done":false},"nextResetTime":1716411600000,"resetType":"DAILY"}
 SceneMain_Explore_Leader_quick = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1716411600000,"resetType":"DAILY"}
+SceneMain_Explore_World = {"data":{"isDone":false,"count":0,"done":false},"nextResetTime":1716411600000,"resetType":"DAILY"}
 SceneMain_Family = {"data":{"isDone":false,"count":0,"done":false},"nextResetTime":1716411600000,"resetType":"DAILY"}
 SceneMain_Family_Help = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1716411600000,"resetType":"DAILY"}
 SceneMain_Family_Info = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1716411600000,"resetType":"DAILY"}
@@ -48,7 +49,8 @@ SceneMain_Mail = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1
 SceneMain_Qiyu = {"data":{"isDone":false,"count":0,"done":false},"nextResetTime":1716411600000,"resetType":"DAILY"}
 SceneMain_Qiyu_find = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1716411600000,"resetType":"DAILY"}
 SceneMain_Qiyu_helper = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1716411600000,"resetType":"DAILY"}
-SceneMain_Qiyu_quest = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1716364800000,"resetType":"SPECIAL_RULES"}
+SceneMain_Qiyu_quest = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1716379200000,"resetType":"SPECIAL_RULES"}
 SceneMain_Role = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1716411600000,"resetType":"DAILY"}
 SceneMain_Role_SkillPoint = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1716370289612,"resetType":"HOUR_3"}
+SceneMain_Task = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1716377131720,"resetType":"HOUR_3"}
 SceneMain_Welfare = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1716411600000,"resetType":"DAILY"}

BIN
opencv/scene/explore/world/back.png


BIN
opencv/scene/explore/world/check.png


BIN
opencv/scene/explore/world/enter.png


BIN
opencv/scene/explore/world/killed.png


BIN
opencv/scene/explore/world/over.png


BIN
opencv/scene/explore/world/scan.png


BIN
opencv/scene/explore/world/scanDo.png


BIN
opencv/scene/explore/world/scanOver.png


BIN
opencv/scene/explore/world/skip.png


BIN
opencv/scene/explore/world/start.png


BIN
opencv/scene/explore/world/start2.png


BIN
opencv/scene/task/back.png


BIN
opencv/scene/task/check.png


BIN
opencv/scene/task/enter.png


BIN
opencv/scene/task/ob.png


+ 137 - 0
src/main/java/com/sencorsta/rabs/obj/ai/scene/explore/SceneMain_Explore_World.java

@@ -0,0 +1,137 @@
+package com.sencorsta.rabs.obj.ai.scene.explore;
+
+import cn.hutool.core.date.DateField;
+import cn.hutool.core.date.DateTime;
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.date.Week;
+import cn.hutool.core.thread.ThreadUtil;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.sencorsta.rabs.annotation.SceneAnnotation;
+import com.sencorsta.rabs.obj.ai.AiManage;
+import com.sencorsta.rabs.obj.ai.api.BaseScene;
+import com.sencorsta.rabs.obj.ai.api.Scene;
+import org.opencv.core.Point;
+
+import java.awt.AWTException;
+
+/**
+ * 探索-世界boss
+ */
+@SceneAnnotation("SceneMain_Explore")
+public class SceneMain_Explore_World extends BaseScene implements Scene {
+    @JsonIgnore
+    @Override
+    public float getPriority() {
+        return 2.0f;
+    }
+
+    private static String PathEnter = System.getProperty("user.dir") + "\\opencv\\scene\\explore\\world\\enter.png";
+    private static String PathCheck = System.getProperty("user.dir") + "\\opencv\\scene\\explore\\world\\check.png";
+    private static String PathBack = System.getProperty("user.dir") + "\\opencv\\scene\\explore\\world\\back.png";
+    private static String PathScan = System.getProperty("user.dir") + "\\opencv\\scene\\explore\\world\\scan.png";
+    private static String PathScanDo = System.getProperty("user.dir") + "\\opencv\\scene\\explore\\world\\scanDo.png";
+    private static String PathScanOver = System.getProperty("user.dir") + "\\opencv\\scene\\explore\\world\\scanOver.png";
+    private static String PathStart = System.getProperty("user.dir") + "\\opencv\\scene\\explore\\world\\start.png";
+    private static String PathStart2 = System.getProperty("user.dir") + "\\opencv\\scene\\explore\\world\\start2.png";
+    private static String PathSkip = System.getProperty("user.dir") + "\\opencv\\scene\\explore\\world\\skip.png";
+    private static String PathOver = System.getProperty("user.dir") + "\\opencv\\scene\\explore\\world\\over.png";
+    private static String PathKilled = System.getProperty("user.dir") + "\\opencv\\scene\\explore\\world\\killed.png";
+
+    @Override
+    public void back() throws AWTException {
+        moveToClick(PathBack, AiManage.getInstance().getCheckPoint());
+    }
+
+    @Override
+    public void open() throws AWTException {
+        while (!check()) {
+            AiManage.getInstance().updateWindow();
+            ThreadUtil.sleep(2000);
+            if (checkHas(PathEnter, AiManage.getInstance().getCheckPoint())) {
+                moveToClick(PathEnter, AiManage.getInstance().getCheckPoint());
+                continue;
+            }
+        }
+    }
+
+    @Override
+    public boolean check() throws AWTException {
+        if (checkHas(PathCheck, AiManage.getInstance().getCheckPoint())) {
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    public void think() throws AWTException {
+        ThreadUtil.sleep(2000);
+        if (checkHas(PathScan, AiManage.getInstance().getCheckPoint())) {
+            moveToClick(PathScan, AiManage.getInstance().getCheckPoint());
+            ThreadUtil.sleep(3000);
+            for (int i = 0; i < 3; i++) {
+                moveToClick(PathScanDo, AiManage.getInstance().getCheckPoint());
+                ThreadUtil.sleep(8000);
+            }
+            moveToClick(PathScanOver, AiManage.getInstance().getCheckPoint());
+            ThreadUtil.sleep(2000);
+        }
+        //往右走
+        moveToClick(PathScan, AiManage.getInstance().getCheckPoint(),new Point(730,325));
+        ThreadUtil.sleep(5000);
+        moveToClick(PathScan, AiManage.getInstance().getCheckPoint(),new Point(730,325));
+        ThreadUtil.sleep(5000);
+
+        for (int i = 0; i < 3; i++) {
+            if (checkHas(PathKilled, AiManage.getInstance().getCheckPoint())){
+                break;
+            }
+
+            //打开界面
+            moveToClick(PathScan, AiManage.getInstance().getCheckPoint(),new Point(787,122));
+            ThreadUtil.sleep(2000);
+            moveToClick(PathStart, AiManage.getInstance().getCheckPoint());
+            ThreadUtil.sleep(3000);
+
+            while (!checkHas(PathOver, AiManage.getInstance().getCheckPoint())){
+                if (checkHas(PathSkip, AiManage.getInstance().getCheckPoint())){
+                    moveToClick(PathSkip, AiManage.getInstance().getCheckPoint());
+                    ThreadUtil.sleep(2000);
+                }
+
+                if (checkHas(PathStart2, AiManage.getInstance().getCheckPoint())){
+                    moveToClick(PathStart2, AiManage.getInstance().getCheckPoint());
+                    ThreadUtil.sleep(2000);
+                }
+                ThreadUtil.sleep(2000);
+            }
+            moveToClick(PathOver, AiManage.getInstance().getCheckPoint());
+            ThreadUtil.sleep(3000);
+        }
+        getRecord().getData().setDone(true);
+
+    }
+
+    @Override
+    public boolean isDone() {
+        return getRecord().getData().isDone();
+    }
+
+    @Override
+    public boolean isOpen() {
+        // 获取当前日期和时间
+        DateTime now = DateUtil.date();
+
+        // 获取当前日期的星期
+        Week week = DateUtil.dayOfWeekEnum(now);
+
+        // 检查是否为周一、周三或周五
+        boolean isSpecificWeekday = week == Week.MONDAY || week == Week.WEDNESDAY || week == Week.FRIDAY;
+
+        // 检查当前时间是否在中午12点以后
+        boolean isAfternoon = now.getField(DateField.HOUR_OF_DAY) >= 12;
+
+        // 返回两个条件是否都满足
+        return isSpecificWeekday && isAfternoon;
+    }
+
+}

+ 87 - 0
src/main/java/com/sencorsta/rabs/obj/ai/scene/task/SceneMain_Task.java

@@ -0,0 +1,87 @@
+package com.sencorsta.rabs.obj.ai.scene.task;
+
+import cn.hutool.core.thread.ThreadUtil;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.sencorsta.rabs.annotation.SceneAnnotation;
+import com.sencorsta.rabs.obj.ai.AiManage;
+import com.sencorsta.rabs.obj.ai.api.BaseScene;
+import com.sencorsta.rabs.obj.ai.api.Scene;
+import com.sencorsta.rabs.util.ResettableData;
+import org.opencv.core.Point;
+
+import java.awt.AWTException;
+
+/**
+ * 角色信息
+ */
+@SceneAnnotation("SceneMain")
+public class SceneMain_Task extends BaseScene implements Scene {
+    @JsonIgnore
+    @Override
+    public float getPriority() {
+        return 1.1f;
+    }
+
+    private static String PathEnter = System.getProperty("user.dir") + "\\opencv\\scene\\task\\enter.png";
+    private static String PathCheck = System.getProperty("user.dir") + "\\opencv\\scene\\task\\check.png";
+    private static String PathBack = System.getProperty("user.dir") + "\\opencv\\scene\\task\\back.png";
+    private static String PathOb = System.getProperty("user.dir") + "\\opencv\\scene\\task\\ob.png";
+    @Override
+    public void back() throws AWTException {
+        moveToClick(PathBack, AiManage.getInstance().getCheckPoint());
+    }
+
+    @Override
+    public void open() throws AWTException {
+        while (!check()) {
+            AiManage.getInstance().updateWindow();
+            ThreadUtil.sleep(2000);
+            if (checkHas(PathEnter, AiManage.getInstance().getCheckPoint())) {
+                moveToClick(PathEnter, AiManage.getInstance().getCheckPoint());
+                continue;
+            }
+        }
+    }
+
+    @Override
+    public boolean check() throws AWTException {
+        if (checkHas(PathCheck, AiManage.getInstance().getCheckPoint())) {
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    public void think() throws AWTException {
+        ThreadUtil.sleep(3000);
+
+
+        moveToClick(PathOb, AiManage.getInstance().getCheckPoint());
+        ThreadUtil.sleep(4000);
+
+        randomToClick();
+        ThreadUtil.sleep(2000);
+
+        moveToClick(PathOb, AiManage.getInstance().getCheckPoint());
+        ThreadUtil.sleep(4000);
+
+        randomToClick();
+        ThreadUtil.sleep(2000);
+
+        getRecord().getData().setDone(true);
+    }
+
+    @Override
+    public boolean isDone() {
+        return getRecord().getData().isDone();
+    }
+
+    /**
+     * 重置
+     */
+    @Override
+    public ResettableData.ResetType getType(){
+        return ResettableData.ResetType.HOUR_3;
+    }
+
+}