示例#1
0
        private static void CastQCannon(Obj_AI_Hero target, bool useE)
        {
            var qePred = QE.GetPrediction(target);

            if (qePred.HitChance >= HitChance.High && qCd == 0 && eCd == 0 && useE)
            {
                var gateVector = Me.Position +
                                 Vector3.Normalize(target.ServerPosition - Me.Position) * MiscOption.GetSlider("E", "gatePlace").Value;

                if (Me.Distance(qePred.CastPosition) < QE.Range + 100)
                {
                    if (E.Ready && QE.Ready)
                    {
                        E.Cast(gateVector);
                        QE.Cast(qePred.CastPosition);
                        return;
                    }
                }
            }

            var qPred = Q.GetPrediction(target);

            if ((!useE || !E.Ready) && qCd == 0 && qPred.HitChance >= HitChance.High &&
                Me.Distance(target.ServerPosition) <= Q.Range && Q.Ready && eCd != 0)
            {
                Q.Cast(target);
            }
        }
示例#2
0
        public override void Execute()
        {
            var target = TargetSelector.GetTarget(Q.Range, DamageType.Magical);

            if (target == null || target.IsZombie || target.HasUndyingBuff())
            {
                return;
            }
            //RKS
            if (SpellManager.R.IsReady() && target.IsValidTarget(R.Range) &&
                Prediction.Health.GetPrediction(target, R.CastDelay) <= SpellDamage.GetRealDamage(SpellSlot.R, target) && Prediction.Health.GetPrediction(target, R.CastDelay) > Misc.OverkillR)
            {
                R.Cast(target);
            }
            //RKS
            //AutoHarass
            var tower = EntityManager.Turrets.Allies.FirstOrDefault(t => t.IsInRange(Player.Instance, 920));

            if (tower == null && Settings.KeyAutoHarass)
            {
                if (Q.IsReady() && E.IsReady() && target.IsValidTarget(QE.Range) && Settings.UseAutoQ && Settings.UseAutoE && Player.Instance.ManaPercent > Settings.ManaAutoHarass)
                {
                    Functions.QE(QE.GetPrediction(target).CastPosition);
                }
                else
                {
                    if (Q.IsReady() && target.IsValidTarget(Q.Range) && Settings.UseAutoQ && Player.Instance.ManaPercent > Settings.ManaAutoHarass)
                    {
                        Q.Cast(target);
                    }

                    if (E.IsReady() && target.IsValidTarget(E.Range) && Settings.UseAutoE && Player.Instance.ManaPercent > Settings.ManaAutoHarass)
                    {
                        E.Cast(target);
                    }
                }

                if (W.IsReady() && target.IsValidTarget(W.Range) && Settings.UseAutoE && Player.Instance.ManaPercent > Settings.ManaAutoHarass)
                {
                    if (Player.Instance.Spellbook.GetSpell(SpellSlot.W).ToggleState != 2 && lastWCast + 1000 < Environment.TickCount)
                    {
                        W.Cast(Functions.GrabWPost(false));
                        lastWCast = Environment.TickCount;
                    }
                    if (Player.Instance.Spellbook.GetSpell(SpellSlot.W).ToggleState == 2 &&
                        lastWCast + 500 < Environment.TickCount)
                    {
                        W.Cast(W.GetPrediction(target).CastPosition);
                    }
                }
            }
        }
示例#3
0
        public override void Execute()
        {
            var target = TargetSelector.GetTarget(QE.Range, DamageType.Magical);

            if (target == null || target.IsZombie || target.HasUndyingBuff())
            {
                return;
            }

            if (R.IsReady() && target.IsValidTarget(R.Range) && Settings.UseR &&
                target.Health <= SpellDamage.GetRealDamage(SpellSlot.R, target) && target.Health > Misc.OverkillR)
            {
                R.Cast(target);
            }

            if (Q.IsReady() && E.IsReady() && target.IsValidTarget(QE.Range) && Settings.UseQ && Settings.UseE)
            {
                Functions.QE(QE.GetPrediction(target).CastPosition);
            }
            else
            {
                if (Q.IsReady() && target.IsValidTarget(Q.Range) && Settings.UseQ)
                {
                    Q.Cast(target);
                }

                if (E.IsReady() && target.IsValidTarget(E.Range) && Settings.UseE)
                {
                    E.Cast(target);
                }
            }

            if (W.IsReady() && target.IsValidTarget(W.Range) && Settings.UseW)
            {
                if (Player.Instance.Spellbook.GetSpell(SpellSlot.W).ToggleState != 2 &&
                    lastWCast + 650 < Environment.TickCount)
                {
                    W.Cast(Functions.GrabWPost(false));
                    lastWCast = Environment.TickCount;
                }
                if (Player.Instance.Spellbook.GetSpell(SpellSlot.W).ToggleState == 2 &&
                    lastWCast + 300 < Environment.TickCount)
                {
                    W.Cast(W.GetPrediction(target).CastPosition);
                }
            }
        }
