コード例 #1
0
        public SpellConfigControl(Menu menu, string label, SpellData spell, bool enableSpell)
        {
            _menu = menu;
            _spell = spell;
            _menu.AddGroupLabel(label);

            DodgeCheckBox = new DynamicCheckBox(ConfigDataType.Spells, spell.SpellName, "Dodge", enableSpell, true, SpellConfigProperty.Dodge);
            DrawCheckBox = new DynamicCheckBox(ConfigDataType.Spells, spell.SpellName, "Draw", enableSpell, true, SpellConfigProperty.Draw);
            SpellRadiusSlider = new DynamicSlider(ConfigDataType.Spells, spell.SpellName, "Radius", (int)spell.Radius, (int)spell.Radius - 100, (int)spell.Radius + 100, true, SpellConfigProperty.Radius);
            DangerLevelSlider = new StringSlider(ConfigDataType.Spells, spell.SpellName, "Danger Level", (int) spell.Dangerlevel,SpellConfigProperty.DangerLevel, DangerLevels);
        }
コード例 #2
0
        public EvadeSpellConfigControl(Menu menu, string menuName, EvadeSpellData spell )
        {

            UseSpellCheckBox = new DynamicCheckBox(ConfigDataType.EvadeSpell, spell.Name, "Use Spell", true, true, SpellConfigProperty.UseEvadeSpell);
            DangerLevelSlider = new StringSlider(ConfigDataType.EvadeSpell, spell.Name, "Danger Level", (int) spell.Dangerlevel, SpellConfigProperty.DangerLevel, SpellConfigControl.DangerLevels);
            SpellModeSlider = new StringSlider(ConfigDataType.EvadeSpell, spell.Name, "Spell Mode", (int)EvadeSpell.GetDefaultSpellMode(spell), SpellConfigProperty.SpellMode, SpellModes);
            menu.AddGroupLabel(menuName);
            menu.Add(spell.Name + "UseEvadeSpell", UseSpellCheckBox.CheckBox);
            menu.Add(spell.Name + "EvadeSpellDangerLevel", DangerLevelSlider.Slider.Slider);
            menu.Add(spell.Name + "EvadeSpellMode", SpellModeSlider.Slider.Slider);
            Properties.SetEvadeSpell(spell.Name, new EvadeSpellConfig { DangerLevel = spell.Dangerlevel, Use = true, SpellMode = EvadeSpell.GetDefaultSpellMode(spell) });
        }
