Exemple #1
0
        private void ChangeBuild_OnValueChanged(object sender, OnValueChangeEventArgs onValueChangeEventArgs)
        {
            if (AutoLevlerMisc.GetMenuSettings("SAssembliesMiscsAutoLevlerSequence")
                .GetMenuItem("SAssembliesMiscsAutoLevlerSequenceShowBuild")
                .GetValue <bool>() || AutoLevlerMisc.GetMenuSettings("SAssembliesMiscsAutoLevlerSequence")
                .GetMenuItem("SAssembliesMiscsAutoLevlerSequenceNewBuild")
                .GetValue <bool>() || AutoLevlerMisc.GetMenuSettings("SAssembliesMiscsAutoLevlerSequence")
                .GetMenuItem("SAssembliesMiscsAutoLevlerSequenceDeleteBuild")
                .GetValue <bool>())
            {
                onValueChangeEventArgs.Process = false;
                return;
            }

            StringList     list      = onValueChangeEventArgs.GetNewValue <StringList>();
            SequenceLevler curLevler = null;

            foreach (SequenceLevler levler in sLevler.ToArray())
            {
                if (levler.Name.Contains(list.SList[list.SelectedIndex]))
                {
                    curLevler = levler;
                }
            }
            if (curLevler != null)
            {
                SequenceLevlerGUI.CurrentLevler = new SequenceLevler(curLevler.Name, curLevler.Sequence);
            }
            else
            {
                SequenceLevlerGUI.CurrentLevler = new SequenceLevler();
            }
        }
Exemple #2
0
            public static void GetLolBuilderData()
            {
                String lolBuilderData = null;

                try
                {
                    lolBuilderData = Website.GetWebSiteContent("http://lolbuilder.net/" + ObjectManager.Player.ChampionName);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                    return;
                }

                String patternSkillOrder = "window.skillOrder\\[(.*?)\\] = \\[(.*?)\\];";
                String patternSkillName  = "<a href=\"#ability-order-(.*?)\">([A-Z]*?)(.*?)<div";

                for (int i = 0; ; i++)
                {
                    String matchSkillOrder = Website.GetMatch(lolBuilderData, patternSkillOrder, i, 2);
                    if (matchSkillOrder.Equals(""))
                    {
                        break;
                    }
                    String      matchSkillName  = Website.GetMatch(lolBuilderData, patternSkillName, i, 3);
                    String[]    splitSkillOrder = matchSkillOrder.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                    SpellSlot[] spellSlots      = new SpellSlot[18];
                    for (int j = 0; j < splitSkillOrder.Length; j++)
                    {
                        var skill = splitSkillOrder[j];
                        try
                        {
                            spellSlots[j] = (SpellSlot)(Convert.ToInt32(skill) - 1);
                        }
                        catch (Exception e)
                        {
                            Console.WriteLine("Cannot convert SkillOrder to SpellSlot {0}: {1}", skill, e);
                        }
                    }
                    SequenceLevler seqLevler = new SequenceLevler(ObjectManager.Player.ChampionName + " LolBuilder " + matchSkillName, spellSlots, true);
                    seqLevler.New = true;
                    SequenceLevlerGUI.CurrentLevler = seqLevler;
                    Common.ExecuteInOnGameUpdate(() => SaveSequence(seqLevler.New));
                }
            }
            public static void GetLolBuilderData()
            {
                String lolBuilderData = null;
                try
                {
                    lolBuilderData = Website.GetWebSiteContent("http://lolbuilder.net/" + ObjectManager.Player.ChampionName);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                    return;
                }

                String patternSkillOrder = "window.skillOrder\\[(.*?)\\] = \\[(.*?)\\];";
                String patternSkillName = "<a href=\"#ability-order-(.*?)\">([A-Z]*?)(.*?)<div";

                for (int i = 0; ; i++)
                {
                    String matchSkillOrder = Website.GetMatch(lolBuilderData, patternSkillOrder, i, 2);
                    if (matchSkillOrder.Equals(""))
                    {
                        break;
                    }
                    String matchSkillName = Website.GetMatch(lolBuilderData, patternSkillName, i, 3);
                    String[] splitSkillOrder = matchSkillOrder.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                    SpellSlot[] spellSlots = new SpellSlot[18];
                    for (int j = 0; j < splitSkillOrder.Length; j++)
                    {
                        var skill = splitSkillOrder[j];
                        try
                        {
                            spellSlots[j] = (SpellSlot)(Convert.ToInt32(skill) - 1);
                        }
                        catch (Exception e)
                        {
                            Console.WriteLine("Cannot convert SkillOrder to SpellSlot {0}: {1}", skill, e);
                        }
                    }
                    SequenceLevler seqLevler = new SequenceLevler(ObjectManager.Player.ChampionName + " LolBuilder " + matchSkillName, spellSlots, true);
                    seqLevler.New = true;
                    SequenceLevlerGUI.CurrentLevler = seqLevler;
                    Common.ExecuteInOnGameUpdate(() => SaveSequence(seqLevler.New));
                }
            }
            public static void GetChampionGgData()
            {
                String championGgData = null;
                try
                {
                    championGgData = Website.GetWebSiteContent("http://champion.gg/champion/" + ObjectManager.Player.ChampionName);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                    return;
                }

                List<String> matchesLane = new List<string>();
                String patternUrl = "<a href=\"/champion/Ryze/(.*?)\">";

                for (int i = 0; ; i++)
                {
                    String matchUrl = Website.GetMatch(championGgData, patternUrl, i);
                    if (matchUrl.Equals(""))
                    {
                        break;
                    }
                    matchesLane.Add(matchUrl);
                }

                foreach (var lane in matchesLane)
                {
                    try
                    {
                        championGgData = Website.GetWebSiteContent("http://champion.gg/champion/" + ObjectManager.Player.ChampionName + "/" + lane);
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine(e);
                        continue;
                    }

                    String patternSkillTree =
                        "<h2 class=\"champion-stats\" style=\"margin-top:55px\">Highest Win % Skill Order</h2><div class=\"skill-order clearfix\">(.*?)</div><div class=\"build-text\">";
                    String matchSkillTree = Website.GetMatch(championGgData, patternSkillTree);

                    List<String> matchesSkill = new List<string>();
                    String patternSkillRow = "<div class=\"(|selected)\">";

                    for (int i = 0; i < 72; i++)
                    {
                        String matchSkill = Website.GetMatch(matchSkillTree, patternSkillRow, i);
                        matchesSkill.Add(matchSkill);
                    }

                    SpellSlot[] spellSlots = new SpellSlot[18];

                    for (int i = 0; i < matchesSkill.Count; i++)
                    {
                        if (matchesSkill[i].Equals("selected"))
                        {
                            int row = i % 18;
                            int spell = (int)Math.Floor(i / 18d);
                            spellSlots[row] = (SpellSlot)spell;
                        }
                    }
                    SequenceLevler seqLevler = new SequenceLevler(ObjectManager.Player.ChampionName + " ChampionGG " + lane, spellSlots, true);
                    seqLevler.New = true;
                    SequenceLevlerGUI.CurrentLevler = seqLevler;
                    Common.ExecuteInOnGameUpdate(() => SaveSequence(seqLevler.New));
                }
            }
