コード例 #1
0
        private static void OnRender()
        {
            try
            {
                if (DrawMenu["FlowersYasuo.DrawMenu.Q"].GetValue <MenuBool>().Enabled&&
                    Q.IsReady() && !HaveQ3)
                {
                    Render.Circle.DrawCircle(Me.Position, Q.Range, Color.FromArgb(86, 0, 255), 1);
                }

                if (DrawMenu["FlowersYasuo.DrawMenu.Q3"].GetValue <MenuBool>().Enabled&&
                    Q3.IsReady() && HaveQ3)
                {
                    Render.Circle.DrawCircle(Me.Position, Q3.Range, Color.FromArgb(0, 255, 161), 1);
                }

                if (DrawMenu["FlowersYasuo.DrawMenu.E"].GetValue <MenuBool>().Enabled&&
                    E.IsReady())
                {
                    Render.Circle.DrawCircle(Me.Position, E.Range, Color.FromArgb(0, 136, 255), 1);
                }

                if (DrawMenu["FlowersYasuo.DrawMenu.R"].GetValue <MenuBool>().Enabled&&
                    R.IsReady())
                {
                    Render.Circle.DrawCircle(Me.Position, R.Range, Color.FromArgb(251, 0, 133), 1);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error in MyEventManager.OnRender." + ex);
            }
        }
コード例 #2
0
        internal static void Init()
        {
            if (Menu.Item("AutoR", true).GetValue <bool>() && R.IsReady())
            {
                var Enemies =
                    HeroManager.Enemies.Where(x => x.IsValidTarget(R.Range))
                    .Count(x => x.HasBuffOfType(BuffType.Knockup) || x.HasBuffOfType(BuffType.Knockback));

                var Allies = HeroManager.Allies.Count(x => x.DistanceToPlayer() <= R.Range);

                if (Enemies >= Menu.Item("AutoRCount", true).GetValue <Slider>().Value&&
                    Me.HealthPercent >= Menu.Item("AutoRMyHp", true).GetValue <Slider>().Value&&
                    Allies >= Menu.Item("AutoRRangeCount", true).GetValue <Slider>().Value)
                {
                    R.Cast();
                }
            }

            if (Menu.Item("AutoQ", true).GetValue <KeyBind>().Active&& Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.None &&
                !Me.UnderTurret(true))
            {
                if (Menu.Item("AutoQ3", true).GetValue <bool>() && Q3.IsReady() && SpellManager.HaveQ3)
                {
                    SpellManager.CastQ3();
                }
                else if (!SpellManager.HaveQ3 && Q.IsReady())
                {
                    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);
                        }
                    }
                }
            }

            if (Menu.Item("StackQ", true).GetValue <KeyBind>().Active&& Q.IsReady() && !SpellManager.HaveQ3 &&
                Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.None && !Me.UnderTurret(true))
            {
                var minions = MinionManager.GetMinions(Me.Position, Q.Range, MinionTypes.All,
                                                       MinionTeam.NotAlly);

                if (minions.Any())
                {
                    var qFarm =
                        MinionManager.GetBestLineFarmLocation(
                            minions.Select(x => x.Position.To2D()).ToList(), Q.Width, Q.Range);

                    if (qFarm.MinionsHit >= 1)
                    {
                        Q.Cast(qFarm.Position, true);
                    }
                }
            }
        }
