Exemple #1
0
        public static void CastQ(Obj_AI_Base target)
        {
            var QEB = GetQ();

            if (!Q.IsReady() || target == null || target.IsInvulnerable)
            {
                return;
            }

            if (HasQ3())
            {
                var pred = Q3EB.GetPrediction(target);
                if (pred.HitChancePercent >= 80)
                {
                    Q3.Cast(target);
                }
            }
            else
            {
                var pred = QEB.GetPrediction(target);
                if (pred.HitChancePercent >= 80)
                {
                    Q.Cast(target);
                }
            }
        }
Exemple #2
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);
                }
            }
        }
Exemple #3
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);
            }
        }
Exemple #4
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);
            }
        }
Exemple #5
0
        private void OnJungleClear()
        {
            foreach (var jungle in GameObjects.Jungle.Where(m => m.IsValidTarget(Q.Range)).ToList())
            {
                if (!jungle.IsValidTarget() || !jungle.IsValidSpellTarget())
                {
                    return;
                }

                if (Q.Ready)
                {
                    bool useQ  = Menu["jungleclear"]["useq"].Enabled;
                    bool useQ2 = Menu["jungleclear"]["useq2"].Enabled;
                    if (useQ && jungle.IsValidTarget(Q.Range) && Player.SpellBook.GetSpell(SpellSlot.Q).Name != "YasuoQ3W" && !Player.IsDashing())
                    {
                        Q.Cast(jungle);
                    }
                    else if (useQ2 && jungle.IsValidTarget(Q2.Range) && Player.SpellBook.GetSpell(SpellSlot.Q).Name == "YasuoQ3W" && !Player.IsDashing())
                    {
                        Q3.Cast(jungle);
                    }
                }

                bool useE = Menu["jungleclear"]["usee"].Enabled;
                if (E.Ready && useE && jungle.IsValidTarget(E.Range))
                {
                    E.Cast(jungle);
                }
            }
        }
Exemple #6
0
        public static void Init()
        {
            Orbwalking.MoveTo(Game.CursorPos);

            if (!SpellManager.HaveQ3)
            {
                if (Q.IsReady())
                {
                    var minion =
                        MinionManager.GetMinions(Me.Position, Q.Range, MinionTypes.All, MinionTeam.NotAlly)
                        .FirstOrDefault();

                    if (minion != null && minion.DistanceToPlayer() <= Q.Range)
                    {
                        Q.Cast(minion);
                    }
                }
            }
            else
            {
                if (Me.IsDashing() && Flash != SpellSlot.Unknown && Flash.IsReady())
                {
                    var bestPos =
                        FlashPoints().Where(x => HeroManager.Enemies.Count(a => a.IsValidTarget(600f, true, x)) > 0)
                        .OrderByDescending(x => HeroManager.Enemies.Count(i => i.Distance(x, true) <= 220 * 220))
                        .FirstOrDefault();

                    if (bestPos.IsValid() && bestPos.CountEnemiesInRange(220) > 0 && Q3.Cast(bestPos, true))
                    {
                        Utility.DelayAction.Add(10 + (Game.Ping / 2 - 5),
                                                () => Me.Spellbook.CastSpell(Flash, bestPos));
                    }
                }

                if (E.IsReady())
                {
                    var allTargets = new List <Obj_AI_Base>();

                    allTargets.AddRange(MinionManager.GetMinions(Me.Position, E.Range + 65, MinionTypes.All,
                                                                 MinionTeam.NotAlly));
                    allTargets.AddRange(HeroManager.Enemies.Where(x => !x.IsDead && x.DistanceToPlayer() <= E.Range + 65));

                    if (allTargets.Any())
                    {
                        var eTarget =
                            allTargets.Where(x => x.IsValidTarget(E.Range + 50) && SpellManager.CanCastE(x))
                            .OrderByDescending(
                                x =>
                                HeroManager.Enemies.Count(
                                    t => t.IsValidTarget(600f, true, PosAfterE(x))))
                            .FirstOrDefault();

                        if (eTarget != null)
                        {
                            E.CastOnUnit(eTarget, true);
                        }
                    }
                }
            }
        }
 private static void Q3Harass()
 {
     if (Q3.Cast(Me.Position, true))
     {
         lastHarassTime = Utils.TickCount;
     }
 }
