Ejemplo n.º 1
0
        /// <summary>
        /// Gets the ganking hero.
        /// </summary>
        /// <returns>An istance of the enemy who is ganking me</returns>
        public static Obj_AI_Hero GetGankingHero()
        {
            try
            {
                foreach (
                    var hero in
                    HeroManager.Enemies.Where(
                        h =>
                        !MenuExtensions.GetItemValue <bool>($"dz191.dza.gank.ignore.{h.ChampionName.ToLower()}") &&
                        h.IsValidTarget()))
                {
                    var heroDistance = hero.ServerPosition.Distance(ObjectManager.Player.ServerPosition);
                    if (heroDistance >= GankAlerterVariables.MinDist && heroDistance <= GankAlerterVariables.MaxDist)
                    {
                        var heroTracker =
                            SSTrackerModule.Trackers.Values.FirstOrDefault(
                                h => h.Hero.ChampionName.ToLower().Equals(hero.ChampionName.ToLower()));
                        if (heroTracker != null)
                        {
                            return(hero);
                        }
                    }
                }
            }
            catch (Exception e)
            {
                LogHelper.AddToLog(new LogItem("Gank_Alert", e, LogSeverity.Medium));
            }

            return(null);
        }
Ejemplo n.º 2
0
        void StealthHelper_OnStealth(StealthHelper.OnStealthEventArgs obj)
        {
            //Using First the Trinket then the vision ward.

            if (MenuExtensions.GetItemValue <bool>("dz191.vhr.misc.general.reveal"))
            {
                if (obj.IsStealthed &&
                    obj.Sender.IsEnemy &&
                    obj.Sender.ServerPosition.Distance(ObjectManager.Player.ServerPosition) <= 600f)
                {
                    var objectPosition = obj.Sender.ServerPosition;
                    if (Trinket.IsOwned() && Trinket.IsReady())
                    {
                        var extend = ObjectManager.Player.ServerPosition.Extend(objectPosition, 400f);
                        Trinket.Cast(extend);
                        return;
                    }

                    if (Ward.IsOwned() && Ward.IsReady())
                    {
                        var extend = ObjectManager.Player.ServerPosition.Extend(objectPosition, 400f);
                        Ward.Cast(extend);
                    }
                }
            }
        }
