예제 #1
0
        public override void Start()
        {
            base.Start();
            Thread.Sleep(3000);
            Interop.CenterProcessWindow(LeagueConstants.LoL_GAME_PROCESS);
            Summoner.LockCamera();
            Thread.Sleep(1000);
            Bot.LeftClick(PixelsConstants.SHOP_BUTTON);
            Thread.Sleep(500);
            Bot.RightClick(PixelsConstants.SHOP_ITEM1);
            Thread.Sleep(1000);
            Bot.RightClick(PixelsConstants.SHOP_ITEM2);
            Thread.Sleep(500);
            Keyboard.KeyPress(Keys.Escape);

            Thread.Sleep(5000);
            Summoner.Talk("Hi team");
            Summoner.MaxE();
            Thread.Sleep(500);
            Summoner.MaxQ();
            Thread.Sleep(500);
            Summoner.MaxZ();
            Thread.Sleep(500);
            Summoner.Move(PixelsConstants.HOWLING_ABYSS_BUSH1);
            Summoner.Wait(20);
            bool playing = true;

            while (playing)
            {
                if (!Interop.IsProcessOpen(Pattern.ProcessName))
                {
                    playing = false;
                    Pattern.OnProcessClosed();
                }
                else
                {
                    if (Side == Side.Blue)
                    {
                        Summoner.Move(PixelsConstants.HOWLING_ABYSS_BLUE_T1);
                    }
                    else
                    {
                        Summoner.Move(PixelsConstants.HOWLING_ABYSS_RED_T1);
                    }
                    Thread.Sleep(2000);

                    Point blueSideAim = new Point(1085, 431);
                    Point redSideAim  = new Point(790, 590);

                    Point target = Side == Side.Blue ? blueSideAim : redSideAim;

                    Summoner.Q();
                    Thread.Sleep(500);
                    Mouse.Move(target.X, target.Y);
                    Summoner.E();
                    Thread.Sleep(500);
                    Mouse.Move(target.X, target.Y);
                    Summoner.Z();
                    Thread.Sleep(500);
                    Mouse.Move(target.X, target.Y);
                    Summoner.R();

                    if (Side == Side.Blue)
                    {
                        Summoner.Move(PixelsConstants.HOWLING_ABYSS_REDNEXUS);
                    }
                    else
                    {
                        Summoner.Move(PixelsConstants.HOWLING_ABYSS_BLUENEXUS);
                    }

                    Thread.Sleep(3000);
                    AsyncRandom rd            = new AsyncRandom();
                    int         shiftX        = rd.Next(-3, 3);
                    int         shiftY        = rd.Next(-3, 3);
                    var         closeRandomPt = new Point(Summoner.Position.X + shiftX, Summoner.Position.Y + shiftY);
                    Bot.RightClick(closeRandomPt);
                    Thread.Sleep(1000);
                    Summoner.Summoner1();
                    Summoner.Summoner2();
                }
            }
        }
        public override void Start()
        {
            string[] greetings = { "hi team gl",                   "gl guys",            "glhf",      "glgl",
                                   "have fun",                     "good luck have fun", "good luck", "GL&HF",
                                   "hope no1 will be afk gl guys", "nice gl" };
            Random   rand  = new Random();
            int      index = rand.Next(greetings.Length);

            //
            base.Start();
            Thread.Sleep(3000);
            //Interop.CenterProcessWindow(LeagueConstants.LoL_GAME_PROCESS);
            Interop.Set0x0Position(LeagueConstants.LOL_GAME_PROCESS);
            Summoner.LockCamera();
            Thread.Sleep(1000);
            Bot.LeftClick(PixelsConstants.SHOP_BUTTON);
            Thread.Sleep(500);
            Bot.RightClick(PixelsConstants.SHOP_ITEM1);
            Thread.Sleep(1000);
            Bot.RightClick(PixelsConstants.SHOP_ITEM2);
            Thread.Sleep(500);
            Keyboard.KeyPress(Keys.Escape);

            Thread.Sleep(5000);
            Summoner.Talk($"{greetings[index]}");
            Summoner.MaxE();
            Thread.Sleep(500);
            Summoner.MaxQ();
            Thread.Sleep(500);
            Summoner.MaxZ();
            Thread.Sleep(500);
            Summoner.Move(PixelsConstants.HOWLING_ABYSS_BUSH1);
            Summoner.Wait(20);
            bool playing = true;

            while (playing)
            {
                if (!Interop.IsProcessOpen(Pattern.ProcessName))
                {
                    playing = false;
                    Pattern.OnProcessClosed();
                }
                else
                {
                    if (Side == Side.Blue)
                    {
                        Summoner.Move(PixelsConstants.HOWLING_ABYSS_BLUE_T1);
                    }
                    else
                    {
                        Summoner.Move(PixelsConstants.HOWLING_ABYSS_RED_T1);
                    }
                    Thread.Sleep(2000);

                    // dodac randomizacje punktow do rzucania skilli
                    Point blueSideAim = new Point(1085, 431);
                    Point redSideAim  = new Point(790, 590);
                    //

                    Point target = Side == Side.Blue ? blueSideAim : redSideAim;

                    Summoner.Q();
                    Thread.Sleep(500);
                    Mouse.Move(target.X, target.Y);
                    Summoner.E();
                    Thread.Sleep(500);
                    Mouse.Move(target.X, target.Y);
                    Summoner.Z();
                    Thread.Sleep(500);
                    Mouse.Move(target.X, target.Y);
                    Summoner.R();

                    if (Side == Side.Blue)
                    {
                        Summoner.Move(PixelsConstants.HOWLING_ABYSS_REDNEXUS);
                    }
                    else
                    {
                        Summoner.Move(PixelsConstants.HOWLING_ABYSS_BLUENEXUS);
                    }

                    Thread.Sleep(3000);
                    AsyncRandom rd            = new AsyncRandom();
                    int         shiftX        = rd.Next(-3, 3);
                    int         shiftY        = rd.Next(-3, 3);
                    var         closeRandomPt = new Point(Summoner.Position.X + shiftX, Summoner.Position.Y + shiftY);
                    Bot.RightClick(closeRandomPt);
                    Thread.Sleep(1000);
                    Summoner.Summoner1();
                    Summoner.Summoner2();
                }
            }
        }