Exemple #8
0
        private static void BeyBlade()
        {
            if (!Common.CanFlash)
            {
                return;
            }
            if (Q.IsReady() && haveQ3 && IsDashing && CanCastQCir)
            {
                var hits =
                    GameObjects.EnemyHeroes.Count(
                        i => i.LSIsValidTarget() && Q3.GetPredPosition(i).Distance(posDash) < Q3.Range + FlashRange);
                if (hits > 0 && Q3.Cast(posDash))
                {
                    //DelayAction.Add();
                }
            }
            if (!E.IsReady() || IsDashing)
            {
                return;
            }
            var obj =
                Common.ListEnemies(true)
                .Where(i => i.LSIsValidTarget(E.Range) && !HaveE(i))
                .MaxOrDefault(
                    i =>
                    GameObjects.EnemyHeroes.Count(
                        a =>
                        !a.Compare(i) && a.LSIsValidTarget() &&
                        Q3.GetPredPosition(a).Distance(GetPosAfterDash(i)) < Q3.Range + FlashRange - 50));

            if (obj != null && E.CastOnUnit(obj))
            {
                lastE = Variables.TickCount;
            }
        }
Exemple #9
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);
            }
        }
Exemple #10
0
        private void OnLastHit()
        {
            foreach (var minion in GetEnemyLaneMinionsTargetsInRange(Q3.Range))
            {
                if (!minion.IsValidTarget())
                {
                    return;
                }
                if (Q.Ready)
                {
                    bool useQ  = Menu["lasthit"]["useq"].Enabled;
                    bool useQ2 = Menu["lasthit"]["useq2"].Enabled;
                    if (useQ && minion.IsValidTarget(Q.Range) && Player.SpellBook.GetSpell(SpellSlot.Q).Name == "YasuoQW" && Player.GetSpellDamage(minion, SpellSlot.Q) >= minion.Health && !Player.IsDashing())
                    {
                        Q.Cast(minion);
                    }
                    if (useQ && minion.IsValidTarget(Q.Range) && Player.SpellBook.GetSpell(SpellSlot.Q).Name == "YasuoQ2W" && Player.GetSpellDamage(minion, SpellSlot.Q) >= minion.Health && !Player.IsDashing())
                    {
                        Q2.Cast(minion);
                    }
                    else if (useQ2 && minion.IsValidTarget(Q3.Range) && Player.SpellBook.GetSpell(SpellSlot.Q).Name == "YasuoQ3W" && !Player.IsDashing() && Player.GetSpellDamage(minion, SpellSlot.Q) >= minion.Health)
                    {
                        Q3.Cast(minion);
                    }
                }

                bool useE = Menu["lasthit"]["usee"].Enabled;
                if (E.Ready && useE && minion.IsValidTarget(E.Range) && Player.GetSpellDamage(minion, SpellSlot.E) >= minion.Health)
                {
                    E.Cast(minion);
                }
            }
        }
