Beispiel #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));
            }
        }
Beispiel #2
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 = _ultimate.IsActive(UltimateModeType.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-settings.stacks").GetValue <Slider>().Value > 0;
                    if (Menu.Item(Menu.Name + ".combo.e-settings.always").GetValue <bool>() || stacks ||
                        GetWStacks(target) >= Menu.Item(Menu.Name + ".combo.e-settings.stacks").GetValue <Slider>().Value ||
                        E.IsKillable(target) ||
                        CPrediction.Circle(E, target, E.GetHitChance("combo")).TotalHits >=
                        Menu.Item(Menu.Name + ".combo.e-settings.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-settings.stacks").GetValue <Slider>().Value > 0;
                    if (Q.IsCharging || Menu.Item(Menu.Name + ".combo.q-settings.always").GetValue <bool>() ||
                        target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(target) * 1.2f || stacks ||
                        GetWStacks(target) >= Menu.Item(Menu.Name + ".combo.q-settings.stacks").GetValue <Slider>().Value ||
                        CPrediction.Line(Q, target, Q.GetHitChance("combo")).TotalHits >=
                        Menu.Item(Menu.Name + ".combo.q-settings.min").GetValue <Slider>().Value || Q.IsKillable(target))
                    {
                        QLogic(
                            target, Q.GetHitChance("combo"),
                            Menu.Item(Menu.Name + ".combo.q-settings.fast-cast-min").GetValue <Slider>().Value);
                    }
                }
            }
            if (r && R.IsReady())
            {
                var target = TargetSelector.GetTarget(R);
                if (target != null)
                {
                    if (!RLogic(UltimateModeType.Combo, R.GetHitChance("combo"), target))
                    {
                        RLogicSingle(UltimateModeType.Combo, R.GetHitChance("combo"));
                    }
                }
            }
        }
Beispiel #3
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));
            }
        }
Beispiel #4
0
 protected override void Harass()
 {
     if (!ResourceManager.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-settings.stacks").GetValue <Slider>().Value > 0;
             if (Menu.Item(Menu.Name + ".harass.e-settings.always").GetValue <bool>() || stacks ||
                 GetWStacks(target) >=
                 Menu.Item(Menu.Name + ".harass.e-settings.stacks").GetValue <Slider>().Value ||
                 E.IsKillable(target) ||
                 CPrediction.Circle(E, target, E.GetHitChance("harass")).TotalHits >=
                 Menu.Item(Menu.Name + ".combo.e-settings.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-settings.stacks").GetValue <Slider>().Value > 0;
             if (Q.IsCharging || Menu.Item(Menu.Name + ".harass.q-settings.always").GetValue <bool>() ||
                 target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(target) * 1.2f || stacks ||
                 GetWStacks(target) >=
                 Menu.Item(Menu.Name + ".harass.q-settings.stacks").GetValue <Slider>().Value ||
                 Q.IsKillable(target) ||
                 CPrediction.Line(Q, target, Q.GetHitChance("harass")).TotalHits >=
                 Menu.Item(Menu.Name + ".harass.q-settings.min").GetValue <Slider>().Value)
             {
                 QLogic(
                     target, Q.GetHitChance("harass"),
                     Menu.Item(Menu.Name + ".harass.q-settings.fast-cast-min").GetValue <Slider>().Value);
             }
         }
     }
 }
Beispiel #5
0
 protected override void Harass()
 {
     if (Menu.Item(Menu.Name + ".harass.q").GetValue <bool>() && Q.IsReady() && ResourceManager.Check("harass-q") &&
         !Player.IsWindingUp && !Player.IsDashing())
     {
         var target = TargetSelector.GetTarget(Q);
         if (target != null)
         {
             var prediction = Q.GetPrediction(target);
             if (prediction.Hitchance >= Q.GetHitChance("harass"))
             {
                 Q.Cast(prediction.CastPosition);
             }
             else if (prediction.Hitchance == HitChance.Collision)
             {
                 QCollisionCheck(target);
             }
         }
     }
     if (Menu.Item(Menu.Name + ".harass.e").GetValue <bool>() && E.IsReady() && ResourceManager.Check("harass-e"))
     {
         foreach (var enemy in GameObjects.EnemyHeroes.Where(e => E.IsInRange(e)))
         {
             if (Rend.IsKillable(enemy, enemy.HealthPercent < 10))
             {
                 CastE();
             }
             else
             {
                 var buff = Rend.GetBuff(enemy);
                 if (buff != null &&
                     buff.Count >= Menu.Item(Menu.Name + ".harass.e-min").GetValue <Slider>().Value)
                 {
                     if (enemy.Distance(Player) > E.Range * 0.8 || buff.EndTime - Game.Time < 0.3)
                     {
                         CastE();
                     }
                 }
             }
         }
     }
 }