示例#4
0
        /// <summary>
        ///     The cast QE range.
        /// </summary>
        private static void CastQERange()
        {
            var target = Variables.TargetSelector.GetTarget(QE.Range, DamageType.Physical);

            if (target != null)
            {
                if (QE.IsReady() && E.IsReady() && target.IsValidTarget(QE.Range) &&
                    (ObjectManager.Player.Mana > Q.Instance.SData.Mana + E.Instance.SData.Mana))
                {
                    var Prediction = QE.GetPrediction(target);
                    if (Prediction.Hitchance >= HitChance.VeryHigh)
                    {
                        QE.Cast(Prediction.CastPosition);
                    }
                }
            }
        }
示例#5
0
        public static void ComboEQ()
        {
            var target = TargetSelector.GetTarget(Spells.QE.Range, DamageType.Magical);

            if (target != null && Q.IsReady())
            {
                Extension.QEcomboing = true;
                var pred = QE.GetPrediction(target);
                if (E.IsInRange(pred.UnitPosition))
                {
                    Q.Cast(Player.Instance.Position.Extend(pred.CastPosition, Player.Instance.Distance(pred.CastPosition) - 20f).To3DWorld());
                }
                else
                {
                    Q.Cast(Player.Instance.Position.Extend(pred.CastPosition, Spells.E.Range - 50f).To3DWorld());
                }
            }
        }
示例#6
0
        public override void Execute()
        {
            var target = TargetSelector.GetTarget(Q.Range, DamageType.Physical);

            if (target == null || target.IsZombie)
            {
                return;
            }

            if (Q.IsReady() && E.IsReady() && target.IsValidTarget(QE.Range) && Settings.UseQ && Settings.UseE && Player.Instance.ManaPercent > Settings.ManaHarass)
            {
                Functions.QE(QE.GetPrediction(target).CastPosition);
            }
            else
            {
                if (Q.IsReady() && target.IsValidTarget(Q.Range) && Settings.UseQ && Player.Instance.ManaPercent > Settings.ManaHarass)
                {
                    Q.Cast(target);
                }

                if (E.IsReady() && target.IsValidTarget(E.Range) && Settings.UseE && Player.Instance.ManaPercent > Settings.ManaHarass)
                {
                    E.Cast(target);
                }
            }

            if (W.IsReady() && target.IsValidTarget(W.Range) && Settings.UseW && Player.Instance.ManaPercent > Settings.ManaHarass)
            {
                if (Player.Instance.Spellbook.GetSpell(SpellSlot.W).ToggleState != 2 &&
                    lastWCast + 700 < Environment.TickCount)
                {
                    W.Cast(Functions.GrabWPost(true));
                    lastWCast = Environment.TickCount;
                }
                if (Player.Instance.Spellbook.GetSpell(SpellSlot.W).ToggleState >= 1 &&
                    lastWCast + 300 < Environment.TickCount)
                {
                    W.Cast(W.GetPrediction(target).CastPosition);
                }
            }
        }
