The menu.
Наследование: Ensage.Common.Menu.Draw.DraggableItem
Пример #1
0
 /// <summary>
 ///     The events_ on close.
 /// </summary>
 /// <param name="sender">
 ///     The sender.
 /// </param>
 /// <param name="e">
 ///     The e.
 /// </param>
 private static void OnClose(object sender, EventArgs e)
 {
     // menu.Items.Remove(menu.Items.FirstOrDefault(x => x.Name == ObjectManager.LocalHero?.Name + "Common.Orbwalking.UserDelay"));
     orbwalker.Unit = null;
     Menu.Menu.Root.RemoveSubMenu(menu.Name);
     menu = null;
 }
Пример #2
0
        public MenuManager(string heroName)
        {
            menu = new Menu("Kunkka", "kunkka", true, heroName, true);

            menu.AddItem(enabled = new MenuItem("enabled", "Enabled").SetValue(true));
            menu.AddItem(autoReturn = new MenuItem("autoReturn", "Auto return").SetValue(true))
                .SetTooltip("Will auto return enemy on Torrent, Ship, Arrow or Hook");
            menu.AddItem(new MenuItem("combo", "Combo").SetValue(new KeyBind('D', KeyBindType.Press)))
                .SetTooltip("X Mark => Torrent => Return")
                .ValueChanged += (sender, arg) => { ComboEnabled = arg.GetNewValue<KeyBind>().Active; };
            menu.AddItem(new MenuItem("fullCombo", "Full combo").SetValue(new KeyBind('F', KeyBindType.Press)))
                    .SetTooltip("X Mark => Ghost Ship => Torrent => Return")
                    .ValueChanged +=
                (sender, arg) => { ComboEnabled = FullComboEnabled = arg.GetNewValue<KeyBind>().Active; };
            menu.AddItem(new MenuItem("tpHome", "X home").SetValue(new KeyBind('G', KeyBindType.Press)))
                .SetTooltip("X Mark on self => Teleport to base")
                .ValueChanged += (sender, arg) => { TpHomeEanbled = arg.GetNewValue<KeyBind>().Active; };
            menu.AddItem(new MenuItem("hitRun", "Hit & run").SetValue(new KeyBind('H', KeyBindType.Press)))
                .SetTooltip("X Mark on self => Dagger => Hit => Return")
                .ValueChanged += (sender, arg) => { HitAndRunEnabled = arg.GetNewValue<KeyBind>().Active; };
            menu.AddItem(
                    new MenuItem("torrentStatic", "Torrent on static objects").SetValue(new KeyBind('J', KeyBindType.Press)))
                .SetTooltip("Will cast torrent on rune or aegis/wk reincarnation before spawn")
                .ValueChanged += (sender, arg) => { TorrentOnStaticObjectsEnabled = arg.GetNewValue<KeyBind>().Active; };
            menu.AddItem(hitAndRunDamage = new MenuItem("hitAndRunDamage", "Hit & run AD").SetValue(true))
                .SetTooltip("Use additional damage when using hit & run (shadow blade etc.)");

            menu.AddToMainMenu();
        }
Пример #3
0
        public MenuManager(string heroName)
        {
            menu = new Menu("Timbersaw ?", "timbersawQuestionMark", true, heroName, true);

            menu.AddItem(enabled = new MenuItem("enabled", "Enabled").SetValue(true));
            menu.AddItem(safeChain = new MenuItem("safeChain", "Safecast chain").SetValue(true))
                .SetTooltip("Will prevent chain cast if it wont hit tree when used manually");
            menu.AddItem(centerHero = new MenuItem("centerHero", "Center camera").SetValue(false))
                .SetTooltip("Center camera on timbersaw when chase enabled");
            menu.AddItem(
                items = new MenuItem("itemToUse", "Use:").SetValue(
                    new AbilityToggler(
                            new Dictionary<string, bool>
                                {
                                    { "item_blink", true },
                                    { "item_shivas_guard", true },
                                    { "item_soul_ring", true },
                                })));
            menu.AddItem(new MenuItem("comboKey", "Chase").SetValue(new KeyBind('F', KeyBindType.Press)))
                .SetTooltip("Chase/Kill enemy using abilities and items")
                .ValueChanged += (sender, arg) => { ChaseEnabled = arg.GetNewValue<KeyBind>().Active; };
            menu.AddItem(new MenuItem("moveKey", "Move").SetValue(new KeyBind('G', KeyBindType.Press)))
                .SetTooltip("Move to mouse position using Chain and Blink")
                .ValueChanged += (sender, arg) => { MoveEnabled = arg.GetNewValue<KeyBind>().Active; };

            menu.AddToMainMenu();
        }
Пример #4
0
        public MenuManager()
        {
            menu = new Menu("Vision Control", "visionControl", true);

            var unitsMenu = new Menu("Enabeld", "enabled");
            var rangesMenu = new Menu("Show ranges", "showRanges");
            var timersMenu = new Menu("Show timers", "showTimers");

            var units = Variables.Units.ToDictionary(x => x.Key, x => true);
            var ranges = new Dictionary<string, bool>(units);
            var timers = new Dictionary<string, bool>
            {
                { "techies_stasis_trap", true },
                { "techies_remote_mines", true },
                { "pugna_nether_ward", true },
                { "undying_tombstone", true },
                { "venomancer_plague_ward", true },
                { "item_ward_sentry", true },
                { "item_ward_observer", true }
            };

            unitsMenu.AddItem(enabled = new MenuItem("enabled", "For:").SetValue(new AbilityToggler(units)));

            rangesMenu.AddItem(
                enabledRanges = new MenuItem("enabledRanges", "For:").SetValue(new AbilityToggler(ranges)));

            timersMenu.AddItem(
                enabledTimers = new MenuItem("enabledTimers", "For:").SetValue(new AbilityToggler(timers)));

            menu.AddSubMenu(unitsMenu);
            menu.AddSubMenu(rangesMenu);
            menu.AddSubMenu(timersMenu);
            menu.AddToMainMenu();
        }
Пример #5
0
        public ManaChecker(Menu mainMenu)
        {
            var menu = new Menu("Mana Combo Checker", "manaChecker", false, "item_energy_booster", true);
            var heroName = Variables.Hero.Name;

            menu.AddItem(enabled = new MenuItem(heroName + "enabledMC", "Enabled").SetValue(false))
                .SetTooltip("Don't forget to change text position");
            menu.AddItem(enabledAbilities = new MenuItem(heroName + "enabledMCAbilities", "Enabled for"))
                .SetValue(abilityToggler = new AbilityToggler(abilities));
            menu.AddItem(
                manaInfo =
                    new MenuItem("mcManaInfo", "Show mana info").SetValue(true)
                        .SetTooltip("Will show how much mana left/needed after/before casting combo"));
            menu.AddItem(
                ptMana =
                    new MenuItem("mcPTcalculations", "Include PT calculations").SetValue(true)
                        .SetTooltip("Will include in calculations mana gained from Power Treads switching"));
            menu.AddItem(textSize = new MenuItem("mcSize", "Text size").SetValue(new Slider(25, 20, 40)));

            var x = (int)HUDInfo.ScreenSizeX();
            var y = (int)HUDInfo.ScreenSizeY();

            menu.AddItem(xPos = new MenuItem("mcX", "Position X").SetValue(new Slider((int)(x * 0.65), 0, x)));
            menu.AddItem(yPos = new MenuItem("mcY", "Position Y").SetValue(new Slider((int)(y * 0.8), 0, y)));

            mainMenu.AddSubMenu(menu);
        }
Пример #6
0
 public static Menu Create(string name)
 {
     var menu = new Menu(name, name, textureName: name);
     if (name == "rubick_spell_steal")
     {
         return menu;
     }
     menu.AddItem(Togglers.OnSight(name));
     var data = AbilityDatabase.Find(name);
     if (data != null)
     {
         if (data.TrueSight)
         {
             menu.AddItem(Togglers.OnInvisible(name));
         }
         if (data.IsPurge)
         {
             menu.AddItem(Togglers.OnPurgable(name));
         }
         if (data.WeakensEnemy)
         {
             menu.AddItem(Togglers.OnAttack(name));
         }
     }
     menu.AddItem(Sliders.MinManaCheck(name));
     menu.AddItem(Sliders.MinManaCheck(name, true));
     return menu;
 }
Пример #7
0
        public RandomiserMenu(Menu rootMenu)
        {
            var menu = new Menu("Randomiser", "randomiser");

            var enabled =
                new MenuItem("enabled", "Enabled").SetValue(false)
                    .SetTooltip("Will intentionally fail to counter abilities");
            menu.AddItem(enabled);
            enabled.ValueChanged += (sender, args) => Enabled = args.GetNewValue<bool>();
            Enabled = enabled.IsActive();

            var nukesOnly =
                new MenuItem("nukesOnly", "Nukes only").SetValue(true)
                    .SetTooltip(
                        "If enabled, only nukes will be randomised and disable abilities will always be countered");
            menu.AddItem(nukesOnly);
            nukesOnly.ValueChanged += (sender, args) => NukesOnly = args.GetNewValue<bool>();
            NukesOnly = nukesOnly.IsActive();

            var failChance = new MenuItem("failChance", "Fail chance").SetValue(new Slider(20, 5, 50));
            menu.AddItem(failChance);
            failChance.ValueChanged += (sender, args) => FailChance = args.GetNewValue<Slider>().Value;
            FailChance = failChance.GetValue<Slider>().Value;

            rootMenu.AddSubMenu(menu);
        }
Пример #8
0
        public static void Init()
        {
            Members.Menu.AddItem(new MenuItem("Enable", "Enable").SetValue(true));
            var settings = new Menu("Settings", "Settings");
            var orb = new Menu("Orbwalking", "Orbwalking");
            var invisibility = new Menu("Invisibility", "Invis", false, "item_silver_edge", true);
            orb.AddItem(new MenuItem("Orbwalking.Enable", "Enable").SetValue(true));
            orb.AddItem(new MenuItem("Orbwalking.FollowTarget", "Follow Target instead of mouse").SetValue(true));
            orb.AddItem(new MenuItem("Orbwalking.WhileTargetInStun", "Do Not Use orbwalking if target is stunned").SetValue(true));
            settings.AddItem(
                new MenuItem("Combo.Enable", "Combo key").SetValue(new KeyBind('D', KeyBindType.Press))).ValueChanged +=
                Core.OnValueChanged;
            var draw = new Menu("Drawing", "Drawing");
            draw.AddItem(new MenuItem("Range.Blink.Enable", "Draw range for Blink").SetValue(true)).ValueChanged +=
                (sender, args) =>
                {
                    if (args.GetNewValue<bool>())
                    {
                        Members.BlinkRange =
                            Members.MyHero.AddParticleEffect("materials/ensage_ui/particles/range_display_mod.vpcf");
                        var range = 1200;
                        Members.BlinkRange.SetControlPoint(1, new Vector3(range, 255, 0));
                        Members.BlinkRange.SetControlPoint(2, new Vector3(0, 155, 255));
                    }
                    else
                    {
                        if (Members.BlinkRange != null && Members.BlinkRange.IsValid && !Members.BlinkRange.IsDestroyed)
                            Members.BlinkRange.Dispose();
                    }
                };
            var items = new Menu("Using", "Items");

            items.AddItem(
                new MenuItem("abilityEnable", "Abilities in combo:").SetValue(
                    new AbilityToggler(Members.AbilityList.ToDictionary(item => item, item => true))));
            items.AddItem(
                new MenuItem("itemEnable", "Items in combo:").SetValue(
                    new AbilityToggler(new Dictionary<string, bool>())));
            items.AddItem(
                new MenuItem("itemEnableLinken", "Linken breaker:").SetValue(
                    new AbilityToggler(new Dictionary<string, bool>())));
            invisibility.AddItem(new MenuItem("UseHealBeforeInvis.Enable", "Use heal before invis").SetValue(true));
            invisibility.AddItem(
                new MenuItem("InvisRange.value", "Nin distance for cast invis/heal/items").SetValue(
                    new Slider(1500, 500, 3500)));
            var devolper = new Menu("Developer", "Developer");
            devolper.AddItem(new MenuItem("Dev.Text.enable", "Debug messages").SetValue(false));
            Members.Menu.AddSubMenu(settings);
            settings.AddSubMenu(items);
            items.AddSubMenu(invisibility);
            settings.AddSubMenu(orb);
            settings.AddSubMenu(draw);
            Members.Menu.AddSubMenu(devolper);
            Members.Menu.AddToMainMenu();
            if (Members.Menu.Item("Range.Blink.Enable").GetValue<bool>())
            {
                Members.Menu.Item("Range.Blink.Enable").SetValue(false);
                Members.Menu.Item("Range.Blink.Enable").SetValue(true);
            }
        }
Пример #9
0
        public PowerTreads(Menu mainMenu)
        {
            var menu = new Menu("Power Treads Switcher", "ptSwitcher", false, "item_power_treads", true);
            var heroName = Variables.Hero.Name;

            menu.AddItem(enabled = new MenuItem(heroName + "enabledPT", "Enabled").SetValue(true));
            menu.AddItem(enabledAbilities = new MenuItem(heroName + "enabledPTAbilities", "Enabled for"))
                .SetValue(abilityToggler = new AbilityToggler(abilities));
            menu.AddItem(
                    switchOnMove =
                        new MenuItem(heroName + "switchPTonMove", "Switch when moving").SetValue(
                            new StringList(Attributes.Keys.ToArray())))
                .SetTooltip("Switch PT to selected attribute when moving");
            menu.AddItem(
                    switchOnAttack =
                        new MenuItem(heroName + "switchPTonAttack", "Swtich when attacking").SetValue(
                            new StringList(Attributes.Keys.ToArray())))
                .SetTooltip("Switch PT to selected attribute when attacking");
            menu.AddItem(switchOnHeal = new MenuItem(heroName + "switchPTHeal", "Swtich when healing").SetValue(true))
                .SetTooltip("Bottle, flask, tango and some hero spells");
            menu.AddItem(
                manaThreshold =
                    new MenuItem("manaPTThreshold", "Mana cost threshold").SetValue(new Slider(15, 0, 50))
                        .SetTooltip("Don't switch PT if spell/Item costs less mana"));
            menu.AddItem(
                autoDisableTime =
                    new MenuItem(heroName + "autoPTdisable", "Auto disable PT switcher after (mins)").SetValue(
                        new Slider(0, 0, 60)));

            mainMenu.AddSubMenu(menu);
        }
Пример #10
0
        /// <summary>
        ///     The events_ on load.
        /// </summary>
        /// <param name="sender">
        ///     The sender.
        /// </param>
        /// <param name="e">
        ///     The e.
        /// </param>
        public static void Events_OnLoad(object sender, EventArgs e)
        {
            if (loaded || !Game.IsInGame || ObjectManager.LocalHero == null || !ObjectManager.LocalHero.IsValid)
            {
                return;
            }

            if (orbwalker != null)
            {
                orbwalker.Unit = ObjectManager.LocalHero;
            }

            if (menu == null)
            {
                menu = Menu.Menu.Root.AddSubMenu(new Menu.Menu("Orbwalking", "Common.Orbwalking"));
                var enableDebugMenuItem = menu.AddItem(new MenuItem("common.orbwalking.debug", "Debug").SetValue(false));
                orbwalker = new Orbwalker(ObjectManager.LocalHero);
                enableDebugMenuItem.ValueChanged += EnableDebugMenuItem_ValueChanged;
            }

            var userDelayMenuItem =
                menu.AddItem(
                    new MenuItem("Common.Orbwalking.UserDelay", "Attack cancel delay", true).SetValue(
                        new Slider(0, -200, 200)));

            UserDelay = userDelayMenuItem.GetValue <Slider>().Value;
            userDelayMenuItem.ValueChanged += (o, args) => { UserDelay = args.GetNewValue <Slider>().Value; };
            loaded = true;
        }
Пример #11
0
        static void Main()
        {
            Drawing.OnDraw += Drawing_OnDraw;
            Game.OnUpdate += OnUpdate;

            Menu.AddItem(new MenuItem("hotkey", "HotKey").SetValue(new KeyBind('F', KeyBindType.Press)));
            var dick = new Dictionary<string, bool>
            {
                {"item_ethereal_blade",true},
                {"morphling_adaptive_strike",true},
                {"item_dagon",true},
                {"morphling_waveform",true}
            };
            Menu.AddItem(new MenuItem("Use", "List of Use").SetValue(new AbilityToggler(dick)));
            Menu.AddItem(new MenuItem("replicateAction", "Replicate").SetValue(new StringList(new[] { "Fight", "Go Back", "Do nothing" })));
            Menu.AddItem(new MenuItem("hybridAction", "Hybrid").SetValue(new StringList(new[] { "Fight", "Go Back","Do nothing" })));

            var autoBalance = new Menu("Auto balance", "Auto balance", false, "morphling_morph_agi", true);
            autoBalance.AddItem(new MenuItem("autoBalance", "Auto balance").SetValue(true));
            autoBalance.AddItem(new MenuItem("minHp", "Minimum HP").SetValue(new Slider(100, 100, 5000)));
            autoBalance.AddItem(new MenuItem("minMp", "Minimum MP percent").SetValue(new Slider(0)));
            Menu.AddSubMenu(autoBalance);

            var safetp = new Menu("Safe Tp", "Safetpout", false, "morphling_morph_replicate", true);
            safetp.AddItem(new MenuItem("safetp", "Use replicate on low hp").SetValue(true));
            safetp.AddItem(new MenuItem("minHpForSafeTp", "Minimum HP").SetValue(new Slider(100, 100, 5000)));
            Menu.AddSubMenu(safetp);

            Menu.AddToMainMenu();
        }
Пример #12
0
        public static Menu Create(string name)
        {
            var menu = new Menu(name, name, textureName: name);
            menu.AddItem(Togglers.OnSight(name));
            menu.AddItem(Togglers.OnAttack(name));
            if (name == "item_armlet")
            {
                menu.AddItem(
                    new MenuItem(name + "belowhpslider", "Toggle when HP is below: ").SetValue(
                        new Slider(350, 100, 1000)));
                menu.AddItem(
                    new MenuItem(name + "armletdelay", "Toggles delay: ").SetValue(new Slider(1300, 500, 2500)));
                menu.AddItem(
                    new MenuItem(name + "alwaystoggle", "Toggle always: ").SetValue(false)
                        .SetTooltip("Toggle armlet always when HP goes below specified treshold"));
            }

            if (name == "item_satanic")
            {
                menu.AddItem(
                    new MenuItem(name + "missinghpslider", "Use when missing HP is higher then: ").SetValue(
                        new Slider(500, 100, 1000)));
                menu.AddItem(new MenuItem(name + "orsign", "   OR").SetFontStyle(FontStyle.Bold, Color.White));
                menu.AddItem(
                    new MenuItem(name + "belowhpslider", "Use when HP is below: ").SetValue(new Slider(1000, 500, 5000)));
            }

            menu.AddItem(Sliders.MinManaCheck(name));
            menu.AddItem(Sliders.MinManaCheck(name, true));
            return menu;
        }
Пример #13
0
        private static void InitMenu()
        {
            var itemdict = new Dictionary<string, bool>
                           {
                               { "item_abyssal_blade", true }, { "item_satanic", true},
                               { "item_black_king_bar", true }
                           };
            Menu = new Menu("BTB Phantom Assasin", "PA");
            Menu.AddItem(new MenuItem("keyBind", "Combo Key").SetValue(new KeyBind('G', KeyBindType.Press)));
            var comboMenu = new Menu("Combo", "combomenu", false, @"..\other\statpop_exclaim", true);
            comboMenu.AddItem(new MenuItem("enabledAbilities", "Items:").SetValue(new AbilityToggler(itemdict)));
            comboMenu.AddItem(
                new MenuItem("SpellQ", "Use Stifling Dagger").SetValue(true));
            comboMenu.AddItem(
                new MenuItem("SpellW", "Use Phantom Strike").SetValue(true));
            comboMenu.AddItem(
                new MenuItem("Wrange", "Min range to use W").SetValue(new Slider(1, 0, 1000)));
            comboMenu.AddItem(
                new MenuItem("UseSatanic", "% Heal to use satanic").SetValue(new Slider(1, 0, 100)));
            comboMenu.AddItem(
                new MenuItem("targetsearchrange", "Target Search Range").SetValue(new Slider(1000, 128, 2500))
                    .SetTooltip("Radius of target search range around cursor."));

            Menu.AddToMainMenu();
        }
