Exemple #1
0
        private static void CreateMenu()
        {
            try
            {
                foreach (var p in CurrentPatchs)
                {
                    BuildsServices.Add(new BuildServices(p.Key, p.Value));
                }

                MenuIni    = MainMenu.AddMenu("AramBuddy", "AramBuddy");
                SpellsMenu = MenuIni.AddSubMenu("Spells");
                MenuIni.AddGroupLabel("AramBuddy Version: " + version);
                MenuIni.AddGroupLabel("AramBuddy Settings");

                BuildMenu = MenuIni.AddSubMenu("Current Build");
                InfoMenu  = MenuIni.AddSubMenu("Extra Options");

                var lolversion  = BuildMenu.Add("buildpatch", new ComboBox("Select Build Patch: ", 0, BuildsServices.Select(s => s.Patch).ToArray()));
                var buildsource = BuildMenu.Add("buildsource", new ComboBox("Builds Service: ", 0, BuildsServices[lolversion.CurrentValue].AvailableServices));

                lolversion.OnValueChange += delegate(ValueBase <int> sender, ValueBase <int> .ValueChangeArgs args)
                {
                    foreach (var i in BuildsServices[args.OldValue].AvailableServices)
                    {
                        buildsource.Remove(i);
                    }
                    foreach (var i in BuildsServices[args.NewValue].AvailableServices)
                    {
                        buildsource.Add(i);
                    }
                };

                BuildMenu.AddLabel("MetaSrc: Very Good For Aram");
                BuildMenu.AddLabel("Championgg: Decent For Aram");
                BuildMenu.AddLabel("KoreanBuilds: Decent For Aram");
                BuildMenu.AddLabel("LoLSkill: Not Good For Aram");

                var debug         = MenuIni.CreateCheckBox("debug", "Enable Debugging Mode");
                var activator     = MenuIni.CreateCheckBox("activator", "Enable Built-In Activator");
                var DisableSpells = MenuIni.CreateCheckBox("DisableSpells", "Disable Built-in Casting Logic", false);
                var CustomPlugin  = MenuIni.CreateCheckBox("CustomPlugin", "Enable Custom Plugins");
                var quit          = MenuIni.CreateCheckBox("quit", "Quit On Game End");
                var stealhr       = MenuIni.CreateCheckBox("stealhr", "Dont Steal Health Relics From Allies", false);
                var chat          = MenuIni.CreateCheckBox("chat", "Send Start / End msg In-Game Chat", false);
                var texture       = MenuIni.CreateCheckBox("texture1", "Disable In-Game Texture (Less RAM/CPU)", false);
                var evade         = MenuIni.CreateCheckBox("evade", "Evade Integration[BETA]");
                var ff            = MenuIni.CreateCheckBox("ff", "Vote Surrender With Team Always");
                var cameralock    = MenuIni.CreateCheckBox("cameralock", "Lock Camera Always");

                MenuIni.AddSeparator(0);
                var Safe = MenuIni.CreateSlider("Safe1", "Safe Slider (Recommended 1250)", 1250, 0, 2500);
                //MenuIni.AddLabel("More Safe Value = more defensive playstyle");
                //MenuIni.AddSeparator(0);
                var HRHP = MenuIni.CreateSlider("HRHP", "Health Percent To Pick Health Relics (Recommended 75%)", 75);
                var HRMP = MenuIni.CreateSlider("HRMP", "Mana Percent To Pick Health Relics (Recommended 15%)", 15);
                MenuIni.AddSeparator(0);
                var Reset = MenuIni.CreateCheckBox("reset", "Reset All Settings To Default", false);

                // Misc Settings
                MiscMenu = MenuIni.AddSubMenu("Misc Settings");
                var autolvl    = MiscMenu.CreateCheckBox("autolvl", "Enable AutoLvlUP");
                var autoshop   = MiscMenu.CreateCheckBox("autoshop", "Enable AutoShop");
                var fixdive    = MiscMenu.CreateCheckBox("fixdive", "Try to Fix Diving Towers");
                var kite       = MiscMenu.CreateCheckBox("kite", "Try Kite Near Enemies");
                var ping       = MiscMenu.CreateCheckBox("ping", "Move To AllySpawn On High Ping/Ping-Spikes");
                var bardchime  = MiscMenu.CreateCheckBox("bardchime", "Pick Bard Chimes");
                var corkibomb  = MiscMenu.CreateCheckBox("corkibomb", "Pick Corki Bomb");
                var dravenaxe  = MiscMenu.CreateCheckBox("dravenaxe", "Pick Draves Axes");
                var olafaxe    = MiscMenu.CreateCheckBox("olafaxe", "Pick Olaf Axe");
                var zacpassive = MiscMenu.CreateCheckBox("zacpassive", "Pick Zac Blops");
                var azirtower  = MiscMenu.CreateCheckBox("azirtower", "Create Azir Towers");
                var teleport   = MiscMenu.CreateCheckBox("tp", "Enable use of Teleporting Logic");
                var logs       = MiscMenu.CreateCheckBox("logs", "Save AramBuddy Logs", false);
                var savechat   = MiscMenu.CreateCheckBox("savechat", "Save In-Game Chat", false);
                var tyler1     = MiscMenu.CreateCheckBox("bigbrother", "Run it down mid", false);
                var tyler1g    = MiscMenu.CreateSlider("gold", "Run it down mid if my Gold >= {0}", 3000, 500, 17500);

                Reset.OnValueChange += delegate(ValueBase <bool> sender, ValueBase <bool> .ValueChangeArgs args)
                {
                    if (args.NewValue)
                    {
                        Reset.CurrentValue         = false;
                        debug.CurrentValue         = true;
                        activator.CurrentValue     = true;
                        DisableSpells.CurrentValue = false;
                        CustomPlugin.CurrentValue  = true;
                        quit.CurrentValue          = true;
                        stealhr.CurrentValue       = false;
                        chat.CurrentValue          = true;
                        texture.CurrentValue       = false;
                        evade.CurrentValue         = true;
                        ff.CurrentValue            = true;
                        cameralock.CurrentValue    = true;
                        Safe.CurrentValue          = 1250;
                        HRHP.CurrentValue          = 75;
                        HRMP.CurrentValue          = 15;

                        // Misc
                        autolvl.CurrentValue    = true;
                        autoshop.CurrentValue   = true;
                        fixdive.CurrentValue    = true;
                        kite.CurrentValue       = true;
                        ping.CurrentValue       = true;
                        bardchime.CurrentValue  = true;
                        corkibomb.CurrentValue  = true;
                        dravenaxe.CurrentValue  = true;
                        olafaxe.CurrentValue    = true;
                        zacpassive.CurrentValue = true;
                        azirtower.CurrentValue  = true;
                        teleport.CurrentValue   = true;
                        logs.CurrentValue       = false;
                        savechat.CurrentValue   = false;
                        tyler1.CurrentValue     = false;
                        tyler1g.CurrentValue    = 3000;
                    }
                };

                Safe.IsVisible      = false; // disabled
                corkibomb.IsVisible = false; // disable for now

                SpellsMenu.AddGroupLabel("Built-In Casting Logic:");
                SpellsMenu.CreateCheckBox("combo", "Use Spells in Combo Mode");
                SpellsMenu.CreateCheckBox("harass", "Use Spells in Harass Mode");
                SpellsMenu.CreateCheckBox("flee", "Use Spells in Flee Mode");
                SpellsMenu.CreateCheckBox("laneclear", "Use Spells in Lane Clear Mode");
                SpellsMenu.AddSeparator(0);
                SpellsMenu.AddGroupLabel("SummonerSpells");
                SpellsMenu.Add("Heal", new CheckBox("Use Heal"));
                SpellsMenu.Add("Barrier", new CheckBox("Use Barrier"));
                SpellsMenu.Add("Clarity", new CheckBox("Use Clarity"));
                SpellsMenu.Add("Ghost", new CheckBox("Use Ghost"));
                SpellsMenu.Add("Flash", new CheckBox("Use Flash"));
                SpellsMenu.Add("Cleanse", new CheckBox("Use Cleanse"));

                InfoMenu.AddGroupLabel("Disabling In-Game Texture");
                InfoMenu.AddLabel("To Disable In-Game Texture Type In Chat \"Disable Texture\"");
                InfoMenu.AddLabel("To Enable In-Game Texture Type In Chat \"Enable Texture\"");
                InfoMenu.AddLabel("Takes affect after 1 or 2 games");

                Console.Title = $"{Drawing.Width}x{Drawing.Height}";

                texture.IsVisible = false;

                if (DisableTexture)
                {
                    Disabletexture();
                }
                else
                {
                    Enabletexture();
                }

                Chat.OnInput += delegate(ChatInputEventArgs args)
                {
                    if (args.Input.ToLower().Contains("disable texture"))
                    {
                        Disabletexture();
                        texture.CurrentValue = true;
                        args.Process         = false;
                    }
                    if (args.Input.ToLower().Contains("enable texture"))
                    {
                        Enabletexture();
                        texture.CurrentValue = false;
                        args.Process         = false;
                    }
                };
            }
            catch (Exception ex)
            {
                Logger.Send("Program Error At CreateMenu", ex, Logger.LogLevel.Error);
            }
        }