예제 #1
0
        private static void QLogic(AIHeroClient target, bool useExtendQ = true)
        {
            if (!Q.IsReady() || target == null || target.IsDead || target.IsUnKillable())
            {
                return;
            }

            if (target.IsValidTarget(Q.Range))
            {
                Q.Cast(target);
            }
            else if (target.IsValidTarget(QExtend.Range) && useExtendQ)
            {
                var collisions = EntityManager.MinionsAndMonsters.EnemyMinions.Where(x => x.IsValidTarget(Q.Range)).ToList();

                if (!collisions.Any())
                {
                    return;
                }

                foreach (var minion in collisions)
                {
                    var qPred    = QExtend.GetPrediction(target);
                    var qPloygon = new Geometry.Polygon.Rectangle(Player.Instance.Position, Player.Instance.Position.Extend(minion.Position, QExtend.Range).To3D(), QExtend.Width);

                    if (qPloygon.IsInside(qPred.UnitPosition.To2D()))
                    {
                        Q.Cast(minion);
                        break;
                    }
                }
            }
        }
예제 #2
0
        private void CastQCannon(Obj_AI_Hero target, bool useE)
        {
            var gateDis = Menu.Item("gatePlace", true).GetValue <Slider>().Value;

            var tarPred = QExtend.GetPrediction(target, true);

            if (tarPred.Hitchance >= HitChance.VeryHigh && Qcd == 0 && Ecd == 0 && useE)
            {
                var gateVector = Player.Position + Vector3.Normalize(target.ServerPosition - Player.Position) * gateDis;

                if (Player.Distance(tarPred.CastPosition) < QExtend.Range + 100)
                {
                    if (E.IsReady() && QExtend.IsReady())
                    {
                        E.Cast(gateVector);
                        QExtend.Cast(tarPred.CastPosition);
                        return;
                    }
                }
            }

            if ((Menu.Item("UseQAlways", true).GetValue <bool>() || !useE) &&
                Qcd == 0 && Q.GetPrediction(target, true).Hitchance >= HitChance.VeryHigh &&
                Player.Distance(target.ServerPosition) <= Q.Range && Q.IsReady() && Ecd != 0)
            {
                Q.Cast(target);
            }
        }
예제 #3
0
        private static void QLogic(AIHeroClient target, bool useExtendQ = true)
        {
            if (!Q.IsReady() || target == null || target.IsDead || target.IsUnKillable())
            {
                return;
            }

            if (target.IsValidTarget(Q.Range))
            {
                Q.CastOnUnit(target, true);
            }
            else if (target.IsValidTarget(QExtend.Range) && useExtendQ)
            {
                var collisions = MinionManager.GetMinions(Me.Position, Q.Range, MinionTypes.All, MinionTeam.NotAlly);

                if (!collisions.Any())
                {
                    return;
                }

                foreach (var minion in collisions)
                {
                    var qPred    = QExtend.GetPrediction(target);
                    var qPloygon = new MyGeometry.Polygon.Rectangle(Me.Position,
                                                                    Me.Position.Extend(minion.Position, QExtend.Range), QExtend.Width);

                    if (qPloygon.IsInside(qPred.UnitPosition.To2D()))
                    {
                        Q.CastOnUnit(minion, true);
                        break;
                    }
                }
            }
        }
예제 #4
0
        private void Cast_Q(Obj_AI_Hero forceTarget = null)
        {
            if (!Q.IsReady() || !PassiveCheck())
            {
                return;
            }

            var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);

            if (forceTarget != null)
            {
                target = forceTarget;
            }

            if (target != null && target.IsValidTarget(Q.Range))
            {
                if (Q.Cast(target) == Spell.CastStates.SuccessfullyCasted)
                {
                    Q.LastCastAttemptT = Utils.TickCount;
                    return;
                }
            }

            target = TargetSelector.GetTarget(QExtend.Range, TargetSelector.DamageType.Physical);

            if (forceTarget != null)
            {
                target = forceTarget;
            }

            if (target == null || !menu.Item("UseQExtendCombo", true).GetValue <bool>())
            {
                return;
            }

            var pred       = QExtend.GetPrediction(target, true);
            var collisions = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.NotAlly);

            if (!collisions.Any() || (!target.IsMoving && menu.Item("MovementCheck", true).GetValue <bool>()))
            {
                return;
            }

            foreach (var minion in collisions)
            {
                var poly = new Geometry.Polygon.Rectangle(Player.ServerPosition, Player.ServerPosition.Extend(minion.ServerPosition, QExtend.Range), QExtend.Width);

                if (poly.IsInside(pred.UnitPosition))
                {
                    if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                    {
                        Q.LastCastAttemptT = Utils.TickCount;
                        return;
                    }
                }
            }
        }
