Example #1
0
        protected override void AddToMenu()
        {
            var ultimateMenu = Menu.AddSubMenu(new Menu("Ultimate", Menu.Name + ".ultimate"));

            var blitzMenu = ultimateMenu.AddSubMenu(new Menu("Blitzcrank", ultimateMenu.Name + ".blitzcrank"));

            HeroListManager.AddToMenu(
                blitzMenu.AddSubMenu(new Menu("Blacklist", blitzMenu.Name + ".blacklist")),
                new HeroListManagerArgs("blitzcrank")
            {
                IsWhitelist   = false,
                Allies        = false,
                Enemies       = true,
                DefaultValue  = false,
                EnabledButton = false
            });
            blitzMenu.AddItem(new MenuItem(blitzMenu.Name + ".r", "Enabled").SetValue(true));

            var tahmMenu = ultimateMenu.AddSubMenu(new Menu("Tahm Kench", ultimateMenu.Name + ".tahm-kench"));

            HeroListManager.AddToMenu(
                tahmMenu.AddSubMenu(new Menu("Blacklist", tahmMenu.Name + ".blacklist")),
                new HeroListManagerArgs("tahm-kench")
            {
                IsWhitelist   = false,
                Allies        = false,
                Enemies       = true,
                DefaultValue  = false,
                EnabledButton = false
            });
            tahmMenu.AddItem(new MenuItem(tahmMenu.Name + ".r", "Enabled").SetValue(true));

            ultimateMenu.AddItem(
                new MenuItem(ultimateMenu.Name + ".save", "Save Mode").SetValue(
                    new StringList(new[] { "None", "Auto", "Min. Health %" }, 1))).ValueChanged +=
                delegate(object sender, OnValueChangeEventArgs args)
            {
                Utils.UpdateVisibleTag(ultimateMenu, 1, args.GetNewValue <StringList>().SelectedIndex == 2);
            };
            ultimateMenu.AddItem(
                new MenuItem(ultimateMenu.Name + ".save-health", "Min. Health %").SetValue(new Slider(10, 1, 50)))
            .SetTag(1);

            Utils.UpdateVisibleTag(
                ultimateMenu, 1, Menu.Item(Menu.Name + ".ultimate.save").GetValue <StringList>().SelectedIndex == 2);

            var comboMenu = Menu.AddSubMenu(new Menu("Combo", Menu.Name + ".combo"));

            HitchanceManager.AddToMenu(
                comboMenu.AddSubMenu(new Menu("Hitchance", comboMenu.Name + ".hitchance")), "combo",
                new Dictionary <string, HitChance> {
                { "Q", HitChance.VeryHigh }
            });
            ResourceManager.AddToMenu(
                comboMenu,
                new ResourceManagerArgs(
                    "combo-q", ResourceType.Mana, ResourceValueType.Percent, ResourceCheckType.Minimum)
            {
                Prefix       = "Q",
                DefaultValue = 10
            });
            comboMenu.AddItem(new MenuItem(comboMenu.Name + ".q", "Use Q").SetValue(true));
            comboMenu.AddItem(new MenuItem(comboMenu.Name + ".e", "Use E").SetValue(true));
            comboMenu.AddItem(new MenuItem(comboMenu.Name + ".e-min", "E Fleeing Min.").SetValue(new Slider(8, 1, 20)));
            comboMenu.AddItem(new MenuItem(comboMenu.Name + ".minions", "Attack Minions").SetValue(false));

            var harassMenu = Menu.AddSubMenu(new Menu("Harass", Menu.Name + ".harass"));

            HitchanceManager.AddToMenu(
                harassMenu.AddSubMenu(new Menu("Hitchance", harassMenu.Name + ".hitchance")), "harass",
                new Dictionary <string, HitChance> {
                { "Q", HitChance.High }
            });
            ResourceManager.AddToMenu(
                harassMenu,
                new ResourceManagerArgs(
                    "harass-q", ResourceType.Mana, ResourceValueType.Percent, ResourceCheckType.Minimum)
            {
                Prefix       = "Q",
                DefaultValue = 30
            });
            ResourceManager.AddToMenu(
                harassMenu,
                new ResourceManagerArgs(
                    "harass-e", ResourceType.Mana, ResourceValueType.Percent, ResourceCheckType.Minimum)
            {
                Prefix       = "E",
                DefaultValue = 30
            });
            harassMenu.AddItem(new MenuItem(harassMenu.Name + ".q", "Use Q").SetValue(true));
            harassMenu.AddItem(new MenuItem(harassMenu.Name + ".e", "Use E").SetValue(true));
            harassMenu.AddItem(new MenuItem(harassMenu.Name + ".e-min", "E Min.").SetValue(new Slider(4, 1, 20)));

            var laneclearMenu = Menu.AddSubMenu(new Menu("Lane Clear", Menu.Name + ".lane-clear"));

            ResourceManager.AddToMenu(
                laneclearMenu,
                new ResourceManagerArgs(
                    "lane-clear", ResourceType.Mana, ResourceValueType.Percent, ResourceCheckType.Minimum)
            {
                Advanced    = true,
                LevelRanges = new SortedList <int, int> {
                    { 1, 6 }, { 6, 12 }, { 12, 18 }
                },
                DefaultValues = new List <int> {
                    50, 30, 30
                },
                IgnoreJungleOption = true
            });
            laneclearMenu.AddItem(new MenuItem(laneclearMenu.Name + ".q", "Use Q").SetValue(true));
            laneclearMenu.AddItem(
                new MenuItem(laneclearMenu.Name + ".q-min", "Q Min. Hits").SetValue(new Slider(3, 1, 5)));
            laneclearMenu.AddItem(new MenuItem(laneclearMenu.Name + ".e", "Use E").SetValue(true));

            var lasthitMenu = Menu.AddSubMenu(new Menu("Last Hit", Menu.Name + ".lasthit"));

            ResourceManager.AddToMenu(
                lasthitMenu,
                new ResourceManagerArgs(
                    "lasthit", ResourceType.Mana, ResourceValueType.Percent, ResourceCheckType.Minimum)
            {
                Advanced    = true,
                LevelRanges = new SortedList <int, int> {
                    { 1, 6 }, { 6, 12 }, { 12, 18 }
                },
                DefaultValues = new List <int> {
                    50, 30, 30
                }
            });
            lasthitMenu.AddItem(new MenuItem(lasthitMenu.Name + ".e-siege", "E Siege Minion").SetValue(true));
            lasthitMenu.AddItem(new MenuItem(lasthitMenu.Name + ".e-unkillable", "E Unkillable").SetValue(true));
            lasthitMenu.AddItem(new MenuItem(lasthitMenu.Name + ".e-turret", "E Under Turret").SetValue(true));
            lasthitMenu.AddItem(new MenuItem(lasthitMenu.Name + ".separator", string.Empty));
            lasthitMenu.AddItem(new MenuItem(lasthitMenu.Name + ".e-jungle", "E Jungle").SetValue(true));
            lasthitMenu.AddItem(new MenuItem(lasthitMenu.Name + ".e-big", "E Dragon/Baron").SetValue(true));

            var killstealMenu = Menu.AddSubMenu(new Menu("Killsteal", Menu.Name + ".killsteal"));

            killstealMenu.AddItem(new MenuItem(killstealMenu.Name + ".e", "Use E").SetValue(true));

            var miscMenu = Menu.AddSubMenu(new Menu("Misc", Menu.Name + ".miscellaneous"));

            ResourceManager.AddToMenu(
                miscMenu,
                new ResourceManagerArgs("misc", ResourceType.Mana, ResourceValueType.Percent, ResourceCheckType.Minimum)
            {
                Prefix       = "E",
                DefaultValue = 30
            });
            miscMenu.AddItem(new MenuItem(miscMenu.Name + ".e-reset", "E Harass Reset").SetValue(true));
            miscMenu.AddItem(
                new MenuItem(miscMenu.Name + ".w-baron", "Hotkey W Baron").SetValue(new KeyBind('J', KeyBindType.Press)));
            miscMenu.AddItem(
                new MenuItem(miscMenu.Name + ".w-dragon", "Hotkey W Dragon").SetValue(
                    new KeyBind('K', KeyBindType.Press)));

            IndicatorManager.AddToMenu(DrawingManager.Menu, true);
            IndicatorManager.Add(Q, true, false);
            IndicatorManager.Add(W, true, false);
            IndicatorManager.Add("E", Rend.GetDamage);
            IndicatorManager.Finale();

            Weights.GetItem("low-health").GetValueFunc = hero => hero.Health - Rend.GetDamage(hero);
            Weights.AddItem(
                new Weights.Item(
                    "w-stack", "W Stack", 10, false, hero => hero.HasBuff("kalistacoopstrikemarkally") ? 10 : 0));
        }