Exemple #5
0
            public static void GetChampionGgData()
            {
                String championGgData = null;

                try
                {
                    championGgData = Website.GetWebSiteContent("http://champion.gg/champion/" + ObjectManager.Player.ChampionName);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                    return;
                }

                List <String> matchesLane = new List <string>();
                String        patternUrl  = "<a href=\"/champion/" + ObjectManager.Player.ChampionName + "/(.*?)\">";

                for (int i = 0; ; i++)
                {
                    String matchUrl = Website.GetMatch(championGgData, patternUrl, i);
                    if (matchUrl.Equals(""))
                    {
                        break;
                    }
                    matchesLane.Add(matchUrl);
                }

                foreach (var lane in matchesLane)
                {
                    try
                    {
                        championGgData = Website.GetWebSiteContent("http://champion.gg/champion/" + ObjectManager.Player.ChampionName + "/" + lane);
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine(e);
                        continue;
                    }

                    String patternSkillTree =
                        "<h2 class=\"champion-stats\" style=\"margin-top:55px\">Highest Win % Skill Order</h2><div class=\"skill-order clearfix\">(.*?)</div><div class=\"build-text\">";
                    String matchSkillTree = Website.GetMatch(championGgData, patternSkillTree);

                    List <String> matchesSkill    = new List <string>();
                    String        patternSkillRow = "<div class=\"(|selected)\">";

                    for (int i = 0; i < 72; i++)
                    {
                        String matchSkill = Website.GetMatch(matchSkillTree, patternSkillRow, i);
                        matchesSkill.Add(matchSkill);
                    }

                    SpellSlot[] spellSlots = new SpellSlot[18];

                    for (int i = 0; i < matchesSkill.Count; i++)
                    {
                        if (matchesSkill[i].Equals("selected"))
                        {
                            int row   = i % 18;
                            int spell = (int)Math.Floor(i / 18d);
                            spellSlots[row] = (SpellSlot)spell;
                        }
                    }
                    SequenceLevler seqLevler = new SequenceLevler(ObjectManager.Player.ChampionName + " ChampionGG " + lane, spellSlots, true);
                    seqLevler.New = true;
                    SequenceLevlerGUI.CurrentLevler = seqLevler;
                    Common.ExecuteInOnGameUpdate(() => SaveSequence(seqLevler.New));
                }
            }