Пример #14
0
        private static void Main()
        {
            Menu.AddItem(new MenuItem("TopPanel.Ultimates", "Enemy's Ultimates Cooldowns").SetValue(true).SetFontStyle(FontStyle.Bold, Color.Green));

			
			
			var settings = new Menu("Settings", "settings");
            settings.AddItem(new MenuItem("BarPosX", "Position X").SetValue(new Slider(0, -300, 300)));
            settings.AddItem(new MenuItem("BarPosY", "Position Y").SetValue(new Slider(0, -300, 300)));
            settings.AddItem(new MenuItem("BarSizeY", "Size").SetValue(new Slider(0, -10, 10)));
			

			Menu.AddSubMenu(settings);


            Menu.AddToMainMenu();
			

			


            Events.OnLoad += (sender, args) =>
            {
                Drawing.OnDraw+=Drawing_OnDraw;
            };

            Events.OnClose += (sender, args) =>
            {
                TopPos.Clear();
                Drawing.OnDraw -= Drawing_OnDraw;
            };
            
        }
Пример #15
0
        private static void Main() {
            var autoHealMenu = new Menu("Auto heal", "autoHeal");

            autoHealMenu.AddItem(new MenuItem("autoHealWhenDisabled", "When disabled"));
            autoHealMenu.AddItem(new MenuItem("autoHealWhenLowHP", "When low HP"));
            autoHealMenu.AddItem(
                new MenuItem("autoHealWhenLowHPThreshold", "Low HP% threshold").SetValue(new Slider(30, 0, 99)));
            autoHealMenu.AddItem(
                new MenuItem("autoHealWhenLowHPRange", "Auto heal low HP if enemy in range").SetValue(new Slider(500, 0,
                    2000)).SetTooltip("If set to 0 range will be ignored"));

            var autoUltMenu = new Menu("Auto ultimate", "autoUltMenu");

            autoUltMenu.AddItem(new MenuItem("autoUlt", "Auto ultimate"))
                .SetValue(new HeroToggler(EnemiesUlt, true, false, false)).DontSave();
            autoUltMenu.AddItem(new MenuItem("autoUltEnemies", "When enemies near").SetValue(new Slider(2, 0, 4)));

            Menu.AddItem(new MenuItem("enabled", "Enabled").SetValue(true));

            Menu.AddSubMenu(autoHealMenu);
            Menu.AddSubMenu(autoUltMenu);
            Menu.AddToMainMenu();

            Game.OnUpdate += Game_OnUpdate;
        }
Пример #16
0
 public static Menu Create(string name, Ability ability)
 {
     var menu = new Menu(name, name, textureName: name);
     if (!ability.IsAbilityBehavior(AbilityBehavior.NoTarget)
         || (name == "item_pipe" || name == "item_buckler" || name == "omniknight_guardian_angel"
             || name == "item_crimson_guard"))
     {
         menu.AddItem(Togglers.UseOnAllies(name));
     }
     menu.AddItem(Sliders.MissingHpMin(name));
     menu.AddItem(Sliders.HpPercentBelow(name));
     if (name == "item_pipe" || name == "item_buckler" || name == "omniknight_guardian_angel"
         || name == "item_crimson_guard")
     {
         menu.AddItem(
             new MenuItem(name + "minalliesaffect", "Minimum affected allies: ").SetValue(
                 new StringList(new[] { "1", "2", "3", "4" }, 1)));
     }
     menu.AddItem(
         new MenuItem(name + "minenemiesaround", "Minimum of enemies near: ").SetValue(
             new StringList(new[] { "1", "2", "3", "4", "5" })));
     menu.AddItem(
         new MenuItem(name + "usenearbool", "Use when near selected enemy: ").SetValue(true)
             .SetTooltip("Use the ability only when affected target is near selected enemy"));
     menu.AddItem(Togglers.UseNear(name));
     return menu;
 }
Пример #17
0
        public static void Init()
        {
            Members.Menu.AddItem(new MenuItem("Enable", "Enable").SetValue(true));
            var settings = new Menu("Settings", "Settings");
            var orb = new Menu("Orbwalking", "Orbwalking");
            orb.AddItem(new MenuItem("Orbwalking.Enable", "Enable").SetValue(true));
            orb.AddItem(new MenuItem("Orbwalking.FollowTarget", "Follow Target instead of mouse").SetValue(true));
            orb.AddItem(new MenuItem("Orbwalking.WhileTargetInStun", "Do Not Use orbwalking if target is stunned").SetValue(true));
            settings.AddItem(
                new MenuItem("Combo.Enable", "Combo key").SetValue(new KeyBind('D', KeyBindType.Press))).ValueChanged +=
                Core.OnValueChanged;
            var draw = new Menu("Drawing", "Drawing");
            draw.AddItem(new MenuItem("Range.Shackle.Enable", "Draw range for Shackle").SetValue(true)).ValueChanged +=
                (sender, args) =>
                {
                    if (args.GetNewValue<bool>())
                    {
                        Members.ShacklRange =
                            Members.MyHero.AddParticleEffect("materials/ensage_ui/particles/range_display_mod.vpcf");
                        var range = 800;
                        Members.ShacklRange.SetControlPoint(1, new Vector3(range, 255, 0));
                        Members.ShacklRange.SetControlPoint(2, new Vector3(0, 155, 255));
                    }
                    else
                    {
                        if (Members.ShacklRange != null && Members.ShacklRange.IsValid && !Members.ShacklRange.IsDestroyed)
                            Members.ShacklRange.Dispose();
                    }
                };
            draw.AddItem(new MenuItem("Range.ShackleAoE.Enable", "Draw range for Shackle's AoE").SetValue(true));
            draw.AddItem(new MenuItem("Range.Lines.Enable", "Draw Lines").SetValue(true));

            var items = new Menu("Using", "Items");

            items.AddItem(
                new MenuItem("abilityEnable", "Abilities in combo:").SetValue(
                    new AbilityToggler(Members.AbilityList.ToDictionary(item => item, item => true))));
            items.AddItem(
                new MenuItem("itemEnable", "Items in combo:").SetValue(
                    new AbilityToggler(new Dictionary<string, bool>())));
            items.AddItem(
                new MenuItem("itemEnableLinken", "Linken breaker:").SetValue(
                    new AbilityToggler(new Dictionary<string, bool>())));
            items.AddItem(new MenuItem("Blink.UltimateCheck", "Blink on ultimate range").SetValue(true));
            var devolper = new Menu("Developer", "Developer");
            devolper.AddItem(new MenuItem("Dev.Text.enable", "Debug messages").SetValue(false));
            devolper.AddItem(new MenuItem("Dev.DebugLines.enable", "Draw lines").SetValue(false));
            Members.Menu.AddSubMenu(settings);
            settings.AddSubMenu(items);
            settings.AddSubMenu(orb);
            settings.AddSubMenu(draw);
            Members.Menu.AddSubMenu(devolper);
            Members.Menu.AddToMainMenu();
            if (Members.Menu.Item("Range.Shackle.Enable").GetValue<bool>())
            {
                Members.Menu.Item("Range.Shackle.Enable").SetValue(false);
                Members.Menu.Item("Range.Shackle.Enable").SetValue(true);
            }
        }
Пример #18
0
        public static Menu Create(string name)
        {
            var menu = new Menu(name, name, textureName: name);
            if (name == "item_soul_ring")
            {
                menu.AddItem(
                    new MenuItem(name + "useBeforeCast", "Use when about to cast mana requiring ability").SetValue(true));
                menu.AddItem(new MenuItem(name + "minHp", "Minimum HP to use: ").SetValue(new Slider(200, 0, 1000)))
                    .SetTooltip("If your HP is below specified value, ability will not be used");
                return menu;
            }

            if (!(name == "item_magic_wand" || name == "item_magic_stick"))
            {
                menu.AddItem(Togglers.UseOnAllies(name));
            }

            if (name == "item_arcane_boots")
            {
                menu.AddItem(Sliders.MissingManaMin(name));
                menu.AddItem(Sliders.ManaPercentBelow(name));
            }
            else
            {
                menu.AddItem(Sliders.MissingHpMin(name));
                menu.AddItem(Sliders.HpPercentBelow(name));
            }

            if (name == "item_mekansm" || name == "item_guardian_greaves" || name == "chen_hand_of_god")
            {
                menu.AddItem(
                    new MenuItem(name + "minalliesheal", "Minimum of healed allies: ").SetValue(
                        new StringList(new[] { "1", "2", "3", "4" }, 1)));
                menu.AddItem(
                    new MenuItem(name + "waitrange", "Wait Range: ").SetValue(new Slider(2000, 1000, 6000))
                        .SetTooltip(
                            "If theres enabled ally hero in specified range, Ability# will wait for this hero to come in heal range"));
            }

            if (name == "item_arcane_boots")
            {
                menu.AddItem(
                    new MenuItem(name + "waitrange", "Wait Range: ").SetValue(new Slider(2000, 1000, 6000))
                        .SetTooltip(
                            "If theres enabled ally hero in specified range, Ability# will wait for this hero to come in heal range"));
            }
            else if (name != "item_urn_of_shadows")
            {
                menu.AddItem(
                    new MenuItem(name + "minenemiesaround", "Minimum of enemies near: ").SetValue(
                        new StringList(new[] { "1", "2", "3", "4", "5" })));
                menu.AddItem(
                    new MenuItem(name + "usenearbool", "Use when near selected enemy: ").SetValue(true)
                        .SetTooltip("Use the ability only when affected target is near selected enemy"));
                menu.AddItem(Togglers.UseNear(name));
            }

            return menu;
        }
Пример #19
0
        public MenuManager(Dictionary<string, Item> addedItems)
        {
            myHero = ObjectManager.LocalHero;
            this.addedItems = addedItems;

            menu = new Menu("Advanced Ranges", "advancedRanges", true);
            menu.AddToMainMenu();
        }
Пример #20
0
 public static void Init()
 {
     menu = new Menu("AutoDeward", "autodeward", true);
     menu.AddItem(new OnOffSlider("enabled", "Enabled", true));
     menu.AddItem(new OnOffSlider("dontBreakInvisibility", "Don't break invisibility", true));
     menu.AddToMainMenu();
     Game.OnUpdate += GameOnUpdate;
 }
Пример #21
0
        private static void Main()
        {
            var herofeeder = new Menu("Hero Feeder", "Hero");

            herofeeder.AddItem(new MenuItem("Hero.Enable", "Enable Hero feeder").SetValue(false)).DontSave();
            herofeeder.AddItem(new MenuItem("Hero.Type", "Feed Type:").SetValue(new StringList(new[] { "attack every creep on midlane", "go to the enemy base" })));
            herofeeder.AddItem(new MenuItem("Hero.Cd", "Order rate").SetValue(new Slider(500, 100, 2000)));

            var courSelection = new Menu("Courier Selection", "cour");

            courSelection.AddItem(new MenuItem("Courier.Blocking.Enable", "Enable Selected Order").SetValue(false)).DontSave();
            courSelection.AddItem(new MenuItem("Courier.Cd", "Rate").SetValue(new Slider(50, 5, 200)));
            courSelection.AddItem(new MenuItem("Courier.MaxRange", "Max Range").SetValue(new Slider(500, 0, 2000)));
            courSelection.AddItem(
                new MenuItem("Courier.Order", "Courier Order:").SetValue(
                    new StringList(new[]
                                   { "blocking on base", "go to the enemy base", "move items to stash", "give items to main hero" })));

            var laugh = new Menu("laugh Selection", "laugh");

            laugh.AddItem(new MenuItem("laugh.Enable", "Enable laugh").SetValue(false));
            laugh.AddItem(new MenuItem("laugh.Cd", "Rate").SetValue(new Slider(20, 20))).SetTooltip("in secs");
            laugh.AddItem(new MenuItem("laugh.Message", "Print Message on laught").SetValue(false).SetTooltip("only for you"));

            var drawing = new Menu("Spam Drawing", "spamDrawing");

            drawing.AddItem(new MenuItem("Drawing.Fully.Enable", "Fully Enable").SetValue(false));
            drawing.AddItem(new MenuItem("Drawing.info", "Working only with ctrl hotkey").SetFontColor(Color.Red));
            drawing.AddItem(new MenuItem("Drawing.Enable", "Enable Spam Drawing").SetValue(new KeyBind(0x11, KeyBindType.Press)).SetTooltip("on minimap").DontSave()).ValueChanged += Program_ValueChanged;


            drawing.AddItem(new MenuItem("Drawing.Speed", "Speed").SetValue(new Slider(1, 1, 10)));
            drawing.AddItem(new MenuItem("Drawing.Cd", "Rate").SetValue(new Slider(1, 1, 1000)));


            Menu.AddSubMenu(herofeeder);
            Menu.AddSubMenu(courSelection);
            Menu.AddSubMenu(laugh);
            Menu.AddSubMenu(drawing);
            Menu.AddToMainMenu();

            Events.OnLoad += (sender, args) =>
            {
                MyHero         = ObjectManager.LocalHero;
                Game.OnUpdate += Game_OnUpdate;
                Game.PrintMessage(
                    "<font face='Comic Sans MS, cursive'><font color='#00aaff'>" + Menu.DisplayName +
                    " By Jumpering" +
                    " loaded!</font> <font color='#aa0000'>v" + Assembly.GetExecutingAssembly().GetName().Version,
                    MessageType.LogMessage);
                _fountain  = null;
                _fountain2 = null;
            };
            Events.OnClose += (sender, args) =>
            {
                Game.OnUpdate -= Game_OnUpdate;
            };
        }
Пример #22
0
        public static void MenuInit()
        {
            heroName = "npc_dota_hero_skywrath_mage";
            Menu = new Menu(AssemblyName, AssemblyName, true, heroName, true);
            comboKey = new MenuItem("comboKey", "Combo Key").SetValue(new KeyBind(70, KeyBindType.Press));
            harassKey = new MenuItem("harassKey", "Harass Key").SetValue(new KeyBind(68, KeyBindType.Press));
            useBlink = new MenuItem("useBlink", "Use Blink Dagger").SetValue(false).SetTooltip("Auto-blink to target when Combo key is pressed.");
            soulRing = new MenuItem("soulRing", "Soulring").SetValue(true).SetTooltip("Use soulring before use the combo if your HP is greater than 150.");
            bladeMail = new MenuItem("bladeMail", "Check for BladeMail").SetValue(false);
            drawTarget = new MenuItem("drawTarget", "Target indicator").SetValue(true);
            moveMode = new MenuItem("moveMode", "Orbwalk").SetValue(true);
            predictionType = new MenuItem("predictionType", "Ultimate prediction").SetValue(new StringList(new[] { "InFront", "By MS/Direction"}));
            ezKillCheck = new MenuItem("ezKillCheck", "Check for EZ Kill").SetValue(true).SetTooltip("Check if an enemy is ez-killable (low-mana costs and the fastest way to slay an enemy).");
            ezKillStyle = new MenuItem("ezKillIndicator", "Indicator style").SetValue(new StringList(new[] {"Icon", "Text"}));
            straightTimeCheck = new MenuItem("straightTimeCheck", "Straight time before ulti").SetValue(new Slider(0, 0, 2)).SetTooltip("At least time enemy's moving in straight before casting ulti.");
            ClosestToMouseRange = new MenuItem("ClosestToMouseRange", "Closest to mouse range").SetValue(new Slider(600, 500, 1200)).SetTooltip("Range that makes assembly checking for enemy in selected range.");
            nocastulti = new MenuItem("noCastUlti", "Do not use ulti if % of enemy's HP is below: ").SetValue(new Slider(35));


            noCastUlti = new Menu("Ultimate usage", "Ultimate usage");
            magicItems = new Menu("Magic Damage Items", "Magic Damage Items");
            popLinkensItems = new Menu("Pop Linkens Items", "Pop Linkens Items");
            abilities = new Menu("Abilities", "Abilities");
            ezkillmenu = new Menu("EZkill Menu", "ezkillmenu");
            
            Menu.AddItem(comboKey);
            Menu.AddItem(harassKey);
            Menu.AddItem(useBlink);
            Menu.AddItem(soulRing);
            Menu.AddItem(bladeMail);
            Menu.AddItem(drawTarget);
            Menu.AddItem(moveMode);
            Menu.AddItem(predictionType);
            Menu.AddItem(straightTimeCheck);
            Menu.AddItem(ClosestToMouseRange);

            Menu.AddSubMenu(magicItems);
            Menu.AddSubMenu(popLinkensItems);
            Menu.AddSubMenu(abilities);
            Menu.AddSubMenu(noCastUlti);
            Menu.AddSubMenu(ezkillmenu);

            magicItems.AddItem(
                new MenuItem("magicItems", "Magic Damage").SetValue(
                    new AbilityToggler(magicItemsDictionary)));
            popLinkensItems.AddItem(
                new MenuItem("popLinkensItems", "Pop Linken's Items").SetValue(
                    new AbilityToggler(popLinkensDictionary)));
            abilities.AddItem(new MenuItem("abilities", "Abilities").SetValue(
                new AbilityToggler(abilitiesDictionary)));

            noCastUlti.AddItem(nocastulti);

            ezkillmenu.AddItem(ezKillCheck);
            ezkillmenu.AddItem(ezKillStyle);

            Menu.AddToMainMenu();
        }
Пример #23
0
 private static void InitMenu()
 {
     Menu = new Menu("Creepstat", "csbb", true);
     Menu.AddItem(
         new MenuItem("cs", "Creepstat").SetValue(true));
     Menu.AddItem(
         new MenuItem("bb", "Buyback").SetValue(true));
     Menu.AddToMainMenu();
 }
Пример #24
0
 public static Menu Create(string name)
 {
     var menu = new Menu(name, name, textureName: name);
     menu.AddItem(Togglers.OnSight(name));
     menu.AddItem(Togglers.OnAttack(name));
     menu.AddItem(Sliders.MinManaCheck(name));
     menu.AddItem(Sliders.MinManaCheck(name, true));
     return menu;
 }
Пример #25
0
 public static void Main(string[] args)
 {
     Game.OnUpdate += Game_OnUpdate;
     var mainmenu = new Menu("Options", "options");
     mainmenu.AddItem(new MenuItem("globaldisable", "Disable Enemy Ulti").SetValue(true));
     mainmenu.AddItem(new MenuItem("useref", "Use Refresher").SetValue(true));
     Menu.AddSubMenu(mainmenu);
     Menu.AddToMainMenu();
     Game.PrintMessage("Silencer Global Disable by <font color='#ff1111'>Spyware293</font> Loaded !!", MessageType.LogMessage);
 }
Пример #26
0
        public MenuManager()
        {
            menu = new Menu("Smart HP/MP Abuse", "smartAbuse", true);

            Recovery = new Recovery(menu);
            PowerTreads = new PowerTreads(menu);
            SoulRing = new SoulRing(menu);
            ManaChecker = new ManaChecker(menu);
            TranquilBoots = new TranquilBoots(menu);

            menu.AddToMainMenu();
        }