Exemple #11
0
        private void OnHarass()
        {
            bool useQ = Menu["harass"]["useq"].Enabled;

            if (Q.Ready && useQ && Player.SpellBook.GetSpell(SpellSlot.Q).Name == "YasuoQW" && !Player.IsDashing())
            {
                var qtarget = GetBestEnemyHeroTargetInRange(Q.Range);
                if (qtarget.IsValidTarget(Q.Range) && qtarget != null)
                {
                    Q.Cast(qtarget);
                }
            }
            if (Q.Ready && useQ && Player.SpellBook.GetSpell(SpellSlot.Q).Name == "YasuoQ2W" && !Player.IsDashing())
            {
                var qtarget = GetBestEnemyHeroTargetInRange(Q2.Range);
                if (qtarget.IsValidTarget(Q2.Range) && qtarget != null)
                {
                    Q2.Cast(qtarget);
                }
            }

            bool useQ2 = Menu["harass"]["useq2"].Enabled;

            if (Q.Ready && useQ2 && Player.SpellBook.GetSpell(SpellSlot.Q).Name == "YasuoQ3W" && !Player.IsDashing())
            {
                var qtarget = GetBestEnemyHeroTargetInRange(Q3.Range);
                if (qtarget.IsValidTarget(Q3.Range) && qtarget != null)
                {
                    Q3.Cast(qtarget);
                }
            }
        }
Exemple #12
0
        private void Killsteal()
        {
            if (Q.Ready && Menu["killsteal"]["useq"].Enabled && Player.SpellBook.GetSpell(SpellSlot.Q).Name == "YasuoQW")
            {
                var besttarget = GetBestKillableHero(Q, DamageType.Physical, false);
                if (besttarget != null && Player.GetSpellDamage(besttarget, SpellSlot.Q) >= besttarget.Health && !Player.IsDashing() && besttarget.IsValidTarget(Q.Range))
                {
                    Q.Cast(besttarget);
                }
            }

            if (Q.Ready && Menu["killsteal"]["useq"].Enabled && Player.SpellBook.GetSpell(SpellSlot.Q).Name == "YasuoQ2W")
            {
                var besttarget = GetBestKillableHero(Q, DamageType.Physical, false);
                if (besttarget != null && Player.GetSpellDamage(besttarget, SpellSlot.Q) >= besttarget.Health && !Player.IsDashing() && besttarget.IsValidTarget(Q.Range))
                {
                    Q2.Cast(besttarget);
                }
            }

            if (Q.Ready && Menu["killsteal"]["useq2"].Enabled && Player.SpellBook.GetSpell(SpellSlot.Q).Name == "YasuoQ3W")
            {
                var besttarget = GetBestKillableHero(Q, DamageType.Physical, false);
                if (besttarget != null && Player.GetSpellDamage(besttarget, SpellSlot.Q) >= besttarget.Health && !Player.IsDashing() && besttarget.IsValidTarget(Q3.Range))
                {
                    {
                        Q3.Cast(besttarget);
                    }
                }
            }

            if (E.Ready && Menu["killsteal"]["usee"].Enabled)
            {
                var besttarget = GetBestKillableHero(E, DamageType.Mixed, false);
                if (besttarget != null && Player.GetSpellDamage(besttarget, SpellSlot.E) >= besttarget.Health && besttarget.IsValidTarget(E.Range))
                {
                    E.Cast(besttarget);
                }
            }

            if (R.Ready && Menu["killsteal"]["user"].Enabled)
            {
                var besttarget = GetBestKillableHero(R, DamageType.Physical, false);
                if (besttarget != null && Player.GetSpellDamage(besttarget, SpellSlot.R) >= besttarget.Health && besttarget.IsValidTarget(R.Range) && (besttarget.HasBuffOfType(BuffType.Knockup) || besttarget.HasBuffOfType(BuffType.Knockback)))
                {
                    R.Cast();
                }
            }

            if (Menu["killsteal"]["ignite"].Enabled && Ignite != null)
            {
                var besttarget = GetBestKillableHero(Ignite, DamageType.True, false);
                if (besttarget != null && IgniteDamages - 100 >= besttarget.Health && besttarget.IsValidTarget(Ignite.Range))
                {
                    Ignite.CastOnUnit(besttarget);
                }
            }
        }
 internal static void Init(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs Args)
 {
     if (Menu.Item("Q3Int", true).GetValue <bool>() && Q3.IsReady() && SpellManager.HaveQ3)
     {
         if (sender != null && sender.IsValidTarget(Q3.Range) && Args.DangerLevel >= Interrupter2.DangerLevel.Medium)
         {
             Q3.Cast(sender);
         }
     }
 }
