Beispiel #1
0
        private static void ChoiceTeam()
        {
            Wating.TeamChoice();
            Outputs.Log("选择队伍中");
            string teamBmp      = "team" + team.ToString();
            string teamHoverBmp = "team" + team.ToString() + "_hover";

            if (!Operation.FindPic(teamHoverBmp))
            {
                int x, y;
                if (Operation.FindPic(teamBmp, out x, out y))
                {
                    Operation.Click(x, 15, y, 15, 250);
                    Utils.Delay(250);
                    if (!Operation.FindPic(teamHoverBmp))
                    {
                        End("选择队伍" + team.ToString() + "失败");
                    }
                }
                else
                {
                    End("选择队伍" + team.ToString() + "失败");
                }
            }
            Utils.Delay(250);
        }
Beispiel #2
0
        public static bool Execution()
        {
            int d = 10;

            Wating.Home();
            while (d > 0)
            {
                Outputs.Log((d * 30).ToString() + "秒后刷新");
                Utils.Delay(30000);
                d--;
            }
            SwitchScene.HomeToSupply();
            SwitchScene.SupplyToHome();
            return(true);
        }
Beispiel #3
0
        private static void ChoicePoint()
        {
            Outputs.Log("选择关卡中");
            int seaArea = Process.seaArea;
            int point = Process.point;
            int x, y;

            if (point > 0 && point <= 4)
            {
                Operation.Click(200 + (point + 1) % 2 * 500, 250, 220 + Convert.ToInt32(Math.Floor(Convert.ToDouble(point / 3))) * 220, 0, 0);
            }
            else
            {
                if (Operation.FindPic("前往扩展海域", out x, out y))
                {
                    Operation.Click(x, 70, y, 80, 0);
                    Utils.Delay(500);
                    Operation.Click(200, 900, (point - 5) * 144 + 220, 100, 0);
                }
                else
                {
                    End("没有扩展海域");
                }
            }

            Wating.AttackInfo();
            //string pointBmp = "图" + seaArea.ToString() + "-" + point.ToString() + "作战名";
            //if (!Operation.FindPic("B", pointBmp))
            //{
            //    End("选择关卡失败" + pointBmp, true);
            //}
            if (!Operation.FindPic("D", new string[] { "出击决定", "出击决定_hover" }, out x, out y))
            {
                End("当前无法出击");
            }
            Operation.Click(x, 240, y, 40, 0);
            Outputs.Log("选择关卡" + seaArea + "-" + point);
            Utils.Delay(500);
        }
Beispiel #4
0
        public static bool Execution()
        {
            int  fixing   = 0;
            bool fastFix  = false;
            bool hasFixed = false;

            if (!Process.isFix)
            {
                Outputs.Log("不需要修理");
                return(false);
            }

            SwitchScene.HomeToDock();

            try
            {
                while (Operation.FindPic(new string[] { "空船坞", "空船坞_hover" }, out int x, out int y))
                {
                    Operation.Click(x, 220, y, 50, 250);
                    Wating.ShipChoice();

                    if (Process.fix == 1)
                    {
                        Operation.FindPic("修理大破", 0.6, out x, out y);
                        fixing = 1;// 修理大破
                    }
                    if (Process.fix == 2)
                    {
                        if (Operation.FindPic("修理大破", 0.6, out x, out y))
                        {
                            fixing = 1;// 修理大破
                        }
                        else if (Operation.FindPic("修理中破", 0.6, out x, out y))
                        {
                            fixing = 2;// 修理中破
                        }
                    }
                    if (Process.fix == 3)
                    {
                        if (Operation.FindPic("修理大破", 0.6, out x, out y))
                        {
                            fixing = 1;// 修理大破
                        }
                        else if (Operation.FindPic("修理中破", 0.6, out x, out y))
                        {
                            fixing = 2;// 修理中破
                        }
                        else if (Operation.FindPic("修理小破", 0.6, out x, out y))
                        {
                            fixing = 3;// 修理小破
                        }
                    }

                    if (x < 0 && y < 0)
                    {
                        Process.isFix = false;
                        End("没有需要修理的舰娘", 1);
                    }

                    Operation.Click(x - 400, 450, y, 35, 250);
                    Wating.ShipStatus();

                    if (fixing == 1 && Process.bigFastFix || fixing == 2 && Process.middleFastFix || fixing == 3 && Process.smallFastFix)
                    {
                        fastFix = true;
                    }

                    if (fastFix)
                    {
                        if (!Operation.FindPic("高速修复", out x, out y))
                        {
                            End("高速修复失败", 2);
                        }
                        Operation.Click(x, 100, y, 25, 0);
                        Utils.Delay(500);
                        if (!Operation.FindPic("高速修复_hover"))
                        {
                            End("高速修复失败", 2);
                        }
                    }

                    if (!Operation.FindPic("D", "入渠开始", out x, out y))
                    {
                        End("入渠失败", 2);
                    }
                    Operation.Click(x, 200, y, 60, 250);

                    Wating.ShipFixConfirm();

                    Operation.FindPic("F", "入渠确定", out x, out y);
                    Operation.Click(x, 140, y, 30, 250);

                    Wating.Dock();

                    hasFixed        = true;
                    Process.watiFix = false;

                    if (fastFix)
                    {
                        Utils.Delay(5000);// 等待快速修复的动画
                    }

                    Utils.Delay(1000);
                }

                if (!hasFixed)
                {
                    Process.watiFix = true;
                    End("暂无船位");
                }
                Process.isFix = false;
            }
            catch (FixException)
            {
            }

            SwitchScene.DockToHome();
            return(true);
        }
Beispiel #5
0
        public static bool Execution()
        {
            Wating.Home();
            int x, y;

            if (!Operation.FindPic("远征归来", out x, out y))
            {
                Outputs.Log("没有远征");
                return(false);
            }
            else
            {
                Outputs.Log("远征归来");
                Operation.Click(x, 100, y + 20, 80, 250);
                bool w1 = true;
                while (w1)
                {
                    if (Operation.FindPic("次", out x, out y))
                    {
                        Outputs.Log("远征结算");
                        Operation.Click(x, 40, y, 40, 250);
                        w1 = false;
                        bool w2 = true;
                        while (w2)
                        {
                            if (Operation.FindPic("次", out x, out y))
                            {
                                if (Operation.FindPic("远征归来2队", out x, out y))
                                {
                                    Process.supplyTeam[1] = true;
                                    if (Process.expedition[0] != 0)
                                    {
                                        Process.expeditionTeam[0] = true;
                                    }
                                    Outputs.Log("远征2队归来");
                                    Operation.Click(x, 40, y, 40, 250);
                                }
                                if (Operation.FindPic("远征归来3队", out x, out y))
                                {
                                    Process.supplyTeam[2] = true;
                                    if (Process.expedition[1] != 0)
                                    {
                                        Process.expeditionTeam[1] = true;
                                    }
                                    Outputs.Log("远征3队归来");
                                    Operation.Click(x, 40, y, 40, 250);
                                }
                                if (Operation.FindPic("远征归来4队", out x, out y))
                                {
                                    Process.supplyTeam[3] = true;
                                    if (Process.expedition[2] != 0)
                                    {
                                        Process.expeditionTeam[2] = true;
                                    }
                                    Outputs.Log("远征4队归来");
                                    Operation.Click(x, 40, y, 40, 250);
                                }
                                w2 = false;
                            }
                            Utils.Delay(1000);
                        }
                    }
                    Utils.Delay(1000);
                }
            }
            return(true);
        }