Пример #27
0
        public DebugMenu(Menu rootMenu)
        {
            var menu = new Menu("Debug", "debug").SetFontColor(Color.PaleVioletRed);

            var drawAbilities =
                new MenuItem("debugAbilities", "Draw abilities").SetValue(false)
                    .SetTooltip("Draw enemy ability ranges, timings and projectiles when casted");
            menu.AddItem(drawAbilities);
            drawAbilities.ValueChanged += (sender, args) => DrawAbilities = args.GetNewValue<bool>();
            DrawAbilities = drawAbilities.IsActive();

            var drawMap = new MenuItem("debugDrawMap", "Draw obstacles map").SetValue(false);
            menu.AddItem(drawMap);
            drawMap.ValueChanged += (sender, args) => DrawMap = args.GetNewValue<bool>();
            DrawMap = drawMap.IsActive();

            var logAbilityUsage = new MenuItem("debugLogAbilityUsage", "Log ability usage").SetValue(false);
            menu.AddItem(logAbilityUsage);
            logAbilityUsage.ValueChanged += (sender, args) => LogAbilityUsage = args.GetNewValue<bool>();
            LogAbilityUsage = logAbilityUsage.IsActive();

            var logInformation = new MenuItem("debugLogInformation", "Log information").SetValue(false);
            menu.AddItem(logInformation);
            logInformation.ValueChanged += (sender, args) => LogInformation = args.GetNewValue<bool>();
            LogInformation = logInformation.IsActive();

            var logIntersection = new MenuItem("debugLogIntersection", "Log intersections").SetValue(false);
            menu.AddItem(logIntersection);
            logIntersection.ValueChanged += (sender, args) => LogIntersection = args.GetNewValue<bool>();
            LogIntersection = logIntersection.IsActive();

            var logModifiers = new MenuItem("debugLogModifiers", "Log modifiers").SetValue(false);
            menu.AddItem(logModifiers);
            logModifiers.ValueChanged += (sender, args) => LogModifiers = args.GetNewValue<bool>();
            LogModifiers = logModifiers.IsActive();

            var logParticles = new MenuItem("debugLogParticles", "Log particles").SetValue(false);
            menu.AddItem(logParticles);
            logParticles.ValueChanged += (sender, args) => LogParticles = args.GetNewValue<bool>();
            LogParticles = logParticles.IsActive();

            var logProjectiles = new MenuItem("debugLogProjectiles", "Log projectiles").SetValue(false);
            menu.AddItem(logProjectiles);
            logProjectiles.ValueChanged += (sender, args) => LogProjectiles = args.GetNewValue<bool>();
            LogProjectiles = logProjectiles.IsActive();

            var logUnits = new MenuItem("debugLogUnits", "Log units").SetValue(false);
            menu.AddItem(logUnits);
            logUnits.ValueChanged += (sender, args) => { LogUnits = args.GetNewValue<bool>(); };
            LogUnits = logUnits.IsActive();

            rootMenu.AddSubMenu(menu);
        }
Пример #28
0
        public static void Create(Ability blink)
        {
            var menu = new Menu("Blink", "abilityMenuBlink", false, "item_blink", true);
            menu.AddItem(new MenuItem("abilityMenuShowBlinkRange", "Show Range").SetValue(true)).ValueChanged +=
                delegate(object sender, OnValueChangeEventArgs eventArgs)
                    {
                        RangeDrawing.RangeVisible(blink, eventArgs.GetNewValue<bool>());
                    };

            RangeDrawing.AddRange(blink);
            RangeDrawing.RangeVisible(blink, menu.Item("abilityMenuShowBlinkRange").GetValue<bool>());
            MainMenu.OptionsMenu.AddSubMenu(menu);
        }
Пример #29
0
        public MenuManager()
        {
            menu = new Menu("Evader", "evader", true, "techies_minefield_sign", true);

            EnemiesSettings = new EnemiesSettingsMenu(menu);
            AlliesSettings = new AlliesSettingsMenu(menu);
            UsableAbilities = new UsableAbilitiesMenu(menu);
            Hotkeys = new HotkeysMenu(menu);
            Settings = new SettingsMenu(menu);
            Randomiser = new RandomiserMenu(menu);
            Debug = new DebugMenu(menu);

            menu.AddToMainMenu();
        }
Пример #30
0
        private static void Main()
        {
            Members.Menu.AddItem(new MenuItem("Enable", "Enable").SetValue(true));
            var settings = new Menu("Settings", "Settings");

            settings.AddItem(new MenuItem("Range.Enable", "Psi Baldes Helper").SetValue(true)).ValueChanged +=
                (sender, args) =>
                {
                    if (args.GetNewValue<bool>())
                    {
                        DrawRange();
                    }
                    else
                    {
                        if (Members.SpellRange != null && Members.SpellRange.IsValid && !Members.SpellRange.IsDestroyed)
                            Members.SpellRange.Dispose();
                    }
                };

            var devolper = new Menu("Developer", "Developer");
            devolper.AddItem(new MenuItem("Dev.Text.enable", "Debug messages").SetValue(false));
            devolper.AddItem(new MenuItem("Dev.Drawing.enable", "Debug drawing").SetValue(false));
            Members.Menu.AddSubMenu(settings);
            Members.Menu.AddSubMenu(devolper);
            _loaded = false;
            Events.OnLoad += (sender, args) =>
            {
                if (_loaded)
                    return;
                Load();
                _loaded = true;
            };
            if (!_loaded && ObjectManager.LocalHero != null &&
                ObjectManager.LocalHero.ClassID == Members.MyClassId && Game.IsInGame)
            {
                Load();
                _loaded = true;
            }

            Events.OnClose += (sender, args) =>
            {
                if (!_loaded)
                    return;
                Members.Menu.RemoveFromMainMenu();
                Game.OnUpdate -= Action.Game_OnUpdate;
                Game.OnUpdate -= UpdateItems;
                Drawing.OnDraw -= Action.OnDrawing;
                _loaded = false;
            };
        }
Пример #31
0
        public MenuManager()
        {
            var menu = new Menu("PCL", "predictedCreepsLocation", true);

            menu.AddItem(showOnMap = new MenuItem("showOnMap", "Show on map").SetValue(true));
            menu.AddItem(showOnMapIcon = new MenuItem("mapIcon", "Map icon").SetValue(false))
                .SetTooltip("If enabled will shows creep icon, otherwise will show \"C\"");
            menu.AddItem(showOnMapSize = new MenuItem("mapSize", "Map size").SetValue(new Slider(50, 25, 75)));
            menu.AddItem(showOnMinimap = new MenuItem("showOnMinimap", "Show on minimap").SetValue(true));
            menu.AddItem(showOnMinimapIcon = new MenuItem("minimapIcon", "Minimap icon").SetValue(false))
                .SetTooltip("If enabled will shows creep icon, otherwise will show \"C\"");
            menu.AddItem(
                showOnMinimapSize = new MenuItem("minimapSize", "Minimap size").SetValue(new Slider(25, 15, 40)));

            menu.AddToMainMenu();
        }
Пример #32
0
        private static void Main()
        {
            var laggermenu = new Menu("Lagger 1", "Lagger");

            Menu.AddItem(new MenuItem("Lagger.Enable", "Enable lagger").SetValue(false)).DontSave();
            Menu.AddItem(new MenuItem("Lagger.Count", "Count").SetValue(new Slider(4000, 1, 50000))).DontSave();
            Menu.AddItem(new MenuItem("Lagger.Delay", "Delay").SetValue(new Slider(100, 1, 1000))).DontSave();
            Menu.AddItem(new MenuItem("Lagger.CMD", "CMD").SetValue(new StringList(new[] { "god", "kill", "explode" }, 0))).DontSave();

            Menu.AddToMainMenu();
            Game.OnUpdate += Game_OnUpdate;
            Thread myThread = new Thread(func);

            myThread.Start();
            Console.WriteLine("LAGGER injected");
        }
Пример #33
0
        public static void AddItem(Hero hero, Item item) {
            Menu rangeMenu;
            RangesMenu.TryGetValue(hero, out rangeMenu);

            if (rangeMenu == null)
                return;

            var castRange = item.GetCastRange();
            if (castRange >= 5000) castRange = item.GetRadius();

            var itemName = item.Name.GetDefaultName();
            var key = hero.Name + itemName;

            if (castRange > 0 && castRange <= 5000) {
                var addItem = new Menu(string.Empty, key, false, itemName);

                addItem.AddItem(new MenuItem(key + "enabled", "Enabled"))
                    .SetValue(false)
                    .ValueChanged += (sender, arg) => { Drawings.DrawRange(hero, itemName, arg.GetNewValue<bool>()); };

                addItem.AddItem(
                    new MenuItem(key + "bonus", "Bonus range").SetValue(new Slider(0, -300, 300)))
                    .ValueChanged +=
                    (sender, arg) => { Drawings.ChangeRange(key, hero, arg.GetNewValue<Slider>().Value); };

                addItem.AddItem(new MenuItem(key + "red", "Red").SetValue(new Slider(255, 0, 255)))
                    .SetFontStyle(fontColor: Color.IndianRed)
                    .ValueChanged +=
                    (sender, arg) => { Drawings.ChangeColor(key, arg.GetNewValue<Slider>().Value, Color.Red); };

                addItem.AddItem(new MenuItem(key + "green", "Green").SetValue(new Slider(0, 0, 255)))
                    .SetFontStyle(fontColor: Color.LightGreen)
                    .ValueChanged +=
                    (sender, arg) => { Drawings.ChangeColor(key, arg.GetNewValue<Slider>().Value, Color.Green); };

                addItem.AddItem(new MenuItem(key + "blue", "Blue").SetValue(new Slider(0, 0, 255)))
                    .SetFontStyle(fontColor: Color.LightBlue)
                    .ValueChanged +=
                    (sender, arg) => { Drawings.ChangeColor(key, arg.GetNewValue<Slider>().Value, Color.Blue); };

                rangeMenu.AddSubMenu(addItem);

                Main.ItemsDictionary.Add(key, item.Level);
            }

            Main.ItemsSet.Add(key);
        }
Пример #34
0
 static void Main(string[] args)
 {
     Ensage.Common.Menu.Menu Circle = new Ensage.Common.Menu.Menu("Circle", "circle");
     Ensage.Common.Menu.Menu Star   = new Ensage.Common.Menu.Menu("Star", "star");
     Ensage.Common.Menu.Menu Heart  = new Ensage.Common.Menu.Menu("Heart", "heart");
     Circle.AddItem(new Ensage.Common.Menu.MenuItem("circlekey", "CTRL +").SetValue(new KeyBind('1', KeyBindType.Press)));
     Circle.AddItem(new Ensage.Common.Menu.MenuItem("radius", "Radius").SetValue(new Slider(100, 15, 150)));
     Star.AddItem(new Ensage.Common.Menu.MenuItem("starkey", "CTRL +").SetValue(new KeyBind('2', KeyBindType.Press)));
     Star.AddItem(new Ensage.Common.Menu.MenuItem("starsize", "Size").SetValue(new Slider(100, 15, 150)));
     Heart.AddItem(new Ensage.Common.Menu.MenuItem("heartkey", "CTRL +").SetValue(new KeyBind('3', KeyBindType.Press)));
     Heart.AddItem(new Ensage.Common.Menu.MenuItem("heartsize", "Size").SetValue(new Slider(100, 15, 150)));
     Menu.AddSubMenu(Circle);
     Menu.AddSubMenu(Star);
     Menu.AddSubMenu(Heart);
     Menu.AddToMainMenu();
     Game.OnUpdate += Game_OnUpdate;
 }
Пример #35
0
 public static Menu Create(string name)
 {
     var menu = new Menu(name, name, textureName: name);
     menu.AddItem(Togglers.UseOn(name));
     menu.AddItem(Sliders.MinHealth(name));
     if (name == "zuus_thundergods_wrath")
     {
         menu.AddItem(
             new MenuItem(name + "minenemykill", "Minimum heroes to kill: ").SetValue(new Slider(1, 1, 5)));
     }
     menu.AddItem(
         new MenuItem(name + "combo", "Use in combo: ").SetValue(true)
             .SetTooltip("Allows the ability to be used along with other nukes in combo when killstealing"));
     menu.AddItem(Sliders.MinManaCheck(name));
     menu.AddItem(Sliders.MinManaCheck(name, true));
     return menu;
 }
Пример #36
0
        private static void OnLoad(object sender, EventArgs eventArgs)
        {
            if (menu == null)
            {
                menu = Menu.Menu.Root.AddSubMenu(new Menu.Menu("Orbwalking", "Common.Orbwalking"));

                var enableOrbwalker =
                    menu.AddItem(
                        new MenuItem(
                            "common.orbwalking.enable",
                            "Enable orbwalking for " + Game.Localize(ObjectManager.LocalHero.Name),
                            true).SetValue(true)
                        .SetTooltip(
                            "Disable this if you dont want currently picked hero to move between attacks. Consider adjusting the AttackCancelDelay below in case attack is getting canceled"));
                enableOrbwalker.ValueChanged += (o, args) =>
                { EnableOrbwalking = args.GetNewValue <bool>(); };
                EnableOrbwalking = enableOrbwalker.GetValue <bool>();

                var enableDebugMenuItem = menu.AddItem(new MenuItem("common.orbwalking.debug", "Debug").SetValue(false));
                enableDebugMenuItem.ValueChanged += EnableDebugMenuItem_ValueChanged;

                var userDelayMenuItem =
                    menu.AddItem(
                        new MenuItem("Common.Orbwalking.UserDelay", "Attack cancel delay", true).SetValue(
                            new Slider(0, -200, 200))
                        .SetTooltip(
                            "Minus value=attack animation gets canceled sooner, Plus value=attack animation gets canceled later (set plus value in case your hero is canceling attacks)"));

                UserDelay = userDelayMenuItem.GetValue <Slider>().Value;
                userDelayMenuItem.ValueChanged += (o, args) => { UserDelay = args.GetNewValue <Slider>().Value; };
            }

            if (orbwalker == null)
            {
                orbwalker = new Orbwalker(ObjectManager.LocalHero);
            }
            else
            {
                orbwalker.Unit = ObjectManager.LocalHero;
            }
        }
Пример #37
0
        /// <summary>
        ///     Initializes static members of the <see cref="HUDInfo" /> class.
        /// </summary>
        static HUDInfo()
        {
            double tinfoHeroDown;
            double panelHeroSizeX;
            float  compareWidth;

            ScreenSize = new Vector2(Drawing.Width, Drawing.Height);
            if (ScreenSize.X == 0)
            {
                Console.WriteLine("Ensage couldnt determine your resolution, try to launch in window mode");
                return;
            }

            minimap = new Minimap(new Vector2(-2, 1), new Vector2(0));

            var ratio = Math.Floor((decimal)(ScreenSize.X / ScreenSize.Y * 100));

            var largeMinimap = Game.GetConsoleVar("dota_hud_extra_large_minimap").GetInt() == 1;

            // Console.WriteLine("Your screen ratio is " + ratio);
            if (ratio == 213)
            {
                compareWidth     = 1600;
                panelHeroSizeX   = 45.28;
                tinfoHeroDown    = 25.714;
                DireCompare      = 2.402;
                RadiantCompare   = 3.08;
                HpBarHeight      = 7;
                HpBarWidth       = 69;
                HpBarX           = 36;
                HpBarY           = 23;
                minimap.Size     = new Vector2(0.1070833333333333f * ScreenSize.X, 0.2240740740740741f * ScreenSize.Y);
                minimapMapScaleX = minimap.Size.X / mapWidth;
                minimapMapScaleY = minimap.Size.Y / mapHeight;
            }
            else if (ratio == 177)
            {
                compareWidth     = 1600;
                panelHeroSizeX   = 52.8900000000004;
                tinfoHeroDown    = 25.714;
                DireCompare      = 2.5001;
                RadiantCompare   = 3.409;
                HpBarHeight      = 10;
                HpBarWidth       = 86.5;
                HpBarX           = 44;
                HpBarY           = 27;
                minimap.Size     = new Vector2(0.1280833333333333f * ScreenSize.X, 0.2240740740740741f * ScreenSize.Y);
                minimapMapScaleX = minimap.Size.X / mapWidth;
                minimapMapScaleY = minimap.Size.Y / mapHeight;
            }
            else if (ratio == 166)
            {
                compareWidth     = 1280;
                panelHeroSizeX   = 47.19;
                tinfoHeroDown    = 25.714;
                DireCompare      = 2.59;
                RadiantCompare   = 3.64;
                HpBarHeight      = 7.4;
                HpBarWidth       = 71;
                HpBarX           = 37;
                HpBarY           = 22;
                minimap.Size     = new Vector2(0.1370833333333333f * ScreenSize.X, 0.2240740740740741f * ScreenSize.Y);
                minimapMapScaleX = minimap.Size.X / mapWidth;
                minimapMapScaleY = minimap.Size.Y / mapHeight;
            }
            else if (ratio == 160)
            {
                compareWidth     = 1280;
                panelHeroSizeX   = 48.95;
                tinfoHeroDown    = 25.714;
                DireCompare      = 2.609;
                RadiantCompare   = 3.78;
                HpBarHeight      = 9;
                HpBarWidth       = 75;
                HpBarX           = 38.3;
                HpBarY           = 25;
                minimap.Size     = new Vector2(0.1425833333333333f * ScreenSize.X, 0.2240740740740741f * ScreenSize.Y);
                minimapMapScaleX = minimap.Size.X / mapWidth;
                minimapMapScaleY = minimap.Size.Y / mapHeight;
            }
            else if (ratio == 150)
            {
                compareWidth     = 1024;
                panelHeroSizeX   = 47.21;
                tinfoHeroDown    = 25.714;
                DireCompare      = 2.775;
                RadiantCompare   = 4.57;
                HpBarHeight      = 8;
                HpBarWidth       = 79.2;
                HpBarX           = 40.2;
                HpBarY           = 24;
                minimap.Size     = new Vector2(0.1500233333333333f * ScreenSize.X, 0.2200940740740741f * ScreenSize.Y);
                minimapMapScaleX = minimap.Size.X / mapWidth;
                minimapMapScaleY = minimap.Size.Y / mapHeight;
            }
            else if (ratio == 133)
            {
                compareWidth     = 1280;
                panelHeroSizeX   = 58.3;
                tinfoHeroDown    = 25.714;
                DireCompare      = 2.78;
                RadiantCompare   = 4.65;
                HpBarHeight      = 8;
                HpBarWidth       = 71;
                HpBarX           = 36.6;
                HpBarY           = 23;
                minimap.Size     = new Vector2(0.1690833333333333f * ScreenSize.X, 0.2225740740740741f * ScreenSize.Y);
                minimapMapScaleX = minimap.Size.X / mapWidth;
                minimapMapScaleY = minimap.Size.Y / mapHeight;
            }
            else if (ratio == 125)
            {
                compareWidth     = 1280;
                panelHeroSizeX   = 58.3;
                tinfoHeroDown    = 25.714;
                DireCompare      = 2.78;
                RadiantCompare   = 4.65;
                HpBarHeight      = 11;
                HpBarWidth       = 96.5;
                HpBarX           = 49;
                HpBarY           = 32;
                minimap.Size     = new Vector2(0.1850833333333333f * ScreenSize.X, 0.2240740740740741f * ScreenSize.Y);
                minimapMapScaleX = minimap.Size.X / mapWidth;
                minimapMapScaleY = minimap.Size.Y / mapHeight;
            }
            else
            {
                Console.WriteLine(
                    @"Your screen resolution is not supported and drawings might have wrong size/position, (" + ratio
                    + ")");
                compareWidth     = 1600;
                panelHeroSizeX   = 65;
                tinfoHeroDown    = 25.714;
                DireCompare      = 2.655;
                RadiantCompare   = 5.985;
                HpBarHeight      = 10;
                HpBarWidth       = 83.5;
                HpBarX           = 43;
                HpBarY           = 28;
                minimap.Size     = new Vector2(0.1270833333333333f * ScreenSize.X, 0.2240740740740741f * ScreenSize.Y);
                minimapMapScaleX = minimap.Size.X / mapWidth;
                minimapMapScaleY = minimap.Size.Y / mapHeight;
            }

            if (largeMinimap)
            {
                const float LargeMinimapConstant = 1.1470833333333333f; // © Moones 2017
                minimap.Size    *= LargeMinimapConstant;
                minimapMapScaleX = minimap.Size.X / mapWidth;
                minimapMapScaleY = minimap.Size.Y / mapHeight;
            }

            Monitor = ScreenSize.X / compareWidth;
            Rate    = Math.Max(Monitor, 1);
            X       = panelHeroSizeX * Monitor;
            y       = ScreenSize.Y / tinfoHeroDown;

            var menu           = new Menu.Menu("HUDInfo", nameof(HUDInfo));
            var minimapOnRight = menu.AddItem(
                new MenuItem(menu.Name + "minimapRight", "Minimap is on the right").SetValue(false).SetTooltip("Enable this if you have minimap on the right"));

            minimapOnRight.ValueChanged += (sender, args) => { MinimapIsOnRight = args.GetNewValue <bool>(); };
            MinimapIsOnRight             = minimapOnRight.GetValue <bool>();

            DelayAction.Add(200, () => Menu.Menu.Root.AddSubMenu(menu));

            try
            {
                var        mouse  = new Rectangle(new Vector2(5, 5), Color.White);
                GameUpdate update = args =>
                {
                    var mousePos = Game.MousePosition;

                    // if (Utils.SleepCheck("mouse"))
                    // {
                    // Console.WriteLine(mousePos);
                    // Utils.Sleep(500, "mouse");
                    // }
                    var minimapPos = mousePos.WorldToMinimap();
                    mouse.Position = minimapPos;
                };

                var mipos = new Vector3(MapLeft, MapTop, 0).WorldToMinimap();
                rectangle = new Rectangle(minimap.Size, new ColorBGRA(255, 255, 255, 25))
                {
                    Position = mipos
                };

                var enableRectangle = menu.AddItem(
                    new MenuItem(menu.Name + "enablerectangle", "Enable minimap debug")
                    .SetTooltip("Draws rectangle over minimap in current e.common minimap size (requires -dx9), and shows current mouse position on minimap")
                    .SetValue(false));
                enableRectangle.SetValue(false);
                DrawingEndScene draw = eventArgs =>
                {
                    rectangle.Render();
                    mouse.Render();
                };
                enableRectangle.ValueChanged += (sender, args) =>
                {
                    if (args.GetNewValue <bool>())
                    {
                        rectangle.Initialize();
                        mouse.Initialize();
                        Drawing.OnEndScene += draw;
                        Game.OnUpdate      += update;
                    }
                    else
                    {
                        rectangle.Dispose();
                        mouse.Dispose();
                        Drawing.OnEndScene -= draw;
                        Game.OnUpdate      -= update;
                    }
                };
            }
            catch (WrongRenderModeException e)
            {
                Console.WriteLine($"HUDInfo won't work due to dx9 restrictions.");
            }
        }
