Exemple #1
0
        private void OnEnemyGapcloser(ActiveGapcloser args)
        {
            try
            {
                if (!args.Sender.IsEnemy)
                {
                    return;
                }

                if (HeroListManager.Check("e-gapcloser", args.Sender) && args.End.Distance(Player.Position) < E.Range &&
                    E.IsReady())
                {
                    var target = TargetSelector.GetTarget(E.Range * 0.85f, E.DamageType);
                    if (target == null || args.Sender.NetworkId.Equals(target.NetworkId))
                    {
                        E.Cast(args.End);
                    }
                }
                if (UltimateManager.Gapcloser(args.Sender))
                {
                    RLogic(
                        args.Sender, HitChance.High, 1,
                        Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                        Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady());
                }
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Exemple #2
0
        private void OnUnitDash(Obj_AI_Base sender, Dash.DashItem args)
        {
            try
            {
                var hero = sender as Obj_AI_Hero;
                if (!sender.IsEnemy || hero == null)
                {
                    return;
                }
                var endTick = Game.Time - Game.Ping / 2000f + (args.EndPos.Distance(args.StartPos) / args.Speed);

                var wCasted = false;
                if (HeroListManager.Check("w-gapcloser", hero) && Player.Distance(args.EndPos) <= W.Range && W.IsReady())
                {
                    var target = TargetSelector.GetTarget(W.Range * 0.85f, W.DamageType);
                    if (target == null || sender.NetworkId.Equals(target.NetworkId))
                    {
                        var delay = (int)(endTick - Game.Time - W.Delay - 0.1f);
                        if (delay > 0)
                        {
                            Utility.DelayAction.Add(delay * 1000, () => W.Cast(args.EndPos));
                        }
                        else
                        {
                            W.Cast(args.EndPos);
                        }
                        wCasted = true;
                    }
                }

                if (!wCasted && HeroListManager.Check("q-gapcloser", hero) && Player.Distance(args.EndPos) <= Q.Range &&
                    Q.IsReady())
                {
                    var delay = (int)(endTick - Game.Time - Q.Delay - 0.1f);
                    if (delay > 0)
                    {
                        Utility.DelayAction.Add(delay * 1000, () => Q.Cast(args.EndPos));
                    }
                    else
                    {
                        Q.Cast(args.EndPos);
                    }
                }
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Exemple #3
0
        private void OnCorePostUpdate(EventArgs args)
        {
            try
            {
                Orbwalker.SetAttack(!Q.IsCharging);
                if (UltimateManager.Assisted() && R.IsReady())
                {
                    if (Menu.Item(Menu.Name + ".ultimate.assisted.move-cursor").GetValue <bool>())
                    {
                        Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius);
                    }

                    if (
                        !RLogic(
                            TargetSelector.GetTarget(R), R.GetHitChance("combo"),
                            Menu.Item(Menu.Name + ".ultimate.assisted.min").GetValue <Slider>().Value,
                            Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                            Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady()))
                    {
                        RLogicDuel(
                            Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                            Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady());
                    }
                }

                if (UltimateManager.Auto() && R.IsReady())
                {
                    if (
                        !RLogic(
                            TargetSelector.GetTarget(R), R.GetHitChance("combo"),
                            Menu.Item(Menu.Name + ".ultimate.auto.min").GetValue <Slider>().Value,
                            Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                            Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(), "auto"))
                    {
                        RLogicDuel(
                            Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                            Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady());
                    }
                }
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Exemple #4
0
 protected override void Harass()
 {
     if (!ManaManager.Check("harass") && !Q.IsCharging)
     {
         return;
     }
     if (Menu.Item(Menu.Name + ".harass.e").GetValue <bool>() && !Q.IsCharging && E.IsReady())
     {
         var target = TargetSelector.GetTarget(E);
         if (target != null)
         {
             var stacks = W.Level == 0 && Menu.Item(Menu.Name + ".harass.e-stacks").GetValue <Slider>().Value > 0;
             if (Menu.Item(Menu.Name + ".harass.e-always").GetValue <bool>() || stacks ||
                 GetWStacks(target) >= Menu.Item(Menu.Name + ".harass.e-stacks").GetValue <Slider>().Value ||
                 E.IsKillable(target) ||
                 CPrediction.Circle(E, target, E.GetHitChance("harass")).TotalHits >=
                 Menu.Item(Menu.Name + ".combo.e-min").GetValue <Slider>().Value)
             {
                 ELogic(target, E.GetHitChance("harass"));
             }
         }
     }
     if (Menu.Item(Menu.Name + ".harass.q").GetValue <bool>() && Q.IsReady())
     {
         var target = TargetSelector.GetTarget((Q.ChargedMaxRange + Q.Width) * 1.1f, Q.DamageType);
         if (target != null)
         {
             var stacks = W.Level == 0 && Menu.Item(Menu.Name + ".harass.q-stacks").GetValue <Slider>().Value > 0;
             if (Q.IsCharging || Menu.Item(Menu.Name + ".harass.q-always").GetValue <bool>() ||
                 Menu.Item(Menu.Name + ".harass.q-range").GetValue <bool>() &&
                 !Orbwalking.InAutoAttackRange(target) || stacks ||
                 GetWStacks(target) >= Menu.Item(Menu.Name + ".harass.q-stacks").GetValue <Slider>().Value ||
                 Q.IsKillable(target) ||
                 CPrediction.Line(Q, target, Q.GetHitChance("harass")).TotalHits >=
                 Menu.Item(Menu.Name + ".harass.q-min").GetValue <Slider>().Value)
             {
                 QLogic(
                     target, Q.GetHitChance("harass"),
                     Menu.Item(Menu.Name + ".harass.q-fast-cast-min").GetValue <Slider>().Value);
             }
         }
     }
 }
Exemple #5
0
        private void OnEnemyGapcloser(ActiveGapcloser args)
        {
            try
            {
                if (!args.Sender.IsEnemy)
                {
                    return;
                }
                if (UltimateManager.Gapcloser(args.Sender))
                {
                    if (args.End.Distance(Player.Position) < R.Range)
                    {
                        R.Cast(args.End);
                    }
                }
                var wCasted = false;
                if (HeroListManager.Check("w-gapcloser", args.Sender) && Player.Distance(args.End) <= W.Range &&
                    W.IsReady())
                {
                    var target = TargetSelector.GetTarget(W.Range * 0.85f, W.DamageType);
                    if (target == null || args.Sender.NetworkId.Equals(target.NetworkId))
                    {
                        W.Cast(args.End);
                        wCasted = true;
                    }
                }

                if (!wCasted && HeroListManager.Check("q-gapcloser", args.Sender) &&
                    Player.Distance(args.End) <= Q.Range && Q.IsReady())
                {
                    Q.Cast(args.End);
                }
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Exemple #6
0
        protected override void AddToMenu()
        {
            var comboMenu = Menu.AddSubMenu(new Menu(Global.Lang.Get("G_Combo"), Menu.Name + ".combo"));

            HitchanceManager.AddToMenu(
                comboMenu.AddSubMenu(new Menu(Global.Lang.Get("F_MH"), comboMenu.Name + ".hitchance")), "combo",
                new Dictionary <string, int> {
                { "Q", 1 }, { "E", 1 }, { "R", 2 }
            });
            comboMenu.AddItem(
                new MenuItem(comboMenu.Name + ".q-fast-cast-min", Global.Lang.Get("Varus_FastCastMin")).SetValue(
                    new Slider(25)));
            comboMenu.AddItem(
                new MenuItem(comboMenu.Name + ".q-range", "Q " + Global.Lang.Get("G_OutOfRange")).SetValue(true));
            comboMenu.AddItem(
                new MenuItem(comboMenu.Name + ".q-always", "Q " + Global.Lang.Get("G_Always")).SetValue(false));
            comboMenu.AddItem(new MenuItem(comboMenu.Name + ".q-stacks", "Q " + Global.Lang.Get("G_StacksIsOrMore")))
            .SetValue(new Slider(3, 1, 3));
            comboMenu.AddItem(
                new MenuItem(comboMenu.Name + ".q-min", "Q " + Global.Lang.Get("G_Min")).SetValue(new Slider(3, 1, 3)));
            comboMenu.AddItem(new MenuItem(comboMenu.Name + ".q", Global.Lang.Get("G_UseQ")).SetValue(true));
            comboMenu.AddItem(
                new MenuItem(comboMenu.Name + ".e-always", "E " + Global.Lang.Get("G_Always")).SetValue(true));
            comboMenu.AddItem(new MenuItem(comboMenu.Name + ".e-stacks", "E " + Global.Lang.Get("G_StacksIsOrMore")))
            .SetValue(new Slider(3, 1, 3));
            comboMenu.AddItem(
                new MenuItem(comboMenu.Name + ".e-min", "E " + Global.Lang.Get("G_Min")).SetValue(new Slider(3, 1, 3)));
            comboMenu.AddItem(new MenuItem(comboMenu.Name + ".e", Global.Lang.Get("G_UseE")).SetValue(true));

            var harassMenu = Menu.AddSubMenu(new Menu(Global.Lang.Get("G_Harass"), Menu.Name + ".harass"));

            HitchanceManager.AddToMenu(
                harassMenu.AddSubMenu(new Menu(Global.Lang.Get("F_MH"), harassMenu.Name + ".hitchance")), "harass",
                new Dictionary <string, int> {
                { "Q", 1 }, { "E", 1 }
            });
            ManaManager.AddToMenu(harassMenu, "harass", ManaCheckType.Minimum, ManaValueType.Percent);
            harassMenu.AddItem(
                new MenuItem(harassMenu.Name + ".q-fast-cast-min", Global.Lang.Get("Varus_FastCastMin")).SetValue(
                    new Slider(25)));
            harassMenu.AddItem(
                new MenuItem(harassMenu.Name + ".q-range", "Q " + Global.Lang.Get("G_OutOfRange")).SetValue(true));
            harassMenu.AddItem(
                new MenuItem(harassMenu.Name + ".q-always", "Q " + Global.Lang.Get("G_Always")).SetValue(false));
            harassMenu.AddItem(new MenuItem(harassMenu.Name + ".q-stacks", "Q " + Global.Lang.Get("G_StacksIsOrMore")))
            .SetValue(new Slider(3, 1, 3));
            harassMenu.AddItem(
                new MenuItem(harassMenu.Name + ".q-min", "Q " + Global.Lang.Get("G_Min")).SetValue(new Slider(3, 1, 3)));
            harassMenu.AddItem(new MenuItem(harassMenu.Name + ".q", Global.Lang.Get("G_UseQ")).SetValue(true));
            harassMenu.AddItem(
                new MenuItem(harassMenu.Name + ".e-always", "E " + Global.Lang.Get("G_Always")).SetValue(false));
            harassMenu.AddItem(new MenuItem(harassMenu.Name + ".e-stacks", "E " + Global.Lang.Get("G_StacksIsOrMore")))
            .SetValue(new Slider(3, 1, 3));
            harassMenu.AddItem(
                new MenuItem(harassMenu.Name + ".e-min", "E " + Global.Lang.Get("G_Min")).SetValue(new Slider(3, 1, 3)));
            harassMenu.AddItem(new MenuItem(harassMenu.Name + ".e", Global.Lang.Get("G_UseE")).SetValue(true));

            var laneclearMenu = Menu.AddSubMenu(new Menu(Global.Lang.Get("G_LaneClear"), Menu.Name + ".lane-clear"));

            ManaManager.AddToMenu(laneclearMenu, "lane-clear", ManaCheckType.Minimum, ManaValueType.Percent);
            laneclearMenu.AddItem(new MenuItem(laneclearMenu.Name + ".q", Global.Lang.Get("G_UseQ")).SetValue(true));
            laneclearMenu.AddItem(new MenuItem(laneclearMenu.Name + ".e", Global.Lang.Get("G_UseE")).SetValue(true));
            laneclearMenu.AddItem(
                new MenuItem(laneclearMenu.Name + ".min", Global.Lang.Get("G_Min")).SetValue(new Slider(3, 1, 5)));

            var ultimateMenu = UltimateManager.AddToMenu(Menu, true, false, false, true, false, false, true, true, true);

            ultimateMenu.AddItem(
                new MenuItem(ultimateMenu.Name + ".radius", Global.Lang.Get("G_Range")).SetValue(
                    new Slider(450, 100, 600))).ValueChanged +=
                delegate(object sender, OnValueChangeEventArgs args)
            {
                _rSpreadRadius = args.GetNewValue <Slider>().Value;
            };

            _rSpreadRadius = Menu.Item(Menu.Name + ".ultimate.radius").GetValue <Slider>().Value;

            var killstealMenu = Menu.AddSubMenu(new Menu(Global.Lang.Get("G_Killsteal"), Menu.Name + ".killsteal"));

            killstealMenu.AddItem(new MenuItem(killstealMenu.Name + ".q", Global.Lang.Get("G_UseQ")).SetValue(true));
            killstealMenu.AddItem(
                new MenuItem(killstealMenu.Name + ".range", Global.Lang.Get("G_OutOfRange")).SetValue(true));

            var fleeMenu = Menu.AddSubMenu(new Menu(Global.Lang.Get("G_Flee"), Menu.Name + ".flee"));

            fleeMenu.AddItem(new MenuItem(fleeMenu.Name + ".e", Global.Lang.Get("G_UseE")).SetValue(true));

            var miscMenu = Menu.AddSubMenu(new Menu(Global.Lang.Get("G_Miscellaneous"), Menu.Name + ".miscellaneous"));

            HeroListManager.AddToMenu(
                miscMenu.AddSubMenu(new Menu("E " + Global.Lang.Get("G_Gapcloser"), miscMenu.Name + "e-gapcloser")),
                "e-gapcloser", false, false, true, false);

            TargetSelector.AddWeightedItem(
                new WeightedItem("w-stacks", "W " + Global.Lang.Get("G_Stacks"), 13, true, t => GetWStacks(t) + 1));

            IndicatorManager.AddToMenu(DrawingManager.GetMenu(), true);
            IndicatorManager.Add("Q", hero => Q.IsReady() ? Q.GetDamage(hero, 1) : 0);
            IndicatorManager.Add(E);
            IndicatorManager.Add(R);
            IndicatorManager.Finale();

            _wStacks = DrawingManager.Add("W " + Global.Lang.Get("G_Stacks"), true);
        }
Exemple #7
0
        protected override void Combo()
        {
            var q = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>();
            var e = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>();
            var r = UltimateManager.Combo();

            if (e && !Q.IsCharging && E.IsReady())
            {
                var target = TargetSelector.GetTarget(E);
                if (target != null)
                {
                    var stacks = W.Level == 0 && Menu.Item(Menu.Name + ".combo.e-stacks").GetValue <Slider>().Value > 0;
                    if (Menu.Item(Menu.Name + ".combo.e-always").GetValue <bool>() || stacks ||
                        GetWStacks(target) >= Menu.Item(Menu.Name + ".combo.e-stacks").GetValue <Slider>().Value ||
                        E.IsKillable(target) ||
                        CPrediction.Circle(E, target, E.GetHitChance("combo")).TotalHits >=
                        Menu.Item(Menu.Name + ".combo.e-min").GetValue <Slider>().Value)
                    {
                        ELogic(target, E.GetHitChance("combo"));
                    }
                }
            }
            if (q && Q.IsReady())
            {
                var target = TargetSelector.GetTarget((Q.ChargedMaxRange + Q.Width) * 1.1f, Q.DamageType);
                if (target != null)
                {
                    var stacks = W.Level == 0 && Menu.Item(Menu.Name + ".combo.q-stacks").GetValue <Slider>().Value > 0;
                    if (Q.IsCharging || Menu.Item(Menu.Name + ".combo.q-always").GetValue <bool>() ||
                        Menu.Item(Menu.Name + ".combo.q-range").GetValue <bool>() &&
                        !Orbwalking.InAutoAttackRange(target) || stacks ||
                        GetWStacks(target) >= Menu.Item(Menu.Name + ".combo.q-stacks").GetValue <Slider>().Value ||
                        CPrediction.Line(Q, target, Q.GetHitChance("combo")).TotalHits >=
                        Menu.Item(Menu.Name + ".combo.q-min").GetValue <Slider>().Value || Q.IsKillable(target))
                    {
                        QLogic(
                            target, Q.GetHitChance("combo"),
                            Menu.Item(Menu.Name + ".combo.q-fast-cast-min").GetValue <Slider>().Value);
                    }
                }
            }
            if (r && R.IsReady())
            {
                var target = TargetSelector.GetTarget(R);
                if (target != null)
                {
                    if (
                        !RLogic(
                            target, R.GetHitChance("combo"),
                            Menu.Item(Menu.Name + ".ultimate.combo.min").GetValue <Slider>().Value,
                            Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                            Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady()))
                    {
                        if (Menu.Item(Menu.Name + ".ultimate.combo.duel").GetValue <bool>())
                        {
                            RLogicDuel(q, e);
                        }
                    }
                }
            }
        }
Exemple #8
0
        protected override void AddToMenu()
        {
            DrawingManager.Add("R " + Global.Lang.Get("G_Flash"), R.Range + SummonerManager.Flash.Range);

            var comboMenu = Menu.AddSubMenu(new Menu(Global.Lang.Get("G_Combo"), Menu.Name + ".combo"));

            HitchanceManager.AddToMenu(
                comboMenu.AddSubMenu(new Menu(Global.Lang.Get("F_MH"), comboMenu.Name + ".hitchance")), "combo",
                new Dictionary <string, int> {
                { "Q", 2 }, { "W", 1 }, { "R", 2 }
            });
            comboMenu.AddItem(new MenuItem(comboMenu.Name + ".q", Global.Lang.Get("G_UseQ")).SetValue(true));
            comboMenu.AddItem(new MenuItem(comboMenu.Name + ".w", Global.Lang.Get("G_UseW")).SetValue(true));
            comboMenu.AddItem(new MenuItem(comboMenu.Name + ".e", Global.Lang.Get("G_UseE")).SetValue(true));

            var harassMenu = Menu.AddSubMenu(new Menu(Global.Lang.Get("G_Harass"), Menu.Name + ".harass"));

            HitchanceManager.AddToMenu(
                harassMenu.AddSubMenu(new Menu(Global.Lang.Get("F_MH"), harassMenu.Name + ".hitchance")), "harass",
                new Dictionary <string, int> {
                { "Q", 2 }, { "W", 1 }
            });
            ManaManager.AddToMenu(
                harassMenu, "harass", ManaCheckType.Minimum, ManaValueType.Total, string.Empty, 70, 0, 750);
            harassMenu.AddItem(new MenuItem(harassMenu.Name + ".q", Global.Lang.Get("G_UseQ")).SetValue(true));
            harassMenu.AddItem(new MenuItem(harassMenu.Name + ".w", Global.Lang.Get("G_UseW")).SetValue(true));
            harassMenu.AddItem(new MenuItem(harassMenu.Name + ".e", Global.Lang.Get("G_UseE")).SetValue(true));

            var laneclearMenu = Menu.AddSubMenu(new Menu(Global.Lang.Get("G_LaneClear"), Menu.Name + ".lane-clear"));

            ManaManager.AddToMenu(
                laneclearMenu, "lane-clear", ManaCheckType.Minimum, ManaValueType.Total, string.Empty, 90, 0, 750);
            laneclearMenu.AddItem(
                new MenuItem(laneclearMenu.Name + ".aa", Global.Lang.Get("G_UseAutoAttacks")).SetValue(true));
            laneclearMenu.AddItem(new MenuItem(laneclearMenu.Name + ".q", Global.Lang.Get("G_UseQ")).SetValue(true));
            laneclearMenu.AddItem(new MenuItem(laneclearMenu.Name + ".w", Global.Lang.Get("G_UseW")).SetValue(true));
            laneclearMenu.AddItem(new MenuItem(laneclearMenu.Name + ".e", Global.Lang.Get("G_UseE")).SetValue(true));

            var lasthitMenu = Menu.AddSubMenu(new Menu(Global.Lang.Get("G_LastHit"), Menu.Name + ".lasthit"));

            ManaManager.AddToMenu(
                lasthitMenu, "lasthit", ManaCheckType.Maximum, ManaValueType.Percent, string.Empty, 70);
            lasthitMenu.AddItem(new MenuItem(lasthitMenu.Name + ".e", Global.Lang.Get("G_UseE")).SetValue(true));
            lasthitMenu.AddItem(
                new MenuItem(
                    lasthitMenu.Name + ".e-poison", Global.Lang.Get("G_UseE") + " " + Global.Lang.Get("G_Poison"))
                .SetValue(true));

            var ultimateMenu = UltimateManager.AddToMenu(Menu, true, true, false, true, false, true, true, true, true);

            ultimateMenu.AddItem(
                new MenuItem(ultimateMenu.Name + ".range", Global.Lang.Get("G_Range")).SetValue(
                    new Slider(700, 400, 825))).ValueChanged += delegate(object sender, OnValueChangeEventArgs args)
            {
                R.Range = args.GetNewValue <Slider>().Value;
                DrawingManager.Update(
                    "R " + Global.Lang.Get("G_Flash"),
                    args.GetNewValue <Slider>().Value + SummonerManager.Flash.Range);
            };

            var killstealMenu = Menu.AddSubMenu(new Menu(Global.Lang.Get("G_Killsteal"), Menu.Name + ".killsteal"));

            killstealMenu.AddItem(new MenuItem(killstealMenu.Name + ".e", Global.Lang.Get("G_UseE")).SetValue(true));
            killstealMenu.AddItem(
                new MenuItem(
                    killstealMenu.Name + ".e-poison", Global.Lang.Get("G_UseE") + " " + Global.Lang.Get("G_Poison"))
                .SetValue(true));

            var fleeMenu = Menu.AddSubMenu(new Menu(Global.Lang.Get("G_Flee"), Menu.Name + ".flee"));

            fleeMenu.AddItem(new MenuItem(fleeMenu.Name + ".w", Global.Lang.Get("G_UseW")).SetValue(true));

            var miscMenu = Menu.AddSubMenu(new Menu(Global.Lang.Get("G_Miscellaneous"), Menu.Name + ".miscellaneous"));

            DelayManager.AddToMenu(miscMenu, "e-delay", "E", 250, 0, 1000);
            HeroListManager.AddToMenu(
                miscMenu.AddSubMenu(new Menu("Q " + Global.Lang.Get("G_Gapcloser"), miscMenu.Name + "q-gapcloser")),
                "q-gapcloser", false, false, true, false);
            HeroListManager.AddToMenu(
                miscMenu.AddSubMenu(new Menu("Q " + Global.Lang.Get("G_Fleeing"), miscMenu.Name + "q-fleeing")),
                "q-fleeing", false, false, true, false);
            HeroListManager.AddToMenu(
                miscMenu.AddSubMenu(new Menu("W " + Global.Lang.Get("G_Gapcloser"), miscMenu.Name + "w-gapcloser")),
                "w-gapcloser", false, false, true, false);
            HeroListManager.AddToMenu(
                miscMenu.AddSubMenu(new Menu("W " + Global.Lang.Get("G_Stunned"), miscMenu.Name + "w-stunned")),
                "w-stunned", false, false, true, false);
            HeroListManager.AddToMenu(
                miscMenu.AddSubMenu(new Menu("W " + Global.Lang.Get("G_Fleeing"), miscMenu.Name + "w-fleeing")),
                "w-fleeing", false, false, true, false);

            R.Range = Menu.Item(Menu.Name + ".ultimate.range").GetValue <Slider>().Value;
            DrawingManager.Update(
                "R " + Global.Lang.Get("G_Flash"),
                Menu.Item(Menu.Name + ".ultimate.range").GetValue <Slider>().Value + SummonerManager.Flash.Range);

            IndicatorManager.AddToMenu(DrawingManager.GetMenu(), true);
            IndicatorManager.Add(Q);
            IndicatorManager.Add(W);
            IndicatorManager.Add("E", hero => E.GetDamage(hero) * 5);
            IndicatorManager.Add(R);
            IndicatorManager.Finale();

            TargetSelector.AddWeightedItem(
                new WeightedItem(
                    "poison-time", Global.Lang.Get("Cassiopeia_PoisonTime"), 10, true,
                    hero => GetPoisonBuffEndTime(hero) + 1));
        }
Exemple #9
0
        protected override void AddToMenu()
        {
            var comboMenu = Menu.AddSubMenu(new Menu(Global.Lang.Get("G_Combo"), Menu.Name + ".combo"));

            ManaManager.AddToMenu(comboMenu, "combo-q", ManaCheckType.Minimum, ManaValueType.Percent, "Q");
            HitchanceManager.AddToMenu(
                comboMenu.AddSubMenu(new Menu(Global.Lang.Get("F_MH"), comboMenu.Name + ".hitchance")), "combo",
                new Dictionary <string, int> {
                { "Q", 2 }
            });
            comboMenu.AddItem(new MenuItem(comboMenu.Name + ".q", Global.Lang.Get("G_UseQ")).SetValue(true));
            comboMenu.AddItem(new MenuItem(comboMenu.Name + ".e", Global.Lang.Get("G_UseE")).SetValue(true));
            comboMenu.AddItem(
                new MenuItem(comboMenu.Name + ".e-min", "E " + Global.Lang.Get("G_Min")).SetValue(new Slider(10, 1, 20)));

            var harassMenu = Menu.AddSubMenu(new Menu(Global.Lang.Get("G_Harass"), Menu.Name + ".harass"));

            HitchanceManager.AddToMenu(
                harassMenu.AddSubMenu(new Menu(Global.Lang.Get("F_MH"), harassMenu.Name + ".hitchance")), "harass",
                new Dictionary <string, int> {
                { "Q", 2 }
            });
            ManaManager.AddToMenu(harassMenu, "harass-q", ManaCheckType.Minimum, ManaValueType.Percent, "Q");
            harassMenu.AddItem(new MenuItem(harassMenu.Name + ".q", Global.Lang.Get("G_UseQ")).SetValue(true));
            ManaManager.AddToMenu(comboMenu, "harass-e", ManaCheckType.Minimum, ManaValueType.Percent, "E");
            harassMenu.AddItem(new MenuItem(harassMenu.Name + ".e", Global.Lang.Get("G_UseE")).SetValue(true));
            harassMenu.AddItem(
                new MenuItem(harassMenu.Name + ".e-min", "E " + Global.Lang.Get("G_Min")).SetValue(new Slider(5, 1, 15)));

            var laneclearMenu = Menu.AddSubMenu(new Menu(Global.Lang.Get("G_LaneClear"), Menu.Name + ".lane-clear"));

            ManaManager.AddToMenu(laneclearMenu, "lane-clear", ManaCheckType.Minimum, ManaValueType.Percent);
            laneclearMenu.AddItem(new MenuItem(laneclearMenu.Name + ".q", Global.Lang.Get("G_UseQ")).SetValue(true));
            laneclearMenu.AddItem(
                new MenuItem(laneclearMenu.Name + ".q-min-1", "Q " + Global.Lang.Get("G_Min") + " <= 4").SetValue(
                    new Slider(2, 1, 5)));
            laneclearMenu.AddItem(
                new MenuItem(laneclearMenu.Name + ".q-min-2", "Q " + Global.Lang.Get("G_Min") + " <= 7").SetValue(
                    new Slider(3, 1, 5)));
            laneclearMenu.AddItem(
                new MenuItem(laneclearMenu.Name + ".q-min-3", "Q " + Global.Lang.Get("G_Min") + " >= 10").SetValue(
                    new Slider(5, 1, 5)));
            laneclearMenu.AddItem(new MenuItem(laneclearMenu.Name + ".e", Global.Lang.Get("G_UseE")).SetValue(false));
            laneclearMenu.AddItem(
                new MenuItem(laneclearMenu.Name + ".e-min", "E " + Global.Lang.Get("G_Min")).SetValue(
                    new Slider(2, 1, 5)));
            laneclearMenu.AddItem(
                new MenuItem(laneclearMenu.Name + ".e-jungle", "E " + Global.Lang.Get("G_Jungle")).SetValue(true));

            var lasthitMenu = Menu.AddSubMenu(new Menu(Global.Lang.Get("G_LastHit"), Menu.Name + ".lasthit"));

            ManaManager.AddToMenu(lasthitMenu, "lasthit", ManaCheckType.Minimum, ManaValueType.Percent);
            lasthitMenu.AddItem(
                new MenuItem(lasthitMenu.Name + ".e-big", "E " + Global.Lang.Get("G_Big")).SetValue(true));
            lasthitMenu.AddItem(
                new MenuItem(lasthitMenu.Name + ".e-unkillable", "E " + Global.Lang.Get("G_Unkillable")).SetValue(true));
            lasthitMenu.AddItem(
                new MenuItem(lasthitMenu.Name + ".e-turret", "E " + Global.Lang.Get("G_Turret")).SetValue(true));

            var killstealMenu = Menu.AddSubMenu(new Menu(Global.Lang.Get("G_Killsteal"), Menu.Name + ".killsteal"));

            killstealMenu.AddItem(new MenuItem(killstealMenu.Name + ".e", Global.Lang.Get("G_UseE")).SetValue(true));

            var fleeMenu = Menu.AddSubMenu(new Menu(Global.Lang.Get("G_Flee"), Menu.Name + ".flee"));

            fleeMenu.AddItem(new MenuItem(fleeMenu.Name + ".aa", Global.Lang.Get("G_UseAutoAttacks")).SetValue(true));

            var ultimateMenu = Menu.AddSubMenu(new Menu(Global.Lang.Get("F_Ultimate"), Menu.Name + ".ultimate"));

            var blitzMenu = ultimateMenu.AddSubMenu(new Menu("Blitzcrank", ultimateMenu.Name + ".blitzcrank"));

            HeroListManager.AddToMenu(
                blitzMenu.AddSubMenu(new Menu(Global.Lang.Get("G_Blacklist"), blitzMenu.Name + ".blacklist")),
                "blitzcrank", false, false, true, false);

            blitzMenu.AddItem(new MenuItem(blitzMenu.Name + ".r", Global.Lang.Get("G_UseR")).SetValue(true));

            var tahmMenu = ultimateMenu.AddSubMenu(new Menu("Tahm Kench", ultimateMenu.Name + ".tahm-kench"));

            HeroListManager.AddToMenu(
                tahmMenu.AddSubMenu(new Menu(Global.Lang.Get("G_Blacklist"), tahmMenu.Name + ".blacklist")),
                "tahm-kench", false, false, true, false);

            tahmMenu.AddItem(new MenuItem(tahmMenu.Name + ".r", Global.Lang.Get("G_UseR")).SetValue(true));

            ultimateMenu.AddItem(new MenuItem(ultimateMenu.Name + ".save", Global.Lang.Get("G_Save")).SetValue(true));

            var miscMenu = Menu.AddSubMenu(new Menu(Global.Lang.Get("G_Miscellaneous"), Menu.Name + ".miscellaneous"));

            ManaManager.AddToMenu(miscMenu, "misc", ManaCheckType.Minimum, ManaValueType.Percent);
            miscMenu.AddItem(
                new MenuItem(miscMenu.Name + ".e-reset", Global.Lang.Get("Kalista_EHarassReset")).SetValue(true));
            miscMenu.AddItem(
                new MenuItem(miscMenu.Name + ".w-baron", Global.Lang.Get("Kalista_WBaron")).SetValue(
                    new KeyBind('J', KeyBindType.Press)));
            miscMenu.AddItem(
                new MenuItem(miscMenu.Name + ".w-dragon", Global.Lang.Get("Kalista_WDragon")).SetValue(
                    new KeyBind('K', KeyBindType.Press)));

            IndicatorManager.AddToMenu(DrawingManager.GetMenu(), true);
            IndicatorManager.Add(Q);
            IndicatorManager.Add(W);
            IndicatorManager.Add("E", Rend.GetDamage);
            IndicatorManager.Finale();

            TargetSelector.OverwriteWeightFunction("low-health", hero => hero.Health - Rend.GetDamage(hero));
            TargetSelector.AddWeightedItem(
                new WeightedItem(
                    "w-stack", "W " + Global.Lang.Get("G_Stack"), 10, false,
                    hero => hero.HasBuff("kalistacoopstrikemarkally") ? 10 : 0));
        }
Exemple #10
0
        protected override void Combo()
        {
            var useQ = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady() && ManaManager.Check("combo-q");
            var useE = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady();

            if (useQ)
            {
                Casting.SkillShot(Q, Q.GetHitChance("combo"));
            }

            if (useE)
            {
                var target = TargetSelector.GetTarget(E);
                if (target != null && Rend.HasBuff(target))
                {
                    if (target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(target))
                    {
                        if (
                            GameObjects.EnemyMinions.Any(
                                m => m.IsValidTarget(Orbwalking.GetRealAutoAttackRange(m)) && Rend.IsKillable(m, true)))
                        {
                            E.Cast();
                        }
                        else
                        {
                            var minion =
                                GetDashObjects(
                                    GameObjects.EnemyMinions.Where(
                                        m => m.IsValidTarget(Orbwalking.GetRealAutoAttackRange(m)))
                                    .Cast <Obj_AI_Base>()
                                    .ToList())
                                .Find(
                                    m =>
                                    m.Health > Player.GetAutoAttackDamage(m) &&
                                    m.Health < Player.GetAutoAttackDamage(m) + Rend.GetDamage(m, 1));
                            if (minion != null)
                            {
                                Orbwalker.ForceTarget(minion);
                            }
                        }
                    }
                    else if (E.IsInRange(target))
                    {
                        if (Rend.IsKillable(target, false))
                        {
                            E.Cast();
                        }
                        else
                        {
                            var buff = Rend.GetBuff(target);
                            if (buff != null &&
                                buff.Count >= Menu.Item(Menu.Name + ".combo.e-min").GetValue <Slider>().Value)
                            {
                                if (target.Distance(Player) > E.Range * 0.8 || buff.EndTime - Game.Time < 0.3)
                                {
                                    E.Cast();
                                }
                            }
                        }
                    }
                }
            }
        }
Exemple #11
0
            public virtual AttackableUnit GetTarget()
            {
                AttackableUnit result = null;

                if ((ActiveMode == OrbwalkingMode.Mixed || ActiveMode == OrbwalkingMode.LaneClear) &&
                    !_config.Item("PriorizeFarm").GetValue <bool>())
                {
                    var target = TargetSelector.GetTarget(-1, DamageType.Physical);
                    if (target != null)
                    {
                        return(target);
                    }
                }

                /*Killable Minion*/
                if (ActiveMode == OrbwalkingMode.LaneClear || ActiveMode == OrbwalkingMode.Mixed ||
                    ActiveMode == OrbwalkingMode.LastHit)
                {
                    var minionList =
                        MinionManager.GetMinions(Player.Position, float.MaxValue)
                        .Where(
                            minion =>
                            InAutoAttackRange(minion) &&
                            minion.Health <
                            2 *
                            (ObjectManager.Player.BaseAttackDamage + ObjectManager.Player.FlatPhysicalDamageMod))
                        .OrderByDescending(minion => minion.CharData.BaseSkinName.Contains("Siege"))
                        .ThenBy(minion => minion.CharData.BaseSkinName.Contains("Super"))
                        .ThenByDescending(minion => minion.MaxHealth)
                        .ThenBy(minion => minion.Health);

                    foreach (var minion in minionList)
                    {
                        var t = (int)(_player.AttackCastDelay * 1000) - 100 + Game.Ping / 2 +
                                1000 * (int)_player.Distance(minion) / (int)GetMyProjectileSpeed();
                        var predHealth = HealthPrediction.GetHealthPrediction(minion, t, FarmDelay);
                        if (predHealth <= 0)
                        {
                            FireOnNonKillableMinion(minion);
                        }

                        if (predHealth > 0 && predHealth <= _player.GetAutoAttackDamage(minion, true))
                        {
                            return(minion);
                        }
                    }
                }

                //Forced target
                if (_forcedTarget.IsValidTarget() && InAutoAttackRange(_forcedTarget))
                {
                    return(_forcedTarget);
                }

                /* turrets / inhibitors / nexus */
                if (ActiveMode == OrbwalkingMode.LaneClear)
                {
                    /* turrets */
                    foreach (var turret in
                             GameObjects.EnemyTurrets.Where(t => t.IsValidTarget() && InAutoAttackRange(t)))
                    {
                        return(turret);
                    }

                    /* inhibitor */
                    foreach (var turret in
                             GameObjects.EnemyInhibitors.Where(t => t.IsValidTarget() && InAutoAttackRange(t)))
                    {
                        return(turret);
                    }

                    /* nexus */
                    if (GameObjects.EnemyNexus != null && GameObjects.EnemyNexus.IsValidTarget() &&
                        InAutoAttackRange(GameObjects.EnemyNexus))
                    {
                        return(GameObjects.EnemyNexus);
                    }
                }

                /*Champions*/
                if (ActiveMode != OrbwalkingMode.LastHit)
                {
                    var target = TargetSelector.GetTarget(-1, DamageType.Physical);
                    if (target.IsValidTarget())
                    {
                        return(target);
                    }
                }

                /*Jungle minions*/
                if (ActiveMode == OrbwalkingMode.LaneClear || ActiveMode == OrbwalkingMode.Mixed)
                {
                    result =
                        MinionManager.GetMinions(Player.Position, float.MaxValue, MinionTypes.All, MinionTeam.Neutral)
                        .Where(InAutoAttackRange)
                        .MaxOrDefault(mob => mob.MaxHealth);

                    if (result != null)
                    {
                        return(result);
                    }
                }

                /*Lane Clear minions*/
                if (ActiveMode == OrbwalkingMode.LaneClear)
                {
                    if (!ShouldWait())
                    {
                        if (_prevMinion.IsValidTarget() && InAutoAttackRange(_prevMinion))
                        {
                            var predHealth = HealthPrediction.LaneClearHealthPrediction(
                                _prevMinion, (int)((_player.AttackDelay * 1000) * LaneClearWaitTimeMod), FarmDelay);
                            if (predHealth >= 2 * _player.GetAutoAttackDamage(_prevMinion) ||
                                Math.Abs(predHealth - _prevMinion.Health) < float.Epsilon)
                            {
                                return(_prevMinion);
                            }
                        }

                        result = (from minion in
                                  MinionManager.GetMinions(Player.Position, float.MaxValue).Where(InAutoAttackRange)
                                  let predHealth =
                                      HealthPrediction.LaneClearHealthPrediction(
                                          minion, (int)((_player.AttackDelay * 1000) * LaneClearWaitTimeMod), FarmDelay)
                                      where
                                      predHealth >= 2 * _player.GetAutoAttackDamage(minion) ||
                                      Math.Abs(predHealth - minion.Health) < float.Epsilon
                                      select minion).MaxOrDefault(m => m.Health);

                        if (result != null)
                        {
                            _prevMinion = (Obj_AI_Minion)result;
                        }
                    }
                }

                return(result);
            }