예제 #5
0
파일: Lucian.cs 프로젝트: hehelmaoCx/Ports
        private void Combo()
        {
            if (Menu.Item("ComboELogic", true).GetValue <bool>() && E.IsReady())
            {
                var target = TargetSelector.GetTarget(975f, TargetSelector.DamageType.Physical);

                if (target.IsValidTarget(975f) && target.DistanceToPlayer() > Orbwalking.GetRealAutoAttackRange(Me))
                {
                    if (Utils.TickCount - CastSpellTime > 400)
                    {
                        Cast_E(target, true);
                    }
                }
            }

            if (Menu.Item("ComboQExtended", true).GetValue <bool>() && Q.IsReady())
            {
                var target = TargetSelector.GetTarget(QExtend.Range, TargetSelector.DamageType.Physical);

                if (CheckTarget(target, QExtend.Range) && target.DistanceToPlayer() > Q.Range &&
                    (!E.IsReady() || (E.IsReady() && target.DistanceToPlayer() > 975f)))
                {
                    var pred       = QExtend.GetPrediction(target, true);
                    var collisions = MinionManager.GetMinions(Me.ServerPosition, Q.Range, MinionTypes.All,
                                                              MinionTeam.NotAlly);

                    if (!collisions.Any())
                    {
                        return;
                    }

                    foreach (var minion in collisions)
                    {
                        var poly = new Geometry.Polygon.Rectangle(Me.ServerPosition,
                                                                  Me.ServerPosition.Extend(minion.ServerPosition, QExtend.Range), QExtend.Width);

                        if (poly.IsInside(pred.UnitPosition))
                        {
                            Q.Cast(minion);
                        }
                    }
                }
            }

            if (Menu.Item("ComboR", true).GetValue <bool>() && R.IsReady())
            {
                var target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);

                if (CheckTarget(target, R.Range) &&
                    R.GetDamage(target) * (7.5 + 7.5 * Me.AttackSpeedMod) > target.Health &&
                    target.Distance(Me) > Orbwalking.GetAttackRange(Me) + 150)
                {
                    R.Cast(target);
                }
            }
        }
예제 #6
0
        private void Combo()
        {
            var itemTarget = TargetSelector.GetTarget(750, TargetSelector.DamageType.Physical);

            if (itemTarget != null)
            {
                var dmg = GetComboDamage(itemTarget);

                ItemManager.Target = itemTarget;

                if (dmg > itemTarget.Health - 50)
                {
                    ItemManager.KillableTarget = true;
                }

                ItemManager.UseTargetted = true;
            }

            if (Menu.Item("UseQExtendCombo", true).GetValue <bool>() && Q.IsReady())
            {
                var target = TargetSelector.GetTarget(QExtend.Range, TargetSelector.DamageType.Physical);

                if (!target.IsValidTarget(Q.Range) && target.IsValidTarget(QExtend.Range))
                {
                    var pred       = QExtend.GetPrediction(target, true);
                    var collisions = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.NotAlly);

                    if (!collisions.Any() || (!target.IsMoving && Menu.Item("MovementCheck", true).GetValue <bool>()))
                    {
                        return;
                    }

                    foreach (var minion in collisions)
                    {
                        var poly = new Geometry.Polygon.Rectangle(Player.ServerPosition, Player.ServerPosition.Extend(minion.ServerPosition, QExtend.Range), QExtend.Width);

                        if (poly.IsInside(pred.UnitPosition))
                        {
                            Q.Cast(minion);
                        }
                    }
                }
            }

            if (Menu.Item("UseRCombo", true).GetValue <bool>() && R.IsReady())
            {
                var target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);

                if (target.IsValidTarget(R.Range) && !target.IsZombie && !target.IsDead &&
                    R.GetDamage(target) * GetShots() > target.Health &&
                    target.Distance(Player) > Orbwalking.GetAttackRange(Player) + 150)
                {
                    R.Cast(target);
                }
            }
        }
예제 #7
0
파일: Lucian.cs 프로젝트: hehelmaoCx/Ports
        private void Harass()
        {
            if (Me.UnderTurret(true))
            {
                return;
            }

            if (Me.ManaPercent >= Menu.Item("HarassMana", true).GetValue <Slider>().Value)
            {
                if (Menu.Item("HarassQ", true).GetValue <bool>() && Q.IsReady())
                {
                    var target = TargetSelector.GetTarget(QExtend.Range, TargetSelector.DamageType.Physical);

                    if (CheckTarget(target, QExtend.Range))
                    {
                        if (target.IsValidTarget(Q.Range))
                        {
                            Q.Cast(target);
                        }
                        else if (target.IsValidTarget(QExtend.Range) && Menu.Item("HarassQExtended", true).GetValue <bool>())
                        {
                            var pred       = QExtend.GetPrediction(target, true);
                            var collisions = MinionManager.GetMinions(Me.ServerPosition, Q.Range, MinionTypes.All,
                                                                      MinionTeam.NotAlly);

                            if (!collisions.Any())
                            {
                                return;
                            }

                            foreach (var minion in collisions)
                            {
                                var poly = new Geometry.Polygon.Rectangle(Me.ServerPosition,
                                                                          Me.ServerPosition.Extend(minion.ServerPosition, QExtend.Range), QExtend.Width);

                                if (poly.IsInside(pred.UnitPosition))
                                {
                                    Q.Cast(minion);
                                }
                            }
                        }
                    }
                }

                if (Menu.Item("HarassW", true).GetValue <bool>() && W.IsReady())
                {
                    var target = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Magical);

                    if (CheckTarget(target, W.Range))
                    {
                        W.CastTo(target);
                    }
                }
            }
        }
예제 #8
0
파일: Lucian.cs 프로젝트: hehelmaoCx/Ports
        private void KillSteal()
        {
            if (Menu.Item("KillStealW", true).GetValue <bool>() && W.IsReady())
            {
                foreach (
                    var target in
                    HeroManager.Enemies.Where(
                        x => x.IsValidTarget(W.Range) && CheckTargetSureCanKill(x) && x.Health < W.GetDamage(x)))
                {
                    if (CheckTarget(target, W.Range))
                    {
                        W.CastTo(target);
                    }
                }
            }

            if (Menu.Item("KillStealQ", true).GetValue <bool>() && Q.IsReady())
            {
                foreach (
                    var target in
                    HeroManager.Enemies.Where(
                        x => x.IsValidTarget(QExtend.Range) && CheckTargetSureCanKill(x) && x.Health < Q.GetDamage(x)))
                {
                    if (CheckTarget(target, QExtend.Range))
                    {
                        if (target.IsValidTarget(Q.Range))
                        {
                            Q.Cast(target, true);
                        }
                        else
                        {
                            var pred       = QExtend.GetPrediction(target, true);
                            var collisions = MinionManager.GetMinions(Me.ServerPosition, Q.Range, MinionTypes.All,
                                                                      MinionTeam.NotAlly);

                            if (!collisions.Any())
                            {
                                return;
                            }

                            foreach (var minion in collisions)
                            {
                                var poly = new Geometry.Polygon.Rectangle(Me.ServerPosition, Me.ServerPosition.Extend(minion.ServerPosition, QExtend.Range), QExtend.Width);

                                if (poly.IsInside(pred.UnitPosition))
                                {
                                    Q.Cast(minion);
                                    return;
                                }
                            }
                        }
                    }
                }
            }
        }
예제 #9
0
        private void Harass()
        {
            if (ManaManager.HasEnoughMana(Menu.GetSlider("HarassMana")))
            {
                if (Menu.GetBool("HarassQ") && Q.IsReady())
                {
                    var target = TargetSelector.GetTarget(QExtend.Range, TargetSelector.DamageType.Physical);

                    if (target.Check(QExtend.Range))
                    {
                        if (target.IsValidTarget(Q.Range))
                        {
                            Q.Cast(target);
                        }
                        else if (target.IsValidTarget(QExtend.Range) && Menu.GetBool("HarassQExtended"))
                        {
                            var pred       = QExtend.GetPrediction(target, true);
                            var collisions = MinionManager.GetMinions(Me.ServerPosition, Q.Range, MinionTypes.All,
                                                                      MinionTeam.NotAlly);

                            if (!collisions.Any())
                            {
                                return;
                            }

                            foreach (var minion in collisions)
                            {
                                var poly = new Geometry.Polygon.Rectangle(Me.ServerPosition,
                                                                          Me.ServerPosition.Extend(minion.ServerPosition, QExtend.Range), QExtend.Width);

                                if (poly.IsInside(pred.UnitPosition))
                                {
                                    Q.Cast(minion);
                                }
                            }
                        }
                    }
                }

                if (Menu.GetBool("HarassW") && W.IsReady())
                {
                    var target = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Magical);

                    if (target.Check(W.Range))
                    {
                        SpellManager.PredCast(W, target, true);
                    }
                }
            }
        }
예제 #10
0
파일: Lucian.cs 프로젝트: xioa123/CN
        private void Cast_Q(Obj_AI_Hero forceTarget = null)
        {
            if (!Q.IsReady() || !PassiveCheck())
            {
                return;
            }

            var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);

            if (forceTarget != null)
            {
                target = forceTarget;
            }

            if (target != null && target.IsValidTarget(Q.Range))
            {
                if (Q.Cast(target, packets()) == Spell.CastStates.SuccessfullyCasted)
                {
                    Q.LastCastAttemptT = Environment.TickCount;
                    Utility.DelayAction.Add(300, () => Player.IssueOrder(GameObjectOrder.AttackUnit, target));
                    return;
                }
            }

            target = TargetSelector.GetTarget(QExtend.Range, TargetSelector.DamageType.Physical);

            if (forceTarget != null)
            {
                target = forceTarget;
            }

            if (target == null)
            {
                return;
            }

            var pred       = QExtend.GetPrediction(target, true);
            var collisions = pred.CollisionObjects;

            if (collisions.Count == 0)
            {
                return;
            }

            if (Q.Cast(collisions[0], packets()) == Spell.CastStates.SuccessfullyCasted)
            {
                Q.LastCastAttemptT = Environment.TickCount;
            }
        }
예제 #11
0
        private void SmartKs()
        {
            if (!Menu.Item("smartKS", true).GetValue <bool>())
            {
                return;
            }

            foreach (var target in ObjectManager.Get <AIHeroClient>().Where(x => x.IsValidTarget(QExtend.Range) && !x.IsDead && !x.HasBuffOfType(BuffType.Invulnerability)))
            {
                if (Q.IsKillable(target) && Player.Distance(target.Position) < QExtend.Range && Q.IsReady())
                {
                    if (target.IsValidTarget(Q.Range))
                    {
                        Q.Cast(target);
                    }
                    else
                    {
                        var pred       = QExtend.GetPrediction(target, true);
                        var collisions = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.NotAlly);

                        if (!collisions.Any() || (!target.IsMoving && Menu.Item("MovementCheck", true).GetValue <bool>()))
                        {
                            return;
                        }

                        foreach (var minion in collisions)
                        {
                            var poly = new Geometry.Polygon.Rectangle(Player.ServerPosition, Player.ServerPosition.Extend(minion.ServerPosition, QExtend.Range), QExtend.Width);

                            if (poly.IsInside(pred.UnitPosition))
                            {
                                if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                                {
                                    Q.LastCastAttemptT = Utils.TickCount;
                                    return;
                                }
                            }
                        }
                    }
                }

                if (W.IsKillable(target) && Player.Distance(target.Position) < W.Range && W.IsReady())
                {
                    W.Cast(target);
                }
            }
        }