示例#7
0
        private static void Combo()
        {
            var target = TargetSelector.GetTarget(1300, TargetSelector.DamageType.Magical);

            if (Q.IsReady() && (Config.Item("UseQCombo").GetValue <bool>()))
            {
                var Qprediction = Q.GetPrediction(target);

                if (Qprediction.Hitchance >= HitChance.VeryHigh)
                {
                    Q.Cast(Qprediction.CastPosition);
                }
            }
            if (Player.Spellbook.GetSpell(SpellSlot.W).ToggleState == 1 && W.IsReady())
            {
                var WGrabObject = GetGrabableObjectPos(target == null);

                if (WGrabObject.To2D().IsValid() && Utils.TickCount - W.LastCastAttemptT > Game.Ping + 300)
                {
                    W.Cast(WGrabObject);
                    W.LastCastAttemptT = Utils.TickCount;
                }
                else if (target != null && Player.Spellbook.GetSpell(SpellSlot.W).ToggleState != 1 && W.IsReady() &&
                         Utils.TickCount - W.LastCastAttemptT > Game.Ping + 100)
                {
                    if (OrbManager.WObject(false) != null)
                    {
                        W.From = OrbManager.WObject(false).ServerPosition;
                        W.Cast(target, false, true);
                    }
                }
            }
            else if (target != null && Player.Spellbook.GetSpell(SpellSlot.W).ToggleState != 1 && W.IsReady() &&
                     Utils.TickCount - W.LastCastAttemptT > Game.Ping + 100)
            {
                if (OrbManager.WObject(false) != null)
                {
                    W.From = OrbManager.WObject(false).ServerPosition;
                    W.Cast(target, false, true);
                }
            }
            if (E.IsReady() && (Config.Item("UseECombo").GetValue <bool>()))
            {
                foreach (var orb in OrbManager.GetOrbs(true))
                {
                    if (Player.Distance(orb) < E.Range + 100)
                    {
                        var startPoint = orb.To2D().Extend(Player.ServerPosition.To2D(), 100);
                        var endPoint   = Player.ServerPosition.To2D()
                                         .Extend(orb.To2D(), Player.Distance(orb) > 200 ? 1300 : 1000);
                        QE.Delay = E.Delay + Player.Distance(orb) / E.Speed;
                        QE.From  = orb;
                        var enemyPred = QE.GetPrediction(target);
                        if (enemyPred.Hitchance >= HitChance.VeryHigh &&
                            enemyPred.UnitPosition.To2D().Distance(startPoint, endPoint, false) <
                            QE.Width + target.BoundingRadius)
                        {
                            E.Cast(orb, true);
                            W.LastCastAttemptT = Utils.TickCount;
                            return;
                        }
                    }
                }
            }
            if (E.IsReady() && Q.IsReady() && (Config.Item("UseQECombo").GetValue <bool>()))
            {
                QE.Delay = E.Delay + Q.Range / E.Speed;
                QE.From  = Player.ServerPosition.To2D().Extend(target.ServerPosition.To2D(), Q.Range).To3D();

                var prediction = QE.GetPrediction(target);
                if (prediction.Hitchance >= HitChance.High)
                {
                    Q.Cast(Player.ServerPosition.To2D().Extend(prediction.CastPosition.To2D(), Q.Range - 100));
                    QET = Utils.TickCount;
                    W.LastCastAttemptT = Utils.TickCount;
                }
            }
            if (R.IsReady() && (Config.Item("UseRCombo").GetValue <bool>()))
            {
                if (target.Health < R.GetDamage(target))
                {
                    R.Cast(target);
                }
            }
        }
示例#8
0
        private static void Combo()
        {
            var target = TargetSelector.GetTarget(1300, TargetSelector.DamageType.Magical);

            if (Q.IsReady() && (Config.Item("UseQCombo").GetValue <bool>()))
            {
                var Qprediction = Q.GetPrediction(target);

                if (Qprediction.Hitchance >= HitChance.VeryHigh)
                {
                    Q.Cast(Qprediction.CastPosition);
                }
            }
            if (Player.Spellbook.GetSpell(SpellSlot.W).ToggleState == 1 && W.IsReady() && Config.Item("UseWCombo").GetValue <bool>())
            {
                foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(W.Range + W.Width) && W.GetPrediction(x).Hitchance >= HitChance.High))
                {
                    UseW(enemy, enemy);
                }
            }
            if (E.IsReady() && (Config.Item("UseECombo").GetValue <bool>()))
            {
                foreach (var orb in OrbManager.GetOrbs(true))
                {
                    if (Player.Distance(orb) < E.Range + 100)
                    {
                        var startPoint = orb.To2D().Extend(Player.ServerPosition.To2D(), 100);
                        var endPoint   = Player.ServerPosition.To2D()
                                         .Extend(orb.To2D(), Player.Distance(orb) > 200 ? 1300 : 1000);
                        QE.Delay = E.Delay + Player.Distance(orb) / E.Speed;
                        QE.From  = orb;
                        var enemyPred = QE.GetPrediction(target);
                        if (enemyPred.Hitchance >= HitChance.VeryHigh &&
                            enemyPred.UnitPosition.To2D().Distance(startPoint, endPoint, false) <
                            QE.Width + target.BoundingRadius)
                        {
                            E.Cast(orb, true);
                            W.LastCastAttemptT = Utils.TickCount;
                            return;
                        }
                    }
                }
            }
            if (E.IsReady() && Q.IsReady() && (Config.Item("UseQECombo").GetValue <bool>()))
            {
                QE.Delay = E.Delay + Q.Range / E.Speed;
                QE.From  = Player.ServerPosition.To2D().Extend(target.ServerPosition.To2D(), Q.Range).To3D();

                var prediction = QE.GetPrediction(target);
                if (prediction.Hitchance >= HitChance.High)
                {
                    Q.Cast(Player.ServerPosition.To2D().Extend(prediction.CastPosition.To2D(), Q.Range - 100));
                    QET = Utils.TickCount;
                    W.LastCastAttemptT = Utils.TickCount;
                }
            }
            if (R.IsReady() && (Config.Item("UseRCombo").GetValue <bool>()))
            {
                if (target.Health < R.GetDamage(target))
                {
                    R.Cast(target);
                }
            }
        }