Пример #1
0
 public override void killSteal()
 {
     if (E.IsCharging || eActive)
     {
         DeathWalker.setAttack(false);
         DeathWalker.setMovement(false);
     }
     else
     {
         DeathWalker.setAttack(true);
         DeathWalker.setMovement(true);
     }
 }
Пример #2
0
        public override void useSpells()
        {
            if (player.HasBuff("Drain") || justUsedDrain)
            {
                DeathWalker.setMovement(false);
                DeathWalker.setAttack(false);
            }
            if (justUsedDrain)
            {
                return;
            }
            if (!player.HasBuff("Drain"))
            {
                DeathWalker.setMovement(true);
                DeathWalker.setAttack(true);
            }

            var tar = ARAMTargetSelector.getBestTarget(Q.Range);

            if (tar != null)
            {
                useQ(tar);
            }
            tar = ARAMTargetSelector.getBestTarget(E.Range);
            if (tar != null)
            {
                useE(tar);
            }
            tar = ARAMTargetSelector.getBestTarget(W.Range);
            if (tar != null)
            {
                useW(tar);
            }
            tar = ARAMTargetSelector.getBestTarget(R.Range);
            if (tar != null)
            {
                useR(tar);
            }
        }
Пример #3
0
        public override void useSpells()
        {
            if (Combo)
            {
                DeathWalker.setAttack(!E.IsReady());
            }
            else
            {
                DeathWalker.setAttack(true);
            }

            if (R.IsReady())
            {
                var t = TargetSelector.GetTarget(R.Range + 400, TargetSelector.DamageType.Physical);
                if (RMissile == null && t.IsValidTarget())
                {
                    R.Cast(t, true, true);
                }

                var allMinionsQ = MinionManager.GetMinions(player.ServerPosition, R.Range + 400, MinionTypes.All);
                var Rfarm       = R.GetCircularFarmLocation(allMinionsQ, R.Width);

                if (RMissile == null &&
                    Farm &&
                    Rfarm.MinionsHit > 2)
                {
                    R.Cast(Rfarm.Position);
                }

                if (Combo && RMissile != null && (RMissile.Position.GetAliveEnemiesInRange(450) == 0))
                {
                    R.Cast();
                }
                else if (RMissile != null && Farm && (Rfarm.MinionsHit < 3 || Rfarm.Position.Distance(RMissile.Position) > 400))
                {
                    R.Cast();
                }
                if (!Combo && !Farm && RMissile != null)
                {
                    R.Cast();
                }
            }
            if (W.IsReady())
            {
                var ta = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);
                if (Combo && ta.IsValidTarget(W.Range) && ta.Path.Count() == 1 && W.GetPrediction(ta).CastPosition.Distance(ta.Position) > 150)
                {
                    if (player.Position.Distance(ta.ServerPosition) > player.Position.Distance(ta.Position))
                    {
                        if (ta.Position.Distance(player.ServerPosition) < ta.Position.Distance(player.Position) && ta.IsValidTarget(W.Range - 200))
                        {
                            CastSpell(W, ta, 3);
                        }
                    }
                    else
                    {
                        if (ta.Position.Distance(player.ServerPosition) > ta.Position.Distance(player.Position) && ta.IsValidTarget(E.Range) && ta.HasBuffOfType(BuffType.Slow))
                        {
                            CastSpell(W, ta, 3);
                        }
                    }
                }
            }
            if (Q.IsReady() && QMissile == null)
            {
                var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget())
                {
                    var qDmg = Q.GetDamage(t);

                    if (qDmg > t.Health)
                    {
                        Q.Cast(t, true);
                    }
                    else if (Combo)
                    {
                        CastSpell(Q, t, 3);
                    }
                    else if (Farm && !player.UnderTurret(true))
                    {
                        foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(enemy => enemy.IsValidTarget(Q.Range)))
                        {
                            CastSpell(Q, enemy, 3);
                        }
                    }

                    else
                    {
                        foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(enemy => enemy.IsValidTarget(Q.Range)))
                        {
                            if (enemy.HasBuffOfType(BuffType.Stun) || enemy.HasBuffOfType(BuffType.Snare) ||
                                enemy.HasBuffOfType(BuffType.Charm) || enemy.HasBuffOfType(BuffType.Fear) ||
                                enemy.HasBuffOfType(BuffType.Taunt) || enemy.HasBuffOfType(BuffType.Slow) || enemy.HasBuff("Recall"))
                            {
                                Q.Cast(enemy, true);
                            }
                        }
                    }
                }
            }

            if (E.IsReady())
            {
                var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget())
                {
                    var qCd = Q.Instance.CooldownExpires - Game.Time;
                    var rCd = R.Instance.CooldownExpires - Game.Time;
                    if (player.Level < 7)
                    {
                        rCd = 10;
                    }
                    //debug("Q " + qCd + "R " + rCd + "E now " + E.Instance.Cooldown);
                    var eDmg = E.GetDamage(t);
                    if (t.HasBuff("chilled"))
                    {
                        eDmg = 2 * eDmg;
                    }
                    if (eDmg > t.Health)
                    {
                        E.Cast(t, true);
                    }
                    else if ((t.HasBuff("chilled")) && Combo && QMissile == null)
                    {
                        if (RMissile == null && R.IsReady())
                        {
                            R.Cast(t, true, true);
                        }
                        E.Cast(t, true);
                    }
                    else if (t.HasBuff("chilled") && Farm && !player.UnderTurret(true) && QMissile == null)
                    {
                        if (RMissile == null && R.IsReady())
                        {
                            R.Cast(t, true, true);
                        }
                        E.Cast(t, true);
                    }
                    else if (t.HasBuff("chilled") && Combo)
                    {
                        E.Cast(t, true);
                    }
                }
                farmE();
            }
            if (Q.IsReady() && QMissile != null)
            {
                if (QMissile.Position.GetAliveEnemiesInRange(220) > 0)
                {
                    Q.Cast();
                }
            }
        }