Пример #38
0
        private static void Main()
        {
            var herofeeder = new Menu("Hero Feeder", "Hero");

            herofeeder.AddItem(new MenuItem("Hero.Enable", "Enable Hero feeder").SetValue(false)).DontSave();
            herofeeder.AddItem(new MenuItem("Hero.Cd", "Order rate").SetValue(new Slider(500, 100, 2000)));

            var courSelection = new Menu("Courier Selection", "cour");

            courSelection.AddItem(new MenuItem("Courier.Blocking.Enable", "Enable Selected Order").SetValue(false)).DontSave();
            courSelection.AddItem(new MenuItem("Courier.Cd", "Rate").SetValue(new Slider(50, 5, 200)));
            courSelection.AddItem(new MenuItem("Courier.MaxRange", "Max Range").SetValue(new Slider(500, 0, 2000)));
            courSelection.AddItem(new MenuItem("Courier.Order", "Courier Order:").SetValue(new StringList(new [] { "blocking on base", "going to enemy base" })));

            var laugh = new Menu("laugh Selection", "laugh");

            laugh.AddItem(new MenuItem("laugh.Enable", "Enable laugh").SetValue(false));
            laugh.AddItem(new MenuItem("laugh.Cd", "Rate").SetValue(new Slider(20, 20))).SetTooltip("in secs");
            laugh.AddItem(new MenuItem("laugh.Message", "Print Message on laught").SetValue(false).SetTooltip("only for you"));

            var drawing = new Menu("Spam Drawing", "spamDrawing");

            drawing.AddItem(new MenuItem("Drawing.Fully.Enable", "Fully Enable").SetValue(false));
            drawing.AddItem(new MenuItem("Drawing.info", "Working only with ctrl hotkey").SetFontStyle(FontStyle.Bold, Color.Red));
            drawing.AddItem(new MenuItem("Drawing.Enable", "Enable Spam Drawing").SetValue(new KeyBind(0x11, KeyBindType.Press)).SetTooltip("on minimap").DontSave()).ValueChanged +=
                (sender, args) =>
            {
                if (!Menu.Item("Drawing.Fully.Enable").GetValue <bool>())
                {
                    return;
                }
                if (args.GetNewValue <KeyBind>().Active)
                {
                    _stageX = _drawingStartPos.X;
                    _stageY = _drawingStartPos.Y;
                    SetCursorPos((int)_drawingStartPos.X, (int)_drawingStartPos.Y);
                }
                mouse_event(
                    args.GetNewValue <KeyBind>().Active
                            ? (int)MouseEvent.MouseeventfLeftdown
                            : (int)MouseEvent.MouseeventfLeftup, 0, 0, 0, 0);
            };
            drawing.AddItem(new MenuItem("Drawing.Speed", "Speed").SetValue(new Slider(1, 1, 10)));
            drawing.AddItem(new MenuItem("Drawing.Cd", "Rate").SetValue(new Slider(1, 1, 1000)));


            Menu.AddSubMenu(herofeeder);
            Menu.AddSubMenu(courSelection);
            Menu.AddSubMenu(laugh);
            Menu.AddSubMenu(drawing);
            Menu.AddToMainMenu();

            Events.OnLoad += (sender, args) =>
            {
                Game.OnUpdate += Game_OnUpdate;
                Game.PrintMessage(
                    "<font face='Comic Sans MS, cursive'><font color='#00aaff'>" + Menu.DisplayName +
                    " By Jumpering" +
                    " loaded!</font> <font color='#aa0000'>v" + Assembly.GetExecutingAssembly().GetName().Version,
                    MessageType.LogMessage);
                _fountain  = null;
                _fountain2 = null;
            };
            Events.OnClose += (sender, args) =>
            {
                Game.OnUpdate -= Game_OnUpdate;
            };
        }
