ICe 3 tháng trước cách đây
mục cha
commit
401e32c983

+ 3 - 3
conf/config.properties

@@ -47,13 +47,13 @@ SceneMain_Fight_Gym_Wind = {"record":{"data":{"isDone":false,"count":0,"done":fa
 SceneMain_Fight_VS = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1717621200000,"resetType":"DAILY"}
 SceneMain_Fight_VS_Quick = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1717621200000,"resetType":"DAILY"}
 SceneMain_Glory = {"data":{"isDone":false,"count":0,"done":false},"nextResetTime":1717621200000,"resetType":"DAILY"}
-SceneMain_Glory_Match = {"record":{"data":{"isDone":false,"count":2,"done":false},"nextResetTime":1719781200000,"resetType":"MONTHLY"},"recordSub":{"data":{"isDone":false,"count":0,"done":false},"nextResetTime":1717621200000,"resetType":"DAILY"}}
+SceneMain_Glory_Match = {"record":{"data":{"isDone":false,"count":2,"done":false},"nextResetTime":1719781200000,"resetType":"MONTHLY"},"recordSub":{"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1717621200000,"resetType":"DAILY"}}
 SceneMain_Mail = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1717621200000,"resetType":"DAILY"}
 SceneMain_Qiyu = {"data":{"isDone":false,"count":0,"done":false},"nextResetTime":1717621200000,"resetType":"DAILY"}
 SceneMain_Qiyu_find = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1717621200000,"resetType":"DAILY"}
 SceneMain_Qiyu_helper = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1717621200000,"resetType":"DAILY"}
 SceneMain_Qiyu_quest = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1717588800000,"resetType":"SPECIAL_RULES"}
 SceneMain_Role = {"data":{"isDone":true,"count":99,"done":true},"nextResetTime":1717621200000,"resetType":"DAILY"}
-SceneMain_Role_SkillPoint = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1717577794234,"resetType":"HOUR_3"}
-SceneMain_Task = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1717577794234,"resetType":"HOUR_3"}
+SceneMain_Role_SkillPoint = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1717598985151,"resetType":"HOUR_3"}
+SceneMain_Task = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1717598985057,"resetType":"HOUR_3"}
 SceneMain_Welfare = {"data":{"isDone":true,"count":0,"done":true},"nextResetTime":1717621200000,"resetType":"DAILY"}

BIN
opencv/scene/glory/match/close2.png


BIN
opencv/scene/glory/match/lv.png


BIN
opencv/scene/glory/match/ob.png


BIN
opencv/scene/glory/match/reward.png


BIN
opencv/scene/tactic/emblem/back.png


BIN
opencv/scene/tactic/emblem/check.png


BIN
opencv/scene/tactic/emblem/enter1.png


BIN
opencv/scene/tactic/emblem/enter2.png


BIN
opencv/scene/tactic/emblem/enter3.png


BIN
opencv/scene/tactic/emblem/enter4.png


BIN
opencv/scene/tactic/emblem/enter5.png


BIN
opencv/scene/tactic/emblem/over.png


BIN
opencv/scene/tactic/emblem/pick1.png


BIN
opencv/scene/tactic/emblem/skip.png


BIN
opencv/scene/tactic/emblem/start.png


BIN
opencv/scene/tactic/emblem/start2.png


+ 119 - 0
src/main/java/com/sencorsta/rabs/obj/ai/scene/emblem/SceneMain_Emblem.java