Exemple #14
0
        private static bool CastQCir(List <Obj_AI_Base> obj)
        {
            if (obj.Count == 0)
            {
                return(false);
            }
            var target = obj.FirstOrDefault();

            return(target != null && Q3.Cast(target.ServerPosition));
        }
Exemple #15
0
        private static bool CastQCir(List <Obj_AI_Base> obj)
        {
            if (obj.Count == 0)
            {
                return(false);
            }
            var target = obj.FirstOrDefault();

            return(target != null && Q3.Cast(!haveQ3 ? Q.GetPredPosition(target) : Q2.GetPredPosition(target)));
        }
Exemple #16
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);
                    }
                }
            }
        }
Exemple #17
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"].Enabled && !HaveQ3 && Q.Ready)
                        {
                            if (minion.IsValidTarget(Q.Range) && minion.Health < Me.GetSpellDamage(minion, SpellSlot.Q))
                            {
                                Q.Cast(minion);
                            }
                        }

                        if (LastHitMenu["FlowersYasuo.LastHitMenu.Q3"].Enabled && HaveQ3 && Q.Ready)
                        {
                            if (minion.IsValidTarget(Q3.Range) && HaveQ3 &&
                                minion.Health < Me.GetSpellDamage(minion, SpellSlot.Q))
                            {
                                Q3.Cast(minion);
                            }
                        }

                        if (LastHitMenu["FlowersYasuo.LastHitMenu.E"].Enabled && E.Ready)
                        {
                            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);
            }
        }
        internal static void Init(ActiveGapcloser Args)
        {
            if (Menu.Item("Q3Anti", true).GetValue <bool>() && Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
            {
                var target = Args.Sender;

                if (target.IsValidTarget(400) && Q3.IsReady() && SpellManager.HaveQ3)
                {
                    Q3.Cast(target);
                }
            }
        }
Exemple #19
0
        private static bool CastQCir(List <Obj_AI_Base> obj)
        {
            if (obj.Count == 0)
            {
                return(false);
            }
            var target = obj.FirstOrDefault();

            if (target != null)
            {
                Q3.Cast(target);
            }
            return(true);
        }
Exemple #20
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);
            }
        }
Exemple #21
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);
                    }
                }
            }
        }
Exemple #22
0
        private static void BeyBlade()
        {
            if (!Common.CanFlash || !Q.IsReady() || !haveQ3)
            {
                return;
            }
            if (IsDashing && CanCastQCir)
            {
                var bestHit = 0;
                var bestPos = new Vector3();
                for (var i = 0; i < 360; i += 10)
                {
                    var pos =
                        (posDash.ToVector2() + FlashRange * new Vector2(1, 0).Rotated((float)(Math.PI * i / 180.0)))
                        .ToVector3();
                    var hits = GameObjects.EnemyHeroes.Count(a => a.IsValidTarget(Q3.Width, true, pos));
                    if (hits > bestHit)
                    {
                        bestHit = hits;
                        bestPos = pos;
                    }
                }
                if (bestPos.IsValid() && Q3.Cast(Player.Position))
                {
                    Player.Spellbook.CastSpell(Flash, bestPos);
                }
            }
            if (!E.IsReady())
            {
                return;
            }
            var obj =
                Common.ListEnemies(true)
                .Where(i => i.IsValidTarget(E.Range) && !HaveE(i))
                .MaxOrDefault(
                    i =>
                    GameObjects.EnemyHeroes.Count(
                        a =>
                        !a.Compare(i) && a.IsValidTarget(Q3.Width / 2 + FlashRange - 50, true, GetPosAfterDash(i))));

            if (obj != null)
            {
                E.CastOnUnit(obj);
            }
        }
Exemple #23
0
        internal static void Init()
        {
            var mobs = MinionManager.GetMinions(Me.ServerPosition, Q3.Range, MinionTypes.All, MinionTeam.Neutral,
                                                MinionOrderTypes.MaxHealth);

            if (mobs.Any())
            {
                var mob = mobs.FirstOrDefault(x => x.IsValidTarget(E.Range) && SpellManager.CanCastE(x));

                if (Menu.Item("JungleClearE", true).GetValue <bool>() && E.IsReady() &&
                    mob != null && mob.IsValidTarget(E.Range))
                {
                    E.CastOnUnit(mob, true);
                }

                if (Menu.Item("JungleClearQ", true).GetValue <bool>() && Q.IsReady() && !SpellManager.HaveQ3)
                {
                    var qFarm = MinionManager.GetBestLineFarmLocation(mobs.Select(x => x.Position.To2D()).ToList(),
                                                                      Q.Width, Q.Range);

                    if (qFarm.MinionsHit >= 1)
                    {
                        Q.Cast(qFarm.Position, true);
                    }
                }

                if (Menu.Item("JungleClearQ3", true).GetValue <bool>() && Q3.IsReady() && SpellManager.HaveQ3)
                {
                    var q3Farm = MinionManager.GetBestLineFarmLocation(mobs.Select(x => x.Position.To2D()).ToList(),
                                                                       Q3.Width, Q3.Range);

                    if (q3Farm.MinionsHit >= 1)
                    {
                        Q3.Cast(q3Farm.Position, true);
                    }
                }
            }
        }
Exemple #24
0
        private static void JungleClearEvent()
        {
            try
            {
                var mobs = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q3.Range) && x.Health > 5 && x.Team == GameObjectTeam.Neutral).ToArray();

                if (mobs.Any())
                {
                    var mob = mobs.OrderBy(x => x.MaxHealth).FirstOrDefault(x => x.IsValidTarget(E.Range) && MyExtraManager.CanCastE(x));

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

                        if (ClearMenu["FlowersYasuo.ClearMenu.JungleClearQ"].Enabled && Q.Ready && !HaveQ3 && mob.IsValidTarget(Q.Range))
                        {
                            Q.Cast(mob);
                        }

                        if (ClearMenu["FlowersYasuo.ClearMenu.JungleClearQ3"].Enabled && Q3.Ready && HaveQ3 &&
                            mob.IsValidTarget(Q3.Range))
                        {
                            Q3.Cast(mob);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error in MyEventManager.JungleClearEvent." + ex);
            }
        }
Exemple #25
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);
            }
        }
Exemple #26
0
        private static void KillStealEvent()
        {
            try
            {
                if (IsMyDashing)
                {
                    return;
                }

                if (KillStealMenu["FlowersYasuo.KillStealMenu.Q"].GetValue <MenuBool>().Enabled&& Q.IsReady() && !HaveQ3)
                {
                    foreach (
                        var target in
                        GameObjects.EnemyHeroes.Where(
                            x =>
                            x.IsValidTarget(Q.Range) && x.Health < Me.GetSpellDamage(x, SpellSlot.Q)))
                    {
                        if (target.IsValidTarget(Q.Range) && !target.IsUnKillable())
                        {
                            CastQ(target);
                            return;
                        }
                    }
                }

                if (KillStealMenu["FlowersYasuo.KillStealMenu.Q3"].GetValue <MenuBool>().Enabled&& Q3.IsReady() && HaveQ3)
                {
                    foreach (
                        var target in
                        GameObjects.EnemyHeroes.Where(
                            x =>
                            x.IsValidTarget(Q3.Range) && x.Health < Me.GetSpellDamage(x, SpellSlot.Q)))
                    {
                        if (target.IsValidTarget(Q3.Range) && !target.IsUnKillable())
                        {
                            Q3.Cast(target);
                            return;
                        }
                    }
                }

                if (KillStealMenu["FlowersYasuo.KillStealMenu.E"].GetValue <MenuBool>().Enabled&& E.IsReady())
                {
                    foreach (
                        var target in
                        GameObjects.EnemyHeroes.Where(
                            x =>
                            x.IsValidTarget(E.Range) &&
                            x.Health <
                            Me.GetSpellDamage(x, SpellSlot.E) + Me.GetSpellDamage(x, SpellSlot.E, DamageStage.Buff)))
                    {
                        if (target.IsValidTarget(E.Range) && !target.IsUnKillable())
                        {
                            E.CastOnUnit(target);
                            return;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error in MyEventManager.KillStealEvent." + ex);
            }
        }
Exemple #27
0
        private static void LaneClear()
        {
            var useQ  = getCheckBoxItem(lcMenu, "Q");
            var useQ3 = getCheckBoxItem(lcMenu, "Q3");

            if (haveQ3 && useQ3)
            {
                var minions = EntityManager.MinionsAndMonsters.GetJungleMonsters().Where(i => Q2.IsInRange(i)).Cast <Obj_AI_Base>().ToList();
                if (minions != null)
                {
                    Q2.Cast(minions.FirstOrDefault());
                }
            }
            if (getCheckBoxItem(lcMenu, "E") && E.IsReady())
            {
                var minions = EntityManager.MinionsAndMonsters.EnemyMinions.Where(i => i.IsMinion() || i.IsPet(false)).Concat(EntityManager.MinionsAndMonsters.Monsters).Where(i => i.IsValidTarget(E.Range) && !HaveE(i) && (!GetPosAfterDash(i).IsUnderEnemyTurret() || getCheckBoxItem(lcMenu, "ETower")) && Evade.IsSafePoint(GetPosAfterDash(i).ToVector2())).OrderByDescending(i => i.MaxHealth).ToList();
                if (minions.Count > 0)
                {
                    var minion = minions.FirstOrDefault(i => E.CanLastHit(i, GetEDmg(i)));
                    if (useQ && minion == null && Q.IsReady(50) && (!haveQ3 || useQ3))
                    {
                        var sub = new List <Obj_AI_Minion>();
                        foreach (var mob in minions)
                        {
                            if ((E2.CanLastHit(mob, GetQDmg(mob), GetEDmg(mob)) || mob.Team == GameObjectTeam.Neutral) &&
                                mob.Distance(GetPosAfterDash(mob)) < Q3.Range)
                            {
                                sub.Add(mob);
                            }
                            if (getCheckBoxItem(lcMenu, "ELastHit"))
                            {
                                continue;
                            }
                            var nearMinion =
                                EntityManager.MinionsAndMonsters.EnemyMinions.Where(i => i.IsMinion() || i.IsPet(false))
                                .Concat(EntityManager.MinionsAndMonsters.Monsters)
                                .Where(i => i.IsValidTarget(Q3.Range, true, GetPosAfterDash(mob)))
                                .ToList();
                            if (nearMinion.Count > 2 || nearMinion.Count(i => mob.Health <= GetQDmg(mob)) > 1)
                            {
                                sub.Add(mob);
                            }
                        }
                        minion = sub.FirstOrDefault();
                    }
                    if (minion != null && E.CastOnUnit(minion))
                    {
                        lastE = Variables.TickCount;
                        return;
                    }
                }
            }
            if (useQ && Q.IsReady() && (!haveQ3 || useQ3))
            {
                if (IsDashing)
                {
                    if (CanCastQCir)
                    {
                        var minions = GetQCirObj.Select(i => i as Obj_AI_Minion).Where(i => i.IsValid()).ToList();
                        if (minions.Any(i => i.Health <= GetQDmg(i) || i.Team == GameObjectTeam.Neutral) || minions.Count > 1)
                        {
                            Q3.Cast(minions.First().ServerPosition);
                        }
                    }
                }
                else if (!Player.Spellbook.IsAutoAttacking)
                {
                    var minions = EntityManager.MinionsAndMonsters.EnemyMinions.Where(i => i.IsMinion() || i.IsPet(false)).Concat(EntityManager.MinionsAndMonsters.Monsters).Where(i => !haveQ3 ? IsInRangeQ(i) : i.IsValidTarget(Q2.Range - i.BoundingRadius / 2)).OrderByDescending(i => i.MaxHealth).ToList();
                    if (minions.Count == 0)
                    {
                        return;
                    }
                    if (!haveQ3)
                    {
                        var minion = minions.FirstOrDefault(i => Q.CanLastHit(i, GetQDmg(i)));
                        if (minion != null)
                        {
                            Q.Casting(minion);
                        }
                        else
                        {
                            var pos = Q.GetLineFarmLocation(minions);
                            if (pos.MinionsHit > 0)
                            {
                                Q.Cast(pos.Position);
                            }
                        }
                    }
                    else
                    {
                        var pos = Q2.GetLineFarmLocation(minions);
                        if (pos.MinionsHit > 0)
                        {
                            Console.WriteLine("ASKDJLAKSJDLKASJDKSAJD");
                            Q2.Cast(pos.Position);
                        }
                    }
                }
            }
        }
Exemple #28
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());
                    }
                }
            }
        }
        private static void YoneCombo()
        {
            if (FunnySlayerCommon.OnAction.OnAA)
            {
                return;
            }
            {
                var target = FunnySlayerCommon.FSTargetSelector.GetFSTarget(isQ3() ? 910 : 700);
                if (target != null && E.IsReady() && !isE2() && YoneMenu.Ecombo.Combo_Ecombo.Enabled)
                {
                    if (YoneMenu.Ecombo.Combo_Edashturret.Enabled && YoneMenu.Keys.TurretKey.Active)
                    {
                        E.Cast(target.Position);
                        return;
                    }

                    if (!Yasuo.YasuoHelper.UnderTower(ObjectManager.Player.Position.Extend(target.Position, 300)))
                    {
                        E.Cast(target.Position);
                        return;
                    }
                }
            }

            {
                var target = FunnySlayerCommon.FSTargetSelector.GetFSTarget(R.Range);
                if (target != null && R.IsReady() && YoneMenu.Rcombo.Combo_Rcombo.Enabled)
                {
                    var pred = FSpred.Prediction.Prediction.GetPrediction(R, target, true);

                    if (pred.Hitchance >= FSpred.Prediction.HitChance.Medium && pred.AoeTargetsHitCount >= YoneMenu.Rcombo.Combo_Rhitcount.Value)
                    {
                        R.Cast(pred.CastPosition);
                        return;
                    }
                }
            }

            {
                var target = FunnySlayerCommon.FSTargetSelector.GetFSTarget(isQ3() ? Q3.Range : Q1.Range);
                if (target != null && Q3.IsReady())
                {
                    if (isQ3())
                    {
                        var pred = FSpred.Prediction.Prediction.GetPrediction(Q3, target);

                        if (pred.Hitchance >= FSpred.Prediction.HitChance.High)
                        {
                            if (!Yasuo.YasuoHelper.UnderTower(objPlayer.Position.Extend(pred.CastPosition, 500)) || YoneMenu.Keys.TurretKey.Active)
                            {
                                Q3.Cast(pred.CastPosition);
                                return;
                            }
                        }
                    }
                    else
                    {
                        var pred = FSpred.Prediction.Prediction.GetPrediction(Q1, target);

                        if (pred.Hitchance >= FSpred.Prediction.HitChance.High)
                        {
                            Q1.Cast(pred.CastPosition);
                            return;
                        }
                    }
                }
            }

            {
                var target = FunnySlayerCommon.FSTargetSelector.GetFSTarget(W.Range);
                if (target != null && W.IsReady() && YoneMenu.Wcombo.Combo_Wcombo.Enabled)
                {
                    var pred = FSpred.Prediction.Prediction.GetPrediction(W, target);

                    if (pred.Hitchance >= FSpred.Prediction.HitChance.High)
                    {
                        W.Cast(pred.CastPosition);
                        return;
                    }
                }
            }
        }
        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);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }