11 Commits c6605089a7 ... 1298ef743c

Tác giả SHA1 Thông báo Ngày
  ICe 1298ef743c 修复荣耀对决卡界面 1 tháng trước cách đây
  ICe f4fc7a7999 bugfix 1 tháng trước cách đây
  ICe 5e43c5dc1f bugfix 1 tháng trước cách đây
  ICe 277b71ad66 bugfix 1 tháng trước cách đây
  ICe 0dec45fde7 bugfix 1 tháng trước cách đây
  ICe 0f3569300d bugfix 2 tháng trước cách đây
  ICe 715e34167a Merge branch 'master' of http://www.sencorsta.com:2203/ice/rabs 2 tháng trước cách đây
  ICe 17a625ed45 bugfix 2 tháng trước cách đây
  ICe 0f52c169bf bugfix 2 tháng trước cách đây
  ICe 30cb637f02 bugfix 2 tháng trước cách đây
  ICe 48a2a93986 bugfix 2 tháng trước cách đây
33 tập tin đã thay đổi với 312 bổ sung40 xóa
  1. 33 32
      Readme.md
  2. BIN
      opencv/scene/activity/back.png
  3. BIN
      opencv/scene/activity/bingo.png
  4. BIN
      opencv/scene/activity/bingoDo.png
  5. BIN
      opencv/scene/activity/check.png
  6. BIN
      opencv/scene/activity/enter.png
  7. BIN
      opencv/scene/explore/king/kings/iKnow.png
  8. BIN
      opencv/scene/family/battle/back.png
  9. BIN
      opencv/scene/family/battle/check.png
  10. BIN
      opencv/scene/family/battle/enter.png
  11. BIN
      opencv/scene/family/battle/goLeft.png
  12. BIN
      opencv/scene/family/battle/rightDoor.png
  13. BIN
      opencv/scene/family/battle/start.png
  14. BIN
      opencv/scene/family/battle/start2.png
  15. BIN
      opencv/scene/glory/match/notOpen.png
  16. BIN
      opencv/scene/glory/match/notOpen2.png
  17. BIN
      opencv/scene/ip1.png
  18. BIN
      opencv/scene/ip2.png
  19. BIN
      opencv/scene/ip3.png
  20. BIN
      opencv/scene/ip4.png
  21. BIN
      opencv/scene/ip4Check.png
  22. 4 0
      src/main/java/com/sencorsta/rabs/obj/ai/AiManage.java
  23. 28 0
      src/main/java/com/sencorsta/rabs/obj/ai/api/BaseScene.java
  24. 5 0
      src/main/java/com/sencorsta/rabs/obj/ai/api/Scene.java
  25. 15 1
      src/main/java/com/sencorsta/rabs/obj/ai/scene/SceneMain.java
  26. 75 0
      src/main/java/com/sencorsta/rabs/obj/ai/scene/activity/SceneMain_Activity.java
  27. 15 0
      src/main/java/com/sencorsta/rabs/obj/ai/scene/explore/SceneMain_Explore_King_kings.java
  28. 93 0
      src/main/java/com/sencorsta/rabs/obj/ai/scene/family/SceneMain_Family_Battle.java
  29. 1 1
      src/main/java/com/sencorsta/rabs/obj/ai/scene/family/SceneMain_Family_Info.java
  30. 1 1
      src/main/java/com/sencorsta/rabs/obj/ai/scene/family/SceneMain_Family_Out.java
  31. 9 3
      src/main/java/com/sencorsta/rabs/obj/ai/scene/fight/SceneMain_Fight_Endless_Quick.java
  32. 24 0
      src/main/java/com/sencorsta/rabs/obj/ai/scene/glory/SceneMain_Glory_Match.java
  33. 9 2
      src/main/java/com/sencorsta/rabs/obj/ai/scene/qiyi/SceneMain_Qiyu_helper.java

+ 33 - 32
Readme.md

@@ -6,8 +6,11 @@
 - [ ] 遇到死循环自动跳过
 - [X] 每日徽章勾选修改
 - [X] 组织小怪进不去问题
-- [ ] 活动页签待实现
-- [ ] 任务界面有可能卡主
+- [X] 活动页签待实现
+- [ ] 任务界面有可能卡住
+- [ ] 增加组织争霸
+- [ ] 琦玉帮助卡住
+- [ ] 王者挑战卡住
 
 # 应用程序说明文档
 
@@ -49,34 +52,32 @@
 
 > 策划人员需要使用配置生成模块进行游戏配置的生成检测,避免出现配置问题。
 
