Exemple #1
0
 static void AutoUseQ()
 {
     if (Q.IsReady() && AutoQ && Player.ManaPercent > MinMana)
     {
         var extarget = TargetSelector.GetTarget(Q1.Range, TargetSelector.DamageType.Physical);
         var Minions  = MinionManager.GetMinions(Q.Range);
         foreach (var Minion in Minions)
         {
             var QHit  = new Geometry.Polygon.Rectangle(Player.Position, Player.Position.Extend(Minion.Position, Q1.Range), Q1.Width);
             var QPred = Q1.GetPrediction(extarget);
             if (!QHit.IsOutside(QPred.UnitPosition.To2D()) && QPred.Hitchance == HitChance.High)
             {
                 Q.Cast(Minion);
                 break;
             }
         }
     }
 }
Exemple #2
0
 static void AutoUseQ()
 {
     if (Q.IsReady() && Getkeybindvalue(Auto, "AutoQ") && Player.ManaPercent > Getslidervalue(Auto, "MinMana"))
     {
         var extarget = TargetSelector.GetTarget(Q1.Range, DamageType.Physical);
         var Minions = EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy,
             Player.Position, Q.Range);
             if(Minions == null || extarget == null || extarget.IsValidTarget()) return;
         foreach (var Minion in Minions)
         {
             var QHit = new Geometry.Polygon.Rectangle(Player.Position, Player.Position.Extend(Minion.Position, Q1.Range), Q1.Width);
             var QPred = Q1.GetPrediction(extarget);
             if (!QHit.IsOutside(QPred.UnitPosition.To2D()) && QPred.HitChance >= HitChance.AveragePoint)
             {
                 Q.Cast(Minion);
                 break;
             }
         }
     }
 }
Exemple #3
0
        public bool QMinionExtend(Obj_AI_Base minion)
        {
            var target = HeroManager.Enemies.FirstOrDefault(x => x.IsValidTarget(Spell.Range));

            if (minion == null || target == null)
            {
                return(false);
            }

            var prediction = Spell.GetPrediction(target);

            if (prediction.Hitchance < HitChance.Medium)
            {
                return(false);
            }

            var hit = new Geometry.Polygon.Rectangle(ObjectManager.Player.Position, ObjectManager.Player.Position.Extend(minion.Position, Spell.Range), Spell.Width);

            return(!hit.IsOutside(QPred(target).To2D()));
        }
Exemple #4
0
        private static void OnDoCastDelayedLC(GameObjectProcessSpellCastEventArgs args)
        {
            AAPassive = false;
            if (args.Target is Obj_AI_Minion && args.Target.IsValid)
            {
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear && Player.ManaPercent > LMinMana)
                {
                    var Minions = MinionManager.GetMinions(Orbwalking.GetRealAutoAttackRange(Player), MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.Health);
                    if (Minions[0].IsValid && Minions.Count != 0)
                    {
                        if (!LT)
                        {
                            return;
                        }

                        if (E.IsReady() && !AAPassive && LE)
                        {
                            E.Cast(Player.Position.Extend(Game.CursorPos, 70));
                        }
                        if (Q.IsReady() && (!E.IsReady() || (E.IsReady() && !LE)) && LQ != 0 && !AAPassive)
                        {
                            var QMinions  = MinionManager.GetMinions(Q.Range);
                            var exminions = MinionManager.GetMinions(Q1.Range);
                            foreach (var Minion in QMinions)
                            {
                                var QHit = new Geometry.Polygon.Rectangle(Player.Position, Player.Position.Extend(Minion.Position, Q1.Range), Q1.Width);
                                if (exminions.Count(x => !QHit.IsOutside(x.Position.To2D())) >= LQ)
                                {
                                    Q.Cast(Minion);
                                    break;
                                }
                            }
                        }
                        if ((!E.IsReady() || (E.IsReady() && !LE)) && (!Q.IsReady() || (Q.IsReady() && LQ == 0)) && LW && W.IsReady() && !AAPassive)
                        {
                            W.Cast(Minions[0].Position);
                        }
                    }
                }
            }
        }