예제 #12
0
        private void Harass()
        {
            if (!ManaManager.HasMana("Harass"))
            {
                return;
            }

            if (Menu.Item("UseQHarass", true).GetValue <bool>() && Q.IsReady())
            {
                var target = TargetSelector.GetTarget(QExtend.Range, TargetSelector.DamageType.Physical);

                if (target != null)
                {
                    if (target.IsValidTarget(Q.Range))
                    {
                        Q.Cast(target);
                    }
                    else if (target.IsValidTarget(QExtend.Range) && Menu.Item("UseQExtendHarass", true).GetValue <bool>())
                    {
                        var pred       = QExtend.GetPrediction(target, true);
                        var collisions = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.NotAlly);

                        if (!collisions.Any() || (!target.IsMoving && Menu.Item("MovementCheck", true).GetValue <bool>()))
                        {
                            return;
                        }

                        foreach (var minion in collisions)
                        {
                            var poly = new Geometry.Polygon.Rectangle(Player.ServerPosition, Player.ServerPosition.Extend(minion.ServerPosition, QExtend.Range), QExtend.Width);

                            if (poly.IsInside(pred.UnitPosition))
                            {
                                Q.Cast(minion);
                            }
                        }
                    }
                }
            }

            if (Menu.Item("UseWHarass", true).GetValue <bool>() && W.IsReady())
            {
                SpellCastManager.CastBasicSkillShot(W, W.Range, TargetSelector.DamageType.Magical, HitChance.VeryHigh);
            }
        }
예제 #13
0
        private void Cast_Q(Obj_AI_Hero forceTarget = null)
        {
            if (!Q.IsReady() || !PassiveCheck())
            {
                return;
            }

            var target = SimpleTs.GetTarget(Q.Range, SimpleTs.DamageType.Physical);

            if (forceTarget != null)
            {
                target = forceTarget;
            }

            if (target != null && target.IsValidTarget(Q.Range))
            {
                Q.CastOnUnit(target, packets());
                Utility.DelayAction.Add(25, Orbwalking.ResetAutoAttackTimer);
                Utility.DelayAction.Add(25, xSLxOrbwalker.ResetAutoAttackTimer);
                Utility.DelayAction.Add(50, () => Player.IssueOrder(GameObjectOrder.AttackTo, target.ServerPosition));
                return;
            }

            target = SimpleTs.GetTarget(QExtend.Range, SimpleTs.DamageType.Physical);

            if (forceTarget != null)
            {
                target = forceTarget;
            }

            if (target == null)
            {
                return;
            }

            var pred       = QExtend.GetPrediction(target, true);
            var collisions = pred.CollisionObjects;

            if (collisions.Count == 0)
            {
                return;
            }

            Q.CastOnUnit(collisions[0], packets());
        }
예제 #14
0
        private void CastQ(string source)
        {
            if (!Q.IsReady())
            {
                return;
            }

            var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);

            if (target != null && target.IsValidTarget(Q.Range))
            {
                SpellCastManager.CastBasicSkillShot(Q, Q.Range, TargetSelector.DamageType.Magical, HitChanceManager.GetQHitChance(source));
            }

            target = TargetSelector.GetTarget(QExtend.Range, TargetSelector.DamageType.Physical);

            if (target == null)
            {
                return;
            }

            var pred       = QExtend.GetPrediction(target, true);
            var collisions = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.NotAlly);

            if (!collisions.Any())
            {
                return;
            }

            foreach (var minion in collisions)
            {
                var poly = new Geometry.Polygon.Rectangle(Player.ServerPosition, Player.ServerPosition.Extend(minion.ServerPosition, QExtend.Range), QExtend.Width);

                if (poly.IsInside(pred.UnitPosition))
                {
                    if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                    {
                        Q.LastCastAttemptT = Utils.TickCount;
                        return;
                    }
                }
            }
        }