-## 面向用户
+## 使用前必读
+### 实现原理
+- 利用AI观察游戏画面 模拟玩家鼠标操作
+- 内置定时重置机制,24小时循环重复劳作   
+- 没有修改读取任何游戏数据 不存在检测风险
+### 前提
+- 安卓环境,苹果的用户不支持
+- windows系统电脑(云服务器也行)一台,安装好任意主流安卓模拟器(推荐BlueStack)
+- 进入游戏后 把模拟游戏画面分辨率调整到940*530左右 不用非常精确 大概误差5%都可以
+### 具体步骤
+- 运行rabs.exe
+- 在第一个框里输入 搜索模拟器应用的名称 比如"BlueStack"
+- 在后面的下拉菜单里选择确认窗口名称
+- 保证游戏角色处于主场景(室外走道上)上
+- 点击开始作业 程序就自动运行了
+
+### 常见问题
+- 开始作业中可以自由操作吗
+> 不建议操作 但是如果看到出现"当前没有任何事件。。。。。。。。"的时候 可以手动控制
+
+- 如何确保画面是940*530
+> 用截图软件 比如QQ 的ctrl+alt+A 拉一下看看就知道了
+
+- 某个界面卡主了怎么办
+> 点击一次"跳过场景",关闭rabs.exe 游戏内手动操作回到主场景 重新打开rabs.exe
+
+- 没有按照预想情况完成任务
+> 目前是内测版本 bug是肯定存在的 有任何问题可以在群里(5034287)反馈
 
-## 压力测试
-
-用于测试服务器压力
-
-## 接口测试
-
-该模块用于测试接口,支持对接口进行调试和发送请求,并且可以查看请求的响应结果和相关信息。
-
-## 测试脚本
-
-该模块用于编辑一套自动执行的脚本,具有添加、删除和编辑任务的功能。
-
-## 模拟游戏
-
-该模块用于脱离客户端模拟基本的游戏环境。
-
-## 配置生成
-
-该模块用于生成Excel配置文件,支持设置文件路径和生成的表格内容。
-
-## 协议生成
-
-该模块用于生成协议文件,支持选择协议类型和生成路径,并且可以编辑协议内容。
-
-## 环境配置
-
-该模块用于配置环境变量,支持添加、删除和编辑变量,并且可以设置变量的值和描述信息。
-
-以上是各个模块的详细说明文档,如有任何疑问或建议,请联系开发人员。

BIN
opencv/scene/activity/back.png


BIN
opencv/scene/activity/bingo.png


BIN
opencv/scene/activity/bingoDo.png


BIN
opencv/scene/activity/check.png


BIN
opencv/scene/activity/enter.png


BIN
opencv/scene/explore/king/kings/iKnow.png


BIN
opencv/scene/family/battle/back.png


BIN
opencv/scene/family/battle/check.png


BIN
opencv/scene/family/battle/enter.png


BIN
opencv/scene/family/battle/goLeft.png


BIN
opencv/scene/family/battle/rightDoor.png


BIN
opencv/scene/family/battle/start.png


BIN
opencv/scene/family/battle/start2.png


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


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


BIN
opencv/scene/ip1.png


BIN
opencv/scene/ip2.png


BIN
opencv/scene/ip3.png


BIN
opencv/scene/ip4.png


BIN
opencv/scene/ip4Check.png


+ 4 - 0
src/main/java/com/sencorsta/rabs/obj/ai/AiManage.java

@@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
 import com.sencorsta.rabs.annotation.SceneAnnotation;
 import com.sencorsta.rabs.config.AppConfig;
 import com.sencorsta.rabs.obj.ai.api.Scene;
+import com.sencorsta.rabs.obj.ai.scene.SceneMain;
 import com.sencorsta.rabs.ui.robot.RobotUtil;
 import com.sencorsta.utils.object.Jsons;
 import com.sun.jna.platform.win32.User32;
