Пример #1
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            Config     = new Menu("Marksman", "Marksman", true);
            CClass     = new Champion();
            AActivator = new Activator();


            var BaseType = CClass.GetType();

            /* Update this with Activator.CreateInstance or Invoke
             * http://stackoverflow.com/questions/801070/dynamically-invoking-any-function-by-passing-function-name-as-string
             * For now stays cancer.
             */
            var championName = ObjectManager.Player.ChampionName.ToLowerInvariant();

            switch (championName)
            {
            case "ashe":
                CClass = new Ashe();
                break;

            case "caitlyn":
                CClass = new Caitlyn();
                break;

            case "corki":
                CClass = new Corki();
                break;

            case "draven":
                CClass = new Draven();
                break;

            case "ezreal":
                CClass = new Ezreal();
                break;

            case "graves":
                CClass = new Graves();
                break;

            case "gnar":
                CClass = new Gnar();
                break;

            case "jinx":
                CClass = new Jinx();
                break;

            case "kalista":
                CClass = new Kalista();
                break;

            case "kogmaw":
                CClass = new Kogmaw();
                break;

            case "lucian":
                CClass = new Lucian();
                break;

            case "missfortune":
                CClass = new MissFortune();
                break;

            case "quinn":
                CClass = new Quinn();
                break;

            case "sivir":
                CClass = new Sivir();
                break;

            case "teemo":
                CClass = new Teemo();
                break;

            case "tristana":
                CClass = new Tristana();
                break;

            case "twitch":
                CClass = new Twitch();
                break;

            case "urgot":
                CClass = new Urgot();
                break;

            case "vayne":
                CClass = new Vayne();
                break;

            case "varus":
                CClass = new Varus();
                break;
            }


            CClass.Id     = ObjectManager.Player.BaseSkinName;
            CClass.Config = Config;

            var targetSelectorMenu = new Menu("Target Selector", "Target Selector");

            TargetSelector.AddToMenu(targetSelectorMenu);
            Config.AddSubMenu(targetSelectorMenu);

            OrbWalking       = Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking"));
            CClass.Orbwalker = new Orbwalking.Orbwalker(OrbWalking);

            OrbWalking.AddItem(new MenuItem("Orb.AutoWindUp", "Marksman - Auto Windup").SetValue(false)).ValueChanged +=
                (sender, argsEvent) => { if (argsEvent.GetNewValue <bool>())
                                         {
                                             CheckAutoWindUp();
                                         }
            };

            /* Menu Summoners */
            var summoners     = Config.AddSubMenu(new Menu("Summoners", "Summoners"));
            var summonersHeal = summoners.AddSubMenu(new Menu("Heal", "Heal"));
            {
                summonersHeal.AddItem(new MenuItem("SUMHEALENABLE", "Enable").SetValue(true));
                summonersHeal.AddItem(new MenuItem("SUMHEALSLIDER", "Min. Heal Per.").SetValue(new Slider(20, 99, 1)));
            }

            var summonersBarrier = summoners.AddSubMenu(new Menu("Barrier", "Barrier"));
            {
                summonersBarrier.AddItem(new MenuItem("SUMBARRIERENABLE", "Enable").SetValue(true));
                summonersBarrier.AddItem(
                    new MenuItem("SUMBARRIERSLIDER", "Min. Heal Per.").SetValue(new Slider(20, 99, 1)));
            }

            var summonersIgnite = summoners.AddSubMenu(new Menu("Ignite", "Ignite"));
            {
                summonersIgnite.AddItem(new MenuItem("SUMIGNITEENABLE", "Enable").SetValue(true));
            }
            /* Menu Items */
            var items = Config.AddSubMenu(new Menu("Items", "Items"));

            items.AddItem(new MenuItem("BOTRK", "BOTRK").SetValue(true));
            items.AddItem(new MenuItem("GHOSTBLADE", "Ghostblade").SetValue(true));
            items.AddItem(new MenuItem("SWORD", "Sword of the Divine").SetValue(true));
            items.AddItem(new MenuItem("MURAMANA", "Muramana").SetValue(true));
            QuickSilverMenu = new Menu("QSS", "QuickSilverSash");
            items.AddSubMenu(QuickSilverMenu);
            QuickSilverMenu.AddItem(new MenuItem("AnyStun", "Any Stun").SetValue(true));
            QuickSilverMenu.AddItem(new MenuItem("AnySlow", "Any Slow").SetValue(true));
            QuickSilverMenu.AddItem(new MenuItem("AnySnare", "Any Snare").SetValue(true));
            QuickSilverMenu.AddItem(new MenuItem("AnyTaunt", "Any Taunt").SetValue(true));
            foreach (var t in AActivator.BuffList)
            {
                foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.IsEnemy))
                {
                    if (t.ChampionName == enemy.ChampionName)
                    {
                        QuickSilverMenu.AddItem(new MenuItem(t.BuffName, t.DisplayName).SetValue(t.DefaultValue));
                    }
                }
            }
            items.AddItem(
                new MenuItem("UseItemsMode", "Use items on").SetValue(
                    new StringList(new[] { "No", "Mixed mode", "Combo mode", "Both" }, 2)));


            //var Extras = Config.AddSubMenu(new Menu("Extras", "Extras"));
            //new PotionManager(Extras);

            // If Champion is supported draw the extra menus
            if (BaseType != CClass.GetType())
            {
                var combo = new Menu("Combo", "Combo");
                if (CClass.ComboMenu(combo))
                {
                    Config.AddSubMenu(combo);
                }

                var harass = new Menu("Harass", "Harass");
                if (CClass.HarassMenu(harass))
                {
                    harass.AddItem(new MenuItem("HarassMana", "Min. Mana Percent").SetValue(new Slider(50, 100, 0)));
                    Config.AddSubMenu(harass);
                }

                var laneclear = new Menu("LaneClear", "LaneClear");
                if (CClass.LaneClearMenu(laneclear))
                {
                    laneclear.AddItem(
                        new MenuItem("LaneClearMana", "Min. Mana Percent").SetValue(new Slider(50, 100, 0)));
                    Config.AddSubMenu(laneclear);
                }

                var misc = new Menu("Misc", "Misc");
                if (CClass.MiscMenu(misc))
                {
                    Config.AddSubMenu(misc);
                }

                /*
                 * if (championName != "caitlyn" || championName != "jinx")
                 * {
                 *  MenuInterruptableSpell = new Menu("Interruptable Spell",
                 *      "Interrupt with " + championName == "caitlyn" ? "Caitlyn's W" : "Jinx's E");
                 *
                 *  MenuInterruptableSpell.AddItem(new MenuItem("InterruptSpells", "Active").SetValue(true));
                 *
                 *  foreach (var xSpell in Interrupter.Spells)
                 *  {
                 *      MenuInterruptableSpell.AddItem(
                 *          new MenuItem("IntNode" + xSpell.BuffName, xSpell.ChampionName + " | " + xSpell.Slot)
                 *              .SetValue(true));
                 *  }
                 *  Config.AddSubMenu(MenuInterruptableSpell);
                 * }
                 */
                var extras = new Menu("Extras", "Extras");
                if (CClass.ExtrasMenu(extras))
                {
                    new PotionManager(extras);
                    Config.AddSubMenu(extras);
                }

                var drawing = new Menu("Drawings", "Drawings");
                if (CClass.DrawingMenu(drawing))
                {
                    drawing.AddItem(new MenuItem("Marksman.Drawings", "Marksman Default Draw Options"));
                    drawing.AddItem(
                        new MenuItem("drawMinionLastHit", MenuSpace + "Minion Last Hit").SetValue(new Circle(false,
                                                                                                             Color.GreenYellow)));
                    drawing.AddItem(
                        new MenuItem("drawMinionNearKill", MenuSpace + "Minion Near Kill").SetValue(new Circle(false,
                                                                                                               Color.Gray)));
                    drawing.AddItem(new MenuItem("drawJunglePosition", MenuSpace + "Jungle Farm Position").SetValue(false));
                    drawing.AddItem(
                        new MenuItem("Draw.DrawMinions", MenuSpace + "Draw Minions Sprite", true).SetValue(false));
                    drawing.AddItem(
                        new MenuItem("Draw.DrawTarget", MenuSpace + "Draw Target Sprite", true).SetValue(false));
                    //drawing.AddItem(new MenuItem("Draw.DrawSTarget", MenuSpace + "Draw Selected Target", true).SetValue(new Circle(false,Color.GreenYellow)));
                    Config.AddSubMenu(drawing);
                }
            }


            CClass.MainMenu(Config);
            Config.AddToMainMenu();
            //Sprite.Load();

            Drawing.OnDraw          += Drawing_OnDraw;
            Game.OnUpdate           += Game_OnGameUpdate;
            Orbwalking.AfterAttack  += Orbwalking_AfterAttack;
            Orbwalking.BeforeAttack += Orbwalking_BeforeAttack;
            //Interrupter.OnPossibleToInterrupt += Interrupter_OnPosibleToInterrupt;
            //Game.OnWndProc += Game_OnWndProc;
        }
