Example #1
0
        private static void QIfUnkillable()
        {
            if (!PermaActive.ShouldQMinion())
            {
                return;
            }

            if (Player.Instance.ManaPercent > Config.Modes.Clear.ManaQ)
            {
                foreach (
                    var minions in
                    EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy,
                                                                    Player.Instance.ServerPosition, SpellManager.Q.Range))
                {
                    if (Prediction.Health.GetPrediction(minions, (int)(Player.Instance.AttackDelay * 1000)) <= 0 &&
                        !Orbwalker.CanAutoAttack)
                    {
                        if (Config.Modes.Misc.UseQOnUnkillable &&
                            Player.Instance.GetSpellDamage(minions, SpellSlot.Q) >= minions.Health &&
                            (Orbwalker.LastTarget == null || Orbwalker.LastTarget.NetworkId != minions.NetworkId))
                        {
                            Q.Cast(Q.GetPrediction(minions).CastPosition);
                        }
                    }
                }
            }
        }
Example #2
0
        public override void Execute()
        {
            if (Settings.UseQ1)
            {
                var etarget = TargetSelector.GetTarget(E.Range, DamageType.Physical);
                {
                    if (Q.IsReady() && etarget != null && ObjectManager.Player.CountEnemiesInRange(2000f) <= Settings.UseQ1Slider)
                    {
                        var pos = QLogic.GetQPos(etarget, true);
                        Q.Cast(pos);
                    }
                }
            }

            if (Settings.UseQ)
            {
                var etarget = TargetSelector.GetTarget(1000f, DamageType.Physical);
                {
                    if (Q.IsReady() && etarget != null && ObjectManager.Player.CountEnemiesInRange(2000f) >= Settings.UseQ1Slider)
                    {
                        Q2.Cast(etarget.Position);
                    }
                    if (Q.IsReady() && etarget != null && !Settings.UseQ1)
                    {
                        Q2.Cast(etarget.Position);
                    }
                }
            }

            if (Settings.UseR && R.IsReady())
            {
                var target = TargetSelector.GetTarget(E.Range, DamageType.Magical);
                if (target != null && ObjectManager.Player.Distance(target) < 400 &&
                    ObjectManager.Player.HasBuff("Deceive"))
                {
                    R.Cast(target);
                }
            }
            if (Settings.UseW)
            {
                var wtarget = TargetSelector.GetTarget(W.Range, DamageType.Physical);
                {
                    if (W.IsReady() && wtarget != null)
                    {
                        var pos = QLogic.GetQPos(wtarget, true, 100);
                        W.Cast(pos);
                    }
                }
            }
            if (Settings.UseE)
            {
                var wtarget = TargetSelector.GetTarget(E.Range, DamageType.Physical);
                {
                    if (E.IsReady() && wtarget != null)
                    {
                        E.Cast(wtarget);
                    }
                }
            }
            if (!Config.Modes.MiscMenu.CloneOrbwalk)
            {
                return;
            }
            if (!PermaActive.hasClone())
            {
                return;
            }
            Program.clone = Flee.getClone();
        }