@@ -103,6 +104,9 @@ public class AiManage {
                     curScene.think();
                     Scene undoneChildren = curScene.getChildren().stream().filter(o -> !o.isDone() && o.isOpen()).max(Comparator.comparingDouble(Scene::getPriority)).orElse(null);
                     if (ObjectUtil.isNotNull(undoneChildren)) {
+                        //通用检查
+                        curScene.checkBeforeEnter();
+
                         System.out.println("进入 open = " + undoneChildren.getClass().getSimpleName());
                         undoneChildren.open();
                         curScene = undoneChildren;

+ 28 - 0
src/main/java/com/sencorsta/rabs/obj/ai/api/BaseScene.java

@@ -4,6 +4,7 @@ import cn.hutool.core.thread.ThreadUtil;
 import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.sencorsta.rabs.obj.ai.AiManage;
+import com.sencorsta.rabs.obj.ai.scene.SceneMain;
 import com.sencorsta.rabs.obj.ai.status.fight.BaseStatus;
 import com.sencorsta.rabs.ui.robot.RobotUtil;
 import com.sencorsta.rabs.util.ResettableData;
@@ -79,6 +80,7 @@ public class BaseScene {
     }
 
 
+
     protected void moveToClick(String filename, double similarityThreshold) throws AWTException {
         moveToClick(filename, similarityThreshold, new Point(0, 0));
     }
@@ -249,6 +251,32 @@ public class BaseScene {
         record.maybeReset();
     }
 
+    public void checkBeforeEnter() throws AWTException {
+        while (true){
+            System.out.println("开始检查活动广告页....");
+            if (checkHas(SceneMain.getPathIp1(), AiManage.getInstance().getCheckPoint())) {
+                moveToClick(SceneMain.getPathIp1(),AiManage.getInstance().getCheckPoint());
+                ThreadUtil.sleep(2000);
+                continue;
+            }
+            if (checkHas(SceneMain.getPathIp2(), AiManage.getInstance().getCheckPoint())) {
+                moveToClick(SceneMain.getPathIp2(),AiManage.getInstance().getCheckPoint());
+                ThreadUtil.sleep(2000);
+                continue;
+            }
+            if (checkHas(SceneMain.getPathIp3(), AiManage.getInstance().getCheckPoint())) {
+                moveToClick(SceneMain.getPathIp3(),AiManage.getInstance().getCheckPoint());
+                ThreadUtil.sleep(2000);
+                continue;
+            }
+            if (checkHas(SceneMain.getPathIp4Check(), AiManage.getInstance().getCheckPoint())) {
+                moveToClick(SceneMain.getPathIp4(),AiManage.getInstance().getCheckPoint());
+                ThreadUtil.sleep(2000);
+                continue;
+            }
+            break;
+        }
+    }
 
     //TODO ice 文字识别封装成一个方法 实现指定任意区域查找英文或者中文
 //    public static void main(String[] args) {

+ 5 - 0
src/main/java/com/sencorsta/rabs/obj/ai/api/Scene.java

@@ -86,4 +86,9 @@ public interface Scene {
      * 强制通过
      */
     void forcePass();
+
+    /**
+     * 进入前通用检查
+     */
+    void checkBeforeEnter() throws AWTException;
 }

+ 15 - 1
src/main/java/com/sencorsta/rabs/obj/ai/scene/SceneMain.java

@@ -4,6 +4,7 @@ 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 lombok.Getter;
 
 import java.awt.AWTException;
 
@@ -13,6 +14,17 @@ import java.awt.AWTException;
 @SceneAnnotation("")
 public class SceneMain extends BaseScene implements Scene {
     private static String PathCheck = System.getProperty("user.dir") + "\\opencv\\scene\\check.png";
+    @Getter
+    private static String PathIp1 = System.getProperty("user.dir") + "\\opencv\\scene\\ip1.png";
+    @Getter
+    private static String PathIp2 = System.getProperty("user.dir") + "\\opencv\\scene\\ip2.png";
+    @Getter
+    private static String PathIp3 = System.getProperty("user.dir") + "\\opencv\\scene\\ip3.png";
+    @Getter
+    private static String PathIp4 = System.getProperty("user.dir") + "\\opencv\\scene\\ip4.png";
+    @Getter
+    private static String PathIp4Check = System.getProperty("user.dir") + "\\opencv\\scene\\ip4Check.png";
+
     @Override
     public void back() {
     }
@@ -31,7 +43,9 @@ public class SceneMain extends BaseScene implements Scene {
 
     @Override
     public void think() throws Exception {
-
+        if (checkHas(PathIp1, AiManage.getInstance().getCheckPoint())) {
+            moveToClick(PathIp1, AiManage.getInstance().getCheckPoint());
+        }
     }
 
     @Override

+ 75 - 0
src/main/java/com/sencorsta/rabs/obj/ai/scene/activity/SceneMain_Activity.java

@@ -0,0 +1,75 @@
+package com.sencorsta.rabs.obj.ai.scene.activity;
+
+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 java.awt.AWTException;
+
+/**
+ * 活动
+ */
+@SceneAnnotation("SceneMain")
+public class SceneMain_Activity extends BaseScene implements Scene {
+    @JsonIgnore
+    @Override
+    public float getPriority() {
+        return 0.9f;
+    }
+
+    private static String PathEnter = System.getProperty("user.dir") + "\\opencv\\scene\\activity\\enter.png";
+    private static String PathCheck = System.getProperty("user.dir") + "\\opencv\\scene\\activity\\check.png";
+    private static String PathBack = System.getProperty("user.dir") + "\\opencv\\scene\\activity\\back.png";
+    private static String PathBingo = System.getProperty("user.dir") + "\\opencv\\scene\\activity\\bingo.png";
+    private static String PathBingoDo = System.getProperty("user.dir") + "\\opencv\\scene\\activity\\bingoDo.png";
+
+    @Override
+    public void back() throws AWTException {
+        moveToClick(PathBack, AiManage.getInstance().getCheckPoint());
+    }
+
+    @Override
+    public void open() throws AWTException {
+        while (AiManage.getInstance().isRunning() && !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 {
+        if (checkHas(PathBingo, AiManage.getInstance().getCheckPoint())) {
+            moveToClick(PathBingo, AiManage.getInstance().getCheckPoint());
+            ThreadUtil.sleep(2000);
+
+            if (checkHas(PathBingoDo,AiManage.getInstance().getCheckPoint())){
+                moveToClick(PathBingoDo, AiManage.getInstance().getCheckPoint());
+                ThreadUtil.sleep(3000);
+            }
+
+            getRecord().getData().setDone(true);
+        }
+
+    }
+
+    @Override
+    public boolean isDone() {
+        return getRecord().getData().isDone();
+    }
+
+}

+ 15 - 0
src/main/java/com/sencorsta/rabs/obj/ai/scene/explore/SceneMain_Explore_King_kings.java

@@ -37,6 +37,10 @@ public class SceneMain_Explore_King_kings extends BaseScene implements Scene {
     private static String PathWeek = System.getProperty("user.dir") + "\\opencv\\scene\\explore\\king\\kings\\week.png";
     private static String PathDay = System.getProperty("user.dir") + "\\opencv\\scene\\explore\\king\\kings\\day.png";
     private static String PathClose = System.getProperty("user.dir") + "\\opencv\\scene\\explore\\king\\kings\\close.png";
+    private static String PathIKnow = System.getProperty("user.dir") + "\\opencv\\scene\\explore\\king\\kings\\iKnow.png";
+
+
+
 
     private int maxCount=9;
     @Override
@@ -74,6 +78,12 @@ public class SceneMain_Explore_King_kings extends BaseScene implements Scene {
     public void think() throws AWTException {
         int count = getRecord().getData().getCount();
         ThreadUtil.sleep(5000);
+
+        if (checkHas(PathIKnow, AiManage.getInstance().getCheckPoint())) {
+            moveToClick(PathIKnow, AiManage.getInstance().getCheckPoint());
+            ThreadUtil.sleep(2000);
+        }
+
         if (count==2){
             moveToClick(PathDay, AiManage.getInstance().getCheckPoint());
             ThreadUtil.sleep(2000);
@@ -124,7 +134,12 @@ public class SceneMain_Explore_King_kings extends BaseScene implements Scene {
                 moveToClick(PathSkip2, AiManage.getInstance().getCheckPoint());
                 ThreadUtil.sleep(2000);
             }
+            if (checkHas(PathCheck, AiManage.getInstance().getCheckPoint())) {
+                //有的时候会回到界面 循环没有结束 如果有就直接跳出
+                break;
+            }
             ThreadUtil.sleep(5000);
+
         }
         ThreadUtil.sleep(2000);
         randomToClick();

+ 93 - 0
src/main/java/com/sencorsta/rabs/obj/ai/scene/family/SceneMain_Family_Battle.java

@@ -0,0 +1,93 @@
+package com.sencorsta.rabs.obj.ai.scene.family;
+
+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;
+
+/**
+ * 组织-争霸
+ */
+@SceneAnnotation("SceneMain_Family")
+public class SceneMain_Family_Battle extends BaseScene implements Scene {
+    @JsonIgnore
+    @Override
+    public float getPriority() {
+        return 5f;
+    }
+
+    private static String PathEnter = System.getProperty("user.dir") + "\\opencv\\scene\\family\\battle\\enter.png";
+    private static String PathCheck = System.getProperty("user.dir") + "\\opencv\\scene\\family\\battle\\check.png";
+    private static String PathBack = System.getProperty("user.dir") + "\\opencv\\scene\\family\\battle\\back.png";
+
+    private static String PathStart = System.getProperty("user.dir") + "\\opencv\\scene\\family\\battle\\start.png";
+    private static String PathStart2 = System.getProperty("user.dir") + "\\opencv\\scene\\family\\battle\\start2.png";
+
+    private static String PathRightdoor = System.getProperty("user.dir") + "\\opencv\\scene\\family\\battle\\rightDoor.png";
+    private static String PathGoLeft = System.getProperty("user.dir") + "\\opencv\\scene\\family\\battle\\goLeft.png";
+    private static String PathPaper = System.getProperty("user.dir") + "\\opencv\\scene\\family\\help\\paper.png";
+
+    @Override
+    public void back() throws AWTException {
+        moveToClick(PathBack, AiManage.getInstance().getCheckPoint());
+    }
+
+    @Override
+    public void open() throws AWTException {
+        while (AiManage.getInstance().isRunning() && !check()) {
+            AiManage.getInstance().updateWindow();
+            ThreadUtil.sleep(2000);
+
+            if (checkHas(PathPaper, AiManage.getInstance().getCheckPoint())) {
+                moveToClick(PathPaper, AiManage.getInstance().getCheckPoint(), new Point(300, 0));
+                ThreadUtil.sleep(2000);
+            }
+
+            if (checkHas(PathEnter, AiManage.getInstance().getCheckPoint())) {
+                moveToClick(PathEnter, AiManage.getInstance().getCheckPoint(), new Point(-150, -35));
+                ThreadUtil.sleep(5000);
+                continue;
+            }
+
+            moveToClick(PathGoLeft, AiManage.getInstance().getCheckPoint(), new Point(430, -70));
+            ThreadUtil.sleep(5000);
+        }
+    }
+
+    @Override
+    public boolean check() throws AWTException {
+        if (checkHas(PathCheck, AiManage.getInstance().getCheckPoint())) {
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    public void think() throws AWTException {
+        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);
+            }
+            //TODO ice 补充逻辑
+            getRecord().getData().setDone(true);
+        } else {
+            //今天没有比赛
+            getRecord().getData().setDone(true);
+        }
+    }
+
+    @Override
+    public boolean isDone() {
+        return getRecord().getData().isDone() && hasChildDone();
+    }
+
+}

+ 1 - 1
src/main/java/com/sencorsta/rabs/obj/ai/scene/family/SceneMain_Family_Info.java

@@ -18,7 +18,7 @@ public class SceneMain_Family_Info extends BaseScene implements Scene {
     @JsonIgnore
     @Override
     public float getPriority() {
-        return 2.0f;
+        return 2f;
     }
 
     private static String PathEnter = System.getProperty("user.dir") + "\\opencv\\scene\\family\\info\\enter.png";

+ 1 - 1
src/main/java/com/sencorsta/rabs/obj/ai/scene/family/SceneMain_Family_Out.java

@@ -18,7 +18,7 @@ public class SceneMain_Family_Out extends BaseScene implements Scene {
     @JsonIgnore
     @Override
     public float getPriority() {
-        return 2.0f;
+        return 4.0f;
     }
 
     private static String PathEnter = System.getProperty("user.dir") + "\\opencv\\scene\\family\\out\\enter.png";

+ 9 - 3
src/main/java/com/sencorsta/rabs/obj/ai/scene/fight/SceneMain_Fight_Endless_Quick.java

@@ -27,7 +27,7 @@ public class SceneMain_Fight_Endless_Quick extends BaseScene implements Scene {
     private static String PathMax = System.getProperty("user.dir") + "\\opencv\\scene\\fight\\endless\\quick\\max.png";
     private static String PathStart = System.getProperty("user.dir") + "\\opencv\\scene\\fight\\endless\\quick\\start.png";
     private static String PathOk = System.getProperty("user.dir") + "\\opencv\\scene\\fight\\endless\\quick\\ok.png";
-    private int maxCount = 2;
+    private int maxCount = 20;
     ;
 
     @Override
@@ -70,10 +70,16 @@ public class SceneMain_Fight_Endless_Quick extends BaseScene implements Scene {
             ThreadUtil.sleep(2000);
             moveToClick(PathStart, AiManage.getInstance().getCheckPoint());
             ThreadUtil.sleep(2000);
-            while (AiManage.getInstance().isRunning() && !checkHas(PathOk, AiManage.getInstance().getCheckPoint())) {
+            int tempCount = 0;
+            while (AiManage.getInstance().isRunning() && !checkHas(PathOk, AiManage.getInstance().getCheckPoint()) && tempCount < 30) {
                 ThreadUtil.sleep(2000);
+                tempCount++;
+            }
+            if (tempCount < 30) {
+                getRecord().getData().setCount(count + 10);
+            }else {
+                getRecord().getData().setCount(count + 1);
             }
-            getRecord().getData().setCount(count + 1);
         }
         isTempDone = true;
     }

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

@@ -37,6 +37,8 @@ public class SceneMain_Glory_Match extends SceneWhitSubRecord implements Scene {
     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 static String PathNotOpen = System.getProperty("user.dir") + "\\opencv\\scene\\glory\\match\\notOpen.png";
+    private static String PathNotOpen2 = System.getProperty("user.dir") + "\\opencv\\scene\\glory\\match\\notOpen2.png";
     private int maxTime = 99;
 
     @Override
@@ -65,14 +67,36 @@ public class SceneMain_Glory_Match extends SceneWhitSubRecord implements Scene {
         if (checkHas(PathCheck, AiManage.getInstance().getCheckPoint())) {
             return true;
         }
+        if (checkHas(PathNotOpen2,AiManage.getInstance().getCheckPoint())){
+            return true;
+        }
         return false;
     }
 
     @Override
     public void think() throws AWTException {
         int count = getRecord().getData().getCount();
+
+        ThreadUtil.sleep(2000);
+        if (checkHas(PathNotOpen2,AiManage.getInstance().getCheckPoint())){
+            System.out.println("活动未开启!");
+            getRecordSub().getData().setDone(true);
+
+            moveToClick(PathClose2, AiManage.getInstance().getCheckPoint());
+            ThreadUtil.sleep(2000);
+            return;
+        }
+
         while (AiManage.getInstance().isRunning() && !isDone()) {
             ThreadUtil.sleep(3000);
+            if (checkHas(PathNotOpen,AiManage.getInstance().getCheckPoint())){
+                System.out.println("活动未开启!");
+                getRecordSub().getData().setDone(true);
+                break;
+            }
+
+
+
             if (checkHas(PathStart, AiManage.getInstance().getCheckPoint())) {
                 moveToClick(PathStart, AiManage.getInstance().getCheckPoint());
                 ThreadUtil.sleep(5000);

+ 9 - 2
src/main/java/com/sencorsta/rabs/obj/ai/scene/qiyi/SceneMain_Qiyu_helper.java

@@ -58,8 +58,10 @@ public class SceneMain_Qiyu_helper extends BaseScene implements Scene {
     public void think() throws AWTException {
         moveToClick(PathOneButton,AiManage.getInstance().getCheckPoint());
         ThreadUtil.sleep(2000);
-        while (AiManage.getInstance().isRunning() && !checkHas(PathOk,AiManage.getInstance().getCheckPoint())){
+        int countTemp=30;
+        while (countTemp>0&&AiManage.getInstance().isRunning() && !checkHas(PathOk,AiManage.getInstance().getCheckPoint())){
             ThreadUtil.sleep(2000);
+            countTemp--;
         }
         ThreadUtil.sleep(5000);
         moveToClick(PathOk,AiManage.getInstance().getCheckPoint());
@@ -67,14 +69,19 @@ public class SceneMain_Qiyu_helper extends BaseScene implements Scene {
         moveToClick(PathOk,AiManage.getInstance().getCheckPoint());
         ThreadUtil.sleep(3000);
 
+        while (AiManage.getInstance().isRunning() && !checkHas(PathChallenge,AiManage.getInstance().getCheckPoint())){
+            ThreadUtil.sleep(2000);
+        }
         moveToClick(PathChallenge,AiManage.getInstance().getCheckPoint());
         ThreadUtil.sleep(2000);
 
         moveToClick(PathOneButton,AiManage.getInstance().getCheckPoint());
         ThreadUtil.sleep(2000);
 
-        while (AiManage.getInstance().isRunning() && !checkHas(PathOk,AiManage.getInstance().getCheckPoint())){
+        countTemp=30;
+        while (countTemp>0&&AiManage.getInstance().isRunning() && !checkHas(PathOk,AiManage.getInstance().getCheckPoint())){
             ThreadUtil.sleep(2000);
+            countTemp--;
         }
         ThreadUtil.sleep(5000);
         moveToClick(PathOk,AiManage.getInstance().getCheckPoint());