Пример #2
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            Config = new Menu("Marksman", "Marksman", true);
            CClass = new Champion();
            AActivator = new Activator();

            var BaseType = CClass.GetType();

            /* Update this with Activator.CreateInstance or Invoke
               http://stackoverflow.com/questions/801070/dynamically-invoking-any-function-by-passing-function-name-as-string
               For now stays cancer.
             */
            var championName = ObjectManager.Player.ChampionName.ToLowerInvariant();

            switch (championName)
            {
                case "ashe":
                    CClass = new Ashe();
                    break;
                case "caitlyn":
                    CClass = new Caitlyn();
                    break;
                case "corki":
                    CClass = new Corki();
                    break;
                case "draven":
                    CClass = new Draven();
                    break;
                case "ezreal":
                    CClass = new Ezreal();
                    break;
                case "graves":
                    CClass = new Graves();
                    break;
                case "gnar":
                    CClass = new Gnar();
                    break;
                case "jinx":
                    CClass = new Jinx();
                    break;
                case "kalista":
                    CClass = new Kalista();
                    break;
                case "kogmaw":
                    CClass = new Kogmaw();
                    break;
                case "lucian":
                    CClass = new Lucian();
                    break;
                case "missfortune":
                    CClass = new MissFortune();
                    break;
                case "quinn":
                    CClass = new Quinn();
                    break;
                case "sivir":
                    CClass = new Sivir();
                    break;
                case "teemo":
                    CClass = new Teemo();
                    break;
                case "tristana":
                    CClass = new Tristana();
                    break;
                case "twitch":
                    CClass = new Twitch();
                    break;
                case "urgot":
                    CClass = new Urgot();
                    break;
                case "vayne":
                    CClass = new Vayne();
                    break;
                case "varus":
                    CClass = new Varus();
                    break;
            }

            CClass.Id = ObjectManager.Player.CharData.BaseSkinName;
            CClass.Config = Config;

            var targetSelectorMenu = new Menu("Target Selector", "Target Selector");
            TargetSelector.AddToMenu(targetSelectorMenu);
            Config.AddSubMenu(targetSelectorMenu);

            OrbWalking = Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking"));
            CClass.Orbwalker = new Orbwalking.Orbwalker(OrbWalking);

            OrbWalking.AddItem(new MenuItem("Orb.AutoWindUp", "Marksman - Auto Windup").SetValue(false)).ValueChanged +=
                (sender, argsEvent) => { if (argsEvent.GetNewValue<bool>()) CheckAutoWindUp(); };

            /* Menu Summoners */
            var summoners = Config.AddSubMenu(new Menu("Summoners", "Summoners"));
            var summonersHeal = summoners.AddSubMenu(new Menu("Heal", "Heal"));
            {
                summonersHeal.AddItem(new MenuItem("SUMHEALENABLE", "Enable").SetValue(true));
                summonersHeal.AddItem(new MenuItem("SUMHEALSLIDER", "Min. Heal Per.").SetValue(new Slider(20, 99, 1)));
            }

            var summonersBarrier = summoners.AddSubMenu(new Menu("Barrier", "Barrier"));
            {
                summonersBarrier.AddItem(new MenuItem("SUMBARRIERENABLE", "Enable").SetValue(true));
                summonersBarrier.AddItem(
                    new MenuItem("SUMBARRIERSLIDER", "Min. Heal Per.").SetValue(new Slider(20, 99, 1)));
            }

            var summonersIgnite = summoners.AddSubMenu(new Menu("Ignite", "Ignite"));
            {
                summonersIgnite.AddItem(new MenuItem("SUMIGNITEENABLE", "Enable").SetValue(true));
            }
            /* Menu Items */
            var items = Config.AddSubMenu(new Menu("Items", "Items"));
            items.AddItem(new MenuItem("BOTRK", "BOTRK").SetValue(true));
            items.AddItem(new MenuItem("GHOSTBLADE", "Ghostblade").SetValue(true));
            items.AddItem(new MenuItem("SWORD", "Sword of the Divine").SetValue(true));
            items.AddItem(new MenuItem("MURAMANA", "Muramana").SetValue(true));
            QuickSilverMenu = new Menu("QSS", "QuickSilverSash");
            items.AddSubMenu(QuickSilverMenu);
            QuickSilverMenu.AddItem(new MenuItem("AnyStun", "Any Stun").SetValue(true));
            QuickSilverMenu.AddItem(new MenuItem("AnySlow", "Any Slow").SetValue(true));
            QuickSilverMenu.AddItem(new MenuItem("AnySnare", "Any Snare").SetValue(true));
            QuickSilverMenu.AddItem(new MenuItem("AnyTaunt", "Any Taunt").SetValue(true));
            foreach (var t in AActivator.BuffList)
            {
                foreach (var enemy in ObjectManager.Get<Obj_AI_Hero>().Where(enemy => enemy.IsEnemy))
                {
                    if (t.ChampionName == enemy.ChampionName)
                        QuickSilverMenu.AddItem(new MenuItem(t.BuffName, t.DisplayName).SetValue(t.DefaultValue));
                }
            }
            items.AddItem(
                new MenuItem("UseItemsMode", "Use items on").SetValue(
                    new StringList(new[] {"No", "Mixed mode", "Combo mode", "Both"}, 2)));

            //var Extras = Config.AddSubMenu(new Menu("Extras", "Extras"));
            //new PotionManager(Extras);

            // If Champion is supported draw the extra menus
            if (BaseType != CClass.GetType())
            {
                SetSmiteSlot();

                var combo = new Menu("Combo", "Combo");
                if (CClass.ComboMenu(combo))
                {
                    if (SmiteSlot != SpellSlot.Unknown)
                        combo.AddItem(new MenuItem("ComboSmite", "Use Smite").SetValue(true));

                    Config.AddSubMenu(combo);
                }

                var harass = new Menu("Harass", "Harass");
                if (CClass.HarassMenu(harass))
                {
                    harass.AddItem(new MenuItem("HarassMana", "Min. Mana Percent").SetValue(new Slider(50, 100, 0)));
                    Config.AddSubMenu(harass);
                }

                var laneclear = new Menu("LaneClear", "LaneClear");
                if (CClass.LaneClearMenu(laneclear))
                {
                    laneclear.AddItem(
                        new MenuItem("LaneClearMana", "Min. Mana Percent").SetValue(new Slider(50, 100, 0)));
                    Config.AddSubMenu(laneclear);
                }

                var misc = new Menu("Misc", "Misc");
                if (CClass.MiscMenu(misc))
                {
                    Config.AddSubMenu(misc);
                }

                var extras = new Menu("Extras", "Extras");
                if (CClass.ExtrasMenu(extras))
                {
                    new PotionManager(extras);
                    Config.AddSubMenu(extras);
                }

                var drawing = new Menu("Drawings", "Drawings");
                if (CClass.DrawingMenu(drawing))
                {
                    drawing.AddItem(new MenuItem("Marksman.Drawings", "Marksman Default Draw Options"));
                    drawing.AddItem(new MenuItem("Draw.ToD", MenuSpace + "Turn Off Drawings On Team Fight").SetValue(false));
                    drawing.AddItem(new MenuItem("Draw.ToDControlRange", MenuSpace + MenuSpace + "Control Range:").SetValue(new Slider(1200, 1600, 600)));
                    drawing.AddItem(new MenuItem("Draw.ToDControlRangeColor", MenuSpace + MenuSpace + "Draw Control Range:").SetValue(new Circle(false, Color.GreenYellow)));
                    drawing.AddItem(new MenuItem("Draw.ToDMinEnemy", MenuSpace + MenuSpace + "Min. Enemy Count:").SetValue(new Slider(3, 5, 0)));

                    drawing.AddItem(new MenuItem("drawMinionLastHit", MenuSpace + "Minion Last Hit").SetValue(new Circle(false,Color.GreenYellow)));
                    drawing.AddItem(new MenuItem("drawMinionNearKill", MenuSpace + "Minion Near Kill").SetValue(new Circle(false,Color.Gray)));
                    drawing.AddItem(
                        new MenuItem("drawJunglePosition", MenuSpace + "Jungle Farm Position").SetValue(false));
                    drawing.AddItem(new MenuItem("Draw.DrawMinion", MenuSpace + "Draw Minions Sprite").SetValue(false));
                    drawing.AddItem(new MenuItem("Draw.DrawTarget", MenuSpace + "Draw Target Sprite").SetValue(false));
                    //drawing.AddItem(new MenuItem("Draw.DrawSTarget", MenuSpace + "Draw Selected Target", true).SetValue(new Circle(false,Color.GreenYellow)));
                    Config.AddSubMenu(drawing);
                }
            }

            CClass.MainMenu(Config);
            Config.AddToMainMenu();
            Sprite.Load();

            Drawing.OnDraw += Drawing_OnDraw;
            Game.OnUpdate += Game_OnGameUpdate;
            Orbwalking.AfterAttack += Orbwalking_AfterAttack;
            Orbwalking.BeforeAttack += Orbwalking_BeforeAttack;
            //Game.OnWndProc += Game_OnWndProc;
        }
