Exemple #1
0
        private void OnCorePostUpdate(EventArgs args)
        {
            try
            {
                if (UltimateManager.Flash() && R.IsReady() && SummonerManager.Flash.IsReady())
                {
                    if (Menu.Item(Menu.Name + ".ultimate.flash.move-cursor").GetValue <bool>())
                    {
                        Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius);
                    }
                    var targets =
                        Targets.Where(
                            t =>
                            t.Distance(Player) < R.Range + SummonerManager.Flash.Range && !t.IsDashing() &&
                            (t.IsFacing(Player)
                                    ? (t.Distance(Player))
                                    : (Prediction.GetPrediction(t, R.Delay + 0.3f)
                                       .UnitPosition.Distance(Player.Position))) > R.Range * 1.025f);
                    foreach (var target in targets)
                    {
                        var min      = Menu.Item(Menu.Name + ".ultimate.flash.min").GetValue <Slider>().Value;
                        var flashPos = Player.Position.Extend(target.Position, SummonerManager.Flash.Range);
                        var pred     =
                            Prediction.GetPrediction(
                                new PredictionInput
                        {
                            Aoe              = true,
                            Collision        = false,
                            CollisionObjects = new[] { CollisionableObjects.YasuoWall },
                            From             = flashPos,
                            RangeCheckFrom   = flashPos,
                            Delay            = R.Delay + 0.3f,
                            Range            = R.Range,
                            Speed            = R.Speed,
                            Radius           = R.Width,
                            Type             = R.Type,
                            Unit             = target
                        });
                        if (pred.Hitchance >= R.GetHitChance("combo"))
                        {
                            R.UpdateSourcePosition(flashPos, flashPos);
                            var hits =
                                GameObjects.EnemyHeroes.Where(enemy => R.WillHit(enemy, pred.CastPosition)).ToList();
                            if (UltimateManager.Check(
                                    "combo", min, hits,
                                    hero =>
                                    CalcComboDamage(
                                        hero, Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                                        Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(),
                                        Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(), true)))
                            {
                                if (
                                    R.Cast(
                                        Player.Position.Extend(
                                            pred.CastPosition, -(Player.Position.Distance(pred.CastPosition) * 2)), true))
                                {
                                    Utility.DelayAction.Add(300, () => SummonerManager.Flash.Cast(flashPos));
                                }
                            }
                            else if (Menu.Item(Menu.Name + ".ultimate.flash.duel").GetValue <bool>())
                            {
                                if (UltimateManager.Check(
                                        "combo", 1, hits,
                                        hero =>
                                        CalcComboDamage(
                                            hero, Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                                            Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(),
                                            Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(), true)))
                                {
                                    var cDmg = CalcComboDamage(
                                        target, Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                                        Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(),
                                        Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(), true);
                                    if (cDmg - 20 >= target.Health)
                                    {
                                        if (
                                            R.Cast(
                                                Player.Position.Extend(
                                                    pred.CastPosition,
                                                    -(Player.Position.Distance(pred.CastPosition) * 2)), true))
                                        {
                                            Utility.DelayAction.Add(300, () => SummonerManager.Flash.Cast(flashPos));
                                        }
                                    }
                                }
                            }
                            R.UpdateSourcePosition();
                        }
                    }
                }

                if (UltimateManager.Assisted() && R.IsReady())
                {
                    if (Menu.Item(Menu.Name + ".ultimate.assisted.move-cursor").GetValue <bool>())
                    {
                        Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius);
                    }

                    if (
                        !RLogic(
                            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.w").GetValue <bool>() && W.IsReady(),
                            Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady()))
                    {
                        if (Menu.Item(Menu.Name + ".ultimate.assisted.duel").GetValue <bool>())
                        {
                            RLogicDuel(
                                R.GetHitChance("combo"),
                                Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                                Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(),
                                Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(), false);
                        }
                    }
                }

                if (UltimateManager.Auto() && R.IsReady())
                {
                    if (
                        !RLogic(
                            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.w").GetValue <bool>() && W.IsReady(),
                            Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(), "auto"))
                    {
                        if (Menu.Item(Menu.Name + ".ultimate.auto.duel").GetValue <bool>())
                        {
                            RLogicDuel(
                                R.GetHitChance("combo"),
                                Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                                Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(),
                                Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady());
                        }
                    }
                }

                if (HeroListManager.Enabled("w-stunned") && W.IsReady())
                {
                    var target = Targets.FirstOrDefault(
                        t => HeroListManager.Check("w-stunned", t) && Utils.IsStunned(t));
                    if (target != null)
                    {
                        Casting.SkillShot(target, W, W.GetHitChance("harass"));
                    }
                }
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Exemple #2
0
        private void OnCorePostUpdate(EventArgs args)
        {
            try
            {
                if (Menu.Item(Menu.Name + ".ultimate.follow").GetValue <bool>())
                {
                    RFollowLogic();
                }
                if (UltimateManager.Assisted() && R.IsReady())
                {
                    if (Menu.Item(Menu.Name + ".ultimate.assisted.move-cursor").GetValue <bool>())
                    {
                        Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius);
                    }
                    var target = TargetSelector.GetTarget(R);
                    if (target != null &&
                        !RLogic(
                            target, 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()))
                    {
                        if (Menu.Item(Menu.Name + ".ultimate.assisted.duel").GetValue <bool>())
                        {
                            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())
                {
                    var target = TargetSelector.GetTarget(R);
                    if (target != null &&
                        !RLogic(
                            target, 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(), false, "auto"))
                    {
                        if (Menu.Item(Menu.Name + ".ultimate.auto.duel").GetValue <bool>())
                        {
                            RLogicDuel(
                                Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                                Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady());
                        }
                    }
                }

                if (HeroListManager.Enabled("w-stunned") && W.IsReady())
                {
                    var target =
                        GameObjects.EnemyHeroes.FirstOrDefault(
                            t => t.IsValidTarget(W.Range) && HeroListManager.Check("w-stunned", t) && Utils.IsStunned(t));
                    if (target != null)
                    {
                        Casting.SkillShot(target, W, W.GetHitChance("combo"));
                    }
                }

                if (HeroListManager.Enabled("w-slowed") && W.IsReady())
                {
                    var target =
                        GameObjects.EnemyHeroes.FirstOrDefault(
                            t =>
                            t.IsValidTarget(W.Range) && HeroListManager.Check("w-slowed", t) &&
                            t.Buffs.Any(b => b.Type == BuffType.Slow && b.EndTime - Game.Time > 0.5f));
                    if (target != null)
                    {
                        Casting.SkillShot(target, W, W.GetHitChance("combo"));
                    }
                }

                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit ||
                    Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
                {
                    if (Menu.Item(Menu.Name + ".lasthit.q-unkillable").GetValue <bool>() && Q.IsReady() &&
                        ManaManager.Check("lasthit"))
                    {
                        var canAttack = Game.Time >= _lastAutoAttack + Player.AttackDelay;
                        var minions   =
                            MinionManager.GetMinions(Q.Range)
                            .Where(
                                m =>
                                (!canAttack || !Orbwalking.InAutoAttackRange(m)) && m.HealthPercent <= 50 &&
                                (_lastAfterFarmTarget == null || _lastAfterFarmTarget.NetworkId != m.NetworkId) &&
                                (_lastBeforeFarmTarget == null || _lastBeforeFarmTarget.NetworkId != m.NetworkId))
                            .ToList();
                        if (minions.Any())
                        {
                            foreach (var minion in minions)
                            {
                                var health = HealthPrediction.GetHealthPrediction(
                                    minion, (int)(Q.ArrivalTime(minion) * 1000));
                                if (health > 0 && Math.Abs(health - minion.Health) > 10 &&
                                    Q.GetDamage(minion) * 0.85f > health)
                                {
                                    if (Q.CastOnUnit(minion))
                                    {
                                        _lastQKillableTarget = minion;
                                    }
                                    break;
                                }
                            }
                        }
                    }
                }

                Orbwalking.PreventStuttering(HasQBuff());
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Exemple #3
0
 private void OnCorePostUpdate(EventArgs args)
 {
     try
     {
         if (Q.IsReady())
         {
             var target =
                 GameObjects.EnemyHeroes.OrderBy(e => e.Distance(Player))
                 .Where(e => Q.IsInRange(e))
                 .FirstOrDefault(t => HeroListManager.Check("q-stunned", t) && Utils.IsStunned(t));
             if (target != null)
             {
                 Q.Cast(target.Position);
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }