Ejemplo n.º 1
0
        internal void EndOfGameLeaveButtonClick()
        {
            VirtualMouse vm = new VirtualMouse();

            vm.MoveTo(1800, 63000); Thread.Sleep(100); // This handles Exit if need to exit/skip when game ends.
            vm.LeftClick();
            vm.MoveTo(6000, 62000); Thread.Sleep(100); // 60 to 51 is fine.
            vm.LeftClick();
        }
Ejemplo n.º 2
0
        internal void SelectRandomSelectHero()
        {
            VirtualMouse vm = new VirtualMouse();

            vm.MoveTo(32000, 37000); Thread.Sleep(300); // 60 to 51 is fine.
            vm.LeftClick(); Thread.Sleep(300);
            vm.MoveTo(9000, 15000); Thread.Sleep(300);  // 60 to 51 is fine.
            vm.LeftClick(); Thread.Sleep(300);
            //vm.MoveTo(6000, 5000); Thread.Sleep(300); // 60 to 51 is fine.
        }
Ejemplo n.º 3
0
        public void DisconnectRejoiner()
        {
            VirtualMouse vm = new VirtualMouse();

            vm.MoveTo(30000, 40000);
            Thread.Sleep(500);
            vm.LeftClick();
            SendKeys.SendWait("l");
            SendKeys.SendWait("l");
        }
Ejemplo n.º 4
0
        public void ReadyUp()
        {
            VirtualMouse vm = new VirtualMouse();

            vm.MoveTo(28200, 60000);
            Thread.Sleep(500);
            vm.LeftClick();
            SendKeys.SendWait("l");
            SendKeys.SendWait("l");
        }
Ejemplo n.º 5
0
        public void GoMid()
        {
            Random rand = new Random();

            List <int> yCoords = new List <int>()
            {
                52000, 54000, 56000, 58000, 60000 // List<int> yCoords = new List<int>() { 52000, 53000, 54000, 55000, 56000, 57000, 58000, 59000, 60000 } ;
            };
            VirtualMouse vm = new VirtualMouse();

            for (int i = 0; i < yCoords.Count; i++)
            {
                vm.MoveTo(58150, yCoords.ElementAt(rand.Next(0, 4))); // 60 to 51 is fine.
                int randomSleep;
                randomSleep = rand.Next(700, 1300);
                Thread.Sleep(randomSleep);
                SendKeys.SendWait("+a");
            }
        }
Ejemplo n.º 6
0
        private char SelectHotkeyRandomly(char[] charArray, List <char> usedChars)
        {
            VirtualMouse vm    = new VirtualMouse();
            Random       rand  = new Random();
            int          range = rand.Next(0, charArray.Length - 1);

            try
            {
                for (int i = 0; i < charArray.Length - 1; i++)
                {
                    char c = charArray[range];
                    range = rand.Next(0, charArray.Length - 1);

                    if (usedChars.Contains(c) == true)
                    {
                        SelectHotkeyRandomly(charArray, usedChars);
                        // We need to restart since we just casted that...
                    }
                    else if (usedChars.Contains(c) == false)
                    {
                        usedChars.Add(c);
                        SendKeys.SendWait("s");
                        int xOffset = rand.Next(-4, 4);
                        int yOffset = rand.Next(-4, 4);
                        vm.MoveTo(33500 + (xOffset * 3000), 30000 + (yOffset * 3000));
                        SendKeys.SendWait(c.ToString());
                    }
                    return(c);
                }
            }
            catch (Exception)
            {
                throw;
            }
            return('.');
        }