@@ -0,0 +1,119 @@
+package com.sencorsta.rabs.obj.ai.scene.emblem;
+
+import cn.hutool.core.thread.ThreadUtil;
+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;
+
+/**
+ * 纹章试炼
+ */
+@SceneAnnotation("SceneMain")
+public class SceneMain_Emblem extends BaseScene implements Scene {
+    @Override
+    public float getPriority() {
+        return 1.9f;
+    }
+
+    private static String PathCheck = System.getProperty("user.dir") + "\\opencv\\scene\\tactic\\emblem\\check.png";
+    private static String PathBack = System.getProperty("user.dir") + "\\opencv\\scene\\tactic\\emblem\\back.png";
+    private static String PathEnter1 = System.getProperty("user.dir") + "\\opencv\\scene\\tactic\\emblem\\enter1.png";
+    private static String PathEnter2 = System.getProperty("user.dir") + "\\opencv\\scene\\tactic\\emblem\\enter2.png";
+    private static String PathEnter3 = System.getProperty("user.dir") + "\\opencv\\scene\\tactic\\emblem\\enter3.png";
+    private static String PathEnter4 = System.getProperty("user.dir") + "\\opencv\\scene\\tactic\\emblem\\enter4.png";
+    private static String PathEnter5 = System.getProperty("user.dir") + "\\opencv\\scene\\tactic\\emblem\\enter5.png";
+    private static String PathPick1 = System.getProperty("user.dir") + "\\opencv\\scene\\tactic\\emblem\\pick1.png";
+    private static String PathStart = System.getProperty("user.dir") + "\\opencv\\scene\\tactic\\emblem\\start.png";
+    private static String PathStart2 = System.getProperty("user.dir") + "\\opencv\\scene\\tactic\\emblem\\start2.png";
+    private static String PathSkip = System.getProperty("user.dir") + "\\opencv\\scene\\tactic\\emblem\\skip.png";
+    private static String PathOver = System.getProperty("user.dir") + "\\opencv\\scene\\tactic\\emblem\\over.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(PathEnter1, AiManage.getInstance().getCheckPoint())) {
+                moveToClick(PathEnter1, AiManage.getInstance().getCheckPoint());
+                ThreadUtil.sleep(2000);
+            }
+            if (checkHas(PathEnter2, AiManage.getInstance().getCheckPoint())) {
+                moveToClick(PathEnter2, AiManage.getInstance().getCheckPoint());
+                ThreadUtil.sleep(2000);
+            }
+            if (checkHas(PathEnter3, AiManage.getInstance().getCheckPoint())) {
+                moveToClick(PathEnter3, AiManage.getInstance().getCheckPoint());
+                ThreadUtil.sleep(2000);
+            }
+            if (checkHas(PathEnter4, AiManage.getInstance().getCheckPoint())) {
+                moveToClick(PathEnter4, AiManage.getInstance().getCheckPoint());
+                ThreadUtil.sleep(2000);
+            }
+            if (checkHas(PathEnter4, AiManage.getInstance().getCheckPoint())) {
+                moveToClick(PathEnter4, AiManage.getInstance().getCheckPoint());
+                ThreadUtil.sleep(2000);
+            }
+            if (checkHas(PathPick1, AiManage.getInstance().getCheckPoint())) {
+                moveToClick(PathPick1, AiManage.getInstance().getCheckPoint());
+                ThreadUtil.sleep(2000);
+            }
+            if (checkHas(PathEnter5, AiManage.getInstance().getCheckPoint())) {
+                moveToClick(PathEnter5, AiManage.getInstance().getCheckPoint());
+                ThreadUtil.sleep(2000);
+            }
+        }
+    }
+
+    @Override
+    public boolean check() throws AWTException {
+        if (checkHas(PathCheck, AiManage.getInstance().getCheckPoint())) {
+            return true;
+        }
+        return false;
+    }
+
+    int maxTimes = 4;
+
+    @Override
+    public void think() throws AWTException {
+        int count = getRecord().getData().getCount();
+        for (int i = count; i < maxTimes; i++) {
+            while (!checkHas(PathOver, AiManage.getInstance().getCheckPoint())) {
+                if (checkHas(PathStart, AiManage.getInstance().getCheckPoint())) {
+                    moveToClick(PathStart, AiManage.getInstance().getCheckPoint());
+                    ThreadUtil.sleep(2000);
+                }
+
+                if (checkHas(PathStart2, AiManage.getInstance().getCheckPoint())) {
+                    moveToClick(PathStart2, AiManage.getInstance().getCheckPoint());
+                    ThreadUtil.sleep(2000);
+                }
+
+                if (checkHas(PathSkip, AiManage.getInstance().getCheckPoint())) {
+                    moveToClick(PathSkip, AiManage.getInstance().getCheckPoint());
+                    ThreadUtil.sleep(2000);
+                }
+            }
+            randomToClick();
+            ThreadUtil.sleep(2000);
+            count++;
+        }
+
+        //TODO ice 领奖
+    }
+
+    @Override
+    public boolean isDone() {
+        return getRecord().getData().getCount() > maxTimes;
+    }
+
+}

