private async void ImageRecognitionCreateARAMLobby()
        {
            bool clickedPlayButton    = false;
            bool selectedARAM         = false;
            bool clickedConfirmButton = false;

            while (!clickedConfirmButton || CancelAutoCreateMatch)
            {
                if (!string.IsNullOrEmpty(Options.PlayButtonCoordinates))
                {
                    Actions.ClickPlayButton();
                }
                else
                {
                    TakeFullDesktopScreenShot();
                    if (!clickedPlayButton)
                    {
                        clickedPlayButton = await ImageRecognition.AutoClickPlayButtonImageRecognition();
                    }
                    if (clickedPlayButton)
                    {
                        Actions.ClickPlayButton();
                    }
                }

                TakeFullDesktopScreenShot();
                if (!selectedARAM)
                {
                    selectedARAM = await ImageRecognition.AutoChooseARAMModeImageRecognition();
                }
                if (selectedARAM)
                {
                    Actions.ClickARAMMatch();
                }

                if (selectedARAM)
                {
                    TakeFullDesktopScreenShot();
                    if (!clickedConfirmButton)
                    {
                        clickedConfirmButton = await ImageRecognition.AutoClickConfirmButtonImageRecognition();
                    }
                    if (clickedConfirmButton)
                    {
                        Actions.ClickConfirmButton();
                        SetLiveStatusText("Created an ARAM room.", Color.Green);
                    }
                }
            }
        }
Exemple #2
0
        private async void CreateARAMLobby()
        {
            bool clickedPlayButton    = false;
            bool selectedARAM         = false;
            bool clickedConfirmButton = false;

            while (!clickedConfirmButton)
            {
                TakeFullDesktopScreenShot();
                if (!clickedPlayButton)
                {
                    clickedPlayButton = await ImageRecognition.AutoClickPlayButtonImageRecognition();
                }
                if (clickedPlayButton)
                {
                    int[] coordinates = HelpFile.GetXYCoordinatesRegex(Options.PlayButtonCoordinates);
                    MouseEvent.MoveMouseXYToAndClick(coordinates[0], coordinates[1]);
                    HelpFile.Log("Click Play Button: Clicked Play Button X:" + coordinates[0] + ", Y:" + coordinates[1] + ".");
                }

                TakeFullDesktopScreenShot();
                if (!selectedARAM)
                {
                    selectedARAM = await ImageRecognition.AutoChooseARAMModeImageRecognition();
                }
                if (selectedARAM)
                {
                    int[] coordinates = HelpFile.GetXYCoordinatesRegex(Options.ARAMMatchCoordinates);
                    MouseEvent.MoveMouseXYToAndClick(coordinates[0], coordinates[1]);
                    HelpFile.Log("Pick ARAM Mode X:" + coordinates[0] + ", Y:" + coordinates[1] + ".");
                }

                TakeFullDesktopScreenShot();
                if (!clickedConfirmButton)
                {
                    clickedConfirmButton = await ImageRecognition.AutoClickConfirmButtonImageRecognition();
                }
                if (clickedConfirmButton)
                {
                    int[] coordinates = HelpFile.GetXYCoordinatesRegex(Options.ConfirmButtonCoordinates);
                    MouseEvent.MoveMouseXYToAndClick(coordinates[0], coordinates[1]);
                    HelpFile.Log("Confirm Button: Clicked Confirm Button X:" + coordinates[0] + ", Y:" + coordinates[1] + ".");

                    AutoCreateSummonerRift = true;
                    SetLiveStatusText("Created an ARAM room.", Color.Green);
                }
            }
        }
        private async void ImageRecognitionCreateSummonersRiftLobby()
        {
            bool clickedPlayButton     = false;
            bool selectedSummonersRift = false;
            bool selectSummonerType    = false;
            bool clickedConfirmButton  = false;

            if (!string.IsNullOrWhiteSpace(Options.SummonerType))
            {
                ShowMessageBox(@"Please make sure you've selected summoner type. \r\nPlease check the Auto Login / Match tab in settings.", "Unable To Create Lobby", MessageBoxIcon.Error);
                SetLiveStatusText("Please double check the Username and Password.", Color.Green);
                return;
            }

            while (!clickedConfirmButton || CancelAutoCreateMatch)
            {
                if (!string.IsNullOrEmpty(Options.PlayButtonCoordinates))
                {
                    Actions.ClickPlayButton();
                }
                else
                {
                    TakeFullDesktopScreenShot();
                    if (!clickedPlayButton)
                    {
                        clickedPlayButton = await ImageRecognition.AutoClickPlayButtonImageRecognition();
                    }
                    if (clickedPlayButton)
                    {
                        Actions.ClickPlayButton();
                    }
                }

                TakeFullDesktopScreenShot();
                if (!selectedSummonersRift)
                {
                    selectedSummonersRift = await ImageRecognition.AutoChooseSummerRiftModeImageRecognition();
                }
                if (selectedSummonersRift)
                {
                    Actions.ClickSummonersMatch();
                }

                if (Options.SummonerType.Equals("Blind Pick"))
                {
                    TakeFullDesktopScreenShot();
                    if (!selectSummonerType)
                    {
                        selectSummonerType = await ImageRecognition.AutoChooseSummersBlindPickImageRecognition();
                    }
                    if (selectSummonerType)
                    {
                        Actions.ClickBlindPick();
                    }
                }

                if (Options.SummonerType.Equals("Draft Pick"))
                {
                    TakeFullDesktopScreenShot();
                    if (!selectSummonerType)
                    {
                        selectSummonerType = await ImageRecognition.AutoChooseSummersDraftPickImageRecognition();
                    }
                    if (selectSummonerType)
                    {
                        Actions.ClickDraftPick();
                    }
                }

                if (Options.SummonerType.Equals("Ranked Solo/Duo"))
                {
                    TakeFullDesktopScreenShot();
                    if (!selectSummonerType)
                    {
                        selectSummonerType = await ImageRecognition.AutoChooseSummersRankedImageRecognition();
                    }
                    if (selectSummonerType)
                    {
                        Actions.ClickSoloDuoRanked();
                    }
                }

                if (selectSummonerType)
                {
                    TakeFullDesktopScreenShot();
                    if (!clickedConfirmButton)
                    {
                        clickedConfirmButton = await ImageRecognition.AutoClickConfirmButtonImageRecognition();
                    }
                    if (clickedConfirmButton)
                    {
                        Actions.ClickConfirmButton();
                        SetLiveStatusText("Created Summoner's Rift: " + Options.SummonerType + " room.", Color.Green);
                    }
                }
            }
        }
