コード例 #1
0
ファイル: MainForm.cs プロジェクト: spiderbuddy411/AutoAccept
 private void ChangeProfileIcon_Click(object sender, EventArgs e)
 {
     Process[] p = Process.GetProcessesByName("LeagueClientUx");
     if (p.Length != 0)
     {
         string profileIcon = LCU.GetRequest(RestSharp.Method.PUT, "/lol-summoner/v1/current-summoner/icon", RestSharp.DataFormat.Json, new { profileIconId = tbProfileIcon.TextStr });
     }
     else
     {
         Environment.Exit(0);
     }
 }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: spiderbuddy411/AutoAccept
        private void MainForm_Load(object sender, EventArgs e)
        {
            Dark.LoadFont();
            Process[] p = Process.GetProcessesByName("LeagueClientUx");
            if (p.Length != 0)
            {
                string showUx = LCU.GetRequest(RestSharp.Method.POST, "/riotclient/ux-show");


                string output = LCU.GetRequest(RestSharp.Method.GET, "/lol-summoner/v1/current-summoner", RestSharp.DataFormat.Json);
                Console.WriteLine(output);
                summoner = JsonConvert.DeserializeObject <SummonerObject.Summoner>(output);
                pbAvatar.ImageLocation = "http://ddragon.leagueoflegends.com/cdn/10.24.1/img/profileicon/" + summoner.ProfileIconId + ".png";
                lblName.Text           = summoner.DisplayName;
                pbLevelProgress.Value  = summoner.PercentCompleteForNextLevel;
                lblLevel.Text          = summoner.SummonerLevel + " (" + summoner.XpUntilNextLevel + "/" + summoner.XpSinceLastLevel + ")";

                string walletJson = LCU.GetRequest(RestSharp.Method.GET, "/lol-store/v1/wallet");
                wallet              = JsonConvert.DeserializeObject <LolStore.Wallet>(walletJson);
                lblRP.Text          = wallet.RP.ToString();
                lblBlueEssence.Text = wallet.BlueEssence.ToString();
            }
        }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: spiderbuddy411/AutoAccept
        private void LCUTimer_Tick(object sender, EventArgs e)
        {
            Process[] p = Process.GetProcessesByName("LeagueClientUx");
            if (p.Length != 0)
            {
                try
                {
                    string JsonReadyCheck = LCU.GetRequest(RestSharp.Method.GET, "/lol-matchmaking/v1/ready-check");
                    readyCheck = JsonConvert.DeserializeObject <Matchmaking.ReadyCheck>(JsonReadyCheck);
                    if (readyCheck.State == "InProgress" && AutoAccept)
                    {
                        LCU.GetRequest(RestSharp.Method.POST, "/lol-matchmaking/v1/ready-check/accept");
                        //API.LCU.GetRequest(RestSharp.Method.POST, "/lol-matchmaking/v1/ready-check/decline");
                    }

                    string gameflowPhase = LCU.GetRequest(RestSharp.Method.GET, "/lol-gameflow/v1/gameflow-phase");
                    if (phase != gameflowPhase)
                    {
                        phase = gameflowPhase;
                        Console.WriteLine(gameflowPhase);

                        if (phase.Contains("ChampSelect") && AutoSkinBoost && !autoSkinDo)
                        {
                            Sleep(1000);
                            autoSkinDo = true;
                            var skinboost = LCUAPI.API.LCU.GetRequest(Method.POST, "lol-champ-select/v1/team-boost/purchase");
                            Console.WriteLine(skinboost);
                            TeamBoost myDeserializedClass = JsonConvert.DeserializeObject <TeamBoost>(skinboost);
                        }
                        else if (!phase.Contains("ChampSelect"))
                        {
                            autoSkinDo = false;
                        }
                    }
                } catch { }
            }
        }