Beispiel #6
0
        private void SetupMenu()
        {
            try
            {
                SFXMenu = new Menu(Global.Name, "sfx", true);

                Menu = new Menu(Global.Prefix + Player.ChampionName, SFXMenu.Name + "." + Player.ChampionName, true);

                DrawingManager.AddToMenu(Menu.AddSubMenu(new Menu("Drawings", Menu.Name + ".drawing")), this);

                TargetSelector.AddToMenu(SFXMenu.AddSubMenu(new Menu("Target Selector", SFXMenu.Name + ".ts")));

                Orbwalker = new Orbwalking.Orbwalker(SFXMenu.AddSubMenu(new Menu("Orbwalker", SFXMenu.Name + ".orb")));

                SpellQueueManager.AddToMenu(SFXMenu.AddSubMenu(new Menu("Spell Queue", SFXMenu.Name + ".spell-queue")));
                KillstealManager.AddToMenu(SFXMenu.AddSubMenu(new Menu("Killsteal", SFXMenu.Name + ".killsteal")));
                ItemManager.AddToMenu(SFXMenu.AddSubMenu(new Menu("Items", SFXMenu.Name + ".items")), ItemFlags);
                SummonerManager.AddToMenu(SFXMenu.AddSubMenu(new Menu("Summoners", SFXMenu.Name + ".summoners")));

                InfoMenu.AddToMenu(SFXMenu.AddSubMenu(new Menu("Info", SFXMenu.Name + ".info")));
                DebugMenu.AddToMenu(SFXMenu, Spells);

                Menu.AddToMainMenu();
                SFXMenu.AddToMainMenu();

                try
                {
                    AddToMenu();
                }
                catch (Exception ex)
                {
                    Global.Logger.AddItem(new LogItem(ex));
                }
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Beispiel #7
0
        protected override void OnPostUpdate()
        {
            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()))
                {
                    RLogicSingle(
                        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(), UltimateModeType.Auto))
                {
                    RLogicSingle(
                        Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                        Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady());
                }
            }
        }
Beispiel #8
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));
            }
        }
Beispiel #9
0
        protected override void OnPostUpdate()
        {
            Orbwalker.SetAttack(!Q.IsCharging);
            if (_ultimate.IsActive(UltimateModeType.Assisted) && R.IsReady())
            {
                if (_ultimate.ShouldMove(UltimateModeType.Assisted))
                {
                    Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius);
                }

                if (!RLogic(UltimateModeType.Assisted, R.GetHitChance("combo"), TargetSelector.GetTarget(R)))
                {
                    RLogicSingle(UltimateModeType.Assisted, R.GetHitChance("combo"));
                }
            }

            if (_ultimate.IsActive(UltimateModeType.Auto) && R.IsReady())
            {
                if (!RLogic(UltimateModeType.Auto, R.GetHitChance("combo"), TargetSelector.GetTarget(R)))
                {
                    RLogicSingle(UltimateModeType.Auto, R.GetHitChance("combo"));
                }
            }
        }
Beispiel #10
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.single").GetValue <bool>())
                        {
                            RLogicSingle(q, e);
                        }
                    }
                }
            }
        }
Beispiel #11
0
        protected override void Combo()
        {
            var useQ = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady() &&
                       ResourceManager.Check("combo-q");
            var useE = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady();

            if (useQ && !Player.IsWindingUp && !Player.IsDashing())
            {
                var target = TargetSelector.GetTarget(Q);
                if (target != null)
                {
                    var prediction = Q.GetPrediction(target);
                    if (prediction.Hitchance >= Q.GetHitChance("combo"))
                    {
                        Q.Cast(prediction.CastPosition);
                    }
                    else if (prediction.Hitchance == HitChance.Collision)
                    {
                        QCollisionCheck(target);
                    }
                }
            }

            var dashObjects = new List <Obj_AI_Base>();

            if (useE)
            {
                var target = TargetSelector.GetTarget(E, false);
                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, (m.HealthPercent < 10))))
                        {
                            CastE();
                        }
                        else
                        {
                            dashObjects =
                                GetDashObjects(
                                    GameObjects.EnemyMinions.Where(
                                        m => m.IsValidTarget(Orbwalking.GetRealAutoAttackRange(m)))
                                    .Select(e => e as Obj_AI_Base)
                                    .ToList());
                            var minion =
                                dashObjects.FirstOrDefault(
                                    m =>
                                    m.Health > Player.GetAutoAttackDamage(m) * 1.1f &&
                                    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))
                        {
                            CastE();
                        }
                        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 && !target.IsFacing(Player))
                                {
                                    CastE();
                                }
                            }
                        }
                    }
                }
            }

            if (Menu.Item(Menu.Name + ".combo.minions").GetValue <bool>() && !Player.IsWindingUp && !Player.IsDashing() &&
                !GameObjects.EnemyHeroes.Any(
                    e => e.IsValidTarget() && e.Distance(Player) < Orbwalking.GetRealAutoAttackRange(e) * 1.1f))
            {
                if (dashObjects.Count <= 0)
                {
                    dashObjects = GetDashObjects().ToList();
                }
                var minion = dashObjects.FirstOrDefault();
                if (minion != null)
                {
                    Orbwalker.ForceTarget(minion);
                }
            }
            else
            {
                Orbwalker.ForceTarget(null);
            }
        }
Beispiel #12
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)))
                                    .Select(e => e as 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 && !target.IsFacing(Player))
                                {
                                    E.Cast();
                                }
                            }
                        }
                    }
                }
            }

            if (Menu.Item(Menu.Name + ".combo.minions").GetValue <bool>() &&
                !GameObjects.EnemyHeroes.Any(
                    e => e.IsValidTarget() && e.Distance(Player) < Orbwalking.GetRealAutoAttackRange(e) * 1.1f) &&
                !Player.IsWindingUp && !Player.IsDashing())
            {
                var obj = GetDashObjects().FirstOrDefault();
                if (obj != null)
                {
                    Orbwalker.ForceTarget(obj);
                }
            }
            else
            {
                Orbwalker.ForceTarget(null);
            }
        }