Пример #3
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            Config = new Menu("Marksman", "Marksman", true).SetFontStyle(FontStyle.Regular, SharpDX.Color.GreenYellow);
            CClass = new Champion();

            var BaseType = CClass.GetType();

            /* Update this with Activator.CreateInstance or Invoke
             * http://stackoverflow.com/questions/801070/dynamically-invoking-any-function-by-passing-function-name-as-string
             * For now stays cancer.
             */
            var championName = ObjectManager.Player.ChampionName.ToLowerInvariant();

            switch (championName)
            {
            case "ashe":
                CClass = new Ashe();
                break;

            case "caitlyn":
                CClass = new Caitlyn();
                break;

            case "corki":
                CClass = new Corki();
                break;

            case "draven":
                CClass = new Draven();
                break;

            case "ezreal":
                CClass = new Ezreal();
                break;

            case "graves":
                CClass = new Graves();
                break;

            case "gnar":
                CClass = new Gnar();
                break;

            case "jinx":
                CClass = new Jinx();
                break;

            case "kalista":
                CClass = new Kalista();
                break;

            case "kindred":
                CClass = new Kindred();
                break;

            case "kogmaw":
                CClass = new Kogmaw();
                break;

            case "lucian":
                CClass = new Lucian();
                break;

            case "missfortune":
                CClass = new MissFortune();
                break;

            case "quinn":
                CClass = new Quinn();
                break;

            case "sivir":
                CClass = new Sivir();
                break;

            case "teemo":
                CClass = new Teemo();
                break;

            case "tristana":
                CClass = new Tristana();
                break;

            case "twitch":
                CClass = new Twitch();
                break;

            case "urgot":
                CClass = new Urgot();
                break;

            case "vayne":
                CClass = new Vayne();
                break;

            case "varus":
                CClass = new Varus();
                break;
            }
            Config.DisplayName = "Marksman | " + CultureInfo.CurrentCulture.TextInfo.ToTitleCase(championName);

            CClass.Id     = ObjectManager.Player.CharData.BaseSkinName;
            CClass.Config = Config;

            OrbWalking       = Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking"));
            CClass.Orbwalker = new Marksman.Utils.Orbwalking.Orbwalker(OrbWalking);

            OrbWalking.AddItem(new MenuItem("Orb.AutoWindUp", "Marksman - Auto Windup").SetValue(false)).ValueChanged +=
                (sender, argsEvent) => { if (argsEvent.GetNewValue <bool>())
                                         {
                                             CheckAutoWindUp();
                                         }
            };
            AActivator = new Activator();

            MenuActivator = new Menu("Activator", "Activator").SetFontStyle(FontStyle.Regular, SharpDX.Color.Aqua);
            {
                AutoLevel = new Utils.AutoLevel();
                AutoPink  = new Utils.AutoPink();
                AutoPink.Initialize();
                IncomingDangerous.Initialize();
                //ExecutedTime.Initialize();
                AutoBushRevealer = new AutoBushRevealer();
                //EarlyEvade = new Utils.EarlyEvade();
                //MenuActivator.AddSubMenu(EarlyEvade.MenuLocal);

                /* Menu Items */
                var items = MenuActivator.AddSubMenu(new Menu("Items", "Items"));
                items.AddItem(new MenuItem("BOTRK", "BOTRK").SetValue(true));
                items.AddItem(new MenuItem("GHOSTBLADE", "Ghostblade").SetValue(true));
                items.AddItem(new MenuItem("SWORD", "Sword of the Divine").SetValue(true));
                items.AddItem(new MenuItem("MURAMANA", "Muramana").SetValue(true));
                QuickSilverMenu = new Menu("QSS", "QuickSilverSash");
                items.AddSubMenu(QuickSilverMenu);
                QuickSilverMenu.AddItem(new MenuItem("AnyStun", "Any Stun").SetValue(true));
                QuickSilverMenu.AddItem(new MenuItem("AnySlow", "Any Slow").SetValue(true));
                QuickSilverMenu.AddItem(new MenuItem("AnySnare", "Any Snare").SetValue(true));
                QuickSilverMenu.AddItem(new MenuItem("AnyTaunt", "Any Taunt").SetValue(true));
                foreach (var t in AActivator.BuffList)
                {
                    foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.IsEnemy))
                    {
                        if (t.ChampionName == enemy.ChampionName)
                        {
                            QuickSilverMenu.AddItem(new MenuItem(t.BuffName, t.DisplayName).SetValue(t.DefaultValue));
                        }
                    }
                }
                items.AddItem(
                    new MenuItem("UseItemsMode", "Use items on").SetValue(
                        new StringList(new[] { "No", "Mixed mode", "Combo mode", "Both" }, 2)));

                new PotionManager(MenuActivator);

                /* Menu Summoners */
                var summoners = MenuActivator.AddSubMenu(new Menu("Summoners", "Summoners"));
                {
                    var summonersHeal = summoners.AddSubMenu(new Menu("Heal", "Heal"));
                    {
                        summonersHeal.AddItem(new MenuItem("SUMHEALENABLE", "Enable").SetValue(true));
                        summonersHeal.AddItem(
                            new MenuItem("SUMHEALSLIDER", "Min. Heal Per.").SetValue(new Slider(20, 99, 1)));
                    }

                    var summonersBarrier = summoners.AddSubMenu(new Menu("Barrier", "Barrier"));
                    {
                        summonersBarrier.AddItem(new MenuItem("SUMBARRIERENABLE", "Enable").SetValue(true));
                        summonersBarrier.AddItem(
                            new MenuItem("SUMBARRIERSLIDER", "Min. Heal Per.").SetValue(new Slider(20, 99, 1)));
                    }

                    var summonersIgnite = summoners.AddSubMenu(new Menu("Ignite", "Ignite"));
                    {
                        summonersIgnite.AddItem(new MenuItem("SUMIGNITEENABLE", "Enable").SetValue(true));
                    }
                }
            }
            Config.AddSubMenu(MenuActivator);
            //var Extras = Config.AddSubMenu(new Menu("Extras", "Extras"));
            //new PotionManager(Extras);

            // If Champion is supported draw the extra menus
            if (BaseType != CClass.GetType())
            {
                SetSmiteSlot();

                var combo = new Menu("Combo", "Combo").SetFontStyle(FontStyle.Regular, SharpDX.Color.GreenYellow);
                if (CClass.ComboMenu(combo))
                {
                    if (SmiteSlot != SpellSlot.Unknown)
                    {
                        combo.AddItem(new MenuItem("ComboSmite", "Use Smite").SetValue(true));
                    }

                    Config.AddSubMenu(combo);
                }

                var harass = new Menu("Harass", "Harass");
                if (CClass.HarassMenu(harass))
                {
                    harass.AddItem(new MenuItem("HarassMana", "Min. Mana Percent").SetValue(new Slider(50, 100, 0)));
                    Config.AddSubMenu(harass);
                }

                var laneclear = new Menu("Lane Mode", "LaneClear");
                if (CClass.LaneClearMenu(laneclear))
                {
                    laneclear.AddItem(new MenuItem("Lane.Enabled", ":: Enable Lane Farm!").SetValue(new KeyBind("L".ToCharArray()[0], KeyBindType.Toggle, true))).Permashow(true, "Marsman | Enable Lane Farm", SharpDX.Color.Aqua);

                    var minManaMenu = new Menu("Min. Mana Settings", "Lane.MinMana.Title");
                    {
                        minManaMenu.AddItem(new MenuItem("LaneMana.Alone", "If I'm Alone %:").SetValue(new Slider(30, 100, 0))).SetFontStyle(FontStyle.Regular, Color.LightSkyBlue);
                        minManaMenu.AddItem(new MenuItem("LaneMana.Enemy", "If Enemy Close %:").SetValue(new Slider(60, 100, 0))).SetFontStyle(FontStyle.Regular, Color.IndianRed);
                        laneclear.AddSubMenu(minManaMenu);
                    }
                    Config.AddSubMenu(laneclear);
                }

                var jungleClear = new Menu("Jungle Mode", "JungleClear");
                if (CClass.JungleClearMenu(jungleClear))
                {
                    var minManaMenu = new Menu("Min. Mana Settings", "Jungle.MinMana.Title");
                    {
                        minManaMenu.AddItem(new MenuItem("Jungle.Mana.Ally", "Ally Mobs %:").SetValue(new Slider(50, 100, 0))).SetFontStyle(FontStyle.Regular, Color.LightSkyBlue);
                        minManaMenu.AddItem(new MenuItem("Jungle.Mana.Enemy", "Enemy Mobs %:").SetValue(new Slider(30, 100, 0))).SetFontStyle(FontStyle.Regular, Color.IndianRed);
                        minManaMenu.AddItem(new MenuItem("Jungle.Mana.BigBoys", "Baron/Dragon %:").SetValue(new Slider(70, 100, 0))).SetFontStyle(FontStyle.Regular, Color.HotPink);
                        jungleClear.AddSubMenu(minManaMenu);
                    }
                    jungleClear.AddItem(new MenuItem("Jungle.Items", ":: Use Items:").SetValue(new StringList(new[] { "Off", "Use for Baron", "Use for Baron", "Both" }, 3)));
                    jungleClear.AddItem(new MenuItem("Jungle.Enabled", ":: Enable Jungle Farm!").SetValue(new KeyBind("J".ToCharArray()[0], KeyBindType.Toggle, true))).Permashow(true, "Marsman | Enable Jungle Farm", SharpDX.Color.Aqua);
                    Config.AddSubMenu(jungleClear);
                }

                /*----------------------------------------------------------------------------------------------------------*/
                Obj_AI_Base ally = (from aAllies in HeroManager.Allies
                                    from aSupportedChampions in
                                    new[]
                {
                    "janna", "tahm", "leona", "lulu", "lux", "nami", "shen", "sona", "braum", "bard"
                }
                                    where aSupportedChampions == aAllies.ChampionName.ToLower()
                                    select aAllies).FirstOrDefault();

                if (ally != null)
                {
                    var menuAllies = new Menu("Ally Combo", "Ally.Combo").SetFontStyle(FontStyle.Regular, SharpDX.Color.Crimson);
                    {
                        Obj_AI_Hero Leona = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "leona");
                        if (Leona != null)
                        {
                            var menuLeona = new Menu("Leona", "Leona");
                            menuLeona.AddItem(new MenuItem("Leona.ComboBuff", "Force Focus Marked Enemy for Bonus Damage").SetValue(true));
                            menuAllies.AddSubMenu(menuLeona);
                        }

                        Obj_AI_Hero Lux = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "lux");
                        if (Lux != null)
                        {
                            var menuLux = new Menu("Lux", "Lux");
                            menuLux.AddItem(new MenuItem("Lux.ComboBuff", "Force Focus Marked Enemy for Bonus Damage").SetValue(true));
                            menuAllies.AddSubMenu(menuLux);
                        }

                        Obj_AI_Hero Shen = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "shen");
                        if (Shen != null)
                        {
                            var menuShen = new Menu("Shen", "Shen");
                            menuShen.AddItem(new MenuItem("Shen.ComboBuff", "Force Focus Q Marked Enemy Objects for Heal").SetValue(true));
                            menuShen.AddItem(new MenuItem("Shen.ComboBuff", "Minimum Heal:").SetValue(new Slider(80)));
                            menuAllies.AddSubMenu(menuShen);
                        }

                        Obj_AI_Hero Tahm = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "Tahm");
                        if (Tahm != null)
                        {
                            var menuTahm = new Menu("Tahm", "Tahm");
                            menuTahm.AddItem(new MenuItem("Tahm.ComboBuff", "Force Focus Marked Enemy for Stun").SetValue(true));
                            menuAllies.AddSubMenu(menuTahm);
                        }

                        Obj_AI_Hero Sona = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "Sona");
                        if (Sona != null)
                        {
                            var menuSona = new Menu("Sona", "Sona");
                            menuSona.AddItem(new MenuItem("Sona.ComboBuff", "Force Focus to Marked Enemy").SetValue(true));
                            menuAllies.AddSubMenu(menuSona);
                        }

                        Obj_AI_Hero Lulu = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "Lulu");
                        if (Lulu != null)
                        {
                            var menuLulu = new Menu("Lulu", "Lulu");
                            menuLulu.AddItem(new MenuItem("Lulu.ComboBuff", "Force Focus to Enemy If I have E buff").SetValue(true));
                            menuAllies.AddSubMenu(menuLulu);
                        }

                        Obj_AI_Hero Nami = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "nami");
                        if (Nami != null)
                        {
                            var menuNami = new Menu("Nami", "Nami");
                            menuNami.AddItem(new MenuItem("Nami.ComboBuff", "Force Focus to Enemy If I have E Buff").SetValue(true));
                            menuAllies.AddSubMenu(menuNami);
                        }
                    }
                    Config.AddSubMenu(menuAllies);
                }
                /*----------------------------------------------------------------------------------------------------------*/

                var misc = new Menu("Misc", "Misc").SetFontStyle(FontStyle.Regular, SharpDX.Color.DarkOrange);
                if (CClass.MiscMenu(misc))
                {
                    misc.AddItem(new MenuItem("Misc.SaveManaForUltimate", "Save Mana for Ultimate").SetValue(false));
                    Config.AddSubMenu(misc);
                }

                /*
                 *              var extras = new Menu("Extras", "Extras");
                 *              if (CClass.ExtrasMenu(extras))
                 *              {
                 *                  Config.AddSubMenu(extras);
                 *              }
                 */

                var marksmanDrawings = new Menu("Drawings", "MDrawings");
                Config.AddSubMenu(marksmanDrawings);

                var drawing = new Menu(CultureInfo.CurrentCulture.TextInfo.ToTitleCase(championName), "Drawings").SetFontStyle(FontStyle.Regular, SharpDX.Color.Aquamarine);
                if (CClass.DrawingMenu(drawing))
                {
                    marksmanDrawings.AddSubMenu(drawing);
                }

                var GlobalDrawings = new Menu("Global", "GDrawings");
                {
                    marksmanDrawings.AddItem(new MenuItem("Draw.TurnOff", "Drawings").SetValue(new StringList(new[] { "Disable", "Enable", "Disable on Combo Mode", "Disable on Lane/Jungle Mode", "Both" }, 1)));
                    var menuCompare = new Menu("Compare me with", "Menu.Compare");
                    {
                        string[] strCompare = new string[HeroManager.Enemies.Count + 1];
                        strCompare[0] = "Off";
                        var i = 1;
                        foreach (var e in HeroManager.Enemies)
                        {
                            strCompare[i] = e.ChampionName;
                            i            += 1;
                        }
                        menuCompare.AddItem(new MenuItem("Marksman.Compare.Set", "Set").SetValue(new StringList(new[] { "Off", "Auto Compare at Startup" }, 1)));
                        menuCompare.AddItem(new MenuItem("Marksman.Compare", "Compare me with").SetValue(new StringList(strCompare, 0)));
                        GlobalDrawings.AddSubMenu(menuCompare);
                    }

                    GlobalDrawings.AddItem(new MenuItem("Draw.KillableEnemy", "Killable Enemy Text").SetValue(false));
                    GlobalDrawings.AddItem(new MenuItem("Draw.MinionLastHit", "Minion Last Hit").SetValue(new StringList(new[] { "Off", "On", "Just Out of AA Range Minions" }, 2)));



                    //GlobalDrawings.AddItem(new MenuItem("Draw.JunglePosition", "Jungle Farm Position").SetValue(new StringList(new[] { "Off", "If I'm Close to Mobs", "If Jungle Clear Active" }, 2)));
                    GlobalDrawings.AddItem(new MenuItem("Draw.DrawMinion", "Draw Minions Sprite").SetValue(false));
                    GlobalDrawings.AddItem(new MenuItem("Draw.DrawTarget", "Draw Target Sprite").SetValue(true));
                    marksmanDrawings.AddSubMenu(GlobalDrawings);
                }
            }

            if (Config.Item("Marksman.Compare.Set").GetValue <StringList>().SelectedIndex == 1)
            {
                LoadDefaultCompareChampion();
            }

            CClass.MainMenu(Config);

            if (championName == "sivir")
            {
                Evade.Evade.Initiliaze();
                Evade.Config.Menu.DisplayName = "E";
                Config.AddSubMenu(Evade.Config.Menu);
            }

            //Evade.Evade.Initiliaze();
            //Config.AddSubMenu(Evade.Config.Menu);

            Config.AddToMainMenu();

            foreach (var i in Config.Children.Cast <Menu>().SelectMany(GetChildirens))
            {
                i.DisplayName = ":: " + i.DisplayName;
            }

            Sprite.Load();
            CheckAutoWindUp();

            Drawing.OnDraw += Drawing_OnDraw;
            Game.OnUpdate  += Game_OnGameUpdate;
            Game.OnUpdate  += eventArgs =>
            {
                if (CClass.FleeActive)
                {
                    ExecuteFlee();
                }

                if (CClass.LaneClearActive)
                {
                    ExecuteLaneClear();
                }

                if (CClass.JungleClearActive)
                {
                    ExecuteJungleClear();
                }

                PermaActive();
            };

            Marksman.Utils.Orbwalking.AfterAttack  += Orbwalking_AfterAttack;
            Marksman.Utils.Orbwalking.BeforeAttack += Orbwalking_BeforeAttack;
            GameObject.OnCreate += OnCreateObject;
            GameObject.OnDelete += OnDeleteObject;

            Obj_AI_Base.OnBuffAdd    += Obj_AI_Base_OnBuffAdd;
            Obj_AI_Base.OnBuffRemove += Obj_AI_Base_OnBuffRemove;

            Spellbook.OnCastSpell          += Spellbook_OnCastSpell;
            Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;

            AsmLoadingTime = Game.Time;
        }