コード例 #3
0
        private void Game_OnGameLoad(EventArgs args)
        {
            ConsoleDebug.WriteLineColor("Loading...", ConsoleColor.Blue, true);
            ConfigPluginControler.LoadConfigPresets();

            try
            {
                Menu = MainMenu.AddMenu("AdEvade", "AdEvade");
                ConsoleDebug.WriteLineColor("   Creating Menu...", ConsoleColor.Yellow, true);
                Menu.AddGroupLabel("AdEvade (EzEvade Port)");
                Menu.AddLabel("Please report any bugs or anything you think is a ");
                Menu.AddLabel("problem / issue, on the GitHub Issues Section, or with a reply to the AdEvade forum thread.");
                Menu.Add("OpenGithub", new CheckBox("Open Github's Issues Section in browser", false)).OnValueChange +=
                    delegate(ValueBase<bool> sender, ValueBase<bool>.ValueChangeArgs changeArgs)
                    {
                        if (changeArgs.OldValue == false && changeArgs.NewValue)
                        {
                            sender.CurrentValue = false;
                            Process.Start(@"https://github.com/coman3/EloBuddy.Addons/issues");
                        }
                    };
                Menu.AddLabel("All Credit for the actual evading (Movement and detection) in this assembly ");
                Menu.AddLabel("goes to the creator of EzEvade.");
                Menu.AddSeparator(100);

                Menu.AddLabel("Created By: Coman3");
                Menu.AddLabel("     Github: https://github.com/coman3/");
                Menu.Add("OpenGithubComan3", new CheckBox("Open Coman3's Github in Browser", false)).OnValueChange +=
                   delegate (ValueBase<bool> sender, ValueBase<bool>.ValueChangeArgs changeArgs)
                   {
                       if (changeArgs.OldValue == false && changeArgs.NewValue)
                       {
                           sender.CurrentValue = false;
                           Process.Start(@"https://github.com/coman3/");
                       }
                   };
                Menu.AddLabel("Last Update: " + LastUpdate);

                Menu mainMenu = Menu.AddSubMenu("Main", "Main");
                mainMenu.Add(ConfigValue.DodgeSkillShots.Name(), new DynamicKeyBind(ConfigValue.DodgeSkillShots, "Dodge SkillShots", true, KeyBind.BindTypes.PressToggle, 'K').KeyBind);
                mainMenu.Add(ConfigValue.ActivateEvadeSpells.Name(), new DynamicKeyBind(ConfigValue.ActivateEvadeSpells, "Use Evade Spells", true, KeyBind.BindTypes.PressToggle, 'K').KeyBind);
                mainMenu.Add(ConfigValue.OnlyDodgeDangerous.Name(), new DynamicCheckBox(ConfigDataType.Data, ConfigValue.OnlyDodgeDangerous, "Dodge Only Dangerous", false).CheckBox);
                mainMenu.Add(ConfigValue.DodgeFowSpells.Name(), new DynamicCheckBox(ConfigDataType.Data, ConfigValue.DodgeFowSpells, "Dodge FOW SkillShots", true).CheckBox);
                mainMenu.Add(ConfigValue.DodgeCircularSpells.Name(), new DynamicCheckBox(ConfigDataType.Data, ConfigValue.DodgeCircularSpells, "Dodge Circular SkillShots", true).CheckBox);
                mainMenu.AddSeparator();
                mainMenu.Add(ConfigValue.DodgeDangerousKeysEnabled.Name(), new DynamicCheckBox(ConfigDataType.Data, ConfigValue.DodgeDangerousKeysEnabled, "Enable Dodge Only Dangerous Keys", false).CheckBox);

                mainMenu.Add(ConfigValue.DodgeDangerousKey1.Name(), new DynamicKeyBind(ConfigValue.DodgeDangerousKey1, "Dodge Only Dangerous Key", false, KeyBind.BindTypes.HoldActive, 32).KeyBind);
                mainMenu.Add(ConfigValue.DodgeDangerousKey2.Name(), new DynamicKeyBind(ConfigValue.DodgeDangerousKey2, "Dodge Only Dangerous Key 2", false, KeyBind.BindTypes.HoldActive, 'V').KeyBind);

                mainMenu.AddSeparator();
                mainMenu.AddGroupLabel("Evade Mode");

                var sliderEvadeMode = new StringSlider(ConfigDataType.Data, "EvadeMode", "Evade Mode", 2, SpellConfigProperty.None, Enum.GetNames(typeof(EvadeMode)));
                sliderEvadeMode.Slider.Slider.OnValueChange += OnEvadeModeChange;
                mainMenu.Add("EvadeMode", sliderEvadeMode.Slider.Slider);

                ConsoleDebug.WriteLineColor("       Detecting Spells...", ConsoleColor.Yellow, true);
                SpellDetector = new SpellDetector(Menu);
                _evadeSpell = new EvadeSpell(Menu);

                ConsoleDebug.WriteLineColor("       Adding Humanizer and Miscellaneous Menus...", ConsoleColor.Yellow, true);
                Menu miscMenu = Menu.AddSubMenu("Misc Settings", "MiscSettings");
                miscMenu.Add(ConfigValue.HighPrecision.Name(), new DynamicCheckBox(ConfigDataType.Data, ConfigValue.HighPrecision, "Enhanced Dodge Precision", false).CheckBox);
                miscMenu.Add(ConfigValue.RecalculatePath.Name(), new DynamicCheckBox(ConfigDataType.Data, ConfigValue.RecalculatePath, "Recalculate Path", true).CheckBox);
                miscMenu.Add(ConfigValue.ContinueMovement.Name(), new DynamicCheckBox(ConfigDataType.Data, ConfigValue.ContinueMovement, "Continue Last Movement", true).CheckBox);
                miscMenu.Add(ConfigValue.CalculateWindupDelay.Name(), new DynamicCheckBox(ConfigDataType.Data, ConfigValue.CalculateWindupDelay, "Calculate Windup Delay", true).CheckBox);
                miscMenu.Add(ConfigValue.CheckSpellCollision.Name(), new DynamicCheckBox(ConfigDataType.Data, ConfigValue.CheckSpellCollision, "Check Spell Collision", false).CheckBox);
                miscMenu.Add(ConfigValue.PreventDodgingUnderTower.Name(), new DynamicCheckBox(ConfigDataType.Data, ConfigValue.PreventDodgingUnderTower, "Prevent Dodging Under Tower", false).CheckBox);
                miscMenu.Add(ConfigValue.PreventDodgingNearEnemy.Name(), new DynamicCheckBox(ConfigDataType.Data, ConfigValue.PreventDodgingNearEnemy, "Prevent Dodging Near Enemies", false).CheckBox);
                miscMenu.Add(ConfigValue.AdvancedSpellDetection.Name(), new DynamicCheckBox(ConfigDataType.Data, ConfigValue.AdvancedSpellDetection, "Advanced Spell Detection", false).CheckBox);
                miscMenu.Add(ConfigValue.ExtraDetectionRange.Name(), new DynamicSlider(ConfigDataType.Data, ConfigValue.ExtraDetectionRange, "Extra Detection Range", 1000, 500, 5000).Slider);
                //TODO: Add Reset
                //miscMenu.AddSeparator(100);
                //miscMenu.AddGroupLabel("Reset");
                //miscMenu.Add("ResetConfig", new DynamicCheckBox(ConfigDataType.Data, "ResetConfig", "Reset Properties", false).CheckBox);

                Menu fastEvadeMenu = Menu.AddSubMenu("Fast Evade", "FastEvade");
                fastEvadeMenu.Add(ConfigValue.FastMovementBlock.Name(), new DynamicCheckBox(ConfigDataType.Data, ConfigValue.FastMovementBlock, "Fast Movement Block", false).CheckBox);
                fastEvadeMenu.Add(ConfigValue.FastEvadeActivationTime.Name(), new DynamicSlider(ConfigDataType.Data, ConfigValue.FastEvadeActivationTime, "FastEvade Activation Time", 65, 0, 500).Slider);
                fastEvadeMenu.Add(ConfigValue.SpellActivationTime.Name(), new DynamicSlider(ConfigDataType.Data, ConfigValue.SpellActivationTime, "Spell Activation Time", 200, 0, 1000).Slider);
                fastEvadeMenu.Add(ConfigValue.RejectMinDistance.Name(), new DynamicSlider(ConfigDataType.Data, ConfigValue.RejectMinDistance, "Collision Distance Buffer", 10, 0, 100).Slider);

                Menu limiterMenu = Menu.AddSubMenu("Humanizer", "Limiter");
                limiterMenu.Add(ConfigValue.ClickOnlyOnce.Name(), new DynamicCheckBox(ConfigDataType.Data, ConfigValue.ClickOnlyOnce, "Click Only Once", true).CheckBox);
                limiterMenu.Add(ConfigValue.EnableEvadeDistance.Name(), new DynamicCheckBox(ConfigDataType.Data, ConfigValue.EnableEvadeDistance, "Extended Evade", false).CheckBox);
                limiterMenu.Add(ConfigValue.TickLimiter.Name(), new DynamicSlider(ConfigDataType.Data, ConfigValue.TickLimiter, "Tick Limiter", 100, 0, 500).Slider);
                limiterMenu.Add(ConfigValue.SpellDetectionTime.Name(), new DynamicSlider(ConfigDataType.Data, ConfigValue.SpellDetectionTime, "Spell Detection Time", 0, 0, 1000).Slider);
                limiterMenu.Add(ConfigValue.ReactionTime.Name(), new DynamicSlider(ConfigDataType.Data, ConfigValue.ReactionTime, "Reaction Time", 0, 0, 500).Slider);
                limiterMenu.Add(ConfigValue.DodgeInterval.Name(), new DynamicSlider(ConfigDataType.Data, ConfigValue.DodgeInterval, "Dodge Interval", 0, 0, 2000).Slider);
                

                Menu bufferMenu = Menu.AddSubMenu("Adv. Humanizer", "ExtraBuffers");
                bufferMenu.Add(ConfigValue.ExtraPingBuffer.Name(), new DynamicSlider(ConfigDataType.Data, ConfigValue.ExtraPingBuffer, "Extra Ping Buffer", 65, 0, 200).Slider);
                bufferMenu.Add(ConfigValue.ExtraCpaDistance.Name(), new DynamicSlider(ConfigDataType.Data, ConfigValue.ExtraCpaDistance, "Extra Collision Distance", 10, 0, 150).Slider);
                bufferMenu.Add(ConfigValue.ExtraSpellRadius.Name(), new DynamicSlider(ConfigDataType.Data, ConfigValue.ExtraSpellRadius, "Extra Spell Radius", 0, 0, 100).Slider);
                bufferMenu.Add(ConfigValue.ExtraEvadeDistance.Name(), new DynamicSlider(ConfigDataType.Data, ConfigValue.ExtraEvadeDistance, "Extra Evade Distance", 100, 0, 300).Slider);
                //bufferMenu.Add(ConfigValue.ExtraSpellRadius.Name(), new DynamicSlider(ConfigDataType.Data, ConfigValue.ExtraSpellRadius, "Extra Avoid Distance", 50, 0, 300).Slider);
                bufferMenu.Add(ConfigValue.MinimumComfortZone.Name(), new DynamicSlider(ConfigDataType.Data, ConfigValue.MinimumComfortZone, "Minimum Distance to Champions", 550, 0, 1000).Slider);

                Menu debugMenu = Menu.AddSubMenu("Debug", "DebugMenu");

                debugMenu.AddGroupLabel("Debug");
                debugMenu.Add(ConfigValue.ShowDebugInfo.Name(), new DynamicCheckBox(ConfigDataType.Data, ConfigValue.ShowDebugInfo, "Show Debug Info (Console)", false).CheckBox).OnValueChange +=
                    (sender, changeArgs) =>
                    {
                        ConsoleDebug.Enabled = sender.CurrentValue;
                    };
                //debugMenu.Add("DebugWithMySpells", new DynamicCheckBox(ConfigDataType.Data, "DebugWithMySpells", "Detect and draw my spells", false).CheckBox); //TODO: Remove From Addon

                debugMenu.AddSeparator();
                //debugMenu.Add(ConfigValue.EnableSpellTester.Name(), new DynamicCheckBox(ConfigDataType.Data, ConfigValue.EnableSpellTester, "Enable Spell Tester", false).CheckBox);
                //debugMenu.AddLabel("Press F5 after enabling / disabling the Spell Tester to load / unload it.");
                _spellDrawer = new SpellDrawer(Menu);

                ConsoleDebug.WriteLineColor("   Hooking Events...", ConsoleColor.Yellow, true);
                Player.OnIssueOrder += Game_OnIssueOrder;
                Spellbook.OnCastSpell += Game_OnCastSpell;
                Game.OnUpdate += Game_OnGameUpdate;

                ConsoleDebug.WriteLineColor("   Loading Spells...", ConsoleColor.Yellow, true);
                SpellDetector.LoadSpellDictionary();
                SpellDetector.InitChannelSpells();

                AIHeroClient.OnProcessSpellCast += Game_OnProcessSpell;

                Game.OnEnd += Game_OnGameEnd;
                SpellDetector.OnProcessDetectedSpells += SpellDetector_OnProcessDetectedSpells;
                Orbwalker.OnPreAttack += Orbwalking_BeforeAttack;

                ConsoleDebug.WriteLineColor("   Setting Loaded Presets Values...", ConsoleColor.Yellow, true);
                ConfigPluginControler.SelectedPreset.LoadConfig();

            }
            catch (Exception e)
            {
                Chat.Print(e);
            }
            ConsoleDebug.WriteLineColor("Successfully Loaded!", ConsoleColor.Green, true);
        }