Esempio n. 1
0
        protected override void Combo()
        {
            var q = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady();
            var w = Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady();
            var e = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady();
            var r = UltimateManager.Combo() && R.IsReady();

            var qCasted = false;

            if (e)
            {
                var target = TargetSelector.GetTarget((MaxERange + E.Width) * 1.1f, E.DamageType);
                if (target != null)
                {
                    ELogic(target, GameObjects.EnemyHeroes.ToList(), E.GetHitChance("combo"));
                }
            }
            if (q)
            {
                var target = TargetSelector.GetTarget(Q.Range, Q.DamageType);
                if (target != null)
                {
                    qCasted = Q.CastOnUnit(target);
                }
            }
            if (w)
            {
                var target = TargetSelector.GetTarget(W);
                if (target != null)
                {
                    WLogic(target, W.GetHitChance("combo"));
                }
            }
            if (r)
            {
                var target = TargetSelector.GetTarget(R);
                if (target != null && (HasQBuff() || (qCasted || !q || !Q.IsReady()) || R.IsKillable(target)) &&
                    !RLogic(target, Menu.Item(Menu.Name + ".ultimate.combo.min").GetValue <Slider>().Value, q, e))
                {
                    if (Menu.Item(Menu.Name + ".ultimate.combo.duel").GetValue <bool>())
                    {
                        RLogicDuel(q, e);
                    }
                }
            }
            var rTarget = TargetSelector.GetTarget(R);

            if (rTarget != null && CalcComboDamage(rTarget, q, e, r) > rTarget.Health)
            {
                ItemManager.UseComboItems(rTarget);
                SummonerManager.UseComboSummoners(rTarget);
            }
        }
Esempio n. 2
0
        protected override void Harass()
        {
            if (!ManaManager.Check("harass"))
            {
                return;
            }

            if (Menu.Item(Menu.Name + ".harass.e").GetValue <bool>())
            {
                var target = TargetSelector.GetTarget((MaxERange + E.Width) * 1.1f, E.DamageType);
                if (target != null)
                {
                    ELogic(target, GameObjects.EnemyHeroes.ToList(), E.GetHitChance("harass"));
                }
            }
            if (Menu.Item(Menu.Name + ".harass.q").GetValue <bool>())
            {
                var target = TargetSelector.GetTarget(Q.Range, Q.DamageType);
                if (target != null)
                {
                    Q.CastOnUnit(target);
                }
            }
        }
Esempio n. 3
0
 public static void TargetSkill(Spell spell)
 {
     TargetSkill(TargetSelector.GetTarget(spell), spell);
 }
Esempio n. 4
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));
            }
        }
Esempio n. 5
0
 public static void SkillShot(Spell spell, HitChance hitChance, bool boundingRadius = true, bool maxRange = true)
 {
     SkillShot(TargetSelector.GetTarget(spell), spell, hitChance);
 }