コード例 #3
0
 private void Drawing_OnDraw(EventArgs args)
 {
     if (Config.Item("qRange", true).GetValue <bool>())
     {
         if (Config.Item("onlyRdy", true).GetValue <bool>())
         {
             if (Q3.IsReady())
             {
                 Utility.DrawCircle(Player.Position, Q3.Range, System.Drawing.Color.Cyan, 1, 1);
             }
         }
         else
         {
             Utility.DrawCircle(Player.Position, Q3.Range, System.Drawing.Color.Cyan, 1, 1);
         }
     }
     if (Config.Item("wRange", true).GetValue <bool>())
     {
         if (Config.Item("onlyRdy", true).GetValue <bool>())
         {
             if (W.IsReady())
             {
                 Utility.DrawCircle(ObjectManager.Player.Position, W.Range, System.Drawing.Color.Orange, 1, 1);
             }
         }
         else
         {
             Utility.DrawCircle(ObjectManager.Player.Position, W.Range, System.Drawing.Color.Orange, 1, 1);
         }
     }
     if (Config.Item("eRange", true).GetValue <bool>())
     {
         if (Config.Item("onlyRdy", true).GetValue <bool>())
         {
             if (E.IsReady())
             {
                 Utility.DrawCircle(Player.Position, E.Range, System.Drawing.Color.Yellow, 1, 1);
             }
         }
         else
         {
             Utility.DrawCircle(Player.Position, E.Range, System.Drawing.Color.Yellow, 1, 1);
         }
     }
     if (Config.Item("rRange", true).GetValue <bool>())
     {
         if (Config.Item("onlyRdy", true).GetValue <bool>())
         {
             if (R.IsReady())
             {
                 Utility.DrawCircle(Player.Position, R.Range, System.Drawing.Color.Gray, 1, 1);
             }
         }
         else
         {
             Utility.DrawCircle(Player.Position, R.Range, System.Drawing.Color.Gray, 1, 1);
         }
     }
 }
コード例 #4
0
 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);
         }
     }
 }
コード例 #5
0
ファイル: KillSteal.cs プロジェクト: wade1990/PortAIO
        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);
                    }
                }
            }
        }
コード例 #6
0
        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);
                }
            }
        }
コード例 #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()
        {
            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);
                    }
                }
            }
        }
コード例 #9
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);
            }
        }
コード例 #10
0
        private static void HarassEvent()
        {
            try
            {
                if (Me.IsUnderEnemyTurret())
                {
                    return;
                }

                if (HarassMenu["FlowersYasuo.HarassMenu.Q"].GetValue <MenuBool>().Enabled&& Q.IsReady() && !HaveQ3)
                {
                    var target = TargetSelector.GetTarget(Q.Range);

                    if (target != null && target.IsValidTarget(Q.Range))
                    {
                        CastQ(target);
                    }
                }

                if (HarassMenu["FlowersYasuo.HarassMenu.Q3"].GetValue <MenuBool>().Enabled&& Q3.IsReady() && HaveQ3)
                {
                    CastQ3();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error in MyEventManager.HarassEvent." + ex);
            }
        }
コード例 #11
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);
            }
        }