Пример #4
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            Config     = new Menu("Deadman", "Deadman", true);
            CClass     = new Champion();
            AActivator = new Activator();


            var BaseType = CClass.GetType();

            /* Update this with Activator.CreateInstance or Invoke
             * http://stackoverflow.com/questions/801070/dynamically-invoking-any-function-by-passing-function-name-as-string
             * For now stays cancer.
             */
            var championName = ObjectManager.Player.ChampionName.ToLowerInvariant();

            switch (championName)
            {
            case "ashe":
                CClass = new Ashe();
                break;

            case "caitlyn":
                CClass = new Caitlyn();
                break;

            case "corki":
                CClass = new Corki();
                break;

            case "draven":
                CClass = new Draven();
                break;

            case "ezreal":
                CClass = new Ezreal();
                break;

            case "graves":
                CClass = new Graves();
                break;

            case "gnar":
                CClass = new Gnar();
                break;

            case "jinx":
                CClass = new Jinx();
                break;

            case "kalista":
                CClass = new Kalista();
                break;

            case "kindred":
                CClass = new Kindred();
                break;

            case "kogmaw":
                CClass = new Kogmaw();
                break;

            case "lucian":
                CClass = new Lucian();
                break;

            case "missfortune":
                CClass = new MissFortune();
                break;

            case "quinn":
                CClass = new Quinn();
                break;

            case "sivir":
                CClass = new Sivir();
                break;

            case "teemo":
                CClass = new Teemo();
                break;

            case "tristana":
                CClass = new Tristana();
                break;

            case "twitch":
                CClass = new Twitch();
                break;

            case "urgot":
                CClass = new Urgot();
                break;

            case "vayne":
                CClass = new Vayne();
                break;

            case "varus":
                CClass = new Varus();
                break;
            }


            CClass.Id     = ObjectManager.Player.CharData.BaseSkinName;
            CClass.Config = Config;



            var targetSelectorMenu = new Menu("Target Selector", "Target Selector");

            TargetSelector.AddToMenu(targetSelectorMenu);
            Config.AddSubMenu(targetSelectorMenu);
            Config.AddSubMenu(new Menu("DeathWalker", "Orbwalker"));

            DeathWalker.AddToMenu(Config.SubMenu("Orbwalker"));


            /* Menu Summoners */
            var summoners     = Config.AddSubMenu(new Menu("Summoners", "Summoners"));
            var summonersHeal = summoners.AddSubMenu(new Menu("Heal", "Heal"));
            {
                summonersHeal.AddItem(new MenuItem("SUMHEALENABLE", "Enable").SetValue(true));
                summonersHeal.AddItem(new MenuItem("SUMHEALSLIDER", "Min. Heal Per.").SetValue(new Slider(20, 99, 1)));
            }

            var summonersBarrier = summoners.AddSubMenu(new Menu("Barrier", "Barrier"));
            {
                summonersBarrier.AddItem(new MenuItem("SUMBARRIERENABLE", "Enable").SetValue(true));
                summonersBarrier.AddItem(
                    new MenuItem("SUMBARRIERSLIDER", "Min. Heal Per.").SetValue(new Slider(20, 99, 1)));
            }

            var summonersIgnite = summoners.AddSubMenu(new Menu("Ignite", "Ignite"));
            {
                summonersIgnite.AddItem(new MenuItem("SUMIGNITEENABLE", "Enable").SetValue(true));
            }
            /* Menu Items */
            var items = Config.AddSubMenu(new Menu("Items", "Items"));

            items.AddItem(new MenuItem("BOTRK", "BOTRK").SetValue(true));
            items.AddItem(new MenuItem("GHOSTBLADE", "Ghostblade").SetValue(true));
            items.AddItem(new MenuItem("SWORD", "Sword of the Divine").SetValue(true));
            items.AddItem(new MenuItem("MURAMANA", "Muramana").SetValue(true));
            QuickSilverMenu = new Menu("QSS", "QuickSilverSash");
            items.AddSubMenu(QuickSilverMenu);
            QuickSilverMenu.AddItem(new MenuItem("AnyStun", "Any Stun").SetValue(true));
            QuickSilverMenu.AddItem(new MenuItem("AnySlow", "Any Slow").SetValue(true));
            QuickSilverMenu.AddItem(new MenuItem("AnySnare", "Any Snare").SetValue(true));
            QuickSilverMenu.AddItem(new MenuItem("AnyTaunt", "Any Taunt").SetValue(true));
            foreach (var t in AActivator.BuffList)
            {
                foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.IsEnemy))
                {
                    if (t.ChampionName == enemy.ChampionName)
                    {
                        QuickSilverMenu.AddItem(new MenuItem(t.BuffName, t.DisplayName).SetValue(t.DefaultValue));
                    }
                }
            }
            items.AddItem(
                new MenuItem("UseItemsMode", "Use items on").SetValue(
                    new StringList(new[] { "No", "Mixed mode", "Combo mode", "Both" }, 2)));


            //var Extras = Config.AddSubMenu(new Menu("Extras", "Extras"));
            //new PotionManager(Extras);

            // If Champion is supported draw the extra menus
            if (BaseType != CClass.GetType())
            {
                SetSmiteSlot();


                var combo = new Menu("Combo", "Combo");
                if (CClass.ComboMenu(combo))
                {
                    if (SmiteSlot != SpellSlot.Unknown)
                    {
                        combo.AddItem(new MenuItem("ComboSmite", "Use Smite").SetValue(true));
                    }

                    Config.AddSubMenu(combo);
                }

                var harass = new Menu("Harass", "Harass");
                if (CClass.HarassMenu(harass))
                {
                    harass.AddItem(new MenuItem("HarassMana", "Min. Mana Percent").SetValue(new Slider(50, 100, 0)));
                    Config.AddSubMenu(harass);
                }

                var laneclear = new Menu("LaneClear", "LaneClear");
                if (CClass.LaneClearMenu(laneclear))
                {
                    laneclear.AddItem(
                        new MenuItem("LaneClearMana", "Min. Mana Percent").SetValue(new Slider(50, 100, 0)));
                    Config.AddSubMenu(laneclear);
                }

                var misc = new Menu("Misc", "Misc");
                if (CClass.MiscMenu(misc))
                {
                    Config.AddSubMenu(misc);
                }

                var extras = new Menu("Extras", "Extras");
                if (CClass.ExtrasMenu(extras))
                {
                    new PotionManager(extras);
                    Config.AddSubMenu(extras);
                }

                var drawing = new Menu("Drawings", "Drawings");
                if (CClass.DrawingMenu(drawing))
                {
                    drawing.AddItem(new MenuItem("Deadman.Drawings", "Deadman Default Draw Options"));
                    //drawing.AddItem(new MenuItem("Draw.Ping", MenuSpace + "Show Game Ping").SetValue(true));
                    drawing.AddItem(new MenuItem("Draw.ToD", MenuSpace + "Turn Off Drawings On Team Fight").SetValue(false));
                    drawing.AddItem(new MenuItem("Draw.ToDControlRange", MenuSpace + MenuSpace + "Control Range:").SetValue(new Slider(1200, 1600, 600)));
                    drawing.AddItem(new MenuItem("Draw.ToDControlRangeColor", MenuSpace + MenuSpace + "Draw Control Range:").SetValue(new Circle(false, Color.GreenYellow)));
                    drawing.AddItem(new MenuItem("Draw.ToDMinEnemy", MenuSpace + MenuSpace + "Min. Enemy Count:").SetValue(new Slider(3, 5, 0)));

                    drawing.AddItem(new MenuItem("drawMinionLastHit", MenuSpace + "Minion Last Hit").SetValue(new Circle(false, Color.GreenYellow)));
                    drawing.AddItem(new MenuItem("drawMinionNearKill", MenuSpace + "Minion Near Kill").SetValue(new Circle(false, Color.Gray)));
                    drawing.AddItem(
                        new MenuItem("drawJunglePosition", MenuSpace + "Jungle Farm Position").SetValue(false));
                    drawing.AddItem(new MenuItem("Draw.DrawMinion", MenuSpace + "Draw Minions Sprite").SetValue(false));
                    drawing.AddItem(new MenuItem("Draw.DrawTarget", MenuSpace + "Draw Target Sprite").SetValue(false));
                    //drawing.AddItem(new MenuItem("Draw.DrawSTarget", MenuSpace + "Draw Selected Target", true).SetValue(new Circle(false,Color.GreenYellow)));
                    Config.AddSubMenu(drawing);
                }
            }



            CClass.MainMenu(Config);
            if (championName == "sivir")
            {
                Evade.Evade.Initiliaze();
                Evade.Config.Menu.DisplayName = "E";
                Config.AddSubMenu(Evade.Config.Menu);
            }
            //Evade.Evade.Initiliaze();
            //Config.AddSubMenu(Evade.Config.Menu);

            Config.AddToMainMenu();
            Sprite.Load();

            Drawing.OnDraw           += Drawing_OnDraw;
            Game.OnUpdate            += Game_OnGameUpdate;
            DeathWalker.AfterAttack  += DeathWalker_AfterAttack;
            DeathWalker.BeforeAttack += DeathWalker_BeforeAttack;
            //Game.OnWndProc += Game_OnWndProc;
        }