Ejemplo n.º 3
0
        static void Drawing_OnDraw(EventArgs args)
        {
            var drakeWallQPos = new Vector2(11514, 4462);
            var midWallQPos   = new Vector2(6962, 8952);

            if (MenuExtensions.GetItemValue <bool>("dz191.vhr.draw.spots"))
            {
                if (ObjectManager.Player.Distance(drakeWallQPos) <= 1500f && PlayerHelper.IsSummonersRift())
                {
                    Render.Circle.DrawCircle(new Vector2(12050, 4827).To3D(), 65f, Color.AliceBlue);
                }
                if (ObjectManager.Player.Distance(midWallQPos) <= 1500f && PlayerHelper.IsSummonersRift())
                {
                    Render.Circle.DrawCircle(new Vector2(6962, 8952).To3D(), 65f, Color.AliceBlue);
                }
            }

            if (MenuExtensions.GetItemValue <bool>("dz191.vhr.draw.range"))
            {
                DrawEnemyZone();
            }

            if (MenuExtensions.GetItemValue <bool>("dz191.vhr.draw.qpos"))
            {
                var QPosition = VHRQLogic.GetVHRQPosition();
                Render.Circle.DrawCircle(QPosition, 35, Color.Yellow);
            }

            DrawCondemnRectangles();
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Determines whether the position is not into enemies.
        /// </summary>
        /// <param name="position">The position.</param>
        /// <returns></returns>
        public static bool IsNotIntoEnemies(this Vector3 position)
        {
            if (!MenuExtensions.GetItemValue <bool>("solo.vayne.misc.tumble.smartQ") &&
                !MenuExtensions.GetItemValue <bool>("solo.vayne.misc.tumble.noqintoenemies"))
            {
                return(true);
            }

            var enemyPoints = TumbleHelper.GetEnemyPoints();

            if (enemyPoints.ToList().Contains(position.To2D()) && !enemyPoints.Contains(ObjectManager.Player.ServerPosition.To2D()))
            {
                return(false);
            }

            var closeEnemies =
                HeroManager.Enemies.FindAll(
                    en =>
                    en.IsValidTarget(1500f) &&
                    !(en.Distance(ObjectManager.Player.ServerPosition) < en.AttackRange + 65f));

            if (closeEnemies.All(enemy => position.CountEnemiesInRange(enemy.AttackRange > 350 ? enemy.AttackRange : 400) == 0))
            {
                return(true);
            }

            return(false);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Initializes the sprites.
        /// </summary>
        /// <param name="bypass">if set to <c>true</c> it will bypass the Menu enabled check.</param>
        public static void InitSprites(bool bypass = false)
        {
            try
            {
                if (!MenuExtensions.GetItemValue <bool>("dz191.dza.hud.show") && !bypass)
                {
                    return;
                }

                HudSprite = new Render.Sprite(Resources.TFHelperBG, CurrentPosition)
                {
                    PositionUpdate   = () => CurrentPosition,
                    VisibleCondition = delegate { return(ShouldBeVisible); },
                };
                HudSprite.Crop(0, 0, (int)SpriteWidth, CroppedHeight);

                ExpandShrinkButton = new Render.Sprite(Resources.Expand, CurrentPosition)
                {
                    PositionUpdate   = () => new Vector2(CurrentPosition.X + SpriteWidth - 20, CurrentPosition.Y + CroppedHeight - 20),
                    Scale            = new Vector2(0.7f, 0.7f),
                    VisibleCondition = delegate { return(ShouldBeVisible); }
                };

                ExpandShrinkButton.Add(1);
                HudSprite.Add(0);
            }
            catch (Exception ex)
            {
                LogHelper.AddToLog(new LogItem("Hud_Init", ex, LogSeverity.Error));
            }
        }
Ejemplo n.º 6
0
        private void AfterAttack(AttackableUnit unit, AttackableUnit target)
        {
            if (ShouldRun())
            {
                if (!(target is AIHeroClient))
                {
                    return;
                }

                var TargetHero = (AIHeroClient)target;

                var currentMenuItem =
                    Variables.Menu.Item(
                        $"dz191.vhr.activator.offensive.youmuu.{Variables.Orbwalker.ActiveMode.ToString().ToLower()}");
                var currentValue = currentMenuItem?.GetValue <bool>() ?? false;


                if (currentValue || MenuExtensions.GetItemValue <bool>("dz191.vhr.activator.offensive.youmuu.always"))
                {
                    if (TargetHero.IsValidTarget(GetItemRange()))
                    {
                        GetItemObject().Cast();
                    }
                }
            }
        }
Ejemplo n.º 7
0
        public static void Execute(EventArgs args)
        {
            if (!E.IsEnabledAndReady(Variables.Orbwalker.ActiveMode))
            {
                return;
            }


            var CondemnTarget = GetCondemnTarget(ObjectManager.Player.ServerPosition);

            if (CondemnTarget.IsValidTarget())
            {
                var AAForE = MenuExtensions.GetItemValue <Slider>("dz191.vhr.misc.condemn.noeaa").Value;

                if (Math.Ceiling(CondemnTarget.Health / ObjectManager.Player.GetAutoAttackDamage(CondemnTarget, true)) < AAForE)
                {
                    return;
                }

                var targetPosition = CondemnTarget.ServerPosition;
                var myPosition     = ObjectManager.Player.ServerPosition;
                if (WindWall.CollidesWithWall(myPosition, targetPosition))
                {
                    return;
                }

                E.CastOnUnit(CondemnTarget);
                TrinketBush(CondemnTarget.ServerPosition.Extend(ObjectManager.Player.ServerPosition, -450f));
            }
            return;
        }
Ejemplo n.º 8
0
 public bool ShouldGetExecuted()
 {
     return(MenuExtensions.GetItemValue <bool>("dz191.vhr.misc.condemn.lowlifepeel") &&
            Variables.spells[SpellSlot.E].IsReady() &&
            !Variables.spells[SpellSlot.Q].IsReady() &&
            (ObjectManager.Player.HealthPercent <= 25));
 }
Ejemplo n.º 9
0
        public static Obj_AI_Hero GetTarget(Vector3 fromPosition)
        {
            foreach (var target in HeroManager.Enemies.Where(h => h.IsValidTarget(Variables.spells[SpellSlot.E].Range)))
            {
                var pushDistance   = MenuExtensions.GetItemValue <Slider>("dz191.vhr.misc.condemn.pushdistance").Value;
                var targetPosition = Variables.spells[SpellSlot.E].GetSPrediction(target).UnitPosition.To3D2();
                var finalPosition  = targetPosition.Extend(fromPosition, -pushDistance);
                var finalPosition2 = targetPosition.Extend(fromPosition, -(pushDistance / 2f));
                var underTurret    = MenuExtensions.GetItemValue <bool>("dz191.vhr.misc.condemn.condemnturret") && (finalPosition.UnderTurret(true));
                var j4Flag         = MenuExtensions.GetItemValue <bool>("dz191.vhr.misc.condemn.condemnflag") && (finalPosition.IsJ4Flag(target) || finalPosition2.IsJ4Flag(target));
                if (finalPosition.IsWall() || finalPosition2.IsWall() || underTurret || j4Flag)
                {
                    if (MenuExtensions.GetItemValue <bool>("dz191.vhr.misc.condemn.onlystuncurrent") && Variables.Orbwalker.GetTarget() != null &&
                        !target.NetworkId.Equals(Variables.Orbwalker.GetTarget().NetworkId))
                    {
                        return(null);
                    }

                    if (target.Health + 10 <=
                        ObjectManager.Player.GetAutoAttackDamage(target) *
                        MenuExtensions.GetItemValue <Slider>("dz191.vhr.misc.condemn.noeaa").Value)
                    {
                        return(null);
                    }

                    return(target);
                }
            }
            return(null);
        }
Ejemplo n.º 10
0
        public void Run()
        {
            if (ShouldRun())
            {
                var rSkills = EvadeHelper.EvadeDetectedSkillshots.Where(
                    skillshot => skillshot.IsAboutToHit(250, ObjectManager.Player.ServerPosition)).ToList();

                if (MenuExtensions.GetItemValue <bool>("iseriesr.activator.spells.heal.ls"))
                {
                    if (
                        rSkills.Any(
                            skillshot =>
                            skillshot.Caster.GetSpellDamage(ObjectManager.Player, skillshot.SpellData.SpellName) >=
                            ObjectManager.Player.Health + 15))
                    {
                        CastSpell();
                    }
                }

                if (ObjectManager.Player.HealthPercent <=
                    MenuExtensions.GetItemValue <Slider>("iseriesr.activator.spells.heal.onhealth").Value)
                {
                    CastSpell();
                }
            }
        }
Ejemplo n.º 11
0
        public static void HandleFarmTumble(Obj_AI_Base target)
        {
            if (MobNames.ToList().Any(m => m.ToLower().Equals(target.CharData.BaseSkinName.ToLower(), StringComparison.InvariantCultureIgnoreCase)) &&
                MenuExtensions.GetItemValue <bool>("dz191.vhr.farm.qjungle"))
            {
                DefaultQCast(Game.CursorPos, target);
                return;
            }

            if (!Variables.spells[SpellSlot.Q].IsEnabledAndReady(Variables.Orbwalker.ActiveMode))
            {
                return;
            }

            var minionsInRange = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, ObjectManager.Player.AttackRange + 65)
                                 .Where(m => m.Health <= ObjectManager.Player.GetAutoAttackDamage(m)
                                        + Variables.spells[SpellSlot.Q].GetDamage(m)
                                        + (((20 + 10 * Variables.spells[SpellSlot.Q].Level) / 100f) * ObjectManager.Player.GetAutoAttackDamage(target)
                                           - 40f))
                                 .ToList();

            if (minionsInRange.Count() > 1)
            {
                var firstMinion         = minionsInRange.OrderBy(m => m.HealthPercent).First();
                var afterTumblePosition = PlayerHelper.GetAfterTumblePosition(Game.CursorPos);
                if (afterTumblePosition.Distance(firstMinion.ServerPosition) <= Orbwalking.GetRealAutoAttackRange(null))
                {
                    DefaultQCast(Game.CursorPos, firstMinion);
                    Variables.Orbwalker.ForceTarget(firstMinion);
                }
            }
        }
Ejemplo n.º 12
0
 /// <summary>
 /// Shoulds the module get executed.
 /// </summary>
 /// <returns></returns>
 public bool ShouldGetExecuted()
 {
     return(MenuExtensions.GetItemValue <bool>("solo.vayne.laneclear.condemn.jungle") &&
            Variables.spells[SpellSlot.E].IsReady() &&
            (Variables.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear) &&
            ObjectManager.Player.ManaPercent >= 40);
 }
Ejemplo n.º 13
0
        public void OnExecute()
        {
            var pushDistance = MenuExtensions.GetItemValue <Slider>("dz191.vhr.misc.condemn.pushdistance").Value - 25;

            foreach (var target in HeroManager.Enemies.Where(en => en.IsValidTarget(E.Range)))
            {
                var Prediction = Variables.spells[SpellSlot.E].GetPrediction(target);

                if (Prediction.Hitchance >= HitChance.VeryHigh)
                {
                    var endPosition = Prediction.UnitPosition.Extend(ObjectManager.Player.ServerPosition, -pushDistance);
                    if (endPosition.IsWall())
                    {
                        E.CastOnUnit(target);
                    }
                    else
                    {
                        //It's not a wall.
                        var step = pushDistance / 5f;
                        for (float i = 0; i < pushDistance; i += step)
                        {
                            var endPositionEx = Prediction.UnitPosition.Extend(ObjectManager.Player.ServerPosition, -i);
                            if (endPositionEx.IsWall())
                            {
                                E.CastOnUnit(target);
                                return;
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 14
0
        /// <summary>
        /// Raises the <see cref="E:Draw" /> event.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs"/> instance containing the event data.</param>
        public static void OnDraw(EventArgs args)
        {
            var closeWard =
                WardTrackerVariables.detectedWards.FirstOrDefault(
                    w => w.Position.Distance(Game.CursorPos, true) < 80 * 80);

            if (closeWard != null)
            {
                if (MenuExtensions.GetItemValue <KeyBind>("dz191.dza.ward.extrainfo").Active)
                {
                    var polyPoints  = GetWardPolygon(closeWard);
                    var currentPath = polyPoints.Select(v2 => new IntPoint(v2.X, v2.Y)).ToList();
                    var currentPoly = Geometry.ToPolygon(currentPath);
                    currentPoly.Draw(GetWardColor(closeWard.WardTypeW));
                }
            }
            foreach (var ward in WardTrackerVariables.detectedWards)
            {
                if (closeWard != null && ward.Position.Distance(closeWard.Position) < float.Epsilon && MenuExtensions.GetItemValue <KeyBind>("dz191.dza.ward.extrainfo").Active)
                {
                    continue;
                }

                var position = ward.Position;
                var shape    = Helper.GetPolygonVertices(
                    new Vector2(position.X, position.Y + 15.5f).To3D(),
                    MenuExtensions.GetItemValue <Slider>("dz191.dza.ward.sides").Value, 65f, 0);
                var list        = shape.Select(v2 => new IntPoint(v2.X, v2.Y)).ToList();
                var currentPoly = Geometry.ToPolygon(list);
                var colour      = GetWardColor(ward.WardTypeW);
                currentPoly.Draw(colour);
            }
        }
Ejemplo n.º 15
0
 public bool ShouldGetExecuted()
 {
     return((MenuExtensions.GetItemValue <bool>("dz191.vhr.misc.general.specialfocus") &&
             Variables.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo) ||
            (Variables.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed &&
             Variables.Orbwalker.GetTarget() is AIHeroClient));
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Shoulds the module get executed.
 /// </summary>
 /// <returns></returns>
 public bool ShouldGetExecuted()
 {
     return(MenuExtensions.GetItemValue <bool>("solo.vayne.misc.condemn.save") &&
            Variables.spells[SpellSlot.E].IsReady() &&
            (Variables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo) &&
            ObjectManager.Player.HealthPercent < 7);
 }
Ejemplo n.º 17
0
        public static Obj_AI_Base GetTarget(Vector3 fromPosition)
        {
            foreach (var target in HeroManager.Enemies.Where(h => h.IsValidTarget(Variables.spells[SpellSlot.E].Range)))
            {
                var   pushDistance   = MenuExtensions.GetItemValue <Slider>("dz191.vhr.misc.condemn.pushdistance").Value;
                var   targetPosition = Variables.spells[SpellSlot.E].GetPrediction(target).UnitPosition;
                var   pushDirection  = (targetPosition - ObjectManager.Player.ServerPosition).Normalized();
                float checkDistance  = pushDistance / 40f;
                for (int i = 0; i < 40; i++)
                {
                    Vector3 finalPosition = targetPosition + (pushDirection * checkDistance * i);
                    var     collFlags     = NavMesh.GetCollisionFlags(finalPosition);
                    var     j4Flag        = MenuExtensions.GetItemValue <bool>("dz191.vhr.misc.condemn.condemnflag") && (finalPosition.IsJ4Flag(target));
                    if (collFlags.HasFlag(CollisionFlags.Wall) || collFlags.HasFlag(CollisionFlags.Building) || j4Flag) //not sure about building, I think its turrets, nexus etc
                    {
                        if (MenuExtensions.GetItemValue <bool>("dz191.vhr.misc.condemn.onlystuncurrent") && Variables.Orbwalker.GetTarget() != null &&
                            !target.NetworkId.Equals(Variables.Orbwalker.GetTarget().NetworkId))
                        {
                            return(null);
                        }

                        if (target.Health + 10 <=
                            ObjectManager.Player.GetAutoAttackDamage(target) *
                            MenuExtensions.GetItemValue <Slider>("dz191.vhr.misc.condemn.noeaa").Value)
                        {
                            return(null);
                        }

                        return(target);
                    }
                }
            }

            return(null);
        }
Ejemplo n.º 18
0
        public static Obj_AI_Base GetTarget(Vector3 fromPosition)
        {
            var HeroList = HeroManager.Enemies.Where(
                h =>
                h.IsValidTarget(Variables.spells[SpellSlot.E].Range) &&
                !h.HasBuffOfType(BuffType.SpellShield) &&
                !h.HasBuffOfType(BuffType.SpellImmunity));
            //dz191.vhr.misc.condemn.rev.accuracy
            //dz191.vhr.misc.condemn.rev.nextprediction
            var MinChecksPercent = MenuExtensions.GetItemValue <Slider>("dz191.vhr.misc.condemn.accuracy").Value;
            var PushDistance     = MenuExtensions.GetItemValue <Slider>("dz191.vhr.misc.condemn.pushdistance").Value;

            if (PushDistance >= 410)
            {
                var PushEx = PushDistance;
                PushDistance -= (10 + (PushEx - 410) / 2);
            }

            if (ObjectManager.Player.ServerPosition.UnderTurret(true))
            {
                return(null);
            }

            foreach (var Hero in HeroList)
            {
                if (MenuExtensions.GetItemValue <bool>("dz191.vhr.misc.condemn.onlystuncurrent") &&
                    Hero.NetworkId != Variables.Orbwalker.GetTarget().NetworkId)
                {
                    continue;
                }

                if (Hero.Health + 10 <=
                    ObjectManager.Player.GetAutoAttackDamage(Hero) *
                    MenuExtensions.GetItemValue <Slider>("dz191.vhr.misc.condemn.noeaa").Value)
                {
                    continue;
                }


                var targetPosition   = Variables.spells[SpellSlot.E].GetPrediction(Hero).UnitPosition;
                var finalPosition    = targetPosition.Extend(ObjectManager.Player.ServerPosition, -PushDistance);
                var finalPosition_ex = Hero.ServerPosition.Extend(ObjectManager.Player.ServerPosition, -PushDistance);

                var condemnRectangle    = new VHRPolygon(VHRPolygon.Rectangle(targetPosition.To2D(), finalPosition.To2D(), Hero.BoundingRadius));
                var condemnRectangle_ex = new VHRPolygon(VHRPolygon.Rectangle(Hero.ServerPosition.To2D(), finalPosition_ex.To2D(), Hero.BoundingRadius));

                if (IsBothNearWall(Hero))
                {
                    return(null);
                }

                if (condemnRectangle.Points.Count(point => NavMesh.GetCollisionFlags(point.X, point.Y).HasFlag(CollisionFlags.Wall)) >= condemnRectangle.Points.Count() * (MinChecksPercent / 100f) &&
                    condemnRectangle_ex.Points.Count(point => NavMesh.GetCollisionFlags(point.X, point.Y).HasFlag(CollisionFlags.Wall)) >= condemnRectangle_ex.Points.Count() * (MinChecksPercent / 100f))
                {
                    return(Hero);
                }
            }
            return(null);
        }
Ejemplo n.º 19
0
        private static void DrawCondemnRectangles()
        {
            if (!MenuExtensions.GetItemValue <bool>("dz191.vhr.draw.condemn") || !Variables.spells[SpellSlot.E].IsReady())
            {
                return;
            }

            var HeroList = HeroManager.Enemies.Where(
                h =>
                h.IsValidTarget(Variables.spells[SpellSlot.E].Range + 130f) &&
                !h.HasBuffOfType(BuffType.SpellShield) &&
                !h.HasBuffOfType(BuffType.SpellImmunity));
            //dz191.vhr.misc.condemn.rev.accuracy
            //dz191.vhr.misc.condemn.rev.nextprediction
            var MinChecksPercent = MenuExtensions.GetItemValue <Slider>("dz191.vhr.misc.condemn.accuracy").Value;
            var PushDistance     = MenuExtensions.GetItemValue <Slider>("dz191.vhr.misc.condemn.pushdistance").Value;

            foreach (var Hero in HeroList)
            {
                if (MenuExtensions.GetItemValue <bool>("dz191.vhr.misc.condemn.onlystuncurrent") &&
                    Hero.NetworkId != Variables.Orbwalker.GetTarget().NetworkId)
                {
                    continue;
                }

                if (Hero.Health + 10 <=
                    ObjectManager.Player.GetAutoAttackDamage(Hero) *
                    MenuExtensions.GetItemValue <Slider>("dz191.vhr.misc.condemn.noeaa").Value)
                {
                    continue;
                }


                var targetPosition   = Hero.Position;
                var finalPosition    = targetPosition.Extend(ObjectManager.Player.ServerPosition, -PushDistance);
                var finalPosition_ex = Hero.ServerPosition.Extend(ObjectManager.Player.ServerPosition, -PushDistance);

                var condemnRectangle    = new VHRPolygon(VHRPolygon.Rectangle(targetPosition.To2D(), finalPosition.To2D(), Hero.BoundingRadius));
                var condemnRectangle_ex = new VHRPolygon(VHRPolygon.Rectangle(Hero.ServerPosition.To2D(), finalPosition_ex.To2D(), Hero.BoundingRadius));

                var points  = condemnRectangle.Points.Select(v2 => new IntPoint(v2.X, v2.Y)).ToList();
                var poly_ex = Helpers.Geometry.ToPolygon(points);

                if (
                    condemnRectangle.Points.Count(
                        point => NavMesh.GetCollisionFlags(point.X, point.Y).HasFlag(CollisionFlags.Wall)) >=
                    condemnRectangle.Points.Count() * (MinChecksPercent / 100f) &&
                    condemnRectangle_ex.Points.Count(
                        point => NavMesh.GetCollisionFlags(point.X, point.Y).HasFlag(CollisionFlags.Wall)) >=
                    condemnRectangle_ex.Points.Count() * (MinChecksPercent / 100f))
                {
                    poly_ex.Draw(Color.Chartreuse, 3);
                }
                else
                {
                    poly_ex.Draw(Color.Red, 3);
                }
            }
        }
Ejemplo n.º 20
0
 /// <summary>
 /// Shoulds the module get executed.
 /// </summary>
 /// <returns></returns>
 public bool ShouldGetExecuted()
 {
     return(ObjectManager.Player.GetEnemiesInRange(1200f).Count() > 1 &&
            ObjectManager.Player.HasBuff("vaynetumblefade") &&
            MenuExtensions.GetItemValue <bool>("solo.vayne.misc.miscellaneous.noaastealth") &&
            !ObjectManager.Player.UnderTurret(true) &&
            !(ObjectManager.Get <Obj_AI_Base>().Count(m => string.Equals(m.CharData.BaseSkinName, "VisionWard", StringComparison.CurrentCultureIgnoreCase) && m.IsValidTarget(650f)) > 0));
 }
Ejemplo n.º 21
0
        private static void HandleBuffTypeCleanser(Items.Item CleanseItem)
        {
            var buffCount = Buffs.Count(buff => ObjectManager.Player.HasBuffOfType(buff) && MenuExtensions.GetItemValue <bool>(string.Format("dz191.vhr.cleanser.bufftype.{0}", buff)));

            if (buffCount >= MenuExtensions.GetItemValue <Slider>("dz191.vhr.cleanser.bufftype.minbuffs").Value)
            {
                CastCleanse(CleanseItem);
            }
        }
Ejemplo n.º 22
0
        public static void Execute(EventArgs args)
        {
            if (!E.IsEnabledAndReady(Variables.Orbwalker.ActiveMode))
            {
                return;
            }

            /**
             * var CondemnTarget = GetCondemnTarget(ObjectManager.Player.ServerPosition);
             * if (CondemnTarget.IsValidTarget())
             * {
             * // var AAForE = MenuExtensions.GetItemValue<Slider>("dz191.vhr.misc.condemn.noeaa").Value;
             *
             * // if (CondemnTarget.Health / ObjectManager.Player.GetAutoAttackDamage(CondemnTarget, true) < AAForE)
             * // {
             * //     return;
             * // }
             *  var targetPosition = CondemnTarget.ServerPosition;
             *  var myPosition = ObjectManager.Player.ServerPosition;
             *  if (WindWall.CollidesWithWall(myPosition, targetPosition))
             *  {
             *      return;
             *  }
             *
             *  E.CastOnUnit(CondemnTarget);
             *  TrinketBush(CondemnTarget.ServerPosition.Extend(ObjectManager.Player.ServerPosition, -450f));
             * }*/
            var pushDistance = MenuExtensions.GetItemValue <Slider>("dz191.vhr.misc.condemn.pushdistance").Value - 25;

            foreach (var target in HeroManager.Enemies.Where(en => en.IsValidTarget(E.Range) && !en.IsDashing()))
            {
                var Prediction = Variables.spells[SpellSlot.E].GetPrediction(target);

                if (Prediction.Hitchance >= HitChance.VeryHigh)
                {
                    var endPosition = Prediction.UnitPosition.Extend(ObjectManager.Player.ServerPosition, -pushDistance);
                    if (endPosition.IsWall())
                    {
                        E.CastOnUnit(target);
                    }
                    else
                    {
                        //It's not a wall.
                        var step = pushDistance / 5f;
                        for (float i = 0; i < pushDistance; i += step)
                        {
                            var endPositionEx = Prediction.UnitPosition.Extend(ObjectManager.Player.ServerPosition, -i);
                            if (endPositionEx.IsWall())
                            {
                                E.CastOnUnit(target);
                                return;
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 23
0
 internal static void OnGapCloser(LeagueSharp.Common.ActiveGapcloser gapcloser)
 {
     if (gapcloser.Sender.IsValidTarget() &&
         MenuExtensions.GetItemValue <bool>("iseriesr.vayne.misc.general.antigp") &&
         Variables.spells[SpellSlot.E].IsReady())
     {
         Variables.spells[SpellSlot.E].Cast(gapcloser.Sender);
     }
 }
Ejemplo n.º 24
0
 private static void OnInterruptableTarget(AIHeroClient sender, Interrupter2.InterruptableTargetEventArgs args)
 {
     if (MenuExtensions.GetItemValue <bool>("dz191.vhr.misc.general.interrupt"))
     {
         if (args.DangerLevel == Interrupter2.DangerLevel.High && sender.IsValidTarget(Variables.spells[SpellSlot.E].Range))
         {
             Variables.spells[SpellSlot.E].CastOnUnit(sender);
         }
     }
 }
Ejemplo n.º 25
0
 internal static void OnInterrupt(AIHeroClient sender, Interrupter2.InterruptableTargetEventArgs args)
 {
     if (args.DangerLevel >= Interrupter2.DangerLevel.Medium &&
         MenuExtensions.GetItemValue <bool>("iseriesr.vayne.misc.general.antigp") &&
         Variables.spells[SpellSlot.E].IsReady() &&
         sender.IsValidTarget(Variables.spells[SpellSlot.E].Range))
     {
         Variables.spells[SpellSlot.E].Cast(sender);
     }
 }
Ejemplo n.º 26
0
 internal static void OnGapcloser(ActiveGapcloser gapcloser)
 {
     if (gapcloser.Sender.IsValidTarget() &&
         Variables.spells[SpellSlot.E].IsReady() &&
         MenuExtensions.GetItemValue <bool>("iseriesr.jinx.e.agp") &&
         ObjectManager.Player.ManaPercent > 30)
     {
         Variables.spells[SpellSlot.E].Cast(gapcloser.End);
     }
 }
Ejemplo n.º 27
0
 private void DamagePrediction_OnSpellWillKill(Obj_AI_Hero sender, Obj_AI_Hero target, SpellData sData)
 {
     if (target.IsMe && sender.IsEnemy)
     {
         if (ShouldRun() && MenuExtensions.GetItemValue <bool>("iseriesr.activator.spells.barrier.ls"))
         {
             CastSpell();
         }
     }
 }
Ejemplo n.º 28
0
 private void DamagePrediction_OnSpellWillKill(AIHeroClient sender, AIHeroClient target, SpellData sData)
 {
     if (target.IsMe && sender.IsEnemy)
     {
         if (ShouldRun() && MenuExtensions.GetItemValue <bool>("dz191.vhr.activator.spells.barrier.ls"))
         {
             CastSpell();
         }
     }
 }
Ejemplo n.º 29
0
 public static void QSwapNoEnemies()
 {
     if (Variables.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo &&
         JinxUtility.IsFishBone() &&
         MenuExtensions.GetItemValue <bool>("iseriesr.jinx.q.switch.noenemies") &&
         ObjectManager.Player.CountEnemiesInRange(1500) < 1)
     {
         Variables.spells[SpellSlot.Q].Cast();
     }
 }
Ejemplo n.º 30
0
        public static AIHeroClient GetTarget(Vector3 fromPosition)
        {
            if (ObjectManager.Player.ServerPosition.UnderTurret(true))
            {
                return(null);
            }

            var pushDistance = MenuExtensions.GetItemValue <Slider>("dz191.vhr.misc.condemn.pushdistance").Value;

            foreach (var target in HeroManager.Enemies.Where(h => h.IsValidTarget(Variables.spells[SpellSlot.E].Range) && !h.HasBuffOfType(BuffType.SpellShield) && !h.HasBuffOfType(BuffType.SpellImmunity)))
            {
                var targetPosition = Vector3.Zero;

                var pred = Variables.spells[SpellSlot.E].GetPrediction(target);
                if (pred.Hitchance >= HitChance.VeryHigh)
                {
                    targetPosition = pred.UnitPosition;
                }

                if (targetPosition == Vector3.Zero)
                {
                    return(null);
                }

                var finalPosition  = targetPosition.Extend(fromPosition, -pushDistance);
                var numberOfChecks = (float)Math.Ceiling(pushDistance / 30f);


                if (MenuExtensions.GetItemValue <bool>("dz191.vhr.misc.condemn.onlystuncurrent") && Variables.Orbwalker.GetTarget() != null &&
                    !target.NetworkId.Equals(Variables.Orbwalker.GetTarget().NetworkId))
                {
                    continue;
                }

                for (var i = 1; i <= 30; i++)
                {
                    var v3 = (targetPosition - fromPosition).Normalized();
                    var extendedPosition = targetPosition + v3 * (numberOfChecks * i);
                    //var underTurret = MenuExtensions.GetItemValue<bool>("dz191.vhr.misc.condemn.condemnturret") && (Helpers.UnderAllyTurret_Ex(finalPosition) || Helpers.IsFountain(finalPosition));
                    var j4Flag = MenuExtensions.GetItemValue <bool>("dz191.vhr.misc.condemn.condemnflag") && (extendedPosition.IsJ4Flag(target));
                    if ((extendedPosition.IsWall() || j4Flag) && (target.Path.Count() < 2) && !target.IsDashing())
                    {
                        if (target.Health + 10 <=
                            ObjectManager.Player.GetAutoAttackDamage(target) *
                            MenuExtensions.GetItemValue <Slider>("dz191.vhr.misc.condemn.noeaa").Value)
                        {
                            return(null);
                        }

                        return(target);
                    }
                }
            }
            return(null);
        }