Пример #39
0
        private static void Main()
        {
            Members.Menu.AddItem(new MenuItem("Enable", "Enable").SetValue(true));
            var topPanel   = new Menu("Top Panel", "toppanel");
            var spellPanel = new Menu("Spell Panel", "spellPanel");
            var ultimate   = new Menu("Ultimate", "ultimate");
            var health     = new Menu("Health Panel", "health");
            var mana       = new Menu("Mana Panel", "mana");
            var status     = new Menu("Status panel", "status");
            var extraPos   = new Menu("Extra Position", "extraPos");
            var itemPanel  = new Menu("Item panel", "itempanel");

            var roshanTimer  = new Menu("Roshan Timer", "roshanTimer");
            var showMeMore   = new Menu("Show Me More", "showmemore");
            var showIllusion = new Menu("Show Illusion", "showillusion");
            var runevision   = new Menu("Rune Vision", "runevision");

            var autoItems = new Menu("Auto Items", "autoitems");
            var settings  = new Menu("Settings", "Settings");

            //===========================
            itemPanel.AddItem(new MenuItem("itempanel.Enable", "Enable").SetValue(true));
            itemPanel.AddItem(new MenuItem("itempanel.Stash.Enable", "Draw Stash Items").SetValue(true));
            itemPanel.AddItem(new MenuItem("itempanel.Button.Enable", "Draw Button for toggle").SetValue(true));
            itemPanel.AddItem(new MenuItem("itempanel.X", "Panel Position X").SetValue(new Slider(100, 0, 2000)));
            itemPanel.AddItem(new MenuItem("itempanel.Y", "Panel Position Y").SetValue(new Slider(200, 0, 2000)));
            itemPanel.AddItem(new MenuItem("itempanel.SizeX", "SizeX").SetValue(new Slider(255, 1, 255)));
            itemPanel.AddItem(new MenuItem("itempanel.SizeY", "SizeY").SetValue(new Slider(174, 1, 255)));
            itemPanel.AddItem(new MenuItem("itempanel.Red", "Red").SetValue(new Slider(141, 0, 255)).SetFontColor(Color.Red));
            itemPanel.AddItem(new MenuItem("itempanel.Green", "Green").SetValue(new Slider(182, 0, 255)).SetFontColor(Color.Green));
            itemPanel.AddItem(new MenuItem("itempanel.Blue", "Blue").SetValue(new Slider(98, 0, 255)).SetFontColor(Color.Blue));
            //===========================
            topPanel.AddItem(new MenuItem("toppanel.Enable", "Enable").SetValue(true));
            topPanel.AddItem(
                new MenuItem("toppanel.Targets", "Draw For: ").SetValue(
                    new StringList(new[] { "Both", "Ally Team", "Enemy Team" })));
            //===========================
            spellPanel.AddItem(new MenuItem("spellpanel.Enable", "Enable").SetValue(true));
            spellPanel.AddItem(
                new MenuItem("spellpanel.Targets", "Draw For: ").SetValue(
                    new StringList(new[] { "Both", "Ally Team", "Enemy Team" })));
            spellPanel.AddItem(new MenuItem("spellPanel.distBetweenSpells", "Distance spells").SetValue(new Slider(36, 0, 200)));
            spellPanel.AddItem(new MenuItem("spellPanel.DistBwtweenLvls", "Distance lvls").SetValue(new Slider(6, 0, 200)));
            spellPanel.AddItem(new MenuItem("spellPanel.SizeSpell", "Level size").SetValue(new Slider(3, 1, 25)));
            spellPanel.AddItem(new MenuItem("spellPanel.ExtraPosX", "Extra Position X").SetValue(new Slider(25)));
            spellPanel.AddItem(new MenuItem("spellPanel.ExtraPosY", "Extra Position Y").SetValue(new Slider(125, 0, 400)));
            //===========================
            ultimate.AddItem(new MenuItem("ultimate.Enable", "Enable").SetValue(true));
            ultimate.AddItem(new MenuItem("ultimate.Icon.Enable", "Draw Icon").SetValue(true));
            ultimate.AddItem(
                new MenuItem("ultimate.Icon.Extra.Enable", "Draw Mana req with cd").SetValue(true)
                .SetTooltip("render lack of mana when spell on cooldown"));
            ultimate.AddItem(
                new MenuItem("ultimate.Type", "Type of drawing").SetValue(
                    new StringList(new[] { "Draw Icon", "Draw Line" }))).ValueChanged += (sender, args) =>
            {
                var newArg    = args.GetNewValue <StringList>().SelectedIndex;
                var newColor  = newArg == 1 ? Color.DarkSlateGray : new Color(195, 186, 173, 255);
                var newColor2 = newArg == 0 ? Color.DarkSlateGray : new Color(195, 186, 173, 255);
                Members.Menu.Item("ultimate.Info").SetFontColor(newColor);
                Members.Menu.Item("ultimate.InfoAlways").SetFontColor(newColor);
                Members.Menu.Item("ultimate.Line.Size").SetFontColor(newColor2);
            };
            ultimate.AddItem(
                new MenuItem("ultimate.Info", "Show details").SetValue(true)
                .SetTooltip("show Ultimate's CD if u put ur mouse on icon"));
            ultimate.AddItem(
                new MenuItem("ultimate.InfoAlways", "Show details all time").SetValue(true)
                .SetTooltip("Show Details should be enabled"));
            ultimate.AddItem(
                new MenuItem("ultimate.Line.Size", "Line Size").SetValue(new Slider(15, 7, 30)));

            //===========================
            health.AddItem(new MenuItem("toppanel.Health.Enable", "Enable").SetValue(true));
            //===========================
            mana.AddItem(new MenuItem("toppanel.Mana.Enable", "Enable").SetValue(true));
            //===========================
            status.AddItem(new MenuItem("toppanel.Status.Enable", "Enable").SetValue(true));
            status.AddItem(new MenuItem("toppanel.AllyVision.Enable", "Vision on Ally Heroes").SetValue(true));
            status.AddItem(new MenuItem("toppanel.EnemiesStatus.Enable", "Enemies status").SetValue(true));
            //===========================
            extraPos.AddItem(
                new MenuItem("extraPos.X", "Extra Position for top panel: X").SetValue(new Slider(0, -25, 25)));
            extraPos.AddItem(
                new MenuItem("extraPos.Y", "Extra Position for top panel: Y").SetValue(new Slider(0, -25, 25)));
            //===========================
            roshanTimer.AddItem(new MenuItem("roshanTimer.Enable", "Enable").SetValue(true));
            //===========================
            showMeMore.AddItem(new MenuItem("showmemore.Enable", "Enable").SetValue(true));
            var charge = new Menu("", "charge", false, "spirit_breaker_charge_of_darkness", true);

            charge.AddItem(new MenuItem("tooltip", "When Charge on your Main Hero").SetFontColor(Color.Red));
            charge.AddItem(new MenuItem("charge.Enable", "Enable").SetValue(true));
            charge.AddItem(new MenuItem("charge.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red));
            charge.AddItem(new MenuItem("charge.Green", "Green").SetValue(new Slider(0, 0, 255)).SetFontColor(Color.Green));
            charge.AddItem(new MenuItem("charge.Blue", "Blue").SetValue(new Slider(0, 0, 255)).SetFontColor(Color.Blue));
            charge.AddItem(new MenuItem("charge.Alpha", "Alpha").SetValue(new Slider(4, 0, 255)).SetFontColor(Color.WhiteSmoke));
            //===========================
            var blur = new Menu("", "blur", false, "phantom_assassin_blur", true);

            blur.AddItem(new MenuItem("blur.Enable", "Show PA on minimap").SetValue(true));
            //===========================
            var wr = new Menu("", "wr", false, "windrunner_powershot", true);

            wr.AddItem(new MenuItem("wr.Enable", "Enable").SetValue(true));
            wr.AddItem(new MenuItem("wr.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red));
            wr.AddItem(new MenuItem("wr.Green", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green));
            wr.AddItem(new MenuItem("wr.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue));
            //===========================
            var mirana = new Menu("", "mirana", false, "mirana_arrow", true);

            mirana.AddItem(new MenuItem("mirana.Enable", "Enable").SetValue(true));
            mirana.AddItem(new MenuItem("mirana.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red));
            mirana.AddItem(new MenuItem("mirana.Green", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green));
            mirana.AddItem(new MenuItem("mirana.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue));
            var apparition = new Menu("", "apparition", false, "ancient_apparition_ice_blast", true);

            apparition.AddItem(new MenuItem("apparition.Enable", "Enable").SetValue(true));
            var lina = new Menu("", "lina", false, "lina_light_strike_array", true);

            lina.AddItem(new MenuItem("lina.Enable", "Enable").SetValue(true));
            var invoker = new Menu("", "invoker", false, "invoker_sun_strike", true);

            invoker.AddItem(new MenuItem("invoker.Enable", "Enable").SetValue(true));
            var lesh = new Menu("", "lesh", false, "leshrac_split_earth", true);

            lesh.AddItem(new MenuItem("lesh.Enable", "Enable").SetValue(true));
            var kunkka = new Menu("", "kunkka", false, "kunkka_torrent", true);

            kunkka.AddItem(new MenuItem("kunkka.Enable", "Torrent Enable").SetValue(true));
            var tech = new Menu("", "tech", false, "npc_dota_hero_techies", true);

            tech.AddItem(new MenuItem("tech.Enable", "Enable").SetValue(true));
            var tinker = new Menu("", "tinker", false, "npc_dota_hero_tinker", true);

            tinker.AddItem(new MenuItem("tinker.Enable", "Enable").SetValue(true));
            var lifestealer = new Menu("", "life stealer", false, "life_stealer_infest", true);

            lifestealer.AddItem(new MenuItem("lifestealer.Enable", "Enable").SetValue(true));
            lifestealer.AddItem(new MenuItem("lifestealer.creeps.Enable", "Enable for creeps").SetValue(true));
            var arc = new Menu("", "arc", textureName: "arc_warden_spark_wraith", showTextWithTexture: true);

            arc.AddItem(new MenuItem("arc.Enable", "Enable").SetValue(true));
            var scan = new Menu("Enemy Scanning Ability", "Scan");

            scan.AddItem(new MenuItem("scan.Enable", "Enable").SetValue(true));
            //var cour = new Menu("Courier", "Courier");
            //cour.AddItem(new MenuItem("Courier.Enable", "Enable").SetValue(true)).SetTooltip("draw courier position on minimap");
            //===========================
            showIllusion.AddItem(new MenuItem("showillusion.Enable", "Enable").SetValue(true));
            //===========================
            runevision.AddItem(new MenuItem("runevision.Enable", "Enable").SetValue(true));
            runevision.AddItem(new MenuItem("runevision.PrintText.Enable", "Print text on rune-spawning").SetValue(true));
            runevision.AddItem(new MenuItem("runevision.DrawOnMinimap.Enable", "Draw rune on minimap").SetValue(true));
            //===========================
            var dangItem = new Menu("Dangerous items", "dangitems");

            dangItem.AddItem(new MenuItem("dangitems.Enable", "Enable").SetValue(false)).SetTooltip("show if enemy has Dangerous items");
            var dict = new Dictionary <string, bool>
            {
                { "item_gem", true },
                { "item_dust", true },
                { "item_sphere", true },
                { "item_blink", true },
                { "item_ward_observer", true },
                { "item_ward_sentry", true },
                { "item_black_king_bar", true },
                { "item_ward_dispenser", true }
            };

            dangItem.AddItem(new MenuItem("dangitems.List", "Items: ").SetValue(new AbilityToggler(dict)));
            //===========================
            autoItems.AddItem(new MenuItem("autoitems.Enable", "Enable").SetValue(true));
            var autoitemlist = new Dictionary <string, bool>
            {
                { "item_phase_boots", true },
                { "item_hand_of_midas", true }
            };

            autoItems.AddItem(new MenuItem("autoitems.List", "Items:").SetValue(new AbilityToggler(autoitemlist)));
            //===========================
            var lastPosition = new Menu("Last position", "lastPosition");

            lastPosition.AddItem(new MenuItem("lastPosition.Enable", "Enable").SetValue(true)).SetTooltip("show last positions of enemies");
            lastPosition.AddItem(new MenuItem("lastPosition.Enable.Prediction", "Enable Prediction").SetValue(true));
            lastPosition.AddItem(new MenuItem("lastPosition.Enable.Map", "on Map").SetValue(false));
            lastPosition.AddItem(new MenuItem("lastPosition.Map.X", "icon size").SetValue(new Slider(50, 10, 150)));
            lastPosition.AddItem(new MenuItem("lastPosition.Enable.Minimap", "on Minimap").SetValue(true));
            lastPosition.AddItem(new MenuItem("lastPosition.Minimap.X", "icon size").SetValue(new Slider(20, 10, 150)));

            //===========================
            var netWorth = new Menu("NetWorth Graph", "netWorth");

            netWorth.AddItem(new MenuItem("netWorth.Enable", "Enable").SetValue(true)).SetTooltip("draw networth graph based on item cost");
            netWorth.AddItem(new MenuItem("netWorth.Order", "Sort Players").SetValue(true));
            netWorth.AddItem(
                new MenuItem("netWorth.X", "Position: X").SetValue(new Slider(0, 0, 2000)));
            netWorth.AddItem(
                new MenuItem("netWorth.Y", "Position: Y").SetValue(new Slider(0, 0, 2000)));
            netWorth.AddItem(new MenuItem("netWorth.SizeX", "SizeX").SetValue(new Slider(255, 1, 255)));
            netWorth.AddItem(new MenuItem("netWorth.SizeY", "SizeY").SetValue(new Slider(174, 1, 255)));
            netWorth.AddItem(new MenuItem("netWorth.Red", "Red").SetValue(new Slider(141, 0, 255)).SetFontColor(Color.Red));
            netWorth.AddItem(new MenuItem("netWorth.Green", "Green").SetValue(new Slider(182, 0, 255)).SetFontColor(Color.Green));
            netWorth.AddItem(new MenuItem("netWorth.Blue", "Blue").SetValue(new Slider(98, 0, 255)).SetFontColor(Color.Blue));
            //===========================
            var devolper = new Menu("Developer", "Developer");

            devolper.AddItem(new MenuItem("Dev.Hax.enable", "Hax in lobby").SetValue(false));
            devolper.AddItem(new MenuItem("Dev.Text.enable", "Debug messages").SetValue(false));
            //===========================
            topPanel.AddSubMenu(ultimate);
            topPanel.AddSubMenu(health);
            topPanel.AddSubMenu(mana);
            topPanel.AddSubMenu(status);
            topPanel.AddSubMenu(extraPos);
            settings.AddSubMenu(topPanel);
            settings.AddSubMenu(spellPanel);
            settings.AddSubMenu(roshanTimer);
            settings.AddSubMenu(showMeMore);
            showMeMore.AddSubMenu(charge);
            showMeMore.AddSubMenu(blur);
            showMeMore.AddSubMenu(wr);
            showMeMore.AddSubMenu(mirana);
            showMeMore.AddSubMenu(apparition);
            showMeMore.AddSubMenu(lina);
            showMeMore.AddSubMenu(invoker);
            showMeMore.AddSubMenu(kunkka);
            showMeMore.AddSubMenu(lesh);
            showMeMore.AddSubMenu(lifestealer);
            showMeMore.AddSubMenu(tech);
            showMeMore.AddSubMenu(tinker);
            showMeMore.AddSubMenu(arc);
            showMeMore.AddSubMenu(scan);
            settings.AddSubMenu(showIllusion);
            settings.AddSubMenu(runevision);
            settings.AddSubMenu(dangItem);
            settings.AddSubMenu(itemPanel);
            settings.AddSubMenu(autoItems);
            settings.AddSubMenu(lastPosition);
            settings.AddSubMenu(netWorth);

            Members.Menu.AddSubMenu(settings);
            Members.Menu.AddSubMenu(devolper);


            if (Drawing.Direct3DDevice9 != null)
            {
                Members.RoshanFont = new Font(
                    Drawing.Direct3DDevice9,
                    new FontDescription
                {
                    FaceName        = "Tahoma",
                    Height          = 15,
                    OutputPrecision = FontPrecision.Default,
                    Quality         = FontQuality.Default
                });
            }
            Events.OnLoad += (sender, args) =>
            {
                Members.MyHero   = ObjectManager.LocalHero;
                Members.MyPlayer = ObjectManager.LocalPlayer;

                Members.AbilityDictionary   = new Dictionary <string, List <Ability> >();
                Members.ItemDictionary      = new Dictionary <string, List <Item> >();
                Members.StashItemDictionary = new Dictionary <string, List <Item> >();
                Members.NetWorthDictionary  = new Dictionary <string, long>();

                Members.Heroes       = new List <Hero>();
                Members.AllyHeroes   = new List <Hero>();
                Members.EnemyHeroes  = new List <Hero>();
                Members.Players      = new List <Player>();
                Members.AllyPlayers  = new List <Player>();
                Members.EnemyPlayers = new List <Player>();
                Members.BaseList     = new List <Unit>();

                Members.PAisHere   = null;
                Members.BaraIsHere = false;
                Members.Apparition = false;
                Members.Mirana     = null;
                Members.Windrunner = null;

                Game.OnUpdate += Updater.HeroList.Update;
                //Game.OnUpdate += Updater.PlayerList.Update;
                Game.OnUpdate += Updater.BaseList.Update;
                Game.OnUpdate += Devolp.ConsoleCommands;
                Game.OnUpdate += RoshanAction.Roshan;
                Game.OnUpdate += Game_OnUpdate;

                Drawing.OnDraw += DrawHelper.Overlay;
                Drawing.OnDraw += ItemPanel.Draw;
                Drawing.OnDraw += ShowMeMore.Draw;
                Drawing.OnDraw += Runes.Draw;

                Drawing.OnPreReset  += DrawHelper.Render.Drawing_OnPreReset;
                Drawing.OnPostReset += DrawHelper.Render.Drawing_OnPostReset;
                Drawing.OnEndScene  += DrawHelper.Render.Drawing_OnEndScene;
                Game.OnWndProc      += Game_OnWndProc;
                AppDomain.CurrentDomain.DomainUnload += DrawHelper.Render.CurrentDomainDomainUnload;
                Game.OnFireEvent += FireEvent.Game_OnGameEvent;

                Game.PrintMessage(
                    "<font face='Comic Sans MS, cursive'><font color='#00aaff'>" + Members.Menu.DisplayName +
                    " By Jumpering" +
                    " loaded!</font> <font color='#aa0000'>v" + Assembly.GetExecutingAssembly().GetName().Version,
                    MessageType.LogMessage);
                Printer.PrintSuccess("> " + Members.Menu.DisplayName + " loaded v" +
                                     Assembly.GetExecutingAssembly().GetName().Version);
                try
                {
                    Members.Menu.AddToMainMenu();
                }
                catch (Exception)
                {
                }
            };
            Events.OnClose += (sender, args) =>
            {
                Game.OnUpdate -= Updater.HeroList.Update;
                //Game.OnUpdate += Updater.PlayerList.Update;
                Game.OnUpdate -= Updater.BaseList.Update;
                Game.OnUpdate -= Devolp.ConsoleCommands;
                Game.OnUpdate -= RoshanAction.Roshan;
                Game.OnUpdate -= Game_OnUpdate;

                Drawing.OnDraw      -= DrawHelper.Overlay;
                Drawing.OnDraw      -= ItemPanel.Draw;
                Drawing.OnDraw      -= ShowMeMore.Draw;
                Drawing.OnDraw      -= Runes.Draw;
                Drawing.OnPreReset  -= DrawHelper.Render.Drawing_OnPreReset;
                Drawing.OnPostReset -= DrawHelper.Render.Drawing_OnPostReset;
                Drawing.OnEndScene  -= DrawHelper.Render.Drawing_OnEndScene;
                Game.OnWndProc      -= Game_OnWndProc;
                AppDomain.CurrentDomain.DomainUnload -= DrawHelper.Render.CurrentDomainDomainUnload;
                Game.OnFireEvent -= FireEvent.Game_OnGameEvent;
                Members.TopPanelPostiion.Clear();
                Members.Heroes.Clear();
                Members.EnemyHeroes.Clear();
                Members.AllyHeroes.Clear();
                Printer.PrintInfo("> " + Members.Menu.DisplayName + " unloaded");
                try
                {
                    Members.Menu.RemoveFromMainMenu();
                }
                catch (Exception)
                {
                    throw;
                }
            };
        }
Пример #40
0
        private static void Main()
        {
            /*Entity.OnParticleEffectAdded += (entity, eventArgs) =>
             * {
             *  var partName = eventArgs.Name;
             *  var name = entity.Name;
             *  if (!partName.Contains("teleport"))
             *      return;
             *
             *  Printer.Print(entity.Name +": "+ eventArgs.Name);
             * };*/
            Members.Menu.AddItem(new MenuItem("Enable", "Enable").SetValue(true));
            var topPanel   = new Menu("Top Panel", "toppanel");
            var spellPanel = new Menu("Spell Panel", "spellPanel");
            var ultimate   = new Menu("Ultimate", "ultimate");
            var health     = new Menu("Health Panel", "health");
            var mana       = new Menu("Mana Panel", "mana");
            var status     = new Menu("Status panel", "status");
            var extraPos   = new Menu("Extra Position", "extraPos");
            var itemPanel  = new Menu("Item panel", "itempanel");

            var roshanTimer  = new Menu("Roshan Timer", "roshanTimer");
            var showMeMore   = new Menu("Show Me More", "showmemore");
            var showIllusion = new Menu("Show Illusion", "showillusion");
            var runevision   = new Menu("Rune Vision", "runevision");

            var autoItems = new Menu("Auto Items", "autoitems");
            var settings  = new Menu("Settings", "Settings");
            var page1     = new Menu("Page 1", "Page 1");
            var page2     = new Menu("Page 2", "Page 2");

            //===========================
            itemPanel.AddItem(new MenuItem("itempanel.Enable", "Enable").SetValue(true));
            itemPanel.AddItem(new MenuItem("itempanel.Stash.Enable", "Draw Stash Items").SetValue(true));
            itemPanel.AddItem(new MenuItem("itempanel.Button.Enable", "Draw Button for toggle").SetValue(true));
            itemPanel.AddItem(new MenuItem("itempanel.X", "Panel Position X").SetValue(new Slider(100, 0, 2000)));
            itemPanel.AddItem(new MenuItem("itempanel.Y", "Panel Position Y").SetValue(new Slider(200, 0, 2000)));
            itemPanel.AddItem(new MenuItem("itempanel.SizeX", "SizeX").SetValue(new Slider(255, 1, 255)));
            itemPanel.AddItem(new MenuItem("itempanel.SizeY", "SizeY").SetValue(new Slider(174, 1, 255)));
            itemPanel.AddItem(new MenuItem("itempanel.Red", "Red").SetValue(new Slider(141, 0, 255)).SetFontColor(Color.Red));
            itemPanel.AddItem(new MenuItem("itempanel.Green", "Green").SetValue(new Slider(182, 0, 255)).SetFontColor(Color.Green));
            itemPanel.AddItem(new MenuItem("itempanel.Blue", "Blue").SetValue(new Slider(98, 0, 255)).SetFontColor(Color.Blue));
            //===========================
            topPanel.AddItem(new MenuItem("toppanel.Enable", "Enable").SetValue(true));
            topPanel.AddItem(
                new MenuItem("toppanel.Targets", "Draw For: ").SetValue(
                    new StringList(new[] { "Both", "Ally Team", "Enemy Team" })));
            //===========================
            spellPanel.AddItem(new MenuItem("spellpanel.Enable", "Enable").SetValue(true));
            spellPanel.AddItem(
                new MenuItem("spellpanel.Targets", "Draw For: ").SetValue(
                    new StringList(new[] { "Both", "Ally Team", "Enemy Team" })));
            var oldMethod = new Menu("OldMethod", "Without Textures");

            oldMethod.AddItem(new MenuItem("spellpanel.OldMethod.Enable", "Enable").SetValue(true));
            oldMethod.AddItem(new MenuItem("spellPanel.distBetweenSpells", "Distance spells").SetValue(new Slider(36, 0, 200)));
            oldMethod.AddItem(new MenuItem("spellPanel.DistBwtweenLvls", "Distance lvls").SetValue(new Slider(6, 0, 200)));
            oldMethod.AddItem(new MenuItem("spellPanel.SizeSpell", "Level size").SetValue(new Slider(3, 1, 25)));
            oldMethod.AddItem(new MenuItem("spellPanel.ExtraPosX", "Extra Position X").SetValue(new Slider(25)));
            oldMethod.AddItem(new MenuItem("spellPanel.ExtraPosY", "Extra Position Y").SetValue(new Slider(125, 0, 400)));
            //---0-0-0-0-0-
            var newMethod = new Menu("New Method", "With Textures");

            newMethod.AddItem(new MenuItem("spellpanel.NewMethod.Enable", "Enable").SetValue(false));
            newMethod.AddItem(new MenuItem("spellpanel.NewMethod.IconSize", "Icon Size").SetValue(new Slider(25, 1, 100)));
            newMethod.AddItem(new MenuItem("spellpanel.NewMethod.SizeLevel", "Text Size (for level)").SetValue(new Slider(50, 0, 150)));
            newMethod.AddItem(new MenuItem("spellpanel.NewMethod.Size", "Text Size (for cooldown/mana)").SetValue(new Slider(50, 0, 150)));
            newMethod.AddItem(new MenuItem("spellpanel.NewMethod.ExtraX", "Extra position X").SetValue(new Slider(0, -150, 150)));
            newMethod.AddItem(new MenuItem("spellpanel.NewMethod.ExtraY", "Extra position Y").SetValue(new Slider(0, -150, 150)));
            //===========================
            ultimate.AddItem(new MenuItem("ultimate.Enable", "Enable").SetValue(true));
            ultimate.AddItem(new MenuItem("ultimate.Icon.Enable", "Draw Icon").SetValue(true));
            ultimate.AddItem(
                new MenuItem("ultimate.Icon.Extra.Enable", "Draw Mana req with cd").SetValue(true)
                .SetTooltip("render lack of mana when spell on cooldown"));
            ultimate.AddItem(
                new MenuItem("ultimate.Type", "Type of drawing").SetValue(
                    new StringList(new[] { "Draw Icon", "Draw Line" }))).ValueChanged += (sender, args) =>
            {
                var newArg    = args.GetNewValue <StringList>().SelectedIndex;
                var newColor  = newArg == 1 ? Color.DarkSlateGray : new Color(195, 186, 173, 255);
                var newColor2 = newArg == 0 ? Color.DarkSlateGray : new Color(195, 186, 173, 255);
                Members.Menu.Item("ultimate.Info").SetFontColor(newColor);
                Members.Menu.Item("ultimate.InfoAlways").SetFontColor(newColor);
                Members.Menu.Item("ultimate.Line.Size").SetFontColor(newColor2);
            };
            ultimate.AddItem(
                new MenuItem("ultimate.Info", "Show details").SetValue(true)
                .SetTooltip("show Ultimate's CD if u put ur mouse on icon"));
            ultimate.AddItem(
                new MenuItem("ultimate.InfoAlways", "Show details all time").SetValue(true)
                .SetTooltip("Show Details should be enabled"));
            ultimate.AddItem(
                new MenuItem("ultimate.Line.Size", "Line Size").SetValue(new Slider(15, 7, 30)));

            //===========================
            health.AddItem(new MenuItem("toppanel.Health.Enable", "Enable").SetValue(true));
            //===========================
            mana.AddItem(new MenuItem("toppanel.Mana.Enable", "Enable").SetValue(true));
            //===========================
            status.AddItem(new MenuItem("toppanel.Status.Enable", "Enable").SetValue(true));
            status.AddItem(new MenuItem("toppanel.AllyVision.Enable", "Vision on Ally Heroes").SetValue(true));
            status.AddItem(new MenuItem("toppanel.EnemiesStatus.Enable", "Enemies status").SetValue(true));
            //===========================
            extraPos.AddItem(
                new MenuItem("extraPos.X", "Extra Position for top panel: X").SetValue(new Slider(0, -25, 25)));
            extraPos.AddItem(
                new MenuItem("extraPos.Y", "Extra Position for top panel: Y").SetValue(new Slider(0, -25, 25)));
            //===========================
            roshanTimer.AddItem(new MenuItem("roshanTimer.Enable", "Enable").SetValue(true));
            //===========================
            showMeMore.AddItem(new MenuItem("showmemore.Enable", "Enable").SetValue(true));
            var charge = new Menu("", "charge", false, "spirit_breaker_charge_of_darkness", true);

            charge.AddItem(new MenuItem("tooltip", "When Charge on your Main Hero").SetFontColor(Color.Red));
            charge.AddItem(new MenuItem("charge.Enable", "Enable").SetValue(true));
            charge.AddItem(new MenuItem("charge.Rect.Enable", "Draw red box").SetValue(false));
            charge.AddItem(new MenuItem("charge.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red));
            charge.AddItem(new MenuItem("charge.Green", "Green").SetValue(new Slider(0, 0, 255)).SetFontColor(Color.Green));
            charge.AddItem(new MenuItem("charge.Blue", "Blue").SetValue(new Slider(0, 0, 255)).SetFontColor(Color.Blue));
            charge.AddItem(new MenuItem("charge.Alpha", "Alpha").SetValue(new Slider(4, 0, 255)).SetFontColor(Color.WhiteSmoke));
            //===========================
            var blur = new Menu("", "blur", false, "phantom_assassin_blur", true);

            blur.AddItem(new MenuItem("blur.Enable", "Show PA on minimap").SetValue(true));
            //===========================
            var wr = new Menu("", "wr", false, "windrunner_powershot", true);

            wr.AddItem(new MenuItem("wr.Enable", "Enable").SetValue(true));
            wr.AddItem(new MenuItem("wr.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red));
            wr.AddItem(new MenuItem("wr.Green", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green));
            wr.AddItem(new MenuItem("wr.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue));
            //===========================
            var mirana = new Menu("", "mirana", false, "mirana_arrow", true);

            mirana.AddItem(new MenuItem("mirana.Enable", "Enable").SetValue(true));
            mirana.AddItem(new MenuItem("mirana.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red));
            mirana.AddItem(new MenuItem("mirana.Green", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green));
            mirana.AddItem(new MenuItem("mirana.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue));
            var apparition = new Menu("", "apparition", false, "ancient_apparition_ice_blast", true);

            apparition.AddItem(new MenuItem("apparition.Enable", "Enable").SetValue(true));
            var lina = new Menu("", "lina", false, "lina_light_strike_array", true);

            lina.AddItem(new MenuItem("lina.Enable", "Enable").SetValue(true));
            var invoker = new Menu("", "invoker", false, "invoker_sun_strike", true);

            invoker.AddItem(new MenuItem("invoker.Enable", "Enable").SetValue(true));
            invoker.AddItem(new MenuItem("invoker.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red));
            invoker.AddItem(new MenuItem("invoker.Green", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green));
            invoker.AddItem(new MenuItem("invoker.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue));
            var lesh = new Menu("", "lesh", false, "leshrac_split_earth", true);

            lesh.AddItem(new MenuItem("lesh.Enable", "Enable").SetValue(true));
            var kunkka = new Menu("", "kunkka", false, "kunkka_torrent", true);

            kunkka.AddItem(new MenuItem("kunkka.Enable", "Enable").SetValue(true));
            kunkka.AddItem(new MenuItem("kunkka.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red));
            kunkka.AddItem(new MenuItem("kunkka.Green", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green));
            kunkka.AddItem(new MenuItem("kunkka.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue));
            var tech = new Menu("", "tech", false, "npc_dota_hero_techies", true);

            tech.AddItem(new MenuItem("tech.Enable", "Enable").SetValue(true));
            var tinker = new Menu("", "tinker", false, "npc_dota_hero_tinker", true);

            tinker.AddItem(new MenuItem("tinker.Enable", "Enable").SetValue(true));
            var lifestealer = new Menu("", "life stealer", false, "life_stealer_infest", true);

            lifestealer.AddItem(new MenuItem("lifestealer.Enable", "Enable").SetValue(true));
            lifestealer.AddItem(new MenuItem("lifestealer.Icon.Enable", "Draw icon near hero").SetValue(false));
            lifestealer.AddItem(new MenuItem("lifestealer.creeps.Enable", "Draw icon near creep").SetValue(false));
            var arc = new Menu("", "arc", textureName: "arc_warden_spark_wraith", showTextWithTexture: true);

            arc.AddItem(new MenuItem("arc.Enable", "Enable").SetValue(true));
            var scan = new Menu("Enemy Scanning Ability", "Scan");

            scan.AddItem(new MenuItem("scan.Enable", "Enable").SetValue(true));
            var courEsp = new Menu("Courier on Minimap", "Cour");

            courEsp.AddItem(new MenuItem("Cour.Enable", "Enable").SetValue(true));
            //var cour = new Menu("Courier", "Courier");
            //cour.AddItem(new MenuItem("Courier.Enable", "Enable").SetValue(true)).SetTooltip("draw courier position on minimap");
            //===========================
            showIllusion.AddItem(new MenuItem("showillusion.Enable", "Enable").SetValue(true));
            showIllusion.AddItem(
                new MenuItem("showillusion.Type", "Type").SetValue(new StringList(new[] { "Smoke", "new 1", "new 2", "balloons" }, 2)));
            showIllusion.AddItem(new MenuItem("showillusion.X", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red));
            showIllusion.AddItem(new MenuItem("showillusion.Y", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green));
            showIllusion.AddItem(new MenuItem("showillusion.Z", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue));
            showIllusion.AddItem(new MenuItem("showillusion.Alpha", "Alpha").SetValue(new Slider(40, 0, 255)));
            showIllusion.AddItem(new MenuItem("showillusion.Size", "Size").SetValue(new Slider(120, 1, 250)));
            //===========================
            runevision.AddItem(new MenuItem("runevision.Enable", "Enable").SetValue(true));
            runevision.AddItem(new MenuItem("runevision.PrintText.Enable", "Print text on rune-spawning").SetValue(true));
            runevision.AddItem(new MenuItem("runevision.DrawOnMinimap.Enable", "Draw rune on minimap").SetValue(true));
            //===========================
            var itemOverlay = new Menu("Item overlay", "itemOverlay");

            itemOverlay.AddItem(new MenuItem("itemOverlay.Enable", "Enable").SetValue(false)).SetTooltip("will show all items on heroes");
            itemOverlay.AddItem(new MenuItem("itemOverlay.DrawCharges", "Draw Charges").SetValue(true));
            itemOverlay.AddItem(new MenuItem("itemOverlay.Size", "Size").SetValue(new Slider(100, 1, 200)));
            itemOverlay.AddItem(new MenuItem("itemOverlay.Extra", "Extra").SetValue(new Slider(26, 1, 100)));
            itemOverlay.AddItem(new MenuItem("itemOverlay.Ally", "Enable for ally").SetValue(true));
            itemOverlay.AddItem(new MenuItem("itemOverlay.Enemy", "Enable for enemy").SetValue(true));
            itemOverlay.AddItem(new MenuItem("itemOverlay.Cour", "Enable for couriers").SetValue(true)).SetTooltip("only for enemy");
            var tpCatcher = new Menu("TP Catcher", "TpCather");

            tpCatcher.AddItem(new MenuItem("TpCather.Enable", "Enable").SetValue(true));
            tpCatcher.AddItem(new MenuItem("TpCather.Ally", "For Ally").SetValue(true));
            tpCatcher.AddItem(new MenuItem("TpCather.Enemy", "For Enemy").SetValue(true));
            tpCatcher.AddItem(new MenuItem("TpCather.Map", "Draw on Map").SetValue(true));
            tpCatcher.AddItem(new MenuItem("TpCather.MiniMap", "Draw on MiniMap").SetValue(true));
            tpCatcher.AddItem(
                new MenuItem("TpCather.MiniMap.Type", "Draw on MiniMap Hero Icon or Rectangle").SetValue(true))
            .SetTooltip("true=icon; false=rectangle");
            tpCatcher.AddItem(new MenuItem("TpCather.MiniMap.Size", "MiniMap Size").SetValue(new Slider(20, 5, 30)));
            tpCatcher.AddItem(new MenuItem("TpCather.Map.Size", "Map Size").SetValue(new Slider(50, 5, 50)));
            var manaBars = new Menu("Manabars", "manaBars");

            manaBars.AddItem(new MenuItem("manaBars.Enable", "Enable").SetValue(true));
            manaBars.AddItem(new MenuItem("manaBars.Nums.Enable", "Enable digital values").SetValue(true));
            manaBars.AddItem(new MenuItem("manaBars.Nums.Size", "Dig Size").SetValue(new Slider(75, 1, 150)));
            manaBars.AddItem(new MenuItem("manaBars.Size", "Size").SetValue(new Slider(75, 1, 150)));

            manaBars.AddItem(new MenuItem("manaBars.Red", "Red").SetValue(new Slider(65, 0, 255)).SetFontColor(Color.Red));
            manaBars.AddItem(new MenuItem("manaBars.Green", "Green").SetValue(new Slider(105, 0, 255)).SetFontColor(Color.Green));
            manaBars.AddItem(new MenuItem("manaBars.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue));

            //var dangItem = new Menu("Dangerous items", "dangitems");
            itemOverlay.AddItem(new MenuItem("itemOverlay.DangItems", "Draw only dangerous items").SetValue(false)).SetTooltip("show if enemy has Dangerous items. Working only for enemy heroes");
            itemOverlay.AddItem(new MenuItem("itemOverlay.OldMethod", "Use old method for drawing dangItems").SetValue(false));

            var dict = new Dictionary <string, bool>
            {
                { "item_gem", true },
                { "item_dust", true },
                { "item_sphere", true },
                { "item_blink", true },
                { "item_ward_observer", true },
                { "item_ward_sentry", true },
                { "item_black_king_bar", true },
                { "item_invis_sword", true },
                { "item_silver_edge", true },
                { "item_ward_dispenser", true }
            };

            itemOverlay.AddItem(new MenuItem("itemOverlay.List", "Items: ").SetValue(new AbilityToggler(dict)));
            //===========================
            autoItems.AddItem(new MenuItem("autoitems.Enable", "Enable").SetValue(true));
            autoItems.AddItem(new MenuItem("autoItems.Percent", "Health(%) for auto stick").SetValue(new Slider(15)));
            autoItems.AddItem(new MenuItem("autoItems.Percent2", "Mana(%) for auto stick").SetValue(new Slider(15)));
            var autoitemlist = new Dictionary <string, bool>
            {
                { "item_magic_wand", true },
                { "item_phase_boots", true },
                { "item_hand_of_midas", true }
            };

            autoItems.AddItem(new MenuItem("autoitems.List", "Items:").SetValue(new AbilityToggler(autoitemlist)));
            //===========================
            var lastPosition = new Menu("Last position", "lastPosition");

            lastPosition.AddItem(new MenuItem("lastPosition.Enable", "Enable").SetValue(true)).SetTooltip("show last positions of enemies");
            lastPosition.AddItem(new MenuItem("lastPosition.Enable.Prediction", "Enable Prediction").SetValue(true));
            lastPosition.AddItem(new MenuItem("lastPosition.Enable.Map", "on Map").SetValue(false));
            lastPosition.AddItem(new MenuItem("lastPosition.Map.X", "icon size").SetValue(new Slider(50, 10, 150)));
            lastPosition.AddItem(new MenuItem("lastPosition.Enable.Minimap", "on Minimap").SetValue(true));
            lastPosition.AddItem(new MenuItem("lastPosition.Minimap.X", "icon size").SetValue(new Slider(20, 10, 150)));

            //===========================
            var netWorth = new Menu("NetWorth Graph", "netWorth");

            netWorth.AddItem(new MenuItem("netWorth.Enable", "Enable").SetValue(true)).SetTooltip("draw networth graph based on item cost");
            netWorth.AddItem(new MenuItem("netWorth.Order", "Sort Players").SetValue(true));
            netWorth.AddItem(
                new MenuItem("netWorth.X", "Position: X").SetValue(new Slider(0, 0, 2000)));
            netWorth.AddItem(
                new MenuItem("netWorth.Y", "Position: Y").SetValue(new Slider(0, 0, 2000)));
            netWorth.AddItem(new MenuItem("netWorth.SizeX", "SizeX").SetValue(new Slider(255, 1, 255)));
            netWorth.AddItem(new MenuItem("netWorth.SizeY", "SizeY").SetValue(new Slider(174, 1, 255)));
            netWorth.AddItem(new MenuItem("netWorth.Red", "Red").SetValue(new Slider(141, 0, 255)).SetFontColor(Color.Red));
            netWorth.AddItem(new MenuItem("netWorth.Green", "Green").SetValue(new Slider(182, 0, 255)).SetFontColor(Color.Green));
            netWorth.AddItem(new MenuItem("netWorth.Blue", "Blue").SetValue(new Slider(98, 0, 255)).SetFontColor(Color.Blue));
            //===========================
            var dmgCalc = new Menu("Damage Calculation", "dmgCalc");

            dmgCalc.AddItem(new MenuItem("dmgCalc.Enable", "Enable").SetValue(true)).SetTooltip("showing dmg from ur abilities");
            dmgCalc.AddItem(new MenuItem("dmgCalc.Abilities", "Abilities: ").SetValue(new AbilityToggler(new Dictionary <string, bool>())));
            var defCol      = new Menu("Default Color", "clrDef");
            var killableCol = new Menu("Color, When skills damage is enough", "clrEno");

            defCol.AddItem(new MenuItem("defCol.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red));
            defCol.AddItem(new MenuItem("defCol.Green", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green));
            defCol.AddItem(new MenuItem("defCol.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue));
            killableCol.AddItem(new MenuItem("killableCol.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red));
            killableCol.AddItem(new MenuItem("killableCol.Green", "Green").SetValue(new Slider(100, 0, 255)).SetFontColor(Color.Green));
            killableCol.AddItem(new MenuItem("killableCol.Blue", "Blue").SetValue(new Slider(100, 0, 255)).SetFontColor(Color.Blue));
            //===========================
            var devolper = new Menu("Developer", "Developer");

            devolper.AddItem(new MenuItem("Dev.Hax.enable", "Hax in lobby").SetValue(false));
            devolper.AddItem(new MenuItem("Dev.Text.enable", "Debug messages").SetValue(false));
            devolper.AddItem(new MenuItem("Dev.CreepsDisabler.enable", "Disable spawn creeps").SetValue(false))
            .ValueChanged +=
                (sender, args) =>
            {
                var type = args.GetNewValue <bool>() ? "enable" : "disable";
                Game.ExecuteCommand($"dota_creeps_no_spawning_{type}");
            };
            //===========================
            spellPanel.AddSubMenu(oldMethod);
            spellPanel.AddSubMenu(newMethod);
            topPanel.AddSubMenu(ultimate);
            topPanel.AddSubMenu(health);
            topPanel.AddSubMenu(mana);
            topPanel.AddSubMenu(status);
            topPanel.AddSubMenu(extraPos);
            page1.AddSubMenu(topPanel);
            page1.AddSubMenu(spellPanel);
            page1.AddSubMenu(roshanTimer);
            page1.AddSubMenu(showMeMore);
            showMeMore.AddSubMenu(charge);
            showMeMore.AddSubMenu(blur);
            showMeMore.AddSubMenu(wr);
            showMeMore.AddSubMenu(mirana);
            showMeMore.AddSubMenu(apparition);
            showMeMore.AddSubMenu(lina);
            showMeMore.AddSubMenu(invoker);
            showMeMore.AddSubMenu(kunkka);
            showMeMore.AddSubMenu(lesh);
            showMeMore.AddSubMenu(lifestealer);
            showMeMore.AddSubMenu(tech);
            showMeMore.AddSubMenu(tinker);
            showMeMore.AddSubMenu(arc);
            showMeMore.AddSubMenu(scan);
            showMeMore.AddSubMenu(courEsp);
            page1.AddSubMenu(showIllusion);
            page1.AddSubMenu(runevision);
            //settings.AddSubMenu(dangItem);
            settings.AddSubMenu(page1);
            settings.AddSubMenu(page2);
            page1.AddSubMenu(itemPanel);
            page1.AddSubMenu(itemOverlay);
            page2.AddSubMenu(manaBars);
            page2.AddSubMenu(autoItems);
            page2.AddSubMenu(lastPosition);
            page2.AddSubMenu(netWorth);
            page2.AddSubMenu(dmgCalc);
            page2.AddSubMenu(tpCatcher);
            dmgCalc.AddSubMenu(defCol);
            dmgCalc.AddSubMenu(killableCol);

            Members.Menu.AddSubMenu(settings);
            Members.Menu.AddSubMenu(devolper);

            Members.HeroesList        = new HeroesList();
            Members.Manabars          = new Manabars();
            Members.ItemOverlay       = new ItemOverlay();
            Members.DamageCalculation = new DamageCalculation();
            Members.AbilityOverlay    = new AbilityOverlay();

            if (Drawing.Direct3DDevice9 != null)
            {
                Members.RoshanFont = new Font(
                    Drawing.Direct3DDevice9,
                    new FontDescription
                {
                    FaceName        = "Tahoma",
                    Height          = 15,
                    OutputPrecision = FontPrecision.Default,
                    Quality         = FontQuality.Default
                });
            }
            Events.OnLoad += (sender, args) =>
            {
                Members.MyHero   = ObjectManager.LocalHero;
                Members.MyPlayer = ObjectManager.LocalPlayer;

                Members.AbilityDictionary   = new Dictionary <uint, List <Ability> >();
                Members.ItemDictionary      = new Dictionary <uint, List <Item> >();
                Members.StashItemDictionary = new Dictionary <uint, List <Item> >();
                Members.NetWorthDictionary  = new Dictionary <string, long>();

                Members.Heroes       = new List <Hero>();
                Members.AllyHeroes   = new List <Hero>();
                Members.EnemyHeroes  = new List <Hero>();
                Members.Players      = new List <Player>();
                Members.AllyPlayers  = new List <Player>();
                Members.EnemyPlayers = new List <Player>();
                Members.BaseList     = new List <Unit>();

                Members.PAisHere   = null;
                Members.BaraIsHere = false;
                Members.Apparition = false;
                Members.Mirana     = null;
                Members.Windrunner = null;
                Updater.HeroList.Flush();
                Updater.BaseList.Flush();
                Updater.PlayerList.Flush();
                Game.OnUpdate += Updater.HeroList.Update;
                //Game.OnUpdate += Updater.PlayerList.Update;
                Game.OnUpdate += Updater.BaseList.Update;
                Game.OnUpdate += Devolp.ConsoleCommands;
                RoshanAction.Flush();
                AutoItems.Flush();
                Game.OnUpdate += RoshanAction.Roshan;
                Game.OnUpdate += Game_OnUpdate;

                Drawing.OnDraw += DrawHelper.Overlay;

                Drawing.OnDraw += ItemPanel.Draw;
                ShowMeMore.Flush();
                Drawing.OnDraw += ShowMeMore.Draw;
                Entity.OnParticleEffectAdded += ShowMeMore.Entity_OnParticleEffectAdded;
                Unit.OnModifierAdded         += ShowMeMore.OnModifierAdded;
                Unit.OnModifierRemoved       += ShowMeMore.OnModifierRemoved;
                Runes.Flush();
                Drawing.OnDraw += Runes.Draw;


                Drawing.OnPreReset  += DrawHelper.Render.Drawing_OnPreReset;
                Drawing.OnPostReset += DrawHelper.Render.Drawing_OnPostReset;
                Drawing.OnEndScene  += DrawHelper.Render.Drawing_OnEndScene;
                Game.OnWndProc      += Game_OnWndProc;
                AppDomain.CurrentDomain.DomainUnload += DrawHelper.Render.CurrentDomainDomainUnload;
                Game.OnFireEvent += FireEvent.Game_OnGameEvent;

                Game.PrintMessage(
                    "<font face='Comic Sans MS, cursive'><font color='#00aaff'>" + Members.Menu.DisplayName +
                    " By Jumpering" +
                    " loaded!</font> <font color='#aa0000'>v" + Assembly.GetExecutingAssembly().GetName().Version,
                    MessageType.LogMessage);
                Printer.PrintSuccess("> " + Members.Menu.DisplayName + " loaded v" +
                                     Assembly.GetExecutingAssembly().GetName().Version);

                /*Entity.OnParticleEffectAdded += Entity_OnParticleEffectAdded;
                 * Drawing.OnDraw += Drawing_OnDraw;*/
                try
                {
                    Members.Menu.AddToMainMenu();
                    if (Members.Menu.Item("Dev.CreepsDisabler.enable").GetValue <bool>())
                    {
                        Game.ExecuteCommand("dota_creeps_no_spawning_enable");
                    }
                }
                catch (Exception)
                {
                    Printer.Print("Members.Menu.AddToMainMenu();");
                }
            };
            Events.OnClose += (sender, args) =>
            {
                Game.OnUpdate -= Updater.HeroList.Update;
                //Game.OnUpdate += Updater.PlayerList.Update;
                Game.OnUpdate -= Updater.BaseList.Update;
                Game.OnUpdate -= Devolp.ConsoleCommands;
                Game.OnUpdate -= RoshanAction.Roshan;
                Game.OnUpdate -= Game_OnUpdate;

                Drawing.OnDraw -= DrawHelper.Overlay;
                Drawing.OnDraw -= ItemPanel.Draw;
                Drawing.OnDraw -= ShowMeMore.Draw;
                Entity.OnParticleEffectAdded -= ShowMeMore.Entity_OnParticleEffectAdded;
                Unit.OnModifierAdded         -= ShowMeMore.OnModifierAdded;
                Unit.OnModifierRemoved       -= ShowMeMore.OnModifierRemoved;
                Drawing.OnDraw      -= Runes.Draw;
                Drawing.OnPreReset  -= DrawHelper.Render.Drawing_OnPreReset;
                Drawing.OnPostReset -= DrawHelper.Render.Drawing_OnPostReset;
                Drawing.OnEndScene  -= DrawHelper.Render.Drawing_OnEndScene;
                Game.OnWndProc      -= Game_OnWndProc;
                AppDomain.CurrentDomain.DomainUnload -= DrawHelper.Render.CurrentDomainDomainUnload;
                Game.OnFireEvent -= FireEvent.Game_OnGameEvent;
                Members.TopPanelPostiion.Clear();
                Members.Heroes.Clear();
                Members.EnemyHeroes.Clear();
                Members.AllyHeroes.Clear();
                Printer.PrintInfo("> " + Members.Menu.DisplayName + " unloaded");
                try
                {
                    Members.Menu.RemoveFromMainMenu();
                }
                catch (Exception)
                {
                    Printer.PrintError("Members.Menu.RemoveFromMainMenu();");
                }
            };
        }
Пример #41
0
        /// <summary>
        ///     Initializes static members of the <see cref="HUDInfo" /> class.
        /// </summary>
        static HUDInfo()
        {
            double tinfoHeroDown;
            double panelHeroSizeX;
            float  compareWidth;

            ScreenSize = new Vector2(Drawing.Width, Drawing.Height);
            if (ScreenSize.X == 0)
            {
                Console.WriteLine("Ensage couldnt determine your resolution, try to launch in window mode");
                return;
            }

            minimap = new Minimap(new Vector2(-2, 1), new Vector2(0));

            var ratio = Math.Floor((decimal)(ScreenSize.X / ScreenSize.Y * 100));

            var largeMinimap = Game.GetConsoleVar("dota_hud_extra_large_minimap").GetInt() == 1;

            // Console.WriteLine("Your screen ratio is " + ratio);
            if (ratio == 213)
            {
                compareWidth     = 1600;
                panelHeroSizeX   = 45.28;
                tinfoHeroDown    = 25.714;
                DireCompare      = 2.402;
                RadiantCompare   = 3.08;
                HpBarHeight      = 7;
                HpBarWidth       = 69;
                HpBarX           = 36;
                HpBarY           = 23;
                minimap.Size     = new Vector2(0.1070833333333333f * ScreenSize.X, 0.2240740740740741f * ScreenSize.Y);
                minimapMapScaleX = minimap.Size.X / mapWidth;
                minimapMapScaleY = minimap.Size.Y / mapHeight;
            }
            else if (ratio == 177)
            {
                compareWidth     = 1600;
                panelHeroSizeX   = 52.8900000000004;
                tinfoHeroDown    = 25.714;
                DireCompare      = 2.5001;
                RadiantCompare   = 3.409;
                HpBarHeight      = 10;
                HpBarWidth       = 86.5;
                HpBarX           = 44;
                HpBarY           = 27;
                minimap.Size     = new Vector2(0.1280833333333333f * ScreenSize.X, 0.2240740740740741f * ScreenSize.Y);
                minimapMapScaleX = minimap.Size.X / mapWidth;
                minimapMapScaleY = minimap.Size.Y / mapHeight;
            }
            else if (ratio == 166)
            {
                compareWidth     = 1280;
                panelHeroSizeX   = 47.19;
                tinfoHeroDown    = 25.714;
                DireCompare      = 2.59;
                RadiantCompare   = 3.64;
                HpBarHeight      = 7.4;
                HpBarWidth       = 71;
                HpBarX           = 37;
                HpBarY           = 22;
                minimap.Size     = new Vector2(0.1370833333333333f * ScreenSize.X, 0.2240740740740741f * ScreenSize.Y);
                minimapMapScaleX = minimap.Size.X / mapWidth;
                minimapMapScaleY = minimap.Size.Y / mapHeight;
            }
            else if (ratio == 160)
            {
                compareWidth     = 1280;
                panelHeroSizeX   = 48.95;
                tinfoHeroDown    = 25.714;
                DireCompare      = 2.609;
                RadiantCompare   = 3.78;
                HpBarHeight      = 9;
                HpBarWidth       = 75;
                HpBarX           = 38.3;
                HpBarY           = 25;
                minimap.Size     = new Vector2(0.1425833333333333f * ScreenSize.X, 0.2240740740740741f * ScreenSize.Y);
                minimapMapScaleX = minimap.Size.X / mapWidth;
                minimapMapScaleY = minimap.Size.Y / mapHeight;
            }
            else if (ratio == 150)
            {
                compareWidth     = 1024;
                panelHeroSizeX   = 47.21;
                tinfoHeroDown    = 25.714;
                DireCompare      = 2.775;
                RadiantCompare   = 4.57;
                HpBarHeight      = 8;
                HpBarWidth       = 79.2;
                HpBarX           = 40.2;
                HpBarY           = 24;
                minimap.Size     = new Vector2(0.1500233333333333f * ScreenSize.X, 0.2200940740740741f * ScreenSize.Y);
                minimapMapScaleX = minimap.Size.X / mapWidth;
                minimapMapScaleY = minimap.Size.Y / mapHeight;
            }
            else if (ratio == 133)
            {
                compareWidth     = 1280;
                panelHeroSizeX   = 58.3;
                tinfoHeroDown    = 25.714;
                DireCompare      = 2.78;
                RadiantCompare   = 4.65;
                HpBarHeight      = 8;
                HpBarWidth       = 71;
                HpBarX           = 36.6;
                HpBarY           = 23;
                minimap.Size     = new Vector2(0.1690833333333333f * ScreenSize.X, 0.2225740740740741f * ScreenSize.Y);
                minimapMapScaleX = minimap.Size.X / mapWidth;
                minimapMapScaleY = minimap.Size.Y / mapHeight;
            }
            else if (ratio == 125)
            {
                compareWidth     = 1280;
                panelHeroSizeX   = 58.3;
                tinfoHeroDown    = 25.714;
                DireCompare      = 2.78;
                RadiantCompare   = 4.65;
                HpBarHeight      = 11;
                HpBarWidth       = 96.5;
                HpBarX           = 49;
                HpBarY           = 32;
                minimap.Size     = new Vector2(0.1850833333333333f * ScreenSize.X, 0.2240740740740741f * ScreenSize.Y);
                minimapMapScaleX = minimap.Size.X / mapWidth;
                minimapMapScaleY = minimap.Size.Y / mapHeight;
            }
            else
            {
                Console.WriteLine(
                    @"Your screen resolution is not supported and drawings might have wrong size/position, (" + ratio
                    + ")");
                compareWidth     = 1600;
                panelHeroSizeX   = 65;
                tinfoHeroDown    = 25.714;
                DireCompare      = 2.655;
                RadiantCompare   = 5.985;
                HpBarHeight      = 10;
                HpBarWidth       = 83.5;
                HpBarX           = 43;
                HpBarY           = 28;
                minimap.Size     = new Vector2(0.1270833333333333f * ScreenSize.X, 0.2240740740740741f * ScreenSize.Y);
                minimapMapScaleX = minimap.Size.X / mapWidth;
                minimapMapScaleY = minimap.Size.Y / mapHeight;
            }

            if (largeMinimap)
            {
                const float LargeMinimapConstant = 1.1470833333333333f; // © Moones 2017
                minimap.Size    *= LargeMinimapConstant;
                minimapMapScaleX = minimap.Size.X / mapWidth;
                minimapMapScaleY = minimap.Size.Y / mapHeight;
            }

            Monitor = ScreenSize.X / compareWidth;
            Rate    = Math.Max(Monitor, 1);
            X       = panelHeroSizeX * Monitor;
            y       = ScreenSize.Y / tinfoHeroDown;

            var menu           = new Menu.Menu("HUDInfo", nameof(HUDInfo));
            var minimapOnRight = menu.AddItem(
                new MenuItem(menu.Name + "minimapRight", "Minimap is on the right").SetValue(false).SetTooltip("Enable this if you have minimap on the right"));

            minimapOnRight.ValueChanged += (sender, args) => { MinimapIsOnRight = args.GetNewValue <bool>(); };
            MinimapIsOnRight             = minimapOnRight.GetValue <bool>();

            DelayAction.Add(200, () => Menu.Menu.Root.AddSubMenu(menu));
        }
Пример #42
0
        public static void Init()
        {
            if (_loaded)
            {
                return;
            }
            _loaded = true;
            Members.Menu.AddItem(new MenuItem("Enable", "Enable").SetValue(true));
            var topPanel           = new Menu("Top Panel", "toppanel");
            var spellPanel         = new Menu("Spell Panel", "spellPanel");
            var ultimate           = new Menu("Ultimate", "ultimate");
            var health             = new Menu("Health Panel", "health");
            var mana               = new Menu("Mana Panel", "mana");
            var status             = new Menu("Status panel", "status");
            var visionOnAllyHeroes = new Menu("Vision on Ally Heroes", "Vision on Ally Heroes");
            var extraPos           = new Menu("Extra Position", "extraPos");
            var itemPanel          = new Menu("Item panel", "itempanel");

            var roshanTimer  = new Menu("Roshan Timer", "roshanTimer");
            var showMeMore   = new Menu("Show Me More", "showmemore");
            var showIllusion = new Menu("Show Illusion", "showillusion");
            var runevision   = new Menu("Rune Vision", "runevision");

            var autoItems = new Menu("Auto Items", "autoitems");
            var settings  = new Menu("Settings", "Settings");
            var page1     = new Menu("Page 1", "Page 1");
            var page2     = new Menu("Page 2", "Page 2");

            //===========================
            itemPanel.AddItem(new MenuItem("itempanel.Enable", "Enable old version").SetValue(false));
            itemPanel.AddItem(new MenuItem("itempanel.new.Enable", "Enable new version").SetValue(true));
            itemPanel.AddItem(new MenuItem("itempanel.Stash.Enable", "Draw Stash Items").SetValue(true));
            itemPanel.AddItem(new MenuItem("itempanel.Button.Enable", "Draw Button for toggle").SetValue(true));
            itemPanel.AddItem(new MenuItem("itempanel.X", "Panel Position X").SetValue(new Slider(100, 0, 2000)));
            itemPanel.AddItem(new MenuItem("itempanel.Y", "Panel Position Y").SetValue(new Slider(200, 0, 2000)));
            itemPanel.AddItem(new MenuItem("itempanel.SizeX", "SizeX").SetValue(new Slider(255, 1, 255)));
            itemPanel.AddItem(new MenuItem("itempanel.SizeY", "SizeY").SetValue(new Slider(174, 1, 255)));
            itemPanel.AddItem(new MenuItem("itempanel.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red));
            itemPanel.AddItem(new MenuItem("itempanel.Green", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green));
            itemPanel.AddItem(new MenuItem("itempanel.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue));
            //===========================
            topPanel.AddItem(new MenuItem("toppanel.Enable", "Enable").SetValue(true));
            topPanel.AddItem(
                new MenuItem("toppanel.Targets", "Draw For: ").SetValue(
                    new StringList(new[] { "Both", "Ally Team", "Enemy Team" })));
            //===========================
            spellPanel.AddItem(new MenuItem("spellpanel.Enable", "Enable").SetValue(true));
            spellPanel.AddItem(
                new MenuItem("spellpanel.Targets", "Draw For: ").SetValue(
                    new StringList(new[] { "Both", "Ally Team", "Enemy Team" })));
            var oldMethod = new Menu("OldMethod", "Without Textures");

            oldMethod.AddItem(new MenuItem("spellpanel.OldMethod.Enable", "Enable").SetValue(true));
            oldMethod.AddItem(new MenuItem("spellPanel.distBetweenSpells", "Distance spells").SetValue(new Slider(36, 0, 200)));
            oldMethod.AddItem(new MenuItem("spellPanel.DistBwtweenLvls", "Distance lvls").SetValue(new Slider(6, 0, 200)));
            oldMethod.AddItem(new MenuItem("spellPanel.SizeSpell", "Level size").SetValue(new Slider(3, 1, 25)));
            oldMethod.AddItem(new MenuItem("spellPanel.ExtraPosX", "Extra Position X").SetValue(new Slider(25)));
            oldMethod.AddItem(new MenuItem("spellPanel.ExtraPosY", "Extra Position Y").SetValue(new Slider(125, 0, 400)));
            //---0-0-0-0-0-
            var newMethod = new Menu("New Method", "With Textures");

            newMethod.AddItem(new MenuItem("spellpanel.NewMethod.Enable", "Enable").SetValue(false));
            newMethod.AddItem(new MenuItem("spellpanel.NewMethod.IconSize", "Icon Size").SetValue(new Slider(25, 1, 100)));
            newMethod.AddItem(new MenuItem("spellpanel.NewMethod.SizeLevel", "Text Size (for level)").SetValue(new Slider(50, 0, 150)));
            newMethod.AddItem(new MenuItem("spellpanel.NewMethod.Size", "Text Size (for cooldown/mana)").SetValue(new Slider(50, 0, 150)));
            newMethod.AddItem(new MenuItem("spellpanel.NewMethod.ExtraX", "Extra position X").SetValue(new Slider(0, -150, 150)));
            newMethod.AddItem(new MenuItem("spellpanel.NewMethod.ExtraY", "Extra position Y").SetValue(new Slider(0, -150, 150)));
            //===========================
            ultimate.AddItem(new MenuItem("ultimate.Enable", "Enable").SetValue(true));
            ultimate.AddItem(new MenuItem("ultimate.Icon.Enable", "Draw Icon").SetValue(true));
            ultimate.AddItem(
                new MenuItem("ultimate.Icon.Extra.Enable", "Draw Mana req with cd").SetValue(true)
                .SetTooltip("render lack of mana when spell on cooldown"));
            ultimate.AddItem(
                new MenuItem("ultimate.Type", "Type of drawing").SetValue(
                    new StringList(new[] { "Draw Icon", "Draw Line" }))).ValueChanged += (sender, args) =>
            {
                var newArg    = args.GetNewValue <StringList>().SelectedIndex;
                var newColor  = newArg == 1 ? Color.DarkSlateGray : new Color(195, 186, 173, 255);
                var newColor2 = newArg == 0 ? Color.DarkSlateGray : new Color(195, 186, 173, 255);
                Members.Menu.Item("ultimate.Info").SetFontColor(newColor);
                Members.Menu.Item("ultimate.InfoAlways").SetFontColor(newColor);
                Members.Menu.Item("ultimate.Line.Size").SetFontColor(newColor2);
            };
            ultimate.AddItem(
                new MenuItem("ultimate.Info", "Show details").SetValue(true)
                .SetTooltip("show Ultimate's CD if u put ur mouse on icon"));
            ultimate.AddItem(
                new MenuItem("ultimate.InfoAlways", "Show details all time").SetValue(true)
                .SetTooltip("Show Details should be enabled"));
            ultimate.AddItem(
                new MenuItem("ultimate.Line.Size", "Line Size").SetValue(new Slider(15, 7, 30)));

            //===========================
            health.AddItem(new MenuItem("toppanel.Health.Enable", "Enable").SetValue(true));
            //===========================
            mana.AddItem(new MenuItem("toppanel.Mana.Enable", "Enable").SetValue(true));
            //===========================
            status.AddItem(new MenuItem("toppanel.Status.Enable", "Enable").SetValue(true));
            visionOnAllyHeroes.AddItem(new MenuItem("toppanel.AllyVision.Enable", "Vision on Ally Heroes").SetValue(true)).ValueChanged +=
                (sender, args) =>
            {
                if (!args.GetNewValue <bool>())
                {
                    VisionHelper.Flush();
                }
            };
            var items = new MenuItem[5];

            visionOnAllyHeroes.AddItem(
                new MenuItem("toppanel.AllyVision.Type", "Type:").SetValue(new StringList(new[] { "rectangle", "text" }))).ValueChanged +=
                (sender, args) =>
            {
                var index = args.GetNewValue <StringList>().SelectedIndex;
                if (index == 0)
                {
                    items[0].SetFontColor(Color.Red);
                    items[1].SetFontColor(Color.Green);
                    items[2].SetFontColor(Color.Blue);
                    items[3].SetFontColor(Color.WhiteSmoke);
                    items[4].SetFontColor(Color.GreenYellow);
                }
                else
                {
                    foreach (var menuItem in items)
                    {
                        menuItem.SetFontColor(Color.Gray);
                    }
                    items[4].SetFontColor(Color.Red);
                    VisionHelper.Flush();
                }
            };
            items[4] = visionOnAllyHeroes.AddItem(new MenuItem("text1", "Settings for rectangle:"));
            items[0] = visionOnAllyHeroes.AddItem(new MenuItem("AllyVision.Red", "Red").SetValue(new Slider(0, 0, 255)).SetFontColor(Color.Red));
            items[1] = visionOnAllyHeroes.AddItem(new MenuItem("AllyVision.Green", "Green").SetValue(new Slider(155, 0, 255)).SetFontColor(Color.Green));
            items[2] = visionOnAllyHeroes.AddItem(new MenuItem("AllyVision.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue));
            items[3] = visionOnAllyHeroes.AddItem(new MenuItem("AllyVision.Alpha", "Alpha").SetValue(new Slider(40, 0, 255)).SetFontColor(Color.WhiteSmoke));
            status.AddItem(new MenuItem("toppanel.EnemiesStatus.Enable", "Enemies status").SetValue(true));
            //===========================
            extraPos.AddItem(
                new MenuItem("extraPos.X", "Extra Position for top panel: X").SetValue(new Slider(0, -25, 25)));
            extraPos.AddItem(
                new MenuItem("extraPos.Y", "Extra Position for top panel: Y").SetValue(new Slider(0, -25, 25)));
            //===========================
            roshanTimer.AddItem(new MenuItem("roshanTimer.Enable", "Enable").SetValue(true));
            //===========================
            showMeMore.AddItem(new MenuItem("showmemore.Enable", "Enable").SetValue(true));
            var charge = new Menu("", "charge", false, "spirit_breaker_charge_of_darkness", true);

            charge.AddItem(new MenuItem("tooltip", "When Charge on your Main Hero").SetFontColor(Color.Red));
            charge.AddItem(new MenuItem("charge.Enable", "Enable").SetValue(true));
            charge.AddItem(new MenuItem("charge.Rect.Enable", "Draw red box").SetValue(false));
            charge.AddItem(new MenuItem("charge.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red));
            charge.AddItem(new MenuItem("charge.Green", "Green").SetValue(new Slider(0, 0, 255)).SetFontColor(Color.Green));
            charge.AddItem(new MenuItem("charge.Blue", "Blue").SetValue(new Slider(0, 0, 255)).SetFontColor(Color.Blue));
            charge.AddItem(new MenuItem("charge.Alpha", "Alpha").SetValue(new Slider(4, 0, 255)).SetFontColor(Color.WhiteSmoke));
            //===========================
            var blur = new Menu("", "blur", false, "phantom_assassin_blur", true);

            blur.AddItem(new MenuItem("blur.Enable", "Show PA on minimap").SetValue(true));
            //===========================
            var wr = new Menu("", "wr", false, "windrunner_powershot", true);

            wr.AddItem(new MenuItem("wr.Enable", "Enable").SetValue(true));
            wr.AddItem(new MenuItem("wr.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red));
            wr.AddItem(new MenuItem("wr.Green", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green));
            wr.AddItem(new MenuItem("wr.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue));
            //===========================
            var mirana = new Menu("", "mirana", false, "mirana_arrow", true);

            mirana.AddItem(new MenuItem("mirana.Enable", "Enable").SetValue(true));
            mirana.AddItem(new MenuItem("mirana.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red));
            mirana.AddItem(new MenuItem("mirana.Green", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green));
            mirana.AddItem(new MenuItem("mirana.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue));
            var apparition = new Menu("", "apparition", false, "ancient_apparition_ice_blast", true);

            apparition.AddItem(new MenuItem("apparition.Enable", "Enable").SetValue(true));
            var lina = new Menu("", "lina", false, "lina_light_strike_array", true);

            lina.AddItem(new MenuItem("lina.Enable", "Enable").SetValue(true));
            var invoker = new Menu("", "invoker", false, "invoker_sun_strike", true);

            invoker.AddItem(new MenuItem("invoker.Enable", "Enable").SetValue(true));
            invoker.AddItem(new MenuItem("invoker.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red));
            invoker.AddItem(new MenuItem("invoker.Green", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green));
            invoker.AddItem(new MenuItem("invoker.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue));
            var lesh = new Menu("", "lesh", false, "leshrac_split_earth", true);

            lesh.AddItem(new MenuItem("lesh.Enable", "Enable").SetValue(true));
            var kunkka = new Menu("", "kunkka", false, "kunkka_torrent", true);

            kunkka.AddItem(new MenuItem("kunkka.Enable", "Enable").SetValue(true));
            kunkka.AddItem(new MenuItem("kunkka.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red));
            kunkka.AddItem(new MenuItem("kunkka.Green", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green));
            kunkka.AddItem(new MenuItem("kunkka.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue));
            var tech = new Menu("", "tech", false, "npc_dota_hero_techies", true);

            tech.AddItem(new MenuItem("tech.Enable", "Enable").SetValue(true));
            var tinker = new Menu("", "tinker", false, "npc_dota_hero_tinker", true);

            tinker.AddItem(new MenuItem("tinker.Enable", "Enable").SetValue(true));
            var lifestealer = new Menu("", "life stealer", false, "life_stealer_infest", true);

            lifestealer.AddItem(new MenuItem("lifestealer.Enable", "Enable").SetValue(true));
            lifestealer.AddItem(new MenuItem("lifestealer.Icon.Enable", "Draw icon near hero").SetValue(false));
            lifestealer.AddItem(new MenuItem("lifestealer.creeps.Enable", "Draw icon near creep").SetValue(false));
            var arc = new Menu("", "arc", textureName: "arc_warden_spark_wraith", showTextWithTexture: true);

            arc.AddItem(new MenuItem("arc.Enable", "Enable").SetValue(true));
            var scan = new Menu("Enemy Scanning Ability", "Scan");

            scan.AddItem(new MenuItem("scan.Enable", "Enable").SetValue(true));
            var courEsp = new Menu("Courier on Minimap", "Cour");

            courEsp.AddItem(new MenuItem("Cour.Enable", "Enable").SetValue(true));
            var linkenEsp = new Menu("linken Esp", "linkenEsp", textureName: "item_sphere", showTextWithTexture: true);

            linkenEsp.AddItem(new MenuItem("linkenEsp.Enable", "Enable").SetValue(true))
            .SetTooltip("will create a linken effect on hero");
            //var cour = new Menu("Courier", "Courier");
            //cour.AddItem(new MenuItem("Courier.Enable", "Enable").SetValue(true)).SetTooltip("draw courier position on minimap");
            //===========================
            showIllusion.AddItem(new MenuItem("showillusion.Enable", "Enable").SetValue(true));
            showIllusion.AddItem(
                new MenuItem("showillusion.Type", "Type").SetValue(new StringList(new[] { "Smoke", "new 1", "new 2", "balloons" }, 2)));
            showIllusion.AddItem(new MenuItem("showillusion.X", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red));
            showIllusion.AddItem(new MenuItem("showillusion.Y", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green));
            showIllusion.AddItem(new MenuItem("showillusion.Z", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue));
            showIllusion.AddItem(new MenuItem("showillusion.Alpha", "Alpha").SetValue(new Slider(40, 0, 255)));
            showIllusion.AddItem(new MenuItem("showillusion.Size", "Size").SetValue(new Slider(120, 1, 250)));
            //===========================
            runevision.AddItem(new MenuItem("runevision.Enable", "Enable").SetValue(true));
            runevision.AddItem(new MenuItem("runevision.PrintText.Enable", "Print text on rune-spawning").SetValue(true));
            runevision.AddItem(new MenuItem("runevision.DrawOnMinimap.Enable", "Draw rune on minimap").SetValue(true));
            //===========================
            var itemOverlay = new Menu("Item overlay", "itemOverlay");

            itemOverlay.AddItem(new MenuItem("itemOverlay.Enable", "Enable").SetValue(false)).SetTooltip("will show all items on heroes");
            itemOverlay.AddItem(new MenuItem("itemOverlay.DrawCharges", "Draw Charges").SetValue(true));
            itemOverlay.AddItem(new MenuItem("itemOverlay.Size", "Size").SetValue(new Slider(100, 1, 200)));
            itemOverlay.AddItem(new MenuItem("itemOverlay.Extra", "Extra").SetValue(new Slider(26, 1, 100)));
            itemOverlay.AddItem(new MenuItem("itemOverlay.Ally", "Enable for ally").SetValue(true));
            itemOverlay.AddItem(new MenuItem("itemOverlay.Enemy", "Enable for enemy").SetValue(true));
            itemOverlay.AddItem(new MenuItem("itemOverlay.Cour", "Enable for couriers").SetValue(true)).SetTooltip("only for enemy");
            var tpCatcher = new Menu("TP Catcher", "TpCather");

            tpCatcher.AddItem(new MenuItem("TpCather.Enable", "Enable").SetValue(true));
            tpCatcher.AddItem(new MenuItem("TpCather.Ally", "For Ally").SetValue(true));
            tpCatcher.AddItem(new MenuItem("TpCather.Enemy", "For Enemy").SetValue(true));
            tpCatcher.AddItem(new MenuItem("TpCather.Map", "Draw on Map").SetValue(true));
            tpCatcher.AddItem(new MenuItem("TpCather.MiniMap", "Draw on MiniMap").SetValue(true));
            tpCatcher.AddItem(
                new MenuItem("TpCather.MiniMap.Type", "Draw on MiniMap Hero Icon or Rectangle").SetValue(true))
            .SetTooltip("true=icon; false=rectangle");
            tpCatcher.AddItem(new MenuItem("TpCather.MiniMap.Size", "MiniMap Size").SetValue(new Slider(20, 5, 30))).ValueChanged += TeleportCatcher.OnValueChanged;
            tpCatcher.AddItem(new MenuItem("TpCather.Map.Size", "Map Size").SetValue(new Slider(50, 5, 50)));
            tpCatcher.AddItem(new MenuItem("TpCather.DrawLines", "Draw lines").SetValue(false));
            tpCatcher.AddItem(new MenuItem("TpCather.SmartDrawingColors", "Use smart colors for drawing").SetValue(true));
            tpCatcher.AddItem(new MenuItem("TpCather.EnableSideMessage", "Enable side notifications").SetValue(true)).SetTooltip("only for enemy");
            tpCatcher.AddItem(new MenuItem("TpCather.ExtraTimeForDrawing", "Draw icon extra few seconds after tp").SetValue(true));
            var tpCatcherTimer = new Menu("TP Timer", "TpCatherTimer");

            tpCatcherTimer.AddItem(new MenuItem("TpCather.Timer", "Enable timer").SetValue(true));
            tpCatcherTimer.AddItem(new MenuItem("TpCather.Timer.Size", "Text Size").SetValue(new Slider(17, 5, 25)));

            /*var hitCather = new Menu("Hit Catcher", "HitCatcher");
             * hitCather.AddItem(new MenuItem("HitCatcher.Enable", "Enable").SetValue(true));
             * hitCather.AddItem(new MenuItem("HitCatcher.Map", "Draw on Map").SetValue(true));
             * hitCather.AddItem(new MenuItem("HitCatcher.MiniMap", "Draw on MiniMap").SetValue(true));
             * hitCather.AddItem(new MenuItem("HitCatcher.DrawLineOnMap", "Draw Line on Map").SetValue(true));*/
            var manaBars = new Menu("Manabars", "manaBars");

            manaBars.AddItem(new MenuItem("manaBars.Enable", "Enable").SetValue(true));
            manaBars.AddItem(new MenuItem("manaBars.Nums.Enable", "Enable digital values").SetValue(true));
            manaBars.AddItem(new MenuItem("manaBars.Nums.Size", "Dig Size").SetValue(new Slider(75, 1, 150)));
            manaBars.AddItem(new MenuItem("manaBars.Size", "Size").SetValue(new Slider(75, 1, 150)));

            manaBars.AddItem(new MenuItem("manaBars.Red", "Red").SetValue(new Slider(65, 0, 255)).SetFontColor(Color.Red));
            manaBars.AddItem(new MenuItem("manaBars.Green", "Green").SetValue(new Slider(105, 0, 255)).SetFontColor(Color.Green));
            manaBars.AddItem(new MenuItem("manaBars.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue));

            //var dangItem = new Menu("Dangerous items", "dangitems");
            itemOverlay.AddItem(new MenuItem("itemOverlay.DangItems", "Draw only dangerous items").SetValue(false)).SetTooltip("show if enemy has Dangerous items. Working only for enemy heroes");
            itemOverlay.AddItem(new MenuItem("itemOverlay.OldMethod", "Use old method for drawing dangItems").SetValue(false));

            var dict = new Dictionary <string, bool>
            {
                { "item_gem", true },
                { "item_dust", true },
                { "item_sphere", true },
                { "item_blink", true },
                { "item_ward_observer", true },
                { "item_ward_sentry", true },
                { "item_black_king_bar", true },
                { "item_invis_sword", true },
                { "item_silver_edge", true },
                { "item_ward_dispenser", true }
            };

            itemOverlay.AddItem(new MenuItem("itemOverlay.List", "Items: ").SetValue(new AbilityToggler(dict)));
            //===========================
            autoItems.AddItem(new MenuItem("autoitems.Enable", "Enable").SetValue(true));
            autoItems.AddItem(new MenuItem("autoItems.Percent", "Health(%) for auto stick").SetValue(new Slider(15)));
            autoItems.AddItem(new MenuItem("autoItems.Percent2", "Mana(%) for auto stick").SetValue(new Slider(15)));
            var autoitemlist = new Dictionary <string, bool>
            {
                { "item_magic_wand", true },
                { "item_phase_boots", true },
                { "item_hand_of_midas", true }
            };

            autoItems.AddItem(new MenuItem("autoitems.List", "Items:").SetValue(new AbilityToggler(autoitemlist)));
            //===========================
            var lastPosition = new Menu("Last position", "lastPosition");

            lastPosition.AddItem(new MenuItem("lastPosition.Enable", "Enable").SetValue(true)).SetTooltip("show last positions of enemies");
            lastPosition.AddItem(new MenuItem("lastPosition.Enable.Prediction", "Enable Prediction").SetValue(true));
            lastPosition.AddItem(new MenuItem("lastPosition.Enable.Map", "on Map").SetValue(false));
            lastPosition.AddItem(new MenuItem("lastPosition.Map.X", "icon size").SetValue(new Slider(50, 10, 150)));
            lastPosition.AddItem(new MenuItem("lastPosition.Enable.Minimap", "on Minimap").SetValue(true));
            lastPosition.AddItem(new MenuItem("lastPosition.Minimap.X", "icon size").SetValue(new Slider(20, 10, 150)));

            //===========================
            var netWorth = new Menu("NetWorth Graph", "netWorth");

            netWorth.AddItem(new MenuItem("netWorth.Enable", "Enable").SetValue(true)).SetTooltip("draw networth graph based on item cost");
            netWorth.AddItem(new MenuItem("netWorth.Order", "Sort Players").SetValue(true));
            netWorth.AddItem(
                new MenuItem("netWorth.X", "Position: X").SetValue(new Slider(0, 0, 2000)));
            netWorth.AddItem(
                new MenuItem("netWorth.Y", "Position: Y").SetValue(new Slider(0, 0, 2000)));
            netWorth.AddItem(new MenuItem("netWorth.SizeX", "SizeX").SetValue(new Slider(255, 1, 255)));
            netWorth.AddItem(new MenuItem("netWorth.SizeY", "SizeY").SetValue(new Slider(174, 1, 255)));
            netWorth.AddItem(new MenuItem("netWorth.Red", "Red").SetValue(new Slider(141, 0, 255)).SetFontColor(Color.Red));
            netWorth.AddItem(new MenuItem("netWorth.Green", "Green").SetValue(new Slider(182, 0, 255)).SetFontColor(Color.Green));
            netWorth.AddItem(new MenuItem("netWorth.Blue", "Blue").SetValue(new Slider(98, 0, 255)).SetFontColor(Color.Blue));
            //===========================
            var netWorthBar = new Menu("NetWorth Bar", "netWorthBar");

            netWorthBar.AddItem(new MenuItem("netWorthBar.Enable", "Enable").SetValue(true)).SetTooltip("draw networth bar based on item cost");
            netWorthBar.AddItem(new MenuItem("netWorthBar.Percents.Enable", "Draw percent").SetValue(true));
            netWorthBar.AddItem(new MenuItem("netWorthBar.TeamWorth.Enable", "Draw Team Networth").SetValue(true));
            netWorthBar.AddItem(new MenuItem("netWorthBar.Size", "Size").SetValue(new Slider(20, 1, 255)));
            netWorthBar.AddItem(new MenuItem("netWorthBar.coef", "Team Netwoth Text Size").SetValue(new Slider(15, 1, 25)));
            var netWorthBarColors = new Menu("Colors", "netWorthBar.colors");
            var radiantColor      = new Menu("Ally Color", "netWorthBar.colors.radiant");

            radiantColor.AddItem(new MenuItem("netWorthBar.Radiant.Red", "Red").SetValue(new Slider(0, 0, 255)).SetFontColor(Color.Red));
            radiantColor.AddItem(new MenuItem("netWorthBar.Radiant.Green", "Green").SetValue(new Slider(155, 0, 255)).SetFontColor(Color.Green));
            radiantColor.AddItem(new MenuItem("netWorthBar.Radiant.Blue", "Blue").SetValue(new Slider(0, 0, 255)).SetFontColor(Color.Blue));
            radiantColor.AddItem(new MenuItem("netWorthBar.Radiant.Alpha", "Alpha").SetValue(new Slider(155, 0, 255)).SetFontColor(Color.LightGray));
            var direColor = new Menu("Enemy Color", "netWorthBar.colors.dire");

            direColor.AddItem(new MenuItem("netWorthBar.Dire.Red", "Red").SetValue(new Slider(155, 0, 255)).SetFontColor(Color.Red));
            direColor.AddItem(new MenuItem("netWorthBar.Dire.Green", "Green").SetValue(new Slider(0, 0, 255)).SetFontColor(Color.Green));
            direColor.AddItem(new MenuItem("netWorthBar.Dire.Blue", "Blue").SetValue(new Slider(0, 0, 255)).SetFontColor(Color.Blue));
            direColor.AddItem(new MenuItem("netWorthBar.Dire.Alpha", "Alpha").SetValue(new Slider(155, 0, 255)).SetFontColor(Color.LightGray));
            //===========================
            var dmgCalc = new Menu("Damage Calculation", "dmgCalc");

            dmgCalc.AddItem(new MenuItem("dmgCalc.Enable", "Enable").SetValue(true)).SetTooltip("showing dmg from ur abilities");
            dmgCalc.AddItem(new MenuItem("dmgCalc.Abilities", "Abilities: ").SetValue(new AbilityToggler(new Dictionary <string, bool>())));
            var defCol      = new Menu("Default Color", "clrDef");
            var killableCol = new Menu("Color, When skills damage is enough", "clrEno");

            defCol.AddItem(new MenuItem("defCol.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red));
            defCol.AddItem(new MenuItem("defCol.Green", "Green").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Green));
            defCol.AddItem(new MenuItem("defCol.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue));
            killableCol.AddItem(new MenuItem("killableCol.Red", "Red").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Red));
            killableCol.AddItem(new MenuItem("killableCol.Green", "Green").SetValue(new Slider(100, 0, 255)).SetFontColor(Color.Green));
            killableCol.AddItem(new MenuItem("killableCol.Blue", "Blue").SetValue(new Slider(100, 0, 255)).SetFontColor(Color.Blue));
            //===========================
            var shrineHelper = new Menu("Shrine Helper", "shrineHelper");

            shrineHelper.AddItem(new MenuItem("shrineHelper.DrawStatus", "Draw Status").SetValue(true));
            shrineHelper.AddItem(new MenuItem("shrineHelper.Size", "Status Size").SetValue(new Slider(15, 1, 150)));
            shrineHelper.AddItem(new MenuItem("shrineHelper.Nums.Enable", "Draw Numbers").SetValue(true));
            shrineHelper.AddItem(new MenuItem("shrineHelper.Nums.Size", "Dig Size").SetValue(new Slider(100, 1, 150)));
            shrineHelper.AddItem(new MenuItem("shrineHelper.Range", "Draw range").SetValue(true))
            .SetTooltip("if dist <=700 and shrine can heal");
            shrineHelper.AddItem(
                new MenuItem("shrineHelper.Red", "Red").SetValue(new Slider(0, 0, 255)).SetFontColor(Color.Red))
            .ValueChanged += ShrineHelper.OnChange;
            shrineHelper.AddItem(
                new MenuItem("shrineHelper.Green", "Green").SetValue(new Slider(155, 0, 255)).SetFontColor(Color.Green))
            .ValueChanged += ShrineHelper.OnChange;
            shrineHelper.AddItem(
                new MenuItem("shrineHelper.Blue", "Blue").SetValue(new Slider(255, 0, 255)).SetFontColor(Color.Blue))
            .ValueChanged += ShrineHelper.OnChange;
            shrineHelper.AddItem(new MenuItem("shrineHelper.Alpha", "Alpha").SetValue(new Slider(255, 0, 255)))
            .ValueChanged += ShrineHelper.OnChange;
            //===========================
            var openDota = new Menu("OpenDota info", "OpenDota");

            openDota.AddItem(new MenuItem("OpenDota.Enable", "Enable").SetValue(true))
            .SetTooltip("will show wr, solo/part mmr & last 5 ranked games for each players on hero picking stage");
            //===========================
            var devolper = new Menu("Developer", "Developer");

            devolper.AddItem(new MenuItem("Dev.Hax.enable", "Hax in lobby").SetValue(false));
            devolper.AddItem(new MenuItem("Dev.Text.enable", "Debug messages").SetValue(false));
            devolper.AddItem(new MenuItem("Dev.CreepsDisabler.enable", "Disable spawn creeps").SetValue(false))
            .ValueChanged +=
                (sender, args) =>
            {
                var type = args.GetNewValue <bool>() ? "enable" : "disable";
                Game.ExecuteCommand($"dota_creeps_no_spawning_{type}");
            };
            //===========================
            spellPanel.AddSubMenu(oldMethod);
            spellPanel.AddSubMenu(newMethod);
            topPanel.AddSubMenu(ultimate);
            topPanel.AddSubMenu(health);
            topPanel.AddSubMenu(mana);
            topPanel.AddSubMenu(status);
            topPanel.AddSubMenu(extraPos);
            page1.AddSubMenu(topPanel);
            page1.AddSubMenu(spellPanel);
            page1.AddSubMenu(roshanTimer);
            page1.AddSubMenu(showMeMore);
            showMeMore.AddSubMenu(charge);
            showMeMore.AddSubMenu(blur);
            showMeMore.AddSubMenu(wr);
            showMeMore.AddSubMenu(mirana);
            showMeMore.AddSubMenu(apparition);
            showMeMore.AddSubMenu(lina);
            showMeMore.AddSubMenu(invoker);
            showMeMore.AddSubMenu(kunkka);
            showMeMore.AddSubMenu(lesh);
            showMeMore.AddSubMenu(lifestealer);
            showMeMore.AddSubMenu(tech);
            showMeMore.AddSubMenu(tinker);
            showMeMore.AddSubMenu(arc);
            showMeMore.AddSubMenu(scan);
            showMeMore.AddSubMenu(courEsp);
            showMeMore.AddSubMenu(linkenEsp);
            page1.AddSubMenu(showIllusion);
            page1.AddSubMenu(runevision);
            //settings.AddSubMenu(dangItem);
            settings.AddSubMenu(page1);
            settings.AddSubMenu(page2);
            page1.AddSubMenu(itemPanel);
            page1.AddSubMenu(itemOverlay);
            page2.AddSubMenu(manaBars);
            page2.AddSubMenu(autoItems);
            page2.AddSubMenu(lastPosition);
            page2.AddSubMenu(netWorth);
            page2.AddSubMenu(netWorthBar);
            netWorthBar.AddSubMenu(netWorthBarColors);
            netWorthBarColors.AddSubMenu(radiantColor);
            netWorthBarColors.AddSubMenu(direColor);
            page2.AddSubMenu(dmgCalc);
            page2.AddSubMenu(tpCatcher);
            page2.AddSubMenu(shrineHelper);
            page2.AddSubMenu(openDota);
            dmgCalc.AddSubMenu(defCol);
            dmgCalc.AddSubMenu(killableCol);
            tpCatcher.AddSubMenu(tpCatcherTimer);
            status.AddSubMenu(visionOnAllyHeroes);

            Members.Menu.AddSubMenu(settings);
            Members.Menu.AddSubMenu(devolper);

            Members.HeroesList        = new HeroesList();
            Members.Manabars          = new Manabars();
            Members.ItemOverlay       = new ItemOverlay();
            Members.DamageCalculation = new DamageCalculation();
            Members.AbilityOverlay    = new AbilityOverlay();

            if (Drawing.RenderMode == RenderMode.Dx9)
            {
                if (Drawing.Direct3DDevice9 != null)
                {
                    Members.RoshanFont = new Font(
                        Drawing.Direct3DDevice9,
                        new FontDescription
                    {
                        FaceName        = "Tahoma",
                        Height          = 15,
                        OutputPrecision = FontPrecision.Default,
                        Quality         = FontQuality.Default
                    });
                }
            }

            /*var sleeper=new Sleeper();
             * Game.OnUpdate += args =>
             * {
             *  if (sleeper.Sleeping)
             *      return;
             *  sleeper.Sleep(250);
             *  Printer.Print("asd");
             *  Unit test = null;
             *  Printer.Print(test.ClassId.ToString());
             * };*/
            Members.Menu.AddToMainMenu();
        }