Exemplo n.º 1
0
        public void Action(string str)
        {
            gop.locate(str, gop.setting.AutoTrans);
            var revive_img = gop.setting.ReviveWay == 1 ? "复活点复活|复活点复活2" : "原地复活";
            var prev_time  = DateTime.Now;

            while (true)
            {
                if (gop.setting.LocateInterval > 0)
                {
                    var now = DateTime.Now;
                    if (now - prev_time >= TimeSpan.FromSeconds(gop.setting.LocateInterval))
                    {
                        gop.setState("循环寻路中");
                        gop.locate(str, gop.setting.AutoTrans);
                        prev_time = now;
                    }
                }
                gop.setState("攻击目标中");
                gop.fangjineng();
                Thread.Sleep(1000);
                var p = gop.findImage(revive_img);
                if (p.X > -1)
                {
                    gop.setState("复活中");
                    gop.click(p.X, p.Y);
                    if (gop.setting.ReviveWay == 1)
                    {
                        gop.setState("准备移动到目标点");
                        Thread.Sleep(1000);
                        gop.locate(str, gop.setting.AutoTrans);
                    }
                }
            }
        }
Exemplo n.º 2
0
        public void Action(string msg)
        {
            var revive_img = gop.setting.ReviveWay != 1 ? "复活点复活|复活点复活2" : "原地复活";

            while (true)
            {
                gop.clear();
                gop.dm.KeyPress(Keys.M);
                Thread.Sleep(1000);
                var p = gop.findImage("跨服boss一层");
                if (p.X > -1)
                {
                    gop.setState("进入跨服一层");
                    p = gop.findImage("dot");
                    gop.click(p.X, p.Y);
                    gop.waitCompleteLocate();
                }
                p = gop.findImage("跨服boss二层");
                if (p.X > -1)
                {
                    gop.setState("进入跨服二层");
                    p = gop.findImage("dot");
                    gop.click(p.X, p.Y);
                    p = gop.waitForImage("是");
                    gop.click(p.X, p.Y);
                }
                gop.setState("等待进入虚宁洞天");
                gop.waitForImage("虚宁洞天");
                gop.setState("寻路到目的地");
                gop.locate(msg);
                while (true)
                {
                    gop.setState("攻击目标中");
                    gop.fangjineng();
                    p = gop.findImage(revive_img);
                    if (p.X > -1)
                    {
                        gop.setState("已死亡,复活中");
                        Thread.Sleep(500);
                        gop.click(p.X, p.Y);
                        Thread.Sleep(1000);
                        break;
                    }
                    Thread.Sleep(1000);
                }
            }
        }
Exemplo n.º 3
0
        public void Sign()
        {
            gop.clear();
            var p = gop.findMap("剩余时间|中立-附魂战场");

            if (p.X > -1)
            {
                return;
            }
            p = gop.findMap("中立-附魂战场休息室");
            if (p.X <= 0)
            {
                p = gop.waitForImage("附魂-icon|附魂-icon2", 500, 300, 0, 2000, 200);
                gop.click(p.X, p.Y);
                Thread.Sleep(1000);
                if (gop.setting.AutoTrans)
                {
                    p = gop.waitForImage("前往传送");
                }
                else
                {
                    p = gop.waitForImage("立即前往");
                }
                gop.click(p.X, p.Y);
                Thread.Sleep(1000);
                p = gop.waitForImage("进入|进入2");
                gop.click(p.X, p.Y);
                Thread.Sleep(1000);
                gop.send_key(Keys.Escape, 3);
            }
            p = gop.findImage("参加竞技|参加竞技2|取消竞技");
            if (p.X <= 0)
            {
                gop.locate("7,42");
                p = gop.waitForImage("附魂报名人物");
                gop.setState("点击npc报名");
                gop.dblclick(p.X, p.Y);
                gop.waitCompleteLocate();
                Thread.Sleep(1000);
            }
            while (true)
            {
                p = gop.findImage("参加竞技|参加竞技2");
                if (p.X > -1)
                {
                    gop.setState("报名");
                    gop.click(p.X, p.Y);
                }
                Thread.Sleep(1000);
                p = gop.findImage("取消竞技");
                if (p.X > -1)
                {
                    break;
                }
            }
            gop.setState("等待进入战场");
            while (true)
            {
                p = gop.findMap("剩余时间|中立-附魂战场");
                if (p.X > 0)
                {
                    Thread.Sleep(1000);
                    break;
                }
                p = gop.findImage("附魂进入|附魂进入2");
                if (p.X > 0)
                {
                    gop.click(p.X, p.Y);
                    Thread.Sleep(21000);
                    break;
                }
                Thread.Sleep(1000);
            }
        }