Exemple #5
0
        private static void OnDoCastDelayedLC(GameObjectProcessSpellCastEventArgs args)
        {
            AAPassive = false;
            if (args.Target is Obj_AI_Minion && args.Target.IsValid)
            {
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) && Player.ManaPercent >= Getslidervalue(Laneclear, "LMinMana"))
                {
                    var Minions =
                        EntityManager.MinionsAndMonsters.Get(EntityManager.MinionsAndMonsters.EntityType.Both,
                            EntityManager.UnitTeam.Enemy, Player.Position, Player.GetAutoAttackRange())
                            .OrderByDescending(i => i.Health).ToList();
                    if (Minions[0].IsValid && Minions.Count != 0)
                    {
                        if (!Getkeybindvalue(Laneclear, "LT")) return;

                        if (E.IsReady() && !AAPassive && Getcheckboxvalue(Laneclear, "LE")) EloBuddy.Player.CastSpell(SpellSlot.E, Player.Position.Extend(Game.CursorPos, 70));
                        if (Q.IsReady() && (!E.IsReady() || (E.IsReady() && !Getcheckboxvalue(Laneclear, "LE"))) && Getslidervalue(Laneclear, "LQ") != 0 && !AAPassive)
                        {
                            var QMinions = EntityManager.MinionsAndMonsters.GetLaneMinions(
                                EntityManager.UnitTeam.Enemy, Player.Position, Q.Range);
                            var exminions = EntityManager.MinionsAndMonsters.GetLaneMinions(
                                EntityManager.UnitTeam.Enemy, Player.Position, Q1.Range);
                            foreach (var Minion in QMinions)
                            {
                                var QHit = new Geometry.Polygon.Rectangle(Player.Position,Player.Position.Extend(Minion.Position, Q1.Range),Q1.Width);
                                if (exminions.Count(x => !QHit.IsOutside(x.Position.To2D())) >= Getslidervalue(Laneclear, "LQ"))
                                {
                                    Q.Cast(Minion);
                                    break;
                                }
                            }
                        }
                        if ((!E.IsReady() || (E.IsReady() && !Getcheckboxvalue(Laneclear, "LE"))) && (!Q.IsReady() || (Q.IsReady() && Getslidervalue(Laneclear, "LQ") == 0)) && Getcheckboxvalue(Laneclear, "LW") && W.IsReady() && !AAPassive) W.Cast(Minions[0].Position);
                    }
                }
            }
        }
Exemple #6
0
        private static void Harass()
        {
            if (Player.ManaPercent < Getslidervalue(HarassMenu, "HMinMana")) return;

            if (Q.IsReady() && Getcheckboxvalue(HarassMenu, "HEXQ"))
            {
                var target = TargetSelector.GetTarget(Q1.Range, DamageType.Physical);
                var Minions = EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy,
                    Player.Position, Q.Range);
                if (target == null || !target.IsValidTarget(Q1.Range) || Minions == null) return;
                foreach (var Minion in Minions)
                {
                    var QHit = new Geometry.Polygon.Rectangle(Player.Position, Player.Position.Extend(Minion.Position, Q1.Range),Q1.Width);
                    var QPred = Q1.GetPrediction(target);
                    if (!QHit.IsOutside(QPred.UnitPosition.To2D()) && QPred.HitChance == HitChance.AveragePoint)
                    {
                        Q.Cast(Minion);
                        break;
                    }
                }
            }
        }
Exemple #7
0
        public bool IsInsideRect(Obj_AI_Base target)
        {
            Rect = new Geometry.Polygon.Rectangle(ObjectManager.Player.Position, Game.CursorPos, 75);

            return(!Rect.IsOutside(target.Position.To2D()));
        }