Exemple #4
0
        private async void CreateSummonersRiftLobby()
        {
            bool clickedPlayButton     = false;
            bool selectedSummonersRift = false;
            bool selectSummonerType    = false;
            bool clickedConfirmButton  = false;

            while (!clickedConfirmButton)
            {
                TakeFullDesktopScreenShot();
                if (!clickedPlayButton)
                {
                    clickedPlayButton = await ImageRecognition.AutoClickPlayButtonImageRecognition();
                }
                if (clickedPlayButton)
                {
                    int[] coordinates = HelpFile.GetXYCoordinatesRegex(Options.PlayButtonCoordinates);
                    MouseEvent.MoveMouseXYToAndClick(coordinates[0], coordinates[1]);
                    HelpFile.Log("Click Play Button: Clicked Play Button X:" + coordinates[0] + ", Y:" + coordinates[1] + ".");
                }

                TakeFullDesktopScreenShot();
                if (!selectedSummonersRift)
                {
                    selectedSummonersRift = await ImageRecognition.AutoChooseSummerRiftModeImageRecognition();
                }
                if (selectedSummonersRift)
                {
                    int[] coordinates = HelpFile.GetXYCoordinatesRegex(Options.SummonersRiftCoordinates);
                    MouseEvent.MoveMouseXYToAndClick(coordinates[0], coordinates[1]);
                    HelpFile.Log("Pick Summoner Mode: Picked Summoner Rift X:" + coordinates[0] + ", Y:" + coordinates[1] + ".");
                }

                Console.WriteLine(Options.SummonerType);

                if (Options.SummonerType.Equals("Draft Pick"))
                {
                    TakeFullDesktopScreenShot();
                    if (!selectSummonerType)
                    {
                        selectSummonerType = await ImageRecognition.AutoChooseSummersDraftPickImageRecognition();
                    }
                    if (selectSummonerType)
                    {
                        int[] coordinates = HelpFile.GetXYCoordinatesRegex(Options.DraftPickCoordinates);
                        MouseEvent.MoveMouseXYToAndClick(coordinates[0], coordinates[1]);
                        HelpFile.Log("Summoner Mode: Draft Pick X:" + coordinates[0] + ", Y:" + coordinates[1] + ".");
                    }
                }

                if (Options.SummonerType.Equals("Blind Pick"))
                {
                    TakeFullDesktopScreenShot();
                    if (!selectSummonerType)
                    {
                        selectSummonerType = await ImageRecognition.AutoChooseSummersBlindPickImageRecognition();
                    }
                    if (selectSummonerType)
                    {
                        int[] coordinates = HelpFile.GetXYCoordinatesRegex(Options.BlindPickCoordinates);
                        MouseEvent.MoveMouseXYToAndClick(coordinates[0], coordinates[1]);
                        HelpFile.Log("Summoner Mode: Blind Pick X:" + coordinates[0] + ", Y:" + coordinates[1] + ".");
                    }
                }

                if (Options.SummonerType.Equals("Ranked Solo/Duo"))
                {
                    TakeFullDesktopScreenShot();
                    if (!selectSummonerType)
                    {
                        selectSummonerType = await ImageRecognition.AutoChooseSummersRankedImageRecognition();
                    }
                    if (selectSummonerType)
                    {
                        int[] coordinates = HelpFile.GetXYCoordinatesRegex(Options.RankedSoloDuoCoordinates);
                        MouseEvent.MoveMouseXYToAndClick(coordinates[0], coordinates[1]);
                        HelpFile.Log("Summoner Mode: Ranked Pick X:" + coordinates[0] + ", Y:" + coordinates[1] + ".");
                    }
                }

                TakeFullDesktopScreenShot();
                if (!clickedConfirmButton)
                {
                    clickedConfirmButton = await ImageRecognition.AutoClickConfirmButtonImageRecognition();
                }
                if (clickedConfirmButton)
                {
                    int[] coordinates = HelpFile.GetXYCoordinatesRegex(Options.PlayButtonCoordinates);
                    MouseEvent.MoveMouseXYToAndClick(coordinates[0], coordinates[1]);
                    HelpFile.Log("Confirm Button: Clicked Confirm Button X:" + coordinates[0] + ", Y:" + coordinates[1] + ".");

                    AutoCreateSummonerRift = true;
                    SetLiveStatusText("Created Summoner's Rift: " + Options.SummonerType + " room.", Color.Green);
                }
            }
        }