Пример #4
0
 public static void OnPermaActive()
 {
     // Re-enable auto attacks that might have been disabled
     DeathWalker.setAttack(true);
 }
Пример #5
0
        void NoAAStealth()
        {
            var mb = (!player.HasBuff("vaynetumblefade", true));

            DeathWalker.setAttack(mb);
        }
Пример #6
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            var ultCasting = Game.Time - UltiCastedTime < 0.2 || ObjectManager.Player.IsChannelingImportantSpell();

            DeathWalker.setAttack(!ultCasting);

            if (Q.IsReady() && GetValue <KeyBind>("UseQTH").Active)
            {
                if (ObjectManager.Player.HasBuff("Recall"))
                {
                    return;
                }
                CastQ();
            }

            if (E.IsReady() && GetValue <KeyBind>("UseETH").Active)
            {
                var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget() && (t.HasBuffOfType(BuffType.Stun) || t.HasBuffOfType(BuffType.Snare) ||
                                          t.HasBuffOfType(BuffType.Charm) || t.HasBuffOfType(BuffType.Fear) ||
                                          t.HasBuffOfType(BuffType.Taunt) || t.HasBuff("zhonyasringshield") ||
                                          t.HasBuff("Recall")))
                {
                    E.CastIfHitchanceEquals(t, HitChance.Low);
                }
            }

            if (ComboActive || HarassActive)
            {
                var useQ = GetValue <bool>("UseQ" + (ComboActive ? "C" : "H"));
                var useE = GetValue <bool>("UseE" + (ComboActive ? "C" : "H"));

                if (Q.IsReady() && useQ)
                {
                    CastQ();
                }

                if (E.IsReady() && useE)
                {
                    var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);
                    if (ObjectManager.Player.Distance(t) > 600)
                    {
                        E.CastIfHitchanceEquals(t, t.Path.Count() > 1 ? HitChance.High : HitChance.Medium);
                    }
                    else
                    {
                        E.CastIfHitchanceEquals(t, HitChance.Low);
                    }
                }
            }

            if (LaneClearActive)
            {
                var useQ = GetValue <bool>("UseQL");

                if (Q.IsReady() && useQ)
                {
                    var vMinions = MinionManager.GetMinions(ObjectManager.Player.Position, Q.Range);
                    foreach (
                        var minions in
                        vMinions.Where(
                            minions =>
                            minions.Health < ObjectManager.Player.GetSpellDamage(minions, SpellSlot.Q) - 20))
                    {
                        Q.Cast(minions);
                    }
                }
            }
        }