Пример #5
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            Config = new Menu("Marksman", "Marksman", true).SetFontStyle(FontStyle.Regular, SharpDX.Color.GreenYellow);
            CClass = new Champion();

            var BaseType = CClass.GetType();

            /* Update this with Activator.CreateInstance or Invoke
               http://stackoverflow.com/questions/801070/dynamically-invoking-any-function-by-passing-function-name-as-string 
               For now stays cancer.
             */
            var championName = ObjectManager.Player.ChampionName.ToLowerInvariant();

            switch (championName)
            {
                case "ashe":
                    CClass = new Ashe();
                    break;
                case "caitlyn":
                    CClass = new Caitlyn();
                    break;
                case "corki":
                    CClass = new Corki();
                    break;
                case "draven":
                    CClass = new Draven();
                    break;
                case "ezreal":
                    CClass = new Ezreal();
                    break;
                case "graves":
                    CClass = new Graves();
                    break;
                case "gnar":
                    CClass = new Gnar();
                    break;
                case "jinx":
                    CClass = new Jinx();
                    break;
                case "kalista":
                    CClass = new Kalista();
                    break;
                case "kindred":
                    CClass = new Kindred();
                    break;
                case "kogmaw":
                    CClass = new Kogmaw();
                    break;
                case "lucian":
                    CClass = new Lucian();
                    break;
                case "missfortune":
                    CClass = new MissFortune();
                    break;
                case "quinn":
                    CClass = new Quinn();
                    break;
                case "sivir":
                    CClass = new Sivir();
                    break;
                case "teemo":
                    CClass = new Teemo();
                    break;
                case "tristana":
                    CClass = new Tristana();
                    break;
                case "twitch":
                    CClass = new Twitch();
                    break;
                case "urgot":
                    CClass = new Urgot();
                    break;
                case "vayne":
                    CClass = new Vayne();
                    break;
                case "varus":
                    CClass = new Varus();
                    break;
            }
            Config.DisplayName = "Marksman | " + CultureInfo.CurrentCulture.TextInfo.ToTitleCase(championName);

            CClass.Id = ObjectManager.Player.CharData.BaseSkinName;
            CClass.Config = Config;

            OrbWalking = Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking"));
            CClass.Orbwalker = new Marksman.Utils.Orbwalking.Orbwalker(OrbWalking);

            OrbWalking.AddItem(new MenuItem("Orb.AutoWindUp", "Marksman - Auto Windup").SetValue(false)).ValueChanged +=
                (sender, argsEvent) => { if (argsEvent.GetNewValue<bool>()) CheckAutoWindUp(); };
            AActivator = new Activator();

            MenuActivator = new Menu("Activator", "Activator").SetFontStyle(FontStyle.Regular, SharpDX.Color.Aqua);
            {
                AutoLevel = new Utils.AutoLevel();
                AutoPink = new Utils.AutoPink();
                AutoPink.Initialize();
                IncomingDangerous.Initialize();
                ExecutedTime.Initialize();
                AutoBushRevealer = new AutoBushRevealer();
                //EarlyEvade = new Utils.EarlyEvade();
                //MenuActivator.AddSubMenu(EarlyEvade.MenuLocal);

                /* Menu Items */
                var items = MenuActivator.AddSubMenu(new Menu("Items", "Items"));
                items.AddItem(new MenuItem("BOTRK", "BOTRK").SetValue(false));
                items.AddItem(new MenuItem("GHOSTBLADE", "Ghostblade").SetValue(false));
                items.AddItem(new MenuItem("SWORD", "Sword of the Divine").SetValue(false));
                items.AddItem(new MenuItem("MURAMANA", "Muramana").SetValue(false));
                QuickSilverMenu = new Menu("QSS", "QuickSilverSash");
                items.AddSubMenu(QuickSilverMenu);
                QuickSilverMenu.AddItem(new MenuItem("AnyStun", "Any Stun").SetValue(false));
                QuickSilverMenu.AddItem(new MenuItem("AnySlow", "Any Slow").SetValue(false));
                QuickSilverMenu.AddItem(new MenuItem("AnySnare", "Any Snare").SetValue(false));
                QuickSilverMenu.AddItem(new MenuItem("AnyTaunt", "Any Taunt").SetValue(false));
                foreach (var t in AActivator.BuffList)
                {
                    foreach (var enemy in ObjectManager.Get<Obj_AI_Hero>().Where(enemy => enemy.IsEnemy))
                    {
                        if (t.ChampionName == enemy.ChampionName)
                            QuickSilverMenu.AddItem(new MenuItem(t.BuffName, t.DisplayName).SetValue(t.DefaultValue));
                    }
                }
                items.AddItem(
                    new MenuItem("UseItemsMode", "Use items on").SetValue(
                        new StringList(new[] { "No", "Mixed mode", "Combo mode", "Both" }, 2)));

                new PotionManager(MenuActivator);

                /* Menu Summoners */
                var summoners = MenuActivator.AddSubMenu(new Menu("Summoners", "Summoners"));
                {
                    var summonersHeal = summoners.AddSubMenu(new Menu("Heal", "Heal"));
                    {
                        summonersHeal.AddItem(new MenuItem("SUMHEALENABLE", "Enable").SetValue(false));
                        summonersHeal.AddItem(
                            new MenuItem("SUMHEALSLIDER", "Min. Heal Per.").SetValue(new Slider(20, 99, 1)));
                    }

                    var summonersBarrier = summoners.AddSubMenu(new Menu("Barrier", "Barrier"));
                    {
                        summonersBarrier.AddItem(new MenuItem("SUMBARRIERENABLE", "Enable").SetValue(false));
                        summonersBarrier.AddItem(
                            new MenuItem("SUMBARRIERSLIDER", "Min. Heal Per.").SetValue(new Slider(20, 99, 1)));
                    }

                    var summonersIgnite = summoners.AddSubMenu(new Menu("Ignite", "Ignite"));
                    {
                        summonersIgnite.AddItem(new MenuItem("SUMIGNITEENABLE", "Enable").SetValue(false));
                    }
                }
            }
            Config.AddSubMenu(MenuActivator);
            //var Extras = Config.AddSubMenu(new Menu("Extras", "Extras"));
            //new PotionManager(Extras);

            // If Champion is supported draw the extra menus
            if (BaseType != CClass.GetType())
            {
                SetSmiteSlot();

                var combo = new Menu("Combo", "Combo").SetFontStyle(FontStyle.Regular, SharpDX.Color.GreenYellow);
                if (CClass.ComboMenu(combo))
                {
                    if (SmiteSlot != SpellSlot.Unknown)
                        combo.AddItem(new MenuItem("ComboSmite", "Use Smite").SetValue(true));

                    Config.AddSubMenu(combo);
                }

                var harass = new Menu("Harass", "Harass");
                if (CClass.HarassMenu(harass))
                {
                    harass.AddItem(new MenuItem("HarassMana", "Min. Mana Percent").SetValue(new Slider(40, 100, 0)));
                    Config.AddSubMenu(harass);
                }

                var laneclear = new Menu("Lane Mode", "LaneClear");
                if (CClass.LaneClearMenu(laneclear))
                {
                    laneclear.AddItem(new MenuItem("Lane.Enabled", ":: Enable Lane Farm!").SetValue(new KeyBind("v".ToCharArray()[0], KeyBindType.Toggle, true))).Permashow(true, "Marsman | Enable Lane Farm", SharpDX.Color.Aqua);

                    var minManaMenu = new Menu("Min. Mana Settings", "Lane.MinMana.Title");
                    {
                        minManaMenu.AddItem(new MenuItem("LaneMana.Alone", "If I'm Alone %:").SetValue(new Slider(30, 100, 0))).SetFontStyle(FontStyle.Regular, Color.LightSkyBlue);
                        minManaMenu.AddItem(new MenuItem("LaneMana.Enemy", "If Enemy Close %:").SetValue(new Slider(50, 100, 0))).SetFontStyle(FontStyle.Regular, Color.IndianRed);
                        laneclear.AddSubMenu(minManaMenu);
                    }
                    Config.AddSubMenu(laneclear);
                }

                var jungleClear = new Menu("Jungle Mode", "JungleClear");
                if (CClass.JungleClearMenu(jungleClear))
                {
                    var minManaMenu = new Menu("Min. Mana Settings", "Jungle.MinMana.Title");
                    {
                        minManaMenu.AddItem(new MenuItem("Jungle.Mana.Ally", "Ally Mobs %:").SetValue(new Slider(50, 100, 0))).SetFontStyle(FontStyle.Regular, Color.LightSkyBlue);
                        minManaMenu.AddItem(new MenuItem("Jungle.Mana.Enemy", "Enemy Mobs %:").SetValue(new Slider(30, 100, 0))).SetFontStyle(FontStyle.Regular, Color.IndianRed);
                        minManaMenu.AddItem(new MenuItem("Jungle.Mana.BigBoys", "Baron/Dragon %:").SetValue(new Slider(70, 100, 0))).SetFontStyle(FontStyle.Regular, Color.HotPink);
                        jungleClear.AddSubMenu(minManaMenu);
                    }
                    jungleClear.AddItem(new MenuItem("Jungle.Items", ":: Use Items:").SetValue(new StringList(new[] { "Off", "Use for Baron", "Use for Baron", "Both" }, 3)));
                    jungleClear.AddItem(new MenuItem("Jungle.Enabled", ":: Enable Jungle Farm!").SetValue(new KeyBind("J".ToCharArray()[0], KeyBindType.Toggle, true))).Permashow(true, "Marsman | Enable Jungle Farm", SharpDX.Color.Aqua);
                    Config.AddSubMenu(jungleClear);
                }

                /*----------------------------------------------------------------------------------------------------------*/
                Obj_AI_Base ally = (from aAllies in HeroManager.Allies
                                    from aSupportedChampions in
                                        new[]
                                            {
                                                "janna", "tahm", "leona", "lulu", "lux", "nami", "shen", "sona", "braum", "bard"
                                            }
                                    where aSupportedChampions == aAllies.ChampionName.ToLower()
                                    select aAllies).FirstOrDefault();

                if (ally != null)
                {
                    var menuAllies = new Menu("Ally Combo", "Ally.Combo").SetFontStyle(FontStyle.Regular, SharpDX.Color.Crimson);
                    {
                        Obj_AI_Hero Leona = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "leona");
                        if (Leona != null)
                        {
                            var menuLeona = new Menu("Leona", "Leona");
                            menuLeona.AddItem(new MenuItem("Leona.ComboBuff", "Force Focus Marked Enemy for Bonus Damage").SetValue(true));
                            menuAllies.AddSubMenu(menuLeona);
                        }

                        Obj_AI_Hero Lux = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "lux");
                        if (Lux != null)
                        {
                            var menuLux = new Menu("Lux", "Lux");
                            menuLux.AddItem(new MenuItem("Lux.ComboBuff", "Force Focus Marked Enemy for Bonus Damage").SetValue(true));
                            menuAllies.AddSubMenu(menuLux);
                        }

                        Obj_AI_Hero Shen = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "shen");
                        if (Shen != null)
                        {
                            var menuShen = new Menu("Shen", "Shen");
                            menuShen.AddItem(new MenuItem("Shen.ComboBuff", "Force Focus Q Marked Enemy Objects for Heal").SetValue(true));
                            menuShen.AddItem(new MenuItem("Shen.ComboBuff", "Minimum Heal:").SetValue(new Slider(80)));
                            menuAllies.AddSubMenu(menuShen);
                        }

                        Obj_AI_Hero Tahm = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "Tahm");
                        if (Tahm != null)
                        {
                            var menuTahm = new Menu("Tahm", "Tahm");
                            menuTahm.AddItem(new MenuItem("Tahm.ComboBuff", "Force Focus Marked Enemy for Stun").SetValue(true));
                            menuAllies.AddSubMenu(menuTahm);
                        }

                        Obj_AI_Hero Sona = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "Sona");
                        if (Sona != null)
                        {
                            var menuSona = new Menu("Sona", "Sona");
                            menuSona.AddItem(new MenuItem("Sona.ComboBuff", "Force Focus to Marked Enemy").SetValue(true));
                            menuAllies.AddSubMenu(menuSona);
                        }

                        Obj_AI_Hero Lulu = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "Lulu");
                        if (Lulu != null)
                        {
                            var menuLulu = new Menu("Lulu", "Lulu");
                            menuLulu.AddItem(new MenuItem("Lulu.ComboBuff", "Force Focus to Enemy If I have E buff").SetValue(true));
                            menuAllies.AddSubMenu(menuLulu);
                        }

                        Obj_AI_Hero Nami = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "nami");
                        if (Nami != null)
                        {
                            var menuNami = new Menu("Nami", "Nami");
                            menuNami.AddItem(new MenuItem("Nami.ComboBuff", "Force Focus to Enemy If I have E Buff").SetValue(true));
                            menuAllies.AddSubMenu(menuNami);
                        }
                    }
                    Config.AddSubMenu(menuAllies);
                }
                /*----------------------------------------------------------------------------------------------------------*/

                var misc = new Menu("Misc", "Misc").SetFontStyle(FontStyle.Regular, SharpDX.Color.DarkOrange);
                if (CClass.MiscMenu(misc))
                {
                    misc.AddItem(new MenuItem("Misc.SaveManaForUltimate", "Save Mana for Ultimate").SetValue(false));                    
                    Config.AddSubMenu(misc);
                }
                /*
                                var extras = new Menu("Extras", "Extras");
                                if (CClass.ExtrasMenu(extras))
                                {
                                    Config.AddSubMenu(extras);
                                }
                 */

                var marksmanDrawings = new Menu("Drawings", "MDrawings");
                Config.AddSubMenu(marksmanDrawings);

                var drawing = new Menu(CultureInfo.CurrentCulture.TextInfo.ToTitleCase(championName), "Drawings").SetFontStyle(FontStyle.Regular, SharpDX.Color.Aquamarine);
                if (CClass.DrawingMenu(drawing))
                {
                    marksmanDrawings.AddSubMenu(drawing);
                }

                var GlobalDrawings = new Menu("Global", "GDrawings");
                {
                    marksmanDrawings.AddItem(new MenuItem("Draw.TurnOff", "Drawings").SetValue(new StringList(new[] { "Disable", "Enable", "Disable on Combo Mode", "Disable on Lane/Jungle Mode", "Both" }, 1)));
                    var menuCompare = new Menu("Compare me with", "Menu.Compare");
                    {
                        string[] strCompare = new string[HeroManager.Enemies.Count + 1];
                        strCompare[0] = "Off";
                        var i = 1;
                        foreach (var e in HeroManager.Enemies)
                        {
                            strCompare[i] = e.ChampionName;
                            i += 1;
                        }
                        menuCompare.AddItem(new MenuItem("Marksman.Compare.Set", "Set").SetValue(new StringList(new[] { "Off", "Auto Compare at Startup" }, 1)));
                        menuCompare.AddItem(new MenuItem("Marksman.Compare", "Compare me with").SetValue(new StringList(strCompare, 0)));
                        GlobalDrawings.AddSubMenu(menuCompare);
                    }

                    GlobalDrawings.AddItem(new MenuItem("Draw.KillableEnemy", "Killable Enemy Text").SetValue(false));
                    GlobalDrawings.AddItem(new MenuItem("Draw.MinionLastHit", "Minion Last Hit").SetValue(new StringList(new[] { "Off", "On", "Just Out of AA Range Minions" }, 2)));



                    //GlobalDrawings.AddItem(new MenuItem("Draw.JunglePosition", "Jungle Farm Position").SetValue(new StringList(new[] { "Off", "If I'm Close to Mobs", "If Jungle Clear Active" }, 2)));
                    GlobalDrawings.AddItem(new MenuItem("Draw.DrawMinion", "Draw Minions Sprite").SetValue(false));
                    GlobalDrawings.AddItem(new MenuItem("Draw.DrawTarget", "Draw Target Sprite").SetValue(true));
                    marksmanDrawings.AddSubMenu(GlobalDrawings);

                }
            }

            if (Config.Item("Marksman.Compare.Set").GetValue<StringList>().SelectedIndex == 1)
            {
                LoadDefaultCompareChampion();
            }

            CClass.MainMenu(Config);

            if (championName == "sivir")
            {
                Evade.Evade.Initiliaze();
                Evade.Config.Menu.DisplayName = "E";
                Config.AddSubMenu(Evade.Config.Menu);
            }

            //Evade.Evade.Initiliaze();
            //Config.AddSubMenu(Evade.Config.Menu);

            Config.AddToMainMenu();

            foreach (var i in Config.Children.Cast<Menu>().SelectMany(GetChildirens))
            {
                i.DisplayName = ":: " + i.DisplayName;
            }

            Sprite.Load();
            CheckAutoWindUp();

            Drawing.OnDraw += Drawing_OnDraw;
            Game.OnUpdate += Game_OnGameUpdate;
            Game.OnUpdate += eventArgs =>
            {

                if (CClass.FleeActive)
                {
                    ExecuteFlee();
                }

                if (CClass.LaneClearActive)
                {
                    ExecuteLaneClear();
                }

                if (CClass.JungleClearActive)
                {
                    ExecuteJungleClear();
                }

                PermaActive();
            };

            Marksman.Utils.Orbwalking.AfterAttack += Orbwalking_AfterAttack;
            Marksman.Utils.Orbwalking.BeforeAttack += Orbwalking_BeforeAttack;
            GameObject.OnCreate += OnCreateObject;
            GameObject.OnDelete += OnDeleteObject;

            Obj_AI_Base.OnBuffAdd += Obj_AI_Base_OnBuffAdd;
            Obj_AI_Base.OnBuffRemove += Obj_AI_Base_OnBuffRemove;

            Spellbook.OnCastSpell += Spellbook_OnCastSpell;
            Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;

            AsmLoadingTime = Game.Time;
        }