+ 56 - 0
src/main/java/com/sencorsta/rabs/obj/ai/scene/glory/SceneMain_Glory_Match.java

@@ -1,5 +1,8 @@
 package com.sencorsta.rabs.obj.ai.scene.glory;
 
+import cn.hutool.core.date.DateField;
+import cn.hutool.core.date.DateTime;
+import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.thread.ThreadUtil;
 import com.sencorsta.rabs.annotation.SceneAnnotation;
 import com.sencorsta.rabs.obj.ai.AiManage;
@@ -30,6 +33,10 @@ public class SceneMain_Glory_Match extends SceneWhitSubRecord implements Scene {
     private static String PathSkip = System.getProperty("user.dir") + "\\opencv\\scene\\glory\\match\\skip.png";
     private static String PathOver = System.getProperty("user.dir") + "\\opencv\\scene\\glory\\match\\over.png";
     private static String PathClose = System.getProperty("user.dir") + "\\opencv\\scene\\glory\\match\\close.png";
+    private static String PathClose2 = System.getProperty("user.dir") + "\\opencv\\scene\\glory\\match\\close2.png";
+    private static String PathReward = System.getProperty("user.dir") + "\\opencv\\scene\\glory\\match\\reward.png";
+    private static String PathOb = System.getProperty("user.dir") + "\\opencv\\scene\\glory\\match\\ob.png";
+    private static String PathLv = System.getProperty("user.dir") + "\\opencv\\scene\\glory\\match\\lv.png";
     private int maxTime = 99;
 
     @Override
@@ -107,6 +114,38 @@ public class SceneMain_Glory_Match extends SceneWhitSubRecord implements Scene {
             randomToClick();
             getRecord().getData().setCount(count+1);
         }
+
+        //领奖
+        moveToClick(PathReward, AiManage.getInstance().getCheckPoint());
+        ThreadUtil.sleep(2000);
+
+        moveToClick(PathOb, AiManage.getInstance().getCheckPoint());
+        ThreadUtil.sleep(3000);
+
+        randomToClick();
+        ThreadUtil.sleep(3000);
+
+
+        moveToClick(PathLv, AiManage.getInstance().getCheckPoint());
+        ThreadUtil.sleep(2000);
+
+        moveToClick(PathReward, AiManage.getInstance().getCheckPoint());
+        ThreadUtil.sleep(2000);
+
+        moveToClick(PathOb, AiManage.getInstance().getCheckPoint());
+        ThreadUtil.sleep(3000);
+
+        randomToClick();
+        ThreadUtil.sleep(3000);
+
+        if (checkHas(PathClose, AiManage.getInstance().getCheckPoint())) {
+            moveToClick(PathClose, AiManage.getInstance().getCheckPoint());
+            ThreadUtil.sleep(2000);
+        }
+
+        moveToClick(PathClose2, AiManage.getInstance().getCheckPoint());
+        ThreadUtil.sleep(2000);
+
     }
 
 
@@ -123,4 +162,21 @@ public class SceneMain_Glory_Match extends SceneWhitSubRecord implements Scene {
         return ResettableData.ResetType.MONTHLY;
     }
 
+
+    /**
+     * 是否开启
+     */
+    @Override
+    public boolean isOpen() {
+        // 获取当前时间
+        DateTime now = DateUtil.date();
+        // 获取当天的中午12点
+        DateTime noon = DateUtil.beginOfDay(now).offset(DateField.HOUR_OF_DAY, 12);
+        // 获取当天的24点(次日的0点)
+        DateTime midnight = DateUtil.endOfDay(now);
+        // 判断当前时间是否在中午12点到24点之间
+        return now.isAfterOrEquals(noon) && now.isBeforeOrEquals(midnight);
+    }
+
+
 }