示例#1
0
        internal static void CastQ3()
        {
            //copy from valvesharp
            var targets = HeroManager.Enemies.Where(x => x.DistanceToPlayer() <= Q3.Range);
            var castPos = Vector3.Zero;

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

            foreach (var pred in
                     targets.Select(i => Q3.GetPrediction(i, true))
                     .Where(
                         i => i.Hitchance >= HitChance.VeryHigh ||
                         (i.Hitchance >= HitChance.High && i.AoeTargetsHitCount > 1))
                     .OrderByDescending(i => i.AoeTargetsHitCount))
            {
                castPos = pred.CastPosition;
                break;
            }

            if (castPos.IsValid())
            {
                Q3.Cast(castPos, true);
            }
        }
示例#2
0
        public static void CastQ3() //Made by Brian(Valve Sharp)
        {
            try
            {
                var targets = GameObjects.EnemyHeroes.Where(x => x.IsValidTarget(1200)).ToArray();
                var castPos = Vector3.Zero;

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

                foreach (var pred in
                         targets.Select(i => Q3.GetPrediction(i))
                         .Where(
                             i => i.Hitchance >= HitChance.High ||
                             i.Hitchance >= HitChance.Medium && i.AoeTargetsHitCount > 1)
                         .OrderByDescending(i => i.AoeTargetsHitCount))
                {
                    castPos = pred.CastPosition;
                    break;
                }

                if (castPos != Vector3.Zero)
                {
                    Q3.Cast(castPos);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error in MyEventManager.CastQ3." + ex);
            }
        }
示例#3
0
文件: Ziggs.cs 项目: tekintr/AIO
 internal static bool CastQ3(Obj_AI_Base target)
 {
     if (target != null && Q.IsReady())
     {
         var pred = Q3.GetPrediction(target);
         if (Q.IsInRange(pred.CastPosition))
         {
             return(CastQ1(target));
         }
         if (Q2.IsInRange(pred.CastPosition))
         {
             return(CastQ2(target));
         }
         if (pred.CanNext(Q3, MenuValue.General.QHitChance, false))
         {
             var castPosition  = player.Position.Extend(pred.CastPosition, player.Distance(pred.CastPosition) * QBounceRatio3).To3DWorld();
             var castPosition2 = player.Position.Extend(pred.CastPosition, player.Distance(pred.CastPosition) / QBounceRatio2);
             if (castPosition2.CountEnemyMinionsInRange(Q.Radius) < float.Epsilon && !castPosition.IsWall() && !castPosition.IsBuilding())
             {
                 if (castPosition.CountEnemyMinionsInRange(Q.Radius) < float.Epsilon && !castPosition.IsWall() && !castPosition.IsBuilding())
                 {
                     return(Q.Cast(castPosition));
                 }
             }
         }
     }
     return(false);
 }
示例#4
0
        private static void HarassLogic()
        {
            var target = TargetSelector.GetTarget(W.Range, DamageType.Mixed);
            var inputW = W.GetPrediction(target);

            if (mainMenu["Harass"].GetValue <MenuSlider>("mana%").Value <= GameObjects.Player.ManaPercent && !Ismelee())
            {
                var targetQ2  = Q2.GetTarget();
                var targetQ3  = Q3.GetTarget();
                var PlayerPos = GameObjects.Player.Position;

                var inputQ2 = Q2.GetPrediction(targetQ2);
                var inputQ3 = Q3.GetPrediction(targetQ2);


                if (mainMenu["Harass"].GetValue <MenuBool>("Q3use").Enabled&& Q.IsReady() && targetQ3.IsValidTarget() && inputQ3.Hitchance >= HitChance.VeryHigh && E2.IsReady())
                {
                    Q3.Cast(inputQ3.CastPosition);
                    E2.Cast(PlayerPos);
                }

                if (mainMenu["Harass"].GetValue <MenuBool>("Q2use").Enabled&& Q.IsReady() && targetQ2.IsValidTarget() && inputQ2.Hitchance >= HitChance.VeryHigh)
                {
                    Q2.Cast(inputQ2.CastPosition);
                }
            }
        }
示例#5
0
        private static void ComboLogic()
        {
            var targetQ2  = Q2.GetTarget();
            var targetQ3  = Q3.GetTarget();
            var targetQ4  = Q4.GetTarget();
            var PlayerPos = GameObjects.Player.Position;

            var inputQ2 = Q2.GetPrediction(targetQ2);
            var inputQ3 = Q3.GetPrediction(targetQ3);
            var inputQ4 = Q4.GetPrediction(targetQ4);

            if (mainMenu["Combo"].GetValue <MenuBool>("Q2use").Enabled&& Q.IsReady() && !E2.IsReady() && targetQ2.IsValidTarget() && inputQ2.Hitchance >= HitChance.VeryHigh)
            {
                Q2.Cast(inputQ2.CastPosition);
            }
            if (mainMenu["Combo"].GetValue <MenuBool>("Q4use").Enabled&& Q.IsReady() && targetQ4.IsValidTarget() && inputQ4.Hitchance >= HitChance.VeryHigh && E2.IsReady())
            {
                E2.Cast(inputQ4.CastPosition);
                Q4.Cast(inputQ4.CastPosition);
            }
            if (mainMenu["Combo"].GetValue <MenuBool>("Q3use").Enabled&& Q.IsReady() && targetQ3.IsValidTarget() && inputQ3.Hitchance >= HitChance.VeryHigh && E2.IsReady())
            {
                Q3.Cast(inputQ3.CastPosition);
                E2.Cast(PlayerPos);
            }
        }
示例#6
0
        internal static void Init()
        {
            foreach (var target in HeroManager.Enemies.Where(x => x.IsValidTarget(Q3.Range)))
            {
                if (!IsDashing)
                {
                    if (Menu.Item("KillStealQ3", true).GetValue <bool>() && target.IsValidTarget(Q3.Range) &&
                        Q3.IsReady() &&
                        SpellManager.HaveQ3 && target.Health <= SpellManager.GetQDmg(target))
                    {
                        var q3Pred = Q3.GetPrediction(target, true);

                        if (q3Pred.Hitchance >= HitChance.VeryHigh)
                        {
                            Q3.Cast(q3Pred.CastPosition, true);
                            return;
                        }
                    }

                    if (Menu.Item("KillStealQ", true).GetValue <bool>() && target.IsValidTarget(Q.Range) && Q.IsReady() &&
                        !SpellManager.HaveQ3 && target.Health <= SpellManager.GetQDmg(target))
                    {
                        var qPred = Q.GetPrediction(target, true);

                        if (qPred.Hitchance >= HitChance.VeryHigh)
                        {
                            Q.Cast(qPred.CastPosition, true);
                            return;
                        }
                    }

                    if (Menu.Item("KillStealE", true).GetValue <bool>() && target.IsValidTarget(E.Range) && E.IsReady() &&
                        SpellManager.CanCastE(target) && target.Health <= SpellManager.GetEDmg(target))
                    {
                        E.CastOnUnit(target, true);
                        return;
                    }
                }
                else
                {
                    if (Menu.Item("KillStealQ3", true).GetValue <bool>() && target.Distance(lastEPos) <= 220 &&
                        Q3.IsReady() && SpellManager.HaveQ3 && target.Health <= SpellManager.GetQDmg(target))
                    {
                        Q3.Cast(Me.Position, true);
                    }

                    if (Menu.Item("KillStealQ", true).GetValue <bool>() && target.Distance(lastEPos) <= 220 && Q.IsReady() &&
                        !SpellManager.HaveQ3 && target.Health <= SpellManager.GetQDmg(target))
                    {
                        Q.Cast(Me.Position, true);
                    }
                }
            }
        }
示例#7
0
        private static void JungleClearEvent()
        {
            try
            {
                var mobs = GameObjects.Jungle.Where(x => x.IsValidTarget(Q3.Range) &&
                                                    x.Health > 5 && x.GetJungleType() != JungleType.Unknown).ToArray();

                if (mobs.Any())
                {
                    var mob = mobs.OrderBy(x => x.MaxHealth).FirstOrDefault();

                    if (mob != null)
                    {
                        if (ClearMenu["FlowersYasuo.ClearMenu.JungleClearE"].GetValue <MenuBool>().Enabled&&
                            E.IsReady() && mob.IsValidTarget(E.Range) && MyExtraManager.CanCastE(mob))
                        {
                            E.CastOnUnit(mob);
                        }

                        if (ClearMenu["FlowersYasuo.ClearMenu.JungleClearQ"].GetValue <MenuBool>().Enabled&&
                            Q.IsReady() && !HaveQ3 && mob.IsValidTarget(Q.Range))
                        {
                            var pred = Q.GetPrediction(mob);
                            if (pred.Hitchance >= HitChance.Medium)
                            {
                                Q.Cast(pred.CastPosition);
                            }
                        }

                        if (ClearMenu["FlowersYasuo.ClearMenu.JungleClearQ3"].GetValue <MenuBool>().Enabled&&
                            Q3.IsReady() && HaveQ3 &&
                            mob.IsValidTarget(Q3.Range))
                        {
                            var pred = Q3.GetPrediction(mob);
                            if (pred.Hitchance >= HitChance.Medium)
                            {
                                Q3.Cast(pred.CastPosition);
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error in MyEventManager.JungleClearEvent." + ex);
            }
        }
示例#8
0
        internal static void Init()
        {
            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed || IsDashing)
            {
                return;
            }

            var minions = MinionManager.GetMinions(Me.Position, Q3.Range);

            foreach (
                var minion in
                minions.Where(x => !x.IsDead && HealthPrediction.GetHealthPrediction(x, 2500) > 0)
                .OrderByDescending(m => m.Health))
            {
                if (Menu.Item("LastHitQ", true).GetValue <bool>() && Q.IsReady() && !SpellManager.HaveQ3)
                {
                    if (minion.IsValidTarget(Q.Range) && minion.Health < Q.GetDamage(minion))
                    {
                        Q.Cast(minion, true);
                    }
                }

                if (Menu.Item("LastHitQ3", true).GetValue <bool>() && Q.IsReady() && SpellManager.HaveQ3)
                {
                    if (minion.IsValidTarget(Q3.Range) && minion.Health < Q3.GetDamage(minion))
                    {
                        var qPred = Q3.GetPrediction(minion, true);

                        if (qPred.Hitchance >= HitChance.VeryHigh)
                        {
                            Q3.Cast(qPred.CastPosition, true);
                        }
                    }
                }

                if (Menu.Item("LastHitE", true).GetValue <bool>() && E.IsReady())
                {
                    if (minion.IsValidTarget(E.Range) && minion.Health < E.GetDamage(minion) &&
                        SpellManager.CanCastE(minion) &&
                        (Menu.Item("LastHitETurret", true).GetValue <bool>() || !UnderTower(PosAfterE(minion))))
                    {
                        E.CastOnUnit(minion, true);
                    }
                }
            }
        }
示例#9
0
 internal static bool CastQ3(Obj_AI_Base target)
 {
     if (target != null && Q.IsReady())
     {
         var pred = Q3.GetPrediction(target);
         if (Q.IsInRange(pred.CastPosition))
         {
             return(CastQ1(target));
         }
         if (Q2.IsInRange(pred.CastPosition))
         {
             return(CastQ2(target));
         }
         if (pred.CanNext(Q3, MenuValue.General.QHitChance, false))
         {
             var castPosition = player.Position.Extend(pred.CastPosition, player.Distance(pred.CastPosition) * QBounceRatio3).To3DWorld();
             return(Q.Cast(castPosition));
         }
     }
     return(false);
 }
示例#10
0
        private static void LastHitEvent()
        {
            try
            {
                if (IsMyDashing)
                {
                    return;
                }

                var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q3.Range) && x.Health > 5).ToArray();

                if (minions.Any())
                {
                    foreach (var minion in minions)
                    {
                        if (LastHitMenu["FlowersYasuo.LastHitMenu.Q"].GetValue <MenuBool>().Enabled&&
                            !HaveQ3 && Q.IsReady())
                        {
                            if (minion.IsValidTarget(Q.Range) && minion.Health < Me.GetSpellDamage(minion, SpellSlot.Q))
                            {
                                var pred = Q.GetPrediction(minion);
                                if (pred.Hitchance >= HitChance.Medium)
                                {
                                    Q.Cast(pred.CastPosition);
                                }
                            }
                        }

                        if (LastHitMenu["FlowersYasuo.LastHitMenu.Q3"].GetValue <MenuBool>().Enabled&&
                            HaveQ3 && Q.IsReady())
                        {
                            if (minion.IsValidTarget(Q3.Range) && HaveQ3 &&
                                minion.Health < Me.GetSpellDamage(minion, SpellSlot.Q))
                            {
                                var pred = Q3.GetPrediction(minion);
                                if (pred.Hitchance >= HitChance.Medium)
                                {
                                    Q3.Cast(pred.CastPosition);
                                }
                            }
                        }

                        if (LastHitMenu["FlowersYasuo.LastHitMenu.E"].GetValue <MenuBool>().Enabled&&
                            E.IsReady())
                        {
                            if (minion.IsValidTarget(E.Range) &&
                                minion.Health <
                                Me.GetSpellDamage(minion, SpellSlot.E) +
                                Me.GetSpellDamage(minion, SpellSlot.E, DamageStage.Buff) &&
                                MyExtraManager.CanCastE(minion) &&
                                !MyExtraManager.UnderTower(MyExtraManager.PosAfterE(minion)) &&
                                MyExtraManager.PosAfterE(minion).IsSafePosition())
                            {
                                E.CastOnUnit(minion);
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error in MyEventManager.LastHitEvent." + ex);
            }
        }
示例#11
0
        private static void LaneClearEvent()
        {
            try
            {
                if (ClearMenu["FlowersYasuo.ClearMenu.LaneClearTurret"].GetValue <MenuBool>().Enabled&& Me.IsUnderEnemyTurret())
                {
                    return;
                }

                var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q3.Range) && x.Health > 5).ToArray();

                if (minions.Any())
                {
                    if (ClearMenu["FlowersYasuo.ClearMenu.LaneClearE"].GetValue <MenuBool>().Enabled&& E.IsReady())
                    {
                        foreach (
                            var minion in
                            minions.Where(
                                x =>
                                x.DistanceToPlayer() <= E.Range && MyExtraManager.CanCastE(x) &&
                                x.Health <=
                                (Q.IsReady()
                                        ? Me.GetSpellDamage(x, SpellSlot.Q) + Me.GetSpellDamage(x, SpellSlot.E)
                                        : Me.GetSpellDamage(x, SpellSlot.E))))
                        {
                            if (minion != null && minion.IsValidTarget(E.Range) &&
                                (!ClearMenu["FlowersYasuo.ClearMenu.LaneClearTurret"].GetValue <MenuBool>().Enabled&&
                                 !MyExtraManager.UnderTower(MyExtraManager.PosAfterE(minion)) ||
                                 MyExtraManager.UnderTower(MyExtraManager.PosAfterE(minion))) &&
                                MyExtraManager.PosAfterE(minion).IsSafePosition())
                            {
                                E.CastOnUnit(minion);
                            }
                        }
                    }

                    if (IsMyDashing)
                    {
                        if (ClearMenu["FlowersYasuo.ClearMenu.LaneClearEQ"].GetValue <MenuBool>().Enabled&&
                            Q.IsReady() && !HaveQ3)
                        {
                            if (minions.Count(x => x.Health > 0 && x.IsValidTarget(220, true, YasuolastEPos)) >= 1)
                            {
                                Q.Cast(Me.PreviousPosition);
                            }
                        }
                    }
                    else
                    {
                        foreach (var minion in minions.Where(x => x.IsValidTarget(Q3.Range)))
                        {
                            if (minion != null && minion.Health > 0)
                            {
                                if (ClearMenu["FlowersYasuo.ClearMenu.LaneClearQ"].GetValue <MenuBool>().Enabled&&
                                    Q.IsReady() && !HaveQ3 && minion.IsValidTarget(Q.Range))
                                {
                                    var pred = Q.GetPrediction(minion);
                                    if (pred.Hitchance >= HitChance.Medium)
                                    {
                                        Q.Cast(pred.CastPosition);
                                    }
                                }

                                if (ClearMenu["FlowersYasuo.ClearMenu.LaneClearQ3"].GetValue <MenuBool>().Enabled&&
                                    Q3.IsReady() && HaveQ3 && minion.IsValidTarget(Q3.Range))
                                {
                                    var pred = Q3.GetPrediction(minion);
                                    if (pred.Hitchance >= HitChance.Medium)
                                    {
                                        Q3.Cast(pred.CastPosition);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error in MyEventManager.LaneClearEvent." + ex);
            }
        }
示例#12
0
        //And it's all stolen too :C
        static void CastQ(Obj_AI_Base target)
        {
            PredictionOutput prediction;

            if (Vector3.Distance(player.Position, target.Position) < Q1.Range)
            {
                var oldrange = Q1.Range;
                Q1.Range   = Q2.Range;
                prediction = Q1.GetPrediction(target, true);
                Q1.Range   = oldrange;
            }
            else if (Vector3.Distance(player.Position, target.Position) < Q2.Range)
            {
                var oldrange = Q2.Range;
                Q2.Range   = Q3.Range;
                prediction = Q2.GetPrediction(target, true);
                Q2.Range   = oldrange;
            }
            else if (Vector3.Distance(player.Position, target.Position) < Q3.Range)
            {
                prediction = Q3.GetPrediction(target, true);
            }
            else
            {
                return;
            }

            if (prediction.Hitchance >= HitChance.High)
            {
                if (ObjectManager.Player.ServerPosition.Distance(prediction.CastPosition) <= Q1.Range + Q1.Width)
                {
                    Vector3 p;
                    if (ObjectManager.Player.ServerPosition.Distance(prediction.CastPosition) > 300)
                    {
                        p = prediction.CastPosition -
                            100 *
                            (prediction.CastPosition.To2D() - ObjectManager.Player.ServerPosition.To2D()).Normalized()
                            .To3D();
                    }
                    else
                    {
                        p = prediction.CastPosition;
                    }

                    Q1.Cast(p);
                    SMouse.addMouseEvent(p, false, CRB);
                    lastQ = Game.Time;
                }
                else if (ObjectManager.Player.ServerPosition.Distance(prediction.CastPosition) <=
                         ((Q1.Range + Q2.Range) / 2))
                {
                    var p = ObjectManager.Player.ServerPosition.To2D()
                            .Extend(prediction.CastPosition.To2D(), Q1.Range - 100);

                    if (!CheckQCollision(target, prediction.UnitPosition, p.To3D()))
                    {
                        Q1.Cast(p.To3D());
                        SMouse.addMouseEvent(p.To3D(), false, CRB);
                        lastQ = Game.Time;
                    }
                }
                else
                {
                    var p = ObjectManager.Player.ServerPosition.To2D() +
                            Q1.Range *
                            (prediction.CastPosition.To2D() - ObjectManager.Player.ServerPosition.To2D()).Normalized
                                ();

                    if (!CheckQCollision(target, prediction.UnitPosition, p.To3D()))
                    {
                        Q1.Cast(p.To3D());
                        SMouse.addMouseEvent(p.To3D(), false, CRB);
                        lastQ = Game.Time;
                    }
                }
            }
        }
示例#13
0
        private static void CastQ(Obj_AI_Base target)
        {
            PredictionOutput prediction;

            if (Player.Distance(target) < Q.Range)
            {
                var oldrange = Q.Range;
                Q.Range    = Q2.Range;
                prediction = Q.GetPrediction(target);
                Q.Range    = oldrange;
            }
            else if (Player.Distance(target) < Q2.Range)
            {
                var oldrange = Q2.Range;
                Q2.Range   = Q3.Range;
                prediction = Q2.GetPrediction(target);
                Q2.Range   = oldrange;
            }
            else if (Player.Distance(target) < Q3.Range)
            {
                prediction = Q3.GetPrediction(target);
            }
            else
            {
                return;
            }

            if (prediction.HitChance >= HitChance.High)
            {
                if (Player.ServerPosition.Distance(prediction.CastPosition) <= Q.Range + Q.Width)
                {
                    Vector3 p;
                    if (Player.ServerPosition.Distance(prediction.CastPosition) > 300)
                    {
                        p = prediction.CastPosition - 100 * (prediction.CastPosition.To2D() - Player.ServerPosition.To2D()).Normalized()
                            .To3D();
                    }
                    else
                    {
                        p = prediction.CastPosition;
                    }
                    Q.Cast(p);
                }
                else if (Player.ServerPosition.Distance(prediction.CastPosition) <= (Q.Range + Q2.Range) / 2)
                {
                    var p = Player.ServerPosition.To2D().Extend(prediction.CastPosition.To2D(), Q.Range - 100);
                    if (!QCollision(target, prediction.UnitPosition, p.To3D()))
                    {
                        Q.Cast(p.To3D());
                    }
                }
                else
                {
                    var p = Player.ServerPosition.To2D() + Q.Range * (prediction.CastPosition.To2D() - Player.ServerPosition.To2D()).Normalized();
                    if (!QCollision(target, prediction.UnitPosition, p.To3D()))
                    {
                        Q.Cast(p.To3D());
                    }
                }
            }
        }
示例#14
0
        private static void Game_OnUpdate(System.EventArgs args)
        {
            if (ObjectManager.Player.IsDead)
            {
                return;
            }


            if (Orbwalker.ActiveMode == OrbwalkerMode.Combo)
            {
                //Game.Print("In Combo");
                YoneCombo();
            }

            if (Orbwalker.ActiveMode == OrbwalkerMode.LaneClear && !FunnySlayerCommon.OnAction.OnAA)
            {
                var Qminions = ObjectManager.Get <AIBaseClient>().Where(i => !i.IsDead && !i.IsAlly && i.IsValidTarget(isQ3() ? 900 : 475) && !i.Position.IsBuilding()).OrderByDescending(i => i.Health);
                if (Qminions != null && Q1.IsReady())
                {
                    foreach (var min in Qminions)
                    {
                        if (!min.IsMinion())
                        {
                            if (isQ3())
                            {
                                var qFarm = Q3.GetPrediction(min);

                                if (qFarm.Hitchance >= HitChance.High && qFarm.CastPosition.DistanceToPlayer() <= 900 && !Yasuo.YasuoHelper.UnderTower(objPlayer.Position.Extend(qFarm.CastPosition, 500)))
                                {
                                    Q3.Cast(qFarm.CastPosition);
                                }
                            }
                            else
                            {
                                var qFarm = Q1.GetPrediction(min);

                                if (qFarm.Hitchance >= HitChance.High && qFarm.CastPosition.DistanceToPlayer() <= 475)
                                {
                                    Q1.Cast(qFarm.CastPosition);
                                }
                            }
                        }
                        else
                        {
                            if (isQ3())
                            {
                                if (Orbwalker.ActiveMode == OrbwalkerMode.Harass)
                                {
                                    return;
                                }
                                else
                                {
                                    var qFarm = Q3.GetLineFarmLocation(Qminions.ToList());

                                    if (qFarm.MinionsHit >= 1 && !Yasuo.YasuoHelper.UnderTower(objPlayer.Position.Extend(qFarm.Position, 500)))
                                    {
                                        Q3.Cast(qFarm.Position);
                                    }
                                }
                            }
                            else
                            {
                                if (Orbwalker.ActiveMode == OrbwalkerMode.Harass)
                                {
                                    if (min.Health < objPlayer.GetSpellDamage(min, SpellSlot.Q) && min.IsValidTarget(Q1.Range))
                                    {
                                        Q1.Cast(min.Position);
                                    }
                                }
                                else
                                {
                                    var qFarm = Q1.GetLineFarmLocation(Qminions.ToList());

                                    if (qFarm.MinionsHit >= 1)
                                    {
                                        Q1.Cast(qFarm.Position);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
示例#15
0
        private static void CastQ(Obj_AI_Base target)
        {
            if (Q.IsReady() && TickManager.NoLag(1) && target != null)
            {
                PredictionResult prediction;

                if (Q.IsInRange(target))
                {
                    prediction = Q.GetPrediction(target);
                    Q.Cast(prediction.CastPosition);
                }
                else if (Q2.IsInRange(target))
                {
                    prediction = Q2.GetPrediction(target);
                    Q2.Cast(prediction.CastPosition);
                }
                else if (Q3.IsInRange(target))
                {
                    prediction = Q3.GetPrediction(target);
                    Q3.Cast(prediction.CastPosition);
                }
                else
                {
                    return;
                }
                if (prediction.HitChance < HitChance.High)
                {
                    return;
                }
                if (Player.ServerPosition.Distance(prediction.CastPosition) <= Q.Range + Q.Width)
                {
                    Vector3 p;
                    if (Player.ServerPosition.Distance(prediction.CastPosition) > 300)
                    {
                        p = prediction.CastPosition -
                            100 *
                            (prediction.CastPosition.To2D() - Player.ServerPosition.To2D()).Normalized()
                            .To3D();
                    }
                    else
                    {
                        p = prediction.CastPosition;
                    }

                    Q.Cast(p);
                }
                else if (Player.ServerPosition.Distance(prediction.CastPosition) <=
                         (Q.Range + Q2.Range) / 2.0)
                {
                    var p = Player.ServerPosition.To2D()
                            .Extend(prediction.CastPosition.To2D(), Q.Range - 100);

                    if (!CheckQCollision(target, prediction.UnitPosition, p.To3D()))
                    {
                        Q.Cast(p.To3D());
                    }
                }
                else
                {
                    var p = Player.ServerPosition.To2D() +
                            Q.Range *
                            (prediction.CastPosition.To2D() - Player.ServerPosition.To2D()).Normalized
                                ();

                    if (!CheckQCollision(target, prediction.UnitPosition, p.To3D()))
                    {
                        Q.Cast(p.To3D());
                    }
                }
            }
        }
示例#16
0
        internal static void Init()
        {
            if (!IsDashing)
            {
                if (SpellManager.HaveQ3)
                {
                    var target = TargetSelector.GetTarget(1200, TargetSelector.DamageType.Physical);

                    if (Menu.Item("HarassE", true).GetValue <bool>() && E.IsReady() && Q3.IsReady() &&
                        target.IsValidTarget(1200) &&
                        Utils.TickCount - lastHarassTime > 5000)
                    {
                        SpellManager.EGapMouse(target, Menu.Item("HarassTower", true).GetValue <bool>(), 250);
                    }

                    if (Menu.Item("HarassQ3", true).GetValue <bool>() && Q3.IsReady() &&
                        target.IsValidTarget(1200))
                    {
                        if (Menu.Item("HarassTower", true).GetValue <bool>() || !Me.UnderTurret(true))
                        {
                            var q3Pred = Q3.GetPrediction(target, true);

                            if (q3Pred.Hitchance >= HitChance.VeryHigh)
                            {
                                Q3.Cast(q3Pred.CastPosition, true);
                            }
                        }
                    }
                }
                else
                {
                    if (Menu.Item("HarassQ", true).GetValue <bool>() && Q.IsReady())
                    {
                        if (Menu.Item("HarassTower", true).GetValue <bool>() || !Me.UnderTurret(true))
                        {
                            if (Me.CountEnemiesInRange(Q.Range) == 0)
                            {
                                var minions =
                                    MinionManager
                                    .GetMinions(Me.Position, Q.Range)
                                    .FirstOrDefault(x => x.Health < Q.GetDamage(x));

                                if (minions != null && minions.IsValidTarget(Q.Range))
                                {
                                    Q.Cast(minions, true);
                                }
                            }

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

                            if (target.IsValidTarget(Q.Range))
                            {
                                var qPred = Q.GetPrediction(target, true);

                                if (qPred.Hitchance >= HitChance.VeryHigh)
                                {
                                    Q.Cast(qPred.CastPosition, true);
                                }
                            }
                        }
                    }
                }
            }
            else
            {
                if (Menu.Item("HarassQ3", true).GetValue <bool>() && Q3.IsReady() && SpellManager.HaveQ3 &&
                    lastEPos.CountEnemiesInRange(220) > 0)
                {
                    Utility.DelayAction.Add(10, Q3Harass);
                }
            }
        }