コード例 #12
0
        private static void EQFlashEvent()
        {
            try
            {
                if (Orbwalker.ActiveMode == OrbwalkerMode.None && FlashSlot != SpellSlot.Unknown && Flash.IsReady())
                {
                    Me.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPosRaw);

                    if (!HaveQ3)
                    {
                        if (Q.IsReady())
                        {
                            var minion = GameObjects.EnemyMinions.FirstOrDefault(x => x.IsValidTarget(Q.Range) && x.MaxHealth > 5);

                            if (minion != null && minion.IsValidTarget(Q.Range))
                            {
                                var pred = Q.GetPrediction(minion);
                                if (pred.Hitchance >= HitChance.Medium)
                                {
                                    Q.Cast(pred.CastPosition);
                                }
                            }
                        }
                    }
                    else if (HaveQ3 && Q3.IsReady())
                    {
                        if (IsMyDashing && FlashSlot != SpellSlot.Unknown && Flash.IsReady())
                        {
                            var bestPos =
                                MyExtraManager.FlashPoints().ToArray()
                                .Where(x => GameObjects.EnemyHeroes.Count(a => a.IsValidTarget(600f, true, x)) > 0)
                                .OrderByDescending(x => GameObjects.EnemyHeroes.Count(i => i.Distance(x) <= 220))
                                .FirstOrDefault();

                            if (bestPos != Vector3.Zero && bestPos.CountEnemyHeroesInRange(220) > 0 && Q.Cast(Me.PreviousPosition))
                            {
                                DelayAction.Add(10 + (Game.Ping / 2 - 5), () =>
                                {
                                    Flash.Cast(bestPos);
                                    YasuolastEQFlashTime = Variables.GameTimeTickCount;
                                });
                            }
                        }

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

                            allTargets.AddRange(GameObjects.EnemyMinions.Where(x => x.IsValidTarget(E.Range) && x.MaxHealth > 5));
                            allTargets.AddRange(GameObjects.EnemyHeroes.Where(x => !x.IsDead && x.IsValidTarget(E.Range)));

                            if (allTargets.Any())
                            {
                                var eTarget =
                                    allTargets.Where(x => x.IsValidTarget(E.Range) && MyExtraManager.CanCastE(x))
                                    .OrderByDescending(
                                        x =>
                                        GameObjects.EnemyHeroes.Count(
                                            t => t.IsValidTarget(600f, true, MyExtraManager.PosAfterE(x))))
                                    .FirstOrDefault();

                                if (eTarget != null)
                                {
                                    E.CastOnUnit(eTarget);
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error in MyEventManager.EQFlashEvent." + ex);
            }
        }
コード例 #13
0
        private static void FleeEvent()
        {
            try
            {
                Me.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPosCenter);

                if (IsMyDashing)
                {
                    if (FleeMenu["FlowersYasuo.FleeMenu.EQ"].GetValue <MenuBool>().Enabled&& Q.IsReady() && !HaveQ3)
                    {
                        var qMinion =
                            GameObjects.EnemyMinions.FirstOrDefault(
                                x =>
                                x.IsValidTarget(220, true, YasuolastEPos) && x.Health > 5 &&
                                !x.Name.ToLower().Contains("plant"));

                        if (qMinion != null && qMinion.IsValidTarget())
                        {
                            Q.Cast(Me.PreviousPosition);
                        }
                    }
                }
                else
                {
                    if (FleeMenu["FlowersYasuo.FleeMenu.Q3"].GetValue <MenuBool>().Enabled&& HaveQ3 && Q3.IsReady() &&
                        GameObjects.EnemyHeroes.Any(x => x.IsValidTarget(Q3.Range)))
                    {
                        CastQ3();
                    }

                    if (FleeMenu["FlowersYasuo.FleeMenu.E"].GetValue <MenuBool>().Enabled&& E.IsReady())
                    {
                        var obj = MyExtraManager.GetNearObj();

                        if (obj != null && obj.IsValidTarget(E.Range))
                        {
                            E.CastOnUnit(obj);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error in MyEventManager.FleeEvent." + ex);
            }
        }
コード例 #14
0
ファイル: Flee.cs プロジェクト: Dekryptor/Port-1
        internal static void Init()
        {
            if (Menu.Item("FleeWallJump", true).GetValue <bool>() && WallJumpPos.Any(x => x.DistanceToPlayer() <= E.Range + 50))
            {
                WallVisibleGetLogic();
                WallJumpLogic();
            }
            else
            {
                if (IsDashing)
                {
                    if (Menu.Item("FleeQ", true).GetValue <bool>() && Q.IsReady() && !SpellManager.HaveQ3)
                    {
                        var qMinion = MinionManager.GetMinions(lastEPos, 220, MinionTypes.All, MinionTeam.NotAlly).FirstOrDefault();

                        if (qMinion.IsValidTarget(220))
                        {
                            Q.Cast(Me.Position, true);
                        }
                    }
                }
                else
                {
                    if (Menu.Item("FleeE", true).GetValue <bool>() && E.IsReady())
                    {
                        var dashList = new List <Obj_AI_Base>();
                        dashList.AddRange(HeroManager.Enemies.Where(i => i.IsValidTarget(E.Range)));
                        dashList.AddRange(MinionManager.GetMinions(Me.Position, E.Range, MinionTypes.All, MinionTeam.NotAlly));

                        var dash = dashList.Where(
                            i => SpellManager.CanCastE(i) &&
                            PosAfterE(i).Distance(Game.CursorPos) < Game.CursorPos.DistanceToPlayer() &&
                            Evade.EvadeManager.IsSafe(PosAfterE(i).To2D()).IsSafe)
                                   .MinOrDefault(i => Game.CursorPos.Distance(PosAfterE(i)));

                        if (dash.IsValidTarget(E.Range) && SpellManager.CanCastE(dash))
                        {
                            E.CastOnUnit(dash, true);
                            return;
                        }
                    }

                    if (Menu.Item("FleeQ3", true).GetValue <bool>() && SpellManager.HaveQ3 && Q3.IsReady() &&
                        HeroManager.Enemies.Any(x => x.IsValidTarget(Q3.Range)))
                    {
                        SpellManager.CastQ3();
                    }
                }
            }
        }
コード例 #15
0
        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;
                    }
                }
            }
        }
コード例 #16
0
ファイル: Flee.cs プロジェクト: spardathementor/LeagueSharp
        internal static void Init()
        {
            if (IsDashing)
            {
                if (Menu.Item("FleeQ", true).GetValue <bool>() && Q.IsReady() && !SpellManager.HaveQ3)
                {
                    var qMinion = MinionManager.GetMinions(lastEPos, 220, MinionTypes.All, MinionTeam.NotAlly).FirstOrDefault();

                    if (qMinion.IsValidTarget(220))
                    {
                        Utility.DelayAction.Add(10, () => Q.Cast(Me.Position, true));
                    }
                }
            }
            else
            {
                if (Menu.Item("FleeE", true).GetValue <bool>() && E.IsReady())
                {
                    var eMinion =
                        MinionManager.GetMinions(Me.Position, E.Range, MinionTypes.All, MinionTeam.NotAlly)
                        .OrderBy(x => x.Position.Distance(Game.CursorPos))
                        .FirstOrDefault();

                    if (eMinion != null && SpellManager.CanCastE(eMinion) && E.IsReady() && Me.IsFacing(eMinion))
                    {
                        E.CastOnUnit(eMinion, true);
                    }
                }

                if (Menu.Item("FleeQ3", true).GetValue <bool>() && SpellManager.HaveQ3 && Q3.IsReady() &&
                    HeroManager.Enemies.Any(x => x.IsValidTarget(Q3.Range)))
                {
                    SpellManager.CastQ3();
                }
            }
        }
コード例 #17
0
ファイル: LaneClear.cs プロジェクト: wade1990/PortAIO
        internal static void Init()
        {
            var minions = MinionManager.GetMinions(Me.Position, Q3.Range);

            if (minions.Any())
            {
                if (Menu.Item("LaneClearItems", true).GetValue <bool>())
                {
                    foreach (var min in minions.Where(x => x.DistanceToPlayer() <= 400))
                    {
                        SpellManager.UseItems(min);
                    }
                }

                if (Menu.Item("LaneClearE", true).GetValue <bool>() && E.IsReady())
                {
                    foreach (
                        var min in
                        minions.Where(
                            x =>
                            x.DistanceToPlayer() <= E.Range && SpellManager.CanCastE(x) &&
                            x.Health <= (Q.IsReady() ? Q.GetDamage(x) + E.GetDamage(x) : E.GetDamage(x))))
                    {
                        if (Menu.Item("LaneClearETurret", true).GetValue <bool>() || !UnderTower(PosAfterE(min)))
                        {
                            E.CastOnUnit(min, true);
                        }
                    }
                }

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

                        if (qFarm.MinionsHit >= 1)
                        {
                            Q.Cast(qFarm.Position, true);
                        }
                    }
                    else
                    {
                        var qminions = MinionManager.GetMinions(Me.Position, 220);

                        if (qminions.Count >= 3)
                        {
                            Q.Cast(Me.Position, true);
                        }
                    }
                }

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

                        if (q3Farm.MinionsHit >= Menu.Item("LaneClearQ3count", true).GetValue <Slider>().Value)
                        {
                            Q3.Cast(q3Farm.Position, true);
                        }
                    }
                    else if (lastEPos.DistanceToPlayer() <= 200)
                    {
                        var q3minions = MinionManager.GetMinions(Me.Position, 220);

                        if (q3minions.Count >= 3)
                        {
                            Q3.Cast(Me.Position, true);
                        }
                    }
                }
            }
        }
コード例 #18
0
ファイル: Harass.cs プロジェクト: spardathementor/LeagueSharp
        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);
                }
            }
        }
コード例 #19
0
        internal static void Init()
        {
            var target = TargetSelector.GetSelectedTarget() ??
                         TargetSelector.GetTarget(1200f, TargetSelector.DamageType.Physical);

            if (target == null)
            {
                return;
            }

            if (target.DistanceToPlayer() > R.Range)
            {
                return;
            }

            if (Menu.Item("ComboIgnite", true).GetValue <bool>() && Ignite != SpellSlot.Unknown && Ignite.IsReady() &&
                target.IsValidTarget(600f) &&
                (target.Health <= Me.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite) ||
                 target.HealthPercent <= 25))
            {
                Me.Spellbook.CastSpell(Ignite, target);
            }

            if (Menu.Item("ComboItems", true).GetValue <bool>())
            {
                SpellManager.UseItems(target, true);
            }

            if (Menu.Item("ComboR", true).GetValue <KeyBind>().Active&& R.IsReady())
            {
                var KnockedUpEnemies =
                    HeroManager.Enemies.Where(x => x.IsValidTarget(R.Range))
                    .Where(x => x.HasBuffOfType(BuffType.Knockup) || x.HasBuffOfType(BuffType.Knockback))
                    .Where(CanCastDelayR);

                if (KnockedUpEnemies.Count() >= Menu.Item("ComboRCount", true).GetValue <Slider>().Value)
                {
                    R.Cast();
                }

                foreach (var rTarget in HeroManager.Enemies.Where(x => x.IsValidTarget(R.Range))
                         .Where(x => x.HasBuffOfType(BuffType.Knockup) || x.HasBuffOfType(BuffType.Knockback))
                         .Where(CanCastDelayR))
                {
                    if (Menu.Item("R" + rTarget.ChampionName.ToLower(), true).GetValue <bool>() &&
                        rTarget.HealthPercent <= Menu.Item("ComboRHp", true).GetValue <Slider>().Value)
                    {
                        R.Cast();
                    }

                    if (Menu.Item("ComboRAlly", true).GetValue <bool>() &&
                        HeroManager.Allies.Any(x => !x.IsDead && !x.IsZombie && x.Distance(rTarget) <= 600) &&
                        rTarget.Health >= Menu.Item("ComboRHp", true).GetValue <Slider>().Value)
                    {
                        R.Cast();
                    }
                }
            }

            if (Menu.Item("ComboE", true).GetValue <bool>() && E.IsReady())
            {
                var dmg = (float)(SpellManager.GetQDmg(target) * 2 + SpellManager.GetEDmg(target)) +
                          Me.GetAutoAttackDamage(target) * 2 +
                          (R.IsReady() ? R.GetDamage(target) : (float)SpellManager.GetQDmg(target));

                if (target.DistanceToPlayer() >= Orbwalking.GetRealAutoAttackRange(Me) + 65 &&
                    dmg >= target.Health && SpellManager.CanCastE(target) &&
                    (Menu.Item("ComboETurret", true).GetValue <bool>() || !UnderTower(PosAfterE(target))))
                {
                    E.CastOnUnit(target, true);
                }
            }

            if (Menu.Item("ComboEGapcloser", true).GetValue <bool>() && E.IsReady() &&
                target.DistanceToPlayer() >= Menu.Item("ComboEGap", true).GetValue <Slider>().Value)
            {
                if (Menu.Item("ComboEMode", true).GetValue <StringList>().SelectedIndex == 0)
                {
                    SpellManager.EGapTarget(target, Menu.Item("ComboETurret", true).GetValue <bool>(),
                                            Menu.Item("ComboEGap", true).GetValue <Slider>().Value, false);
                }
                else
                {
                    SpellManager.EGapMouse(target, Menu.Item("ComboETurret", true).GetValue <bool>(),
                                           Menu.Item("ComboEGap", true).GetValue <Slider>().Value, false);
                }
            }

            if (Menu.Item("ComboQ", true).GetValue <bool>() && Me.Spellbook.GetSpell(SpellSlot.Q).IsReady() && !IsDashing)
            {
                if (SpellManager.HaveQ3)
                {
                    if (target.IsValidTarget(Q3.Range))
                    {
                        SpellManager.CastQ3();
                    }
                }
                else
                {
                    if (target.IsValidTarget(Q.Range))
                    {
                        Q.Cast(target, true);
                    }
                }
            }

            if (Me.IsDashing() && Menu.Item("ComboEQFlash", true).GetValue <KeyBind>().Active&& Flash != SpellSlot.Unknown &&
                Flash.IsReady() && SpellManager.HaveQ3 && Q3.IsReady() && R.IsReady())
            {
                if (Menu.Item("ComboEQFlashSolo", true).GetValue <bool>() &&
                    !HeroManager.Enemies.Any(x => x.IsValidTarget(1200) && x.NetworkId != target.NetworkId) &&
                    !HeroManager.Allies.Any(x => x.IsValidTarget(1200, false) && x.NetworkId != Me.NetworkId))
                {
                    if (target.Health + target.HPRegenRate * 2 <
                        SpellManager.GetQDmg(target) +
                        (SpellManager.CanCastE(target) ? SpellManager.GetEDmg(target) : 0) +
                        Me.GetAutoAttackDamage(target) * 2 + R.GetDamage(target) &&
                        !HeroManager.Enemies.Any(x => x.IsValidTarget(1200) && x.NetworkId != target.NetworkId) &&
                        !HeroManager.Allies.Any(x => x.IsValidTarget(1200, false) && x.NetworkId != Me.NetworkId))
                    {
                        var bestPos = FlashPoints().FirstOrDefault(x => target.Distance(x) <= 220);

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

                if (Menu.Item("ComboEQFlashTeam", true).GetValue <bool>() &&
                    HeroManager.Enemies.Count(x => x.IsValidTarget(1200)) >=
                    Menu.Item("ComboEQFlashTeamCount", true).GetValue <Slider>().Value&&
                    HeroManager.Allies.Count(x => x.IsValidTarget(1200, false) && x.NetworkId != Me.NetworkId) >=
                    Menu.Item("ComboEQFlashTeamAlly", true).GetValue <Slider>().Value)
                {
                    var bestPos =
                        FlashPoints()
                        .Where(
                            x =>
                            HeroManager.Enemies.Count(a => a.IsValidTarget(600f, true, x)) >=
                            Menu.Item("ComboEQFlashTeamCount", true).GetValue <Slider>().Value)
                        .OrderByDescending(x => HeroManager.Enemies.Count(i => i.Distance(x) <= 220))
                        .FirstOrDefault();

                    if (bestPos.IsValid() &&
                        bestPos.CountEnemiesInRange(220) >=
                        Menu.Item("ComboEQFlashTeamCount", true).GetValue <Slider>().Value&& Q3.Cast(bestPos, true))
                    {
                        LeagueSharp.Common.Utility.DelayAction.Add(10 + (Game.Ping / 2 - 5),
                                                                   () => Me.Spellbook.CastSpell(Flash, bestPos));
                    }
                }
            }

            if (IsDashing)
            {
                if (Menu.Item("ComboEQ", true).GetValue <bool>() && Q.IsReady() && !SpellManager.HaveQ3 &&
                    target.Distance(lastEPos) <= 220)
                {
                    Q.Cast(Me.Position, true);
                }

                if (Menu.Item("ComboEQ3", true).GetValue <bool>() && Q3.IsReady() && SpellManager.HaveQ3 &&
                    target.Distance(lastEPos) <= 220)
                {
                    Q3.Cast(Me.Position, true);
                }

                if (Menu.Item("ComboQStack", true).GetValue <StringList>().SelectedIndex != 3 && Q.IsReady() && !SpellManager.HaveQ3)
                {
                    switch (Menu.Item("ComboQStack", true).GetValue <StringList>().SelectedIndex)
                    {
                    case 0:
                        if (MinionManager.GetMinions(lastEPos, 220, MinionTypes.All, MinionTeam.NotAlly).Count > 0 ||
                            HeroManager.Enemies.Count(x => x.IsValidTarget(220, true, lastEPos)) > 0)
                        {
                            Q.Cast(Me.Position, true);
                        }
                        break;

                    case 1:
                        if (HeroManager.Enemies.Count(x => x.IsValidTarget(220, true, lastEPos)) > 0)
                        {
                            Q.Cast(Me.Position, true);
                        }
                        break;

                    case 2:
                        if (MinionManager.GetMinions(lastEPos, 220, MinionTypes.All, MinionTeam.NotAlly).Count > 0)
                        {
                            Q.Cast(Me.Position, true);
                        }
                        break;
                    }
                }
            }
        }