예제 #1
0
 public void CastR(AIHeroClient target)
 {
     if (R.IsReady && target != null && !MiscMenu.CheckBox("BlackList." + target.ChampionName) && !_ballIsMissile)
     {
         R.Cast(target);
     }
 }
예제 #2
0
        public Jhin()
        {
            foreach (var enemy in EntityManager.Heroes.Enemies)
            {
                TextsInScreen.Add(enemy.NetworkId, new Text(enemy.ChampionName + " is R killable", new Font("Arial", 30F, FontStyle.Bold))
                {
                    Color = Color.Red
                });
                TextsInHeroPosition.Add(enemy.NetworkId, new Text("R killable", new Font("Arial", 23F, FontStyle.Bold))
                {
                    Color = Color.Red
                });
                LastPredictedPositionText.Add(enemy.NetworkId, new Text(enemy.ChampionName + " last predicted position", new Font("Arial", 23F, FontStyle.Bold))
                {
                    Color = Color.Red
                });
            }
            Q = new SpellBase(SpellSlot.Q, SpellType.Targeted, 600)
            {
                Width     = 450,
                Speed     = 1800,
                CastDelay = 250,
            };
            W = new SpellBase(SpellSlot.W, SpellType.Linear, 2500)
            {
                Width                 = 40,
                CastDelay             = 750,
                Speed                 = 5000,
                AllowedCollisionCount = -1,
            };
            E = new SpellBase(SpellSlot.E, SpellType.Circular, 750)
            {
                Width     = 135,
                CastDelay = 250,
                Speed     = 1600,
            };
            R = new SpellBase(SpellSlot.R, SpellType.Linear, 3500)
            {
                Width                 = 65,
                CastDelay             = 250,
                Speed                 = 5000,
                AllowedCollisionCount = -1,
            };
            Evader.OnEvader += delegate
            {
                if (EvaderMenu.CheckBox("BlockW"))
                {
                    LastBlockTick = Core.GameTickCount;
                }
            };

            Spellbook.OnCastSpell += delegate(Spellbook sender, SpellbookCastSpellEventArgs args)
            {
                if (sender.Owner.IsMe)
                {
                    if (args.Slot == SpellSlot.W)
                    {
                        args.Process = Core.GameTickCount - LastBlockTick > 750;
                    }
                }
            };
            Obj_AI_Base.OnProcessSpellCast += delegate(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
            {
                if (sender.IsMe)
                {
                    switch (args.Slot)
                    {
                    case SpellSlot.W:
                        W.LastCastTime    = Core.GameTickCount;
                        W.LastEndPosition = args.End;
                        break;

                    case SpellSlot.R:
                        if (args.SData.Name == "JhinR")
                        {
                            IsCastingR = true;
                            LastRCone  = new Geometry.Polygon.Sector(sender.Position, args.End, (float)(45 * 2f * Math.PI / 175f), R.Range);
                            Stacks     = 4;
                        }
                        else if (args.SData.Name == "JhinRShot")
                        {
                            R.LastCastTime = Core.GameTickCount;
                            TapKeyPressed  = false;
                            Stacks--;
                        }
                        break;
                    }
                }
            };
            Gapcloser.OnGapcloser += delegate(AIHeroClient sender, Gapcloser.GapcloserEventArgs args)
            {
                if (sender.IsValidTarget(E.Range) && sender.IsEnemy)
                {
                    if (MyHero.Distance(args.Start, true) > MyHero.Distance(args.End))
                    {
                        if (AutomaticMenu.CheckBox("E.Gapcloser") && MyHero.IsInRange(args.End, E.Range) && E.IsReady)
                        {
                            E.Cast(args.End);
                        }
                        if (MyHero.Distance(args.End, true) < (sender.GetAutoAttackRange(MyHero) * 1.5f).Pow())
                        {
                            WShouldWaitTick = Core.GameTickCount;
                        }
                    }
                }
            };

            MenuManager.AddSubMenu("Keys");
            {
                KeysMenu.AddValue("TapKey", new KeyBind("R Tap Key", false, KeyBind.BindTypes.HoldActive, 'T')).OnValueChange +=
                    delegate(ValueBase <bool> sender, ValueBase <bool> .ValueChangeArgs args)
                {
                    if (args.NewValue && R.IsLearned && (R.IsReady || IsCastingR) && R.EnemyHeroes.Count > 0)
                    {
                        TapKeyPressed = true;
                    }
                };
                KeysMenu.AddValue("UltKey", new KeyBind("R Key in game", false, KeyBind.BindTypes.HoldActive, 'R')).OnValueChange +=
                    delegate(ValueBase <bool> sender, ValueBase <bool> .ValueChangeArgs args)
                {
                    if (args.NewValue && R.IsLearned && (R.IsReady || IsCastingR))
                    {
                        Player.IssueOrder(GameObjectOrder.Stop, Player.Instance.ServerPosition);
                    }
                };
                ToggleManager.RegisterToggle(
                    KeysMenu.AddValue("AutoW",
                                      new KeyBind("AutoW Toggle", false, KeyBind.BindTypes.PressToggle, 'K')),
                    delegate
                {
                    foreach (var enemy in UnitManager.ValidEnemyHeroes.Where(TargetHaveEBuff))
                    {
                        if (MiscMenu.CheckBox("AutoW." + enemy.ChampionName))
                        {
                            CastW(enemy);
                        }
                    }
                });
            }

            W.AddConfigurableHitChancePercent();
            R.AddConfigurableHitChancePercent();

            MenuManager.AddSubMenu("Combo");
            {
                ComboMenu.AddValue("Q", new CheckBox("Use Q"));
                ComboMenu.AddValue("W", new CheckBox("Use W", false));
                ComboMenu.AddValue("E", new CheckBox("Use E", false));
                ComboMenu.AddValue("Items", new CheckBox("Use offensive items"));
            }
            MenuManager.AddSubMenu("Ultimate");
            {
                UltimateMenu.AddStringList("Mode", "R AIM Mode", new[] { "Disabled", "Using TapKey", "Automatic" }, 3);
                UltimateMenu.AddValue("OnlyKillable", new CheckBox("Only attack if it's killable", false));
                UltimateMenu.AddValue("Delay", new Slider("Delay between R's (in ms)", 0, 0, 1500));
                UltimateMenu.AddValue("NearMouse", new GroupLabel("Near Mouse Settings"));
                UltimateMenu.AddValue("NearMouse.Enabled", new CheckBox("Only select target near mouse", false));
                UltimateMenu.AddValue("NearMouse.Radius", new Slider("Near mouse radius", 500, 100, 1500));
                UltimateMenu.AddValue("NearMouse.Draw", new CheckBox("Draw near mouse radius"));
            }
            MenuManager.AddSubMenu("Harass");
            {
                HarassMenu.AddValue("Q", new CheckBox("Use Q"));
                HarassMenu.AddValue("W", new CheckBox("Use W", false));
                HarassMenu.AddValue("E", new CheckBox("Use E", false));
                HarassMenu.AddValue("ManaPercent", new Slider("Minimum Mana Percent", 20));
            }

            MenuManager.AddSubMenu("Clear");
            {
                ClearMenu.AddValue("LaneClear", new GroupLabel("LaneClear"));
                {
                    ClearMenu.AddValue("LaneClear.Q", new Slider("Use Q if hit is greater than {0}", 5, 0, 10));
                    ClearMenu.AddValue("LaneClear.W", new Slider("Use W if hit is greater than {0}", 6, 0, 10));
                    ClearMenu.AddValue("LaneClear.E", new Slider("Use E if hit is greater than {0}", 5, 0, 10));
                    ClearMenu.AddValue("LaneClear.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("LastHit", new GroupLabel("LastHit"));
                {
                    ClearMenu.AddStringList("LastHit.Q", "Use Q", new[] { "Never", "Smartly", "Always" }, 1);
                    ClearMenu.AddValue("LastHit.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("JungleClear", new GroupLabel("JungleClear"));
                {
                    ClearMenu.AddValue("JungleClear.Q", new CheckBox("Use Q"));
                    ClearMenu.AddValue("JungleClear.W", new CheckBox("Use W", false));
                    ClearMenu.AddValue("JungleClear.E", new CheckBox("Use E", false));
                    ClearMenu.AddValue("JungleClear.ManaPercent", new Slider("Minimum Mana Percent", 20));
                }
            }

            MenuManager.AddKillStealMenu();
            {
                KillStealMenu.AddValue("Q", new CheckBox("Use Q"));
                KillStealMenu.AddValue("Qmin", new CheckBox("Use Q On Minions"));
                KillStealMenu.AddValue("W", new CheckBox("Use W"));
                KillStealMenu.AddValue("E", new CheckBox("Use E", false));
                KillStealMenu.AddValue("R", new CheckBox("Use R"));
            }

            MenuManager.AddSubMenu("Automatic");
            {
                AutomaticMenu.AddValue("E.Gapcloser", new CheckBox("Use E on hero gapclosing / dashing"));
                AutomaticMenu.AddValue("Immobile", new CheckBox("Use E on hero immobile"));
                AutomaticMenu.AddValue("Buffed", new CheckBox("Use W on hero with buff"));
            }
            MenuManager.AddSubMenu("Evader");
            {
                EvaderMenu.AddValue("BlockW", new CheckBox("Block W to Evade"));
            }
            Evader.Initialize();
            Evader.AddCrowdControlSpells();
            Evader.AddDangerousSpells();
            MenuManager.AddSubMenu("Misc");
            {
                MiscMenu.AddValue("Champions", new GroupLabel("Allowed champions to use Auto W"));
                foreach (var enemy in EntityManager.Heroes.Enemies)
                {
                    MiscMenu.AddValue("AutoW." + enemy.ChampionName, new CheckBox(enemy.ChampionName));
                }
            }
            MenuManager.AddDrawingsMenu();
            {
                Q.AddDrawings(false);
                W.AddDrawings();
                E.AddDrawings(false);
                R.AddDrawings();
                DrawingsMenu.AddValue("Toggles", new CheckBox("Draw toggles status"));
                DrawingsMenu.AddValue("R.Killable", new CheckBox("Draw text if target is r killable"));
                DrawingsMenu.AddValue("R.LastPredictedPosition", new CheckBox("Draw last predicted position"));
            }
        }
예제 #3
0
파일: Jhin.cs 프로젝트: chienhao10/CHOP
        public Jhin()
        {
            foreach (var enemy in EntityManager.Heroes.Enemies)
            {
                TextsInScreen.Add(enemy.NetworkId, new Text(enemy.ChampionName + " 可击杀", new Font("Arial", 30F, FontStyle.Bold))
                {
                    Color = Color.Red
                });
                TextsInHeroPosition.Add(enemy.NetworkId, new Text("R 可击杀", new Font("Arial", 23F, FontStyle.Bold))
                {
                    Color = Color.Red
                });
                LastPredictedPositionText.Add(enemy.NetworkId, new Text(enemy.ChampionName + " 最后预知位置", new Font("Arial", 23F, FontStyle.Bold))
                {
                    Color = Color.Red
                });
            }
            Q = new SpellBase(SpellSlot.Q, SpellType.Targeted, 600)
            {
                Width     = 450,
                Speed     = 1800,
                CastDelay = 250,
            };
            W = new SpellBase(SpellSlot.W, SpellType.Linear, 2500)
            {
                Width                 = 40,
                CastDelay             = 750,
                AllowedCollisionCount = -1,
            };
            E = new SpellBase(SpellSlot.E, SpellType.Circular, 750)
            {
                Width     = 135,
                CastDelay = 250,
                Speed     = 1600,
            };
            R = new SpellBase(SpellSlot.R, SpellType.Linear, 3500)
            {
                Width                 = 80,
                CastDelay             = 200,
                Speed                 = 5000,
                AllowedCollisionCount = -1,
            };
            Evader.OnEvader += delegate
            {
                if (EvaderMenu.CheckBox("BlockW"))
                {
                    LastBlockTick = Core.GameTickCount;
                }
            };

            Spellbook.OnCastSpell += delegate(Spellbook sender, SpellbookCastSpellEventArgs args)
            {
                if (sender.Owner.IsMe)
                {
                    if (args.Slot == SpellSlot.W)
                    {
                        args.Process = Core.GameTickCount - LastBlockTick > 750;
                    }
                }
            };
            Obj_AI_Base.OnProcessSpellCast += delegate(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
            {
                if (sender.IsMe)
                {
                    switch (args.Slot)
                    {
                    case SpellSlot.W:
                        W.LastCastTime    = Core.GameTickCount;
                        W.LastEndPosition = args.End;
                        break;

                    case SpellSlot.R:
                        if (args.SData.Name == "JhinR")
                        {
                            IsCastingR = true;
                            LastRCone  = new Geometry.Polygon.Sector(sender.Position, args.End, (float)(60f * Math.PI / 180f), R.Range);
                            Stacks     = 4;
                        }
                        else if (args.SData.Name == "JhinRShot")
                        {
                            R.LastCastTime = Core.GameTickCount;
                            TapKeyPressed  = false;
                            Stacks--;
                        }
                        break;
                    }
                }
            };
            Gapcloser.OnGapcloser += delegate(AIHeroClient sender, Gapcloser.GapcloserEventArgs args)
            {
                if (sender.IsValidTarget() && sender.IsEnemy)
                {
                    if (MyHero.Distance(args.Start, true) > MyHero.Distance(args.End))
                    {
                        if (AutomaticMenu.CheckBox("E.Gapcloser") && MyHero.IsInRange(args.End, E.Range))
                        {
                            E.Cast(args.End);
                        }
                        if (MyHero.Distance(args.End, true) < (sender.GetAutoAttackRange(MyHero) * 1.5f).Pow())
                        {
                            WShouldWaitTick = Core.GameTickCount;
                        }
                    }
                }
            };

            MenuManager.AddSubMenu("Keys");
            {
                KeysMenu.AddValue("TapKey", new KeyBind("R 半自动发射", false, KeyBind.BindTypes.HoldActive, 32)).OnValueChange +=
                    delegate(ValueBase <bool> sender, ValueBase <bool> .ValueChangeArgs args)
                {
                    if (args.NewValue && R.IsLearned && IsCastingR)
                    {
                        TapKeyPressed = true;
                    }
                };
                ToggleManager.RegisterToggle(
                    KeysMenu.AddValue("AutoW",
                                      new KeyBind("自动W开关", true, KeyBind.BindTypes.PressToggle, 'K')),
                    delegate
                {
                    foreach (var enemy in UnitManager.ValidEnemyHeroes.Where(TargetHaveEBuff))
                    {
                        if (MyHero.ManaPercent >= MiscMenu.Slider("W.ManaPercent"))
                        {
                            if (MiscMenu.CheckBox("自动W." + enemy.ChampionName))
                            {
                                CastW(enemy);
                            }
                        }
                    }
                });
            }

            W.AddConfigurableHitChancePercent();
            R.AddConfigurableHitChancePercent();

            MenuManager.AddSubMenu("Combo");
            {
                ComboMenu.AddValue("Q", new CheckBox("Use Q"));
                ComboMenu.AddValue("E", new CheckBox("Use E"));
                ComboMenu.AddValue("Items", new CheckBox("Use offensive items"));
                ComboMenu.AddStringList("W", "Use W", new[] { "Never", "Only buffed enemies", "Always" }, 2);
            }
            MenuManager.AddSubMenu("Ultimate");
            {
                UltimateMenu.AddStringList("Mode", "R 瞄准模式", new[] { "不使用", "使用扳机键", "自动" }, 2);
                UltimateMenu.AddValue("OnlyKillable", new CheckBox("只攻击可击杀目标"));
                UltimateMenu.AddValue("Delay", new Slider("R之间的延迟(毫秒)", 0, 0, 1500));
                UltimateMenu.AddValue("NearMouse", new GroupLabel("鼠标附近设置"));
                UltimateMenu.AddValue("NearMouse.Enabled", new CheckBox("只选择鼠标附近目标", false));
                UltimateMenu.AddValue("NearMouse.Radius", new Slider("靠近鼠标半径", 500, 100, 1500));
                UltimateMenu.AddValue("NearMouse.Draw", new CheckBox("显示鼠标半径"));
            }
            MenuManager.AddSubMenu("Harass");
            {
                HarassMenu.AddValue("Q", new CheckBox("Use Q"));
                HarassMenu.AddValue("W", new CheckBox("Use W", false));
                HarassMenu.AddValue("E", new CheckBox("Use E", false));
                HarassMenu.AddValue("ManaPercent", new Slider("Minimum Mana Percent", 20));
            }

            MenuManager.AddSubMenu("Clear");
            {
                ClearMenu.AddValue("LaneClear", new GroupLabel("LaneClear"));
                {
                    ClearMenu.AddValue("LaneClear.Q", new Slider("Use Q if hit is greater than {0}", 3, 0, 10));
                    ClearMenu.AddValue("LaneClear.W", new Slider("Use W if hit is greater than {0}", 5, 0, 10));
                    ClearMenu.AddValue("LaneClear.E", new Slider("Use E if hit is greater than {0}", 4, 0, 10));
                    ClearMenu.AddValue("LaneClear.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("LastHit", new GroupLabel("LastHit"));
                {
                    ClearMenu.AddStringList("LastHit.Q", "Use Q", new[] { "Never", "Smartly", "Always" }, 1);
                    ClearMenu.AddValue("LastHit.ManaPercent", new Slider("Minimum Mana Percent", 50));
                }
                ClearMenu.AddValue("JungleClear", new GroupLabel("JungleClear"));
                {
                    ClearMenu.AddValue("JungleClear.Q", new CheckBox("Use Q"));
                    ClearMenu.AddValue("JungleClear.W", new CheckBox("Use W"));
                    ClearMenu.AddValue("JungleClear.E", new CheckBox("Use E"));
                    ClearMenu.AddValue("JungleClear.ManaPercent", new Slider("Minimum Mana Percent", 20));
                }
            }

            MenuManager.AddKillStealMenu();
            {
                KillStealMenu.AddValue("Q", new CheckBox("Use Q"));
                KillStealMenu.AddValue("W", new CheckBox("Use W"));
                KillStealMenu.AddValue("E", new CheckBox("Use E"));
                KillStealMenu.AddValue("R", new CheckBox("Use R"));
            }

            MenuManager.AddSubMenu("Automatic");
            {
                AutomaticMenu.AddValue("E.Gapcloser", new CheckBox("Use E on hero gapclosing / dashing"));
                AutomaticMenu.AddValue("Immobile", new CheckBox("对无法移动目标使用E"));
            }
            MenuManager.AddSubMenu("Evader");
            {
                EvaderMenu.AddValue("BlockW", new CheckBox("保留W进行躲避"));
            }
            Evader.Initialize();
            Evader.AddCrowdControlSpells();
            Evader.AddDangerousSpells();
            MenuManager.AddSubMenu("Misc");
            {
                MiscMenu.AddValue("W.ManaPercent", new Slider("最低蓝量百分比使用自动W", 10));
                MiscMenu.AddValue("Champions", new GroupLabel("自动使用W英雄"));
                foreach (var enemy in EntityManager.Heroes.Enemies)
                {
                    MiscMenu.AddValue("自动W." + enemy.ChampionName, new CheckBox(enemy.ChampionName));
                }
            }
            MenuManager.AddDrawingsMenu();
            {
                Q.AddDrawings(false);
                W.AddDrawings();
                E.AddDrawings(false);
                R.AddDrawings();
                DrawingsMenu.AddValue("Toggles", new CheckBox("Draw toggles status"));
                DrawingsMenu.AddValue("R.Killable", new CheckBox("显示可被R击杀的目标"));
                DrawingsMenu.AddValue("R.LastPredictedPosition", new CheckBox("显示预判敌人最后出现位置"));
            }
        }
예제 #4
0
        public Orianna()
        {
            try
            {
                AIO.Initializers.Add(delegate
                {
                    _ballObject =
                        ObjectManager.Get <Obj_GeneralParticleEmitter>()
                        .FirstOrDefault(
                            o => o.IsValid && !o.IsDead && o.Name.Equals(BallName));
                });
                Q = new SpellBase(SpellSlot.Q, SpellType.Circular, 815)
                {
                    Speed = 1200,
                    Width = 80,
                    CollidesWithYasuoWall = false
                };
                Q.SetSourceFunction(() => Ball);
                W = new SpellBase(SpellSlot.W, SpellType.Self, 255);
                W.SetSourceFunction(() => Ball);
                W.SetRangeCheckSourceFunction(() => Ball);
                E = new SpellBase(SpellSlot.E, SpellType.Circular, 1095)
                {
                    Speed = 1800,
                    Width = 85,
                    MinHitChancePercent   = 45,
                    CollidesWithYasuoWall = false
                };
                E.SetSourceFunction(() => Ball);
                R = new SpellBase(SpellSlot.R, SpellType.Self, 400)
                {
                    CastDelay = 500
                };
                R.SetSourceFunction(() => Ball);
                R.SetRangeCheckSourceFunction(() => Ball);
                Spellbook.OnCastSpell += delegate(Spellbook sender, SpellbookCastSpellEventArgs args)
                {
                    if (sender.Owner.IsMe)
                    {
                        if (args.Slot == SpellSlot.R && MiscMenu.CheckBox("R.Block"))
                        {
                            args.Process = _hitR != 0 && !_ballIsMissile;
                        }
                    }
                };
                GameObject eTarget = null;
                Obj_AI_Base.OnProcessSpellCast += delegate(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
                {
                    if (sender.IsMe)
                    {
                        if (args.Slot == SpellSlot.E)
                        {
                            eTarget = args.Target;
                        }
                    }
                };
                GameObject.OnCreate += delegate(GameObject sender, EventArgs args)
                {
                    if (sender.Name.Equals(BallName))
                    {
                        _ballObject = sender;
                    }
                    else
                    {
                        var missile = sender as MissileClient;
                        if (missile != null && missile.SpellCaster != null && missile.SpellCaster.IsMe)
                        {
                            if (missile.SData.Name.Equals("orianaizuna") || missile.SData.Name.Equals("orianaredact"))
                            {
                                _ballObject = missile;
                            }
                        }
                    }
                };
                GameObject.OnDelete += delegate(GameObject sender, EventArgs args)
                {
                    var missile = sender as MissileClient;
                    if (missile != null && missile.SpellCaster != null && missile.SpellCaster.IsMe)
                    {
                        if (missile.SData.Name.Equals("orianaredact"))
                        {
                            _ballObject = eTarget;
                        }
                    }
                };
                Obj_AI_Base.OnPlayAnimation += delegate(Obj_AI_Base sender, GameObjectPlayAnimationEventArgs args)
                {
                    if (sender.IsMe && args.Animation.Equals("Prop"))
                    {
                        _ballObject = sender;
                    }
                };
                Gapcloser.OnGapcloser += delegate(AIHeroClient sender, Gapcloser.GapcloserEventArgs args)
                {
                    if (sender.IsAlly)
                    {
                        if (Target != null && AutomaticMenu.CheckBox("Gapcloser") &&
                            Ball.GetDistanceSqr(Target) > args.End.Distance(Target, true) &&
                            args.End.Distance(Target, true) < args.Sender.GetDistanceSqr(Target))
                        {
                            CastE(sender);
                        }
                    }
                };
                Dash.OnDash += delegate(Obj_AI_Base sender, Dash.DashEventArgs args)
                {
                    if (sender.IsAlly)
                    {
                        if (Target != null && AutomaticMenu.CheckBox("Gapcloser") &&
                            Ball.GetDistanceSqr(Target) > args.EndPos.Distance(Target, true) &&
                            args.EndPos.Distance(Target, true) < sender.GetDistanceSqr(Target))
                        {
                            CastE(sender);
                        }
                    }
                };
                Interrupter.OnInterruptableSpell +=
                    delegate(Obj_AI_Base sender, Interrupter.InterruptableSpellEventArgs args)
                {
                    if (sender.IsEnemy)
                    {
                        if (AutomaticMenu.CheckBox("Interrupter"))
                        {
                            if (!Ball.InRange(args.Sender, R.Range))
                            {
                                ThrowBall(args.Sender);
                            }
                            else
                            {
                                CastR(args.Sender);
                            }
                        }
                    }
                };
                Obj_AI_Base.OnBasicAttack += delegate(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
                {
                    if (sender.IsEnemy && _canShield && args.Target != null && args.Target.IsMe)
                    {
                        if (sender.Type == GameObjectType.AIHeroClient)
                        {
                            if (sender.IsMelee)
                            {
                                CastE(MyHero);
                            }
                        }
                        else if (sender.Type == GameObjectType.obj_AI_Turret)
                        {
                            CastE(MyHero);
                        }
                    }
                };
                Obj_AI_Base.OnProcessSpellCast += delegate(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
                {
                    if (sender.IsEnemy && _canShield && args.Target != null && args.Target.IsMe)
                    {
                        if (sender.Type == GameObjectType.AIHeroClient)
                        {
                            CastE(MyHero);
                        }
                    }
                };

                Q.AddConfigurableHitChancePercent();
                R.AddConfigurableHitChancePercent();

                MenuManager.AddSubMenu("Combo");
                {
                    ComboMenu.AddValue("TeamFight",
                                       new Slider("Use TeamFight logic if enemies near is greater than {0}", 3, 1, 5));
                    ComboMenu.AddValue("Common", new GroupLabel("Common logic"));
                    ComboMenu.AddValue("Q", new CheckBox("Use Q"));
                    ComboMenu.AddValue("W", new CheckBox("Use W"));
                    ComboMenu.AddValue("E.Shield", new CheckBox("Use E on enemy spells"));
                    ComboMenu.AddValue("E.HealthPercent", new Slider("Use E if my % of health is less than {0}", 40));
                    ComboMenu.AddValue("1vs1", new GroupLabel("1 vs 1 logic"));
                    ComboMenu.AddValue("R.Killable", new CheckBox("Use R if target is killable"));
                    ComboMenu.AddValue("TeamFightLogic", new GroupLabel("TeamFight logic"));
                    ComboMenu.AddValue("Q.Hit", new Slider("Use Q if hit is greater than {0}", 2, 1, 5));
                    ComboMenu.AddValue("W.Hit", new Slider("Use W if hit is greater than {0}", 2, 1, 5));
                    ComboMenu.AddValue("R.Hit", new Slider("Use R if hit is greater than {0}", 3, 1, 5));
                }

                MenuManager.AddSubMenu("Harass");
                {
                    HarassMenu.AddValue("Q", new CheckBox("Use Q"));
                    HarassMenu.AddValue("W", new CheckBox("Use W"));
                    HarassMenu.AddValue("E.Shield", new CheckBox("Use E on enemy spells"));
                    HarassMenu.AddValue("E.HealthPercent", new Slider("Use E if my % of health is less than {0}", 40));
                    HarassMenu.AddValue("ManaPercent", new Slider("Minimum Mana Percent", 25));
                }

                MenuManager.AddSubMenu("Clear");
                {
                    ClearMenu.AddValue("LaneClear", new GroupLabel("LaneClear"));
                    {
                        ClearMenu.AddValue("LaneClear.Q", new Slider("Use Q if hit is greater than {0}", 4, 0, 10));
                        ClearMenu.AddValue("LaneClear.W", new Slider("Use W if hit is greater than {0}", 3, 0, 10));
                        ClearMenu.AddValue("LaneClear.E", new Slider("Use E if hit is greater than {0}", 6, 0, 10));
                        ClearMenu.AddValue("LaneClear.ManaPercent", new Slider("Minimum Mana Percent", 50));
                    }
                    ClearMenu.AddValue("LastHit", new GroupLabel("LastHit"));
                    {
                        ClearMenu.AddStringList("LastHit.Q", "Use Q", new[] { "Never", "Smartly", "Always" }, 1);
                        ClearMenu.AddValue("LastHit.ManaPercent", new Slider("Minimum Mana Percent", 50));
                    }
                    ClearMenu.AddValue("JungleClear", new GroupLabel("JungleClear"));
                    {
                        ClearMenu.AddValue("JungleClear.Q", new CheckBox("Use Q"));
                        ClearMenu.AddValue("JungleClear.W", new CheckBox("Use W"));
                        ClearMenu.AddValue("JungleClear.E", new CheckBox("Use E"));
                        ClearMenu.AddValue("JungleClear.ManaPercent", new Slider("Minimum Mana Percent", 20));
                    }
                }

                MenuManager.AddKillStealMenu();
                {
                    KillStealMenu.AddValue("Q", new CheckBox("Use Q"));
                    KillStealMenu.AddValue("W", new CheckBox("Use W"));
                    KillStealMenu.AddValue("E", new CheckBox("Use E"));
                    KillStealMenu.AddValue("R", new CheckBox("Use R", false));
                }

                MenuManager.AddSubMenu("Automatic");
                {
                    AutomaticMenu.AddValue("Gapcloser", new CheckBox("Use E on hero gapclosing / dashing"));
                    AutomaticMenu.AddValue("Interrupter", new CheckBox("Use R on channeling spells"));
                    AutomaticMenu.AddValue("E.Shield", new CheckBox("Use E on enemy spells"));
                    AutomaticMenu.AddValue("W.Hit", new Slider("Use W if hit is greater than {0}", 2, 1, 5));
                    AutomaticMenu.AddValue("R.Hit", new Slider("Use R if hit is greater than {0}", 3, 1, 5));
                }

                MenuManager.AddDrawingsMenu();
                {
                    var c = DrawingsMenu.AddValue("Ball", new CheckBox("Draw ball position"));
                    CircleManager.Circles.Add(new Circle(c, new ColorBGRA(0, 0, 255, 100), () => 120, () => true,
                                                         () => Ball)
                    {
                        Width = 3
                    });
                    Q.AddDrawings();
                    W.AddDrawings();
                    E.AddDrawings(false);
                    R.AddDrawings();
                }
                MenuManager.AddSubMenu("Misc");
                {
                    MiscMenu.AddValue("R.Block", new CheckBox("Block R if will not hit"));
                    if (EntityManager.Heroes.Enemies.Count > 0)
                    {
                        var enemiesAdded = new HashSet <string>();
                        MiscMenu.AddValue("BlackList.R", new GroupLabel("Don't use R on:"));
                        foreach (var enemy in EntityManager.Heroes.Enemies)
                        {
                            if (!enemiesAdded.Contains(enemy.ChampionName))
                            {
                                MiscMenu.AddValue("BlackList." + enemy.ChampionName,
                                                  new CheckBox(enemy.ChampionName, false));
                                enemiesAdded.Add(enemy.ChampionName);
                            }
                        }
                    }
                }
            }
            catch (Exception e)
            {
                AIO.WriteInConsole(e.ToString());
            }
        }