Beispiel #1
0
        /// <summary>
        ///     Initializes this instance.
        /// </summary>
        internal static void Initialize()
        {
            menu = new Menu("Hacks", "Hacks");

            MenuAntiAfk = menu.AddItem(new MenuItem("AfkHack", "Anti-AFK").SetValue(false));
            MenuAntiAfk.ValueChanged += (sender, args) => EloBuddy.Hacks.AntiAFK = args.GetNewValue <bool>();

            MenuDisableDrawings = menu.AddItem(new MenuItem("DrawingHack", "Disable Drawing").SetValue(false));
            MenuDisableDrawings.ValueChanged +=
                (sender, args) => EloBuddy.Hacks.DisableDrawings = args.GetNewValue <bool>();
            MenuDisableDrawings.SetValue(EloBuddy.Hacks.DisableDrawings);

            MenuDisableSay =
                menu.AddItem(
                    new MenuItem("SayHack", "Disable L# Send Chat").SetValue(false)
                    .SetTooltip("Block Game.Say from Assemblies"));
            MenuDisableSay.ValueChanged +=
                (sender, args) => EloBuddy.Hacks.IngameChat = args.GetNewValue <bool>();

            MenuTowerRange = menu.AddItem(new MenuItem("TowerHack", "Show Tower Ranges").SetValue(false));
            MenuTowerRange.ValueChanged +=
                (sender, args) => EloBuddy.Hacks.TowerRanges = args.GetNewValue <bool>();

            EloBuddy.Hacks.AntiAFK         = MenuAntiAfk.GetValue <bool>();
            EloBuddy.Hacks.DisableDrawings = MenuDisableDrawings.GetValue <bool>();
            EloBuddy.Hacks.IngameChat      = !MenuDisableSay.GetValue <bool>();
            EloBuddy.Hacks.TowerRanges     = MenuTowerRange.GetValue <bool>();

            CommonMenu.Instance.AddSubMenu(menu);

            Game.OnWndProc += args =>
            {
                if (!MenuDisableDrawings.GetValue <bool>())
                {
                    return;
                }

                if ((int)args.WParam != Config.ShowMenuPressKey)
                {
                    return;
                }

                if (args.Msg == WM_KEYDOWN)
                {
                    EloBuddy.Hacks.DisableDrawings = false;
                }

                if (args.Msg == WM_KEYUP)
                {
                    EloBuddy.Hacks.DisableDrawings = true;
                }
            };
        }
Beispiel #2
0
        /// <summary>
        ///     Create the menu
        /// </summary>
        private static void CreateMenu()
        {
            placetosave = new Menu("PermaShow", "Permashow");
            var enablepermashow = new MenuItem("enablepermashow", "Enable PermaShow").SetValue(true);

            placetosave.AddItem(enablepermashow);
            var xvalue = new MenuItem("X", "X").SetValue(new Slider((int)DefaultPosition.X, 0, Drawing.Width));
            var yvalue = new MenuItem("Y", "Y").SetValue(new Slider((int)DefaultPosition.Y, 0, Drawing.Height));

            xvalue.ShowItem = false;
            yvalue.ShowItem = false;
            placetosave.AddItem(xvalue);
            placetosave.AddItem(yvalue);

            var bigwidth   = new MenuItem("bwidth", "Width").SetValue(new Slider((int)DefaultPermaShowWidth, 100, 400));
            var smallwidth =
                new MenuItem("swidth", "Indicator Width").SetValue(new Slider((int)DefaultSmallBoxWidth, 30, 90));

            var moveable = new MenuItem("moveable", "Moveable").SetValue(true);

            placetosave.AddItem(moveable);
            placetosave.AddItem(bigwidth);
            placetosave.AddItem(smallwidth);

            var def = new MenuItem("defaults", "Default").SetValue(false);

            def.ValueChanged += (sender, args) =>
            {
                if (args.GetNewValue <bool>())
                {
                    bigwidth.SetValue(new Slider((int)DefaultPermaShowWidth, 100, 400));
                    smallwidth.SetValue(new Slider((int)DefaultSmallBoxWidth, 30, 90));
                }
            };

            placetosave.AddItem(def);

            CommonMenu.Instance.AddSubMenu(placetosave);

            enablepermashow.ValueChanged += (sender, args) =>
            {
                if (args.GetNewValue <bool>() && !subbed)
                {
                    Sub();
                }
                else if (!args.GetNewValue <bool>())
                {
                    Unsub();
                }
            };
        }