Exemple #1
0
 public void waitProcessOpen(string processName)
 {
     while (!Mouse.IsProcessOpen(processName))
     {
         CMDHelper.Sleep(1000);
     }
 }
Exemple #2
0
 public void processSpellToEnemyChampions()
 {
     tryCastSpellToEnemyChampion(1);
     tryCastSpellToEnemyChampion(3);
     CMDHelper.Sleep(550);
     tryCastSpellToEnemyChampion(3);
     tryCastSpellToEnemyChampion(4);
 }
Exemple #3
0
        public void justMoveAway()
        {
            Point go = Values.EnemyChampion();

            if (go.X == 0 && go.Y == 0)
            {
                return;
            }

            InputHelper.RightClick(780, 600);
            CMDHelper.Sleep(1000);
        }
Exemple #4
0
        public void allyCreepPosition()
        {
            Point go = Values.AllyCreepPosition();

            if (go.X == 0 && go.Y == 0)
            {
                return;
            }

            InputHelper.MoveMouse(go.X - 40, go.Y + 135);
            CMDHelper.Sleep(350);
            InputHelper.PressKey("A");
        }
Exemple #5
0
        public void moveAwayFromCreep()
        {
            Point go = Values.EnemyCreepPosition();

            if (go.X == 0 && go.Y == 0)
            {
                return;
            }

            InputHelper.RightClick(780, 600);
            CMDHelper.Sleep(1100);
            InputHelper.MoveMouse(970, 540);
            InputHelper.PressKey("A");
        }
Exemple #6
0
        public void tryCastSpellToEnemyChampion(int indice)
        {
            Point go = Values.EnemyChampion();

            if (go.X == 0 && go.Y == 0)
            {
                return;
            }

            InputHelper.MoveMouse(go.X + 39, go.Y + 129);

            string key = "D" + indice;

            InputHelper.PressKey(key.ToString());
            CMDHelper.Sleep(50);
        }
Exemple #7
0
        public void tryCastSpellToCreep(int indice)
        {
            Point go = Values.EnemyCreepPosition();

            if (go.X == 0 && go.Y == 0)
            {
                return;
            }

            InputHelper.MoveMouse(go.X + 28, go.Y + 42);

            string key = "D" + indice;

            InputHelper.PressKey(key.ToString());
            CMDHelper.Sleep(65);
        }
Exemple #8
0
        public void talkInChampSelect(string message)
        {
            InputHelper.LeftClick(390, 940, 200);

            CMDHelper.Sleep(100);

            foreach (var character in message)
            {
                Keys key = KeyboardInput.GetKey(character);
                Keyboard.KeyPress(key, 150);
                CMDHelper.Sleep(100);
            }
            CMDHelper.DelayInput();
            Keyboard.KeyPress(Keys.Enter, 150);
            CMDHelper.DelayInput();
        }
Exemple #9
0
        public void talkInGame(string message)
        {
            Keyboard.KeyPress(Keys.Enter, 150);

            CMDHelper.Sleep(100);

            foreach (var character in message)
            {
                Keys key = KeyboardInput.GetKey(character);
                Keyboard.KeyPress(key, 150);
                CMDHelper.Sleep(100);
            }
            CMDHelper.DelayInput();
            Keyboard.KeyPress(Keys.Enter, 150);
            CMDHelper.DelayInput();
        }
Exemple #10
0
        public void waitUntilProcessBounds(string processName, int boundsX, int boundsY)
        {
            Mouse.RECT rect = new Mouse.RECT();

            int width  = 0;
            int height = 0;

            while (width != boundsX && height != boundsY)
            {
                var process = Process.GetProcessesByName(processName).FirstOrDefault();

                if (process == null)
                {
                    throw new Exception("Process " + process + " cannot be found.");
                }

                Mouse.GetWindowRect(process.MainWindowHandle, out rect);

                width  = rect.Right - rect.Left;
                height = rect.Bottom - rect.Top;

                CMDHelper.Sleep(1000);
            }
        }
Exemple #11
0
        public void tryBuyItem()
        {
            if (ItemsToBuy != null)
            {
                foreach (Item _item in ItemsToBuy)
                {
                    CMDHelper.Sleep(1000);
                    if (_item.cost <= getPlayerGold())
                    {
                        if (_item.got == false)
                        {
                            CMDOutput.Write($"Character bought {_item.name}.");
                            InputHelper.RightClick(_item.point.X, _item.point.Y, 200);
                            _item.got = true;

                            CMDHelper.Sleep(500);
                            CMDOutput.Write($"{getPlayerGold().ToString()} gold remaining.");
                            tryBuyItem();
                            CMDHelper.Sleep(500);
                        }
                    }
                }
            }
        }
Exemple #12
0
 public void wait(int ms)
 {
     CMDHelper.Sleep(ms);
 }
Exemple #13
0
 public void nothingHereMoveAway()
 {
     InputHelper.RightClick(780, 600);
     CMDHelper.Sleep(1000);
 }