Пример #1
0
 private void Orbwalker_OnPostAttack(AttackableUnit target, EventArgs args)
 {
     Orbwalker.ForcedTarget = null;
     if (E.IsReady() && this.UseECombo)
     {
         if (!OnlyUseEOnMelees)
         {
             var eTarget = TargetSelector.GetTarget(UseEOnEnemiesCloserThanSlider, DamageType.Physical);
             if (eTarget != null)
             {
                 var pred = E.GetPrediction(eTarget);
                 if (pred.CollisionObjects.Count == 0 && (int)pred.Hitchance >= (int)HitChance.High)
                 {
                     E.Cast(pred.UnitPosition);
                 }
             }
         }
         else
         {
             var eTarget =
                 ValidTargets.FirstOrDefault(
                     e =>
                     e.IsMelee && e.Distance(ObjectManager.Player) < UseEOnEnemiesCloserThanSlider &&
                     !e.IsZombie);
             var pred = E.GetPrediction(eTarget);
             if (pred.CollisionObjects.Count == 0 && (int)pred.Hitchance >= (int)HitChance.Medium)
             {
                 E.Cast(pred.UnitPosition);
             }
         }
     }
 }
Пример #2
0
        void WLogic()
        {
            var goodTarget =
                ValidTargets.FirstOrDefault(
                    e =>
                    e.IsValidTarget(820) && e.HasBuffOfType(BuffType.Knockup) || e.HasBuffOfType(BuffType.Snare) ||
                    e.HasBuffOfType(BuffType.Stun) || e.HasBuffOfType(BuffType.Suppression) || e.IsCharmed ||
                    e.IsCastingInterruptableSpell() || e.HasBuff("ChronoRevive") || e.HasBuff("ChronoShift"));

            if (goodTarget != null)
            {
                var pos = goodTarget.ServerPosition;
                if (pos.Distance(ObjectManager.Player.ServerPosition) < 820)
                {
                    W.Cast(goodTarget.ServerPosition);
                }
            }
            foreach (var enemyMinion in
                     ObjectManager.Get <Obj_AI_Base>()
                     .Where(
                         m =>
                         m.IsEnemy && m.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < W.Range &&
                         m.HasBuff("teleport_target")))
            {
                W.Cast(enemyMinion.ServerPosition);
            }
        }
Пример #3
0
 private void OnOrbwalkerAction(object sender, OrbwalkingActionArgs orbwalkingActionArgs)
 {
     if (orbwalkingActionArgs.Type == OrbwalkingType.AfterAttack)
     {
         Orbwalker.ForceTarget = null;
         if (Q.IsReady())
         {
             this.QLogic(orbwalkingActionArgs.Target);
             if (UseQStackTransferBool)
             {
                 this.QLogic(orbwalkingActionArgs.Target);
             }
         }
     }
     if (orbwalkingActionArgs.Type == OrbwalkingType.BeforeAttack)
     {
         if (FocusWBuffedEnemyBool)
         {
             Orbwalker.ForceTarget =
                 ValidTargets.FirstOrDefault(
                     h =>
                     h.Distance(ObjectManager.Player.ServerPosition) < 600 &&
                     h.HasBuff("kalistacoopstrikemarkally"));
         }
     }
 }
Пример #4
0
        void WLogic()
        {
            var goodTarget =
                ValidTargets.FirstOrDefault(
                    e =>
                    !e.IsDead && e.HasBuffOfType(BuffType.Knockup) || e.HasBuffOfType(BuffType.Snare) ||
                    e.HasBuffOfType(BuffType.Stun) || e.HasBuffOfType(BuffType.Suppression) || e.IsCharmed ||
                    e.IsCastingInterruptableSpell() || !e.CanMove);

            if (goodTarget != null)
            {
                var pos = goodTarget.ServerPosition;
                if (!GameObjects.AllyMinions.Any(m => !m.IsDead && m.CharData.BaseSkinName.Contains("trap") && m.Distance(goodTarget.ServerPosition) < 100) && pos.Distance(ObjectManager.Player.ServerPosition) < 820)
                {
                    W.Cast(goodTarget.ServerPosition);
                }
            }
            foreach (var enemyMinion in
                     ObjectManager.Get <Obj_AI_Base>()
                     .Where(
                         m =>
                         m.IsEnemy && m.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < W.Range &&
                         m.HasBuff("teleport_target")))
            {
                W.Cast(enemyMinion.ServerPosition);
            }
            foreach (var hero in GameObjects.EnemyHeroes.Where(h => h.Distance(ObjectManager.Player) < W.Range))
            {
                var pred = Prediction.GetPrediction(hero, W);
                if (!GameObjects.AllyMinions.Any(m => !m.IsDead && m.CharData.BaseSkinName.Contains("trap") && m.Distance(pred.Item2) < 100) && (int)pred.Item1 > (int)HitChance.Medium)
                {
                    W.Cast(pred.Item2);
                }
            }
        }
Пример #5
0
        public override void OnDraw(EventArgs args)
        {
            base.OnDraw(args);
            if (DrawWStacksBool)
            {
                var target =
                    ValidTargets.FirstOrDefault(
                        enemy => enemy.HasBuff("vaynesilvereddebuff") && enemy.IsValidTarget(2000));
                if (target.IsValidTarget())
                {
                    var x = target.HPBarPosition.X + 50;
                    var y = target.HPBarPosition.Y - 20;

                    if (W.Level > 0)
                    {
                        int stacks = target.GetBuffCount("vaynesilvereddebuff");
                        if (stacks > -1)
                        {
                            for (var i = 0; i < 3; i++)
                            {
                                Drawing.DrawLine(x + i * 20, y, x + i * 20 + 10, y, 10,
                                                 stacks <= i ? Color.DarkGray : Color.DeepSkyBlue);
                            }
                        }
                    }
                }
            }
        }
Пример #6
0
        private void OnAction(object sender, OrbwalkingActionArgs args)
        {
            if (args.Type == OrbwalkingType.BeforeAttack)
            {
                //Anti Melee
                var possibleNearbyMeleeChampion =
                    ValidTargets.FirstOrDefault(
                        e => e.IsMelee && e.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 350);

                if (possibleNearbyMeleeChampion.IsValidTarget())
                {
                    if (E.IsReady() && UseEAntiMelee)
                    {
                        var pos = ObjectManager.Player.ServerPosition.Extend(possibleNearbyMeleeChampion.ServerPosition,
                                                                             -Misc.GiveRandomInt(250, 475));
                        if (!IsDangerousPosition(pos))
                        {
                            if (pos.IsUnderEnemyTurret() && !ObjectManager.Player.IsUnderEnemyTurret())
                            {
                                return;
                            }
                            E.Cast(pos);
                        }
                    }
                }
            }
            if (args.Type == OrbwalkingType.AfterAttack)
            {
                //JungleClear
                if (args.Target is Obj_AI_Minion)
                {
                    JungleClear(args.Target);
                }
            }
        }
Пример #7
0
 private void Orbwalker_OnPreAttack(AttackableUnit target, Orbwalker.PreAttackArgs args)
 {
     if (FocusWBuffedEnemyBool)
     {
         Orbwalker.ForcedTarget =
             ValidTargets.FirstOrDefault(
                 h =>
                 h.Distance(ObjectManager.Player.ServerPosition) < 600 &&
                 h.HasBuff("kalistacoopstrikemarkally"));
     }
 }
Пример #8
0
        public void EInterruptable()
        {
            var victim =
                ValidTargets.FirstOrDefault(
                    e => e.Distance(ObjectManager.Player) < 900 && e.IsCastingInterruptableSpell());

            if (victim != null)
            {
                this.CastE(victim.ServerPosition);
            }
        }
Пример #9
0
        private void OnAction(object sender, OrbwalkingActionArgs args)
        {
            if (args.Type == OrbwalkingType.BeforeAttack)
            {
                var possibleNearbyMeleeChampion =
                    ValidTargets.FirstOrDefault(
                        e => e.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 350);

                if (possibleNearbyMeleeChampion.IsValidTarget())
                {
                    if (E.IsReady() && UseEAntiMelee)
                    {
                        var pos = ObjectManager.Player.ServerPosition.Extend(possibleNearbyMeleeChampion.ServerPosition,
                                                                             -Misc.GiveRandomInt(300, 475));
                        if (!IsDangerousPosition(pos))
                        {
                            E.Cast(pos);
                        }
                    }
                }
            }
            if (args.Type == OrbwalkingType.AfterAttack)
            {
                if (!HasPassive)
                {
                    var minion = args.Target as Obj_AI_Minion;
                    if (minion != null)
                    {
                        var tg = minion;
                        if (tg.CharData.BaseSkinName.Contains("SRU") && !tg.CharData.BaseSkinName.Contains("Mini"))
                        {
                            if (QJg && Q.IsReady())
                            {
                                Q.Cast(tg);
                                return;
                            }
                            if (WJg && W.IsReady())
                            {
                                var pred = W.GetPrediction(tg);
                                W.Cast(pred.UnitPosition);
                                return;
                            }
                            if (EJg && E.IsReady())
                            {
                                E.Cast(
                                    Deviation(ObjectManager.Player.Position.ToVector2(), tg.Position.ToVector2(),
                                              60).ToVector3());
                                return;
                            }
                        }
                    }
                }
            }
        }
Пример #10
0
 private void OnAction(object sender, OrbwalkingActionArgs orbwalkingActionArgs)
 {
     if (orbwalkingActionArgs.Type == OrbwalkingType.BeforeAttack)
     {
         /*if (orbwalkingActionArgs.Target is Obj_AI_Minion && HasPassive && FocusOnHeadShotting &&
          *  Orbwalker.ActiveMode == OrbwalkingMode.LaneClear)
          * {
          *  var target = orbwalkingActionArgs.Target as Obj_AI_Minion;
          *  if (target != null && !target.CharData.BaseSkinName.Contains("MinionSiege") && target.Health > 60)
          *  {
          *      var tg = (Obj_AI_Hero)TargetSelector.GetTarget(715, DamageType.Physical);
          *      if (tg != null && tg.IsHPBarRendered)
          *      {
          *          Orbwalker.ForceTarget = tg;
          *          orbwalkingActionArgs.Process = false;
          *      }
          *  }
          * }*/
     }
     if (orbwalkingActionArgs.Type == OrbwalkingType.AfterAttack)
     {
         Orbwalker.ForceTarget = null;
         if (E.IsReady() && this.UseECombo)
         {
             if (!OnlyUseEOnMelees)
             {
                 var eTarget = TargetSelector.GetTarget(UseEOnEnemiesCloserThanSlider.Value, DamageType.Physical);
                 if (eTarget != null)
                 {
                     var pred = Prediction.GetPrediction(eTarget, E);
                     if (pred.Item3.Count == 0 && (int)pred.Item1 >= (int)HitChance.High)
                     {
                         E.Cast(pred.Item2);
                     }
                 }
             }
             else
             {
                 var eTarget =
                     ValidTargets.FirstOrDefault(
                         e =>
                         e.IsMelee && e.Distance(ObjectManager.Player) < UseEOnEnemiesCloserThanSlider.Value &&
                         !e.IsZombie);
                 var pred = Prediction.GetPrediction(eTarget, E);
                 if (pred.Item3.Count == 0 && (int)pred.Item1 > (int)HitChance.Medium)
                 {
                     E.Cast(pred.Item2);
                 }
             }
         }
     }
 }
Пример #11
0
 private void OnAction(object sender, OrbwalkingActionArgs orbwalkingActionArgs)
 {
     if (orbwalkingActionArgs.Type == OrbwalkingType.BeforeAttack)
     {
         if (orbwalkingActionArgs.Target is Obj_AI_Minion && HasPassive && FocusOnHeadShotting &&
             Orbwalker.ActiveMode != OrbwalkingMode.LaneClear)
         {
             var target = orbwalkingActionArgs.Target as Obj_AI_Minion;
             if (!target.CharData.BaseSkinName.Contains("MinionSiege") && target.Health > 60)
             {
                 var tg = Orbwalker.ForceTarget = TargetSelector.GetTarget(715, DamageType.Physical);
                 if (tg != null)
                 {
                     orbwalkingActionArgs.Process = false;
                 }
             }
         }
         if (E.IsReady() && this.UseECombo)
         {
             if (!OnlyUseEOnMelees)
             {
                 var eTarget = TargetSelector.GetTarget(UseEOnEnemiesCloserThanSlider.Value, DamageType.Physical);
                 if (eTarget != null)
                 {
                     var pred = E.GetPrediction(eTarget);
                     if (pred.CollisionObjects.Count == 0 && (int)pred.Hitchance >= (int)HitChance.Medium)
                     {
                         E.Cast(pred.UnitPosition);
                     }
                 }
             }
             else
             {
                 var eTarget =
                     ValidTargets.FirstOrDefault(
                         e =>
                         e.IsMelee && e.Distance(ObjectManager.Player) < UseEOnEnemiesCloserThanSlider.Value &&
                         !e.IsZombie);
                 var pred = E.GetPrediction(eTarget);
                 if (pred.CollisionObjects.Count == 0 && (int)pred.Hitchance >= (int)HitChance.Medium)
                 {
                     E.Cast(pred.UnitPosition);
                 }
             }
         }
     }
     if (orbwalkingActionArgs.Type == OrbwalkingType.AfterAttack)
     {
         Orbwalker.ForceTarget = null;
     }
 }
Пример #12
0
 void QLogic()
 {
     if (Orbwalker.ActiveMode == OrbwalkingMode.Combo)
     {
         if (UseQCombo && Q.IsReady() && ObjectManager.Player.CountEnemyHeroesInRange(800) == 0 &&
             ObjectManager.Player.CountEnemyHeroesInRange(1100) > 0)
         {
             Q.CastIfWillHit(TargetSelector.GetTarget(900, DamageType.Physical), 2);
             var goodQTarget =
                 ValidTargets.FirstOrDefault(
                     t =>
                     t.Distance(ObjectManager.Player) < 950 && t.Health < Q.GetDamage(t) ||
                     SquishyTargets.Contains(t.CharData.BaseSkinName));
             if (goodQTarget != null)
             {
                 var pred = Prediction.GetPrediction(goodQTarget, Q);
                 if ((int)pred.Item1 > (int)HitChance.Medium)
                 {
                     Q.Cast(pred.Item2);
                 }
             }
         }
     }
     if (Orbwalker.ActiveMode != OrbwalkingMode.None && Orbwalker.ActiveMode != OrbwalkingMode.Combo &&
         ObjectManager.Player.CountEnemyHeroesInRange(850) == 0)
     {
         var qHarassMode = QHarassMode.SelectedValue;
         if (qHarassMode != "DISABLED")
         {
             var qTarget = TargetSelector.GetTarget(1100, DamageType.Physical);
             if (qTarget != null)
             {
                 var pred = Prediction.GetPrediction(qTarget, Q);
                 if ((int)pred.Item1 > (int)HitChance.Medium)
                 {
                     if (qHarassMode == "ALLOWMINIONS")
                     {
                         Q.Cast(pred.Item2);
                     }
                     else if (pred.Item3.Count == 0)
                     {
                         Q.Cast(pred.Item2);
                     }
                 }
             }
         }
     }
 }
Пример #13
0
 void QLogic()
 {
     if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
     {
         if (UseQCombo && Q.IsReady() && ObjectManager.Player.CountEnemyHeroesInRange(800) == 0 &&
             ObjectManager.Player.CountEnemyHeroesInRange(1100) > 0)
         {
             Q.CastIfWillHit(TargetSelector.GetTarget(1100, DamageType.Physical), 2);
             var goodQTarget =
                 ValidTargets.FirstOrDefault(
                     t =>
                     t.Distance(ObjectManager.Player) < 1150 && t.Health < Q.GetDamage(t) ||
                     SquishyTargets.Contains(t.CharData.BaseSkinName));
             if (goodQTarget != null)
             {
                 var pred = Q.GetPrediction(goodQTarget);
                 if ((int)pred.Hitchance > (int)HitChance.Medium)
                 {
                     Q.Cast(pred.UnitPosition);
                 }
             }
         }
     }
     if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.None) && !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) &&
         ObjectManager.Player.CountEnemyHeroesInRange(850) == 0)
     {
         var qHarassMode = QHarassMode;
         if (qHarassMode != 2)
         {
             var qTarget = TargetSelector.GetTarget(1100, DamageType.Physical);
             if (qTarget != null)
             {
                 var pred = Q.GetPrediction(qTarget);
                 if ((int)pred.Hitchance > (int)HitChance.Medium)
                 {
                     if (qHarassMode == 1)
                     {
                         Q.Cast(pred.UnitPosition);
                     }
                     else if (pred.CollisionObjects.Count == 0)
                     {
                         Q.Cast(pred.UnitPosition);
                     }
                 }
             }
         }
     }
 }
Пример #14
0
        private void Orbwalker_OnPreAttack(AttackableUnit target, Orbwalker.PreAttackArgs args)
        {
            //Anti Melee
            var possibleNearbyMeleeChampion =
                ValidTargets.FirstOrDefault(
                    e => e.IsMelee && e.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 350);

            if (possibleNearbyMeleeChampion.IsValidTarget())
            {
                if (E.IsReady() && UseEAntiMelee)
                {
                    var pos = ObjectManager.Player.ServerPosition.LSExtend(possibleNearbyMeleeChampion.ServerPosition,
                                                                           -Misc.GiveRandomInt(250, 475));
                    if (!IsDangerousPosition(pos))
                    {
                        E.Cast(pos);
                    }
                }
            }
        }
Пример #15
0
 private void OnOrbwalkerAction(object sender, OrbwalkingActionArgs orbwalkingActionArgs)
 {
     if (orbwalkingActionArgs.Target == null)
     {
         return;
     }
     if (orbwalkingActionArgs.Type == OrbwalkingType.AfterAttack)
     {
         Orbwalker.ForceTarget = null;
         if (UseEIfResettedByAMinionBool && ObjectManager.Player.ManaPercent > EResetByAMinionMinManaSlider.Value)
         {
             if (
                 ValidTargets.Any(e =>
                                  e.Distance(ObjectManager.Player.ServerPosition) > 615 &&
                                  GetRendBuff(e).Count >= MinEnemyStacksForEMinionResetSlider.Value) &&
                 GameObjects.EnemyMinions.Any(m => IsRendKillable(m)))
             {
                 E.Cast();
             }
         }
         if (Orbwalker.ActiveMode == OrbwalkingMode.Combo && Q.IsReady())
         {
             var hero = orbwalkingActionArgs.Target as Obj_AI_Hero;
             if (hero != null)
             {
                 if (hero.IsHPBarRendered)
                 {
                     var pred = Q.GetPrediction(hero);
                     if (pred.Hitchance >= HitChance.High)
                     {
                         Q.Cast(pred.UnitPosition);
                         return;
                     }
                 }
             }
             else
             {
                 foreach (var target in ValidTargets.Where(t => t.Distance(ObjectManager.Player) < 900))
                 {
                     if (ObjectManager.Player.ManaPercent > UseQManaSlider.Value)
                     {
                         var pred = Q.GetPrediction(target);
                         if (pred.Hitchance >= HitChance.High)
                         {
                             Q.Cast(pred.UnitPosition);
                             return;
                         }
                     }
                 }
             }
         }
         if (UseQStackTransferBool && orbwalkingActionArgs.Target is Obj_AI_Minion)
         {
             var target = orbwalkingActionArgs.Target as Obj_AI_Minion;
             if (GetRendBuff(target).Count >= UseQStackTransferMinStacksSlider && target.Health < Q.GetDamage(target))
             {
                 foreach (var enemy in ValidTargets.Where(en => en.Distance(ObjectManager.Player) < 900))
                 {
                     var pred = Q.GetPrediction(enemy, false);
                     if (pred.CollisionObjects.All(co => co is Obj_AI_Minion && co.Health < Q.GetDamage(co)) && pred.CollisionObjects.Any(m => m.NetworkId == target.NetworkId))
                     {
                         Q.Cast(pred.UnitPosition);
                     }
                 }
             }
         }
     }
     if (orbwalkingActionArgs.Type == OrbwalkingType.BeforeAttack)
     {
         if (Orbwalker.ActiveMode == OrbwalkingMode.Combo && FocusWBuffedEnemyBool)
         {
             var wMarkedEnemy =
                 ValidTargets.FirstOrDefault(
                     h => h.Distance(ObjectManager.Player.ServerPosition) < 600 && h.HasBuff("kalistacoopstrikemarkally"));
             if (wMarkedEnemy != null && wMarkedEnemy.IsValidTarget())
             {
                 Orbwalker.ForceTarget = wMarkedEnemy;
             }
         }
         if (Orbwalker.ActiveMode != OrbwalkingMode.Combo && FocusWBuffedEnemyInHarassBool)
         {
             var wMarkedEnemy =
                 ValidTargets.FirstOrDefault(
                     h => h.Distance(ObjectManager.Player.ServerPosition) < 600 && h.HasBuff("kalistacoopstrikemarkally"));
             if (wMarkedEnemy != null && wMarkedEnemy.IsValidTarget())
             {
                 Orbwalker.ForceTarget = wMarkedEnemy;
             }
         }
         if (Orbwalker.ActiveMode == OrbwalkingMode.LaneClear &&
             orbwalkingActionArgs.Target.Type != GameObjectType.obj_AI_Hero)
         {
             if (FocusWBuffedMinions)
             {
                 Orbwalker.ForceTarget =
                     GameObjects.EnemyMinions.FirstOrDefault(
                         m =>
                         m.Distance(ObjectManager.Player.ServerPosition) < 615 && m.HasBuff("kalistacoopstrikemarkally") &&
                         m.Health < ObjectManager.Player.GetAutoAttackDamage(m) + W.GetDamage(m));
             }
         }
     }
 }
Пример #16
0
        private void Orbwalker_OnPostAttack(AttackableUnit target, EventArgs args)
        {
            Orbwalker.ForcedTarget = (null);
            var possible2WTarget = ValidTargets.FirstOrDefault(
                h =>
                h.ServerPosition.Distance(EloBuddy.ObjectManager.Player.ServerPosition) < 500 &&
                h.GetBuffCount("vaynesilvereddebuff") == 2);

            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                if (possible2WTarget.LSIsValidTarget() && UseEAs3rdWProcBool && LeagueSharp.SDK.Core.Utils.MathUtils.GetWaypoints(possible2WTarget).LastOrDefault().Distance(EloBuddy.ObjectManager.Player.ServerPosition) < 1000)
                {
                    if (EDelaySlider > 0)
                    {
                        var thisEnemy = possible2WTarget;
                        LeagueSharp.SDK.Core.Utils.DelayAction.Add(EDelaySlider, () => E.CastOnUnit(thisEnemy));
                        return;
                    }
                    E.CastOnUnit(possible2WTarget);
                }
            }
            if (target is EloBuddy.AIHeroClient && UseQBool)
            {
                if (Q.IsReady())
                {
                    var tg = target as EloBuddy.AIHeroClient;
                    if (tg != null)
                    {
                        var mode           = QModeStringList;
                        var tumblePosition = EloBuddy.Game.CursorPos;
                        switch (mode)
                        {
                        case 1:
                            tumblePosition = GetTumblePos(tg);
                            break;

                        default:
                            tumblePosition = EloBuddy.Game.CursorPos;
                            break;
                        }
                        if (tumblePosition.Distance(EloBuddy.ObjectManager.Player.Position) > 2000 || IsDangerousPosition(tumblePosition))
                        {
                            return;
                        }
                        Q.Cast(tumblePosition);
                    }
                }
            }
            if (target is EloBuddy.Obj_AI_Minion && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
            {
                var tg = target as EloBuddy.Obj_AI_Minion;
                if (E.IsReady())
                {
                    if (this.IsMinionCondemnable(tg) && GameObjects.Jungle.Any(m => m.NetworkId == tg.NetworkId) && tg.LSIsValidTarget() && this.UseEJungleFarm)
                    {
                        if (this.EDelaySlider > 0)
                        {
                            var thisEnemy = tg;
                            LeagueSharp.SDK.Core.Utils.DelayAction.Add(EDelaySlider, () => E.CastOnUnit(thisEnemy));
                            return;
                        }
                        E.CastOnUnit(tg);
                    }
                }
                if (this.UseQFarm && this.Q.IsReady())
                {
                    if (tg.CharData.BaseSkinName.Contains("SRU_") && !tg.CharData.BaseSkinName.Contains("Mini") && tg.LSIsValidTarget() && !this.IsDangerousPosition(EloBuddy.Game.CursorPos))
                    {
                        Q.Cast(EloBuddy.Game.CursorPos);
                    }
                    if (EloBuddy.ObjectManager.Player.UnderAllyTurret() && GameObjects.EnemyMinions.Count(
                            m =>
                            m.Position.Distance(EloBuddy.ObjectManager.Player.Position) < 550 && m.Health < EloBuddy.ObjectManager.Player.LSGetAutoAttackDamage(m) && Health.GetPrediction(m, (int)(100 + (EloBuddy.Game.Ping / 2) + EloBuddy.ObjectManager.Player.AttackCastDelay * 1000)) > 3) > 1 &&
                        !this.IsDangerousPosition(EloBuddy.Game.CursorPos))
                    {
                        Q.Cast(EloBuddy.Game.CursorPos);
                    }
                    if (EloBuddy.ObjectManager.Player.UnderAllyTurret())
                    {
                        if (GameObjects.EnemyMinions.Count(
                                m =>
                                m.Position.Distance(EloBuddy.ObjectManager.Player.Position) < 550 &&
                                m.Health < EloBuddy.ObjectManager.Player.LSGetAutoAttackDamage(m) + Q.GetDamage(m)) > 0 && !this.IsDangerousPosition(EloBuddy.Game.CursorPos))
                        {
                            Q.Cast(EloBuddy.Game.CursorPos);
                        }
                    }
                }
            }
            if (UseQOnlyAt2WStacksBool && !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) && possible2WTarget.LSIsValidTarget())
            {
                Q.Cast(GetTumblePos(possible2WTarget));
            }
        }
Пример #17
0
        public override void OnDraw(EventArgs args)
        {
            var drawRange = DrawRange.Value;

            if (drawRange > 0)
            {
                Render.Circle.DrawCircle(ObjectManager.Player.Position, drawRange, Color.Gold);
            }
            if (Orbwalker.ActiveMode == OrbwalkingMode.Combo)
            {
                if (UseQCombo && Q.IsReady() && ObjectManager.Player.CountEnemyHeroesInRange(800) == 0 &&
                    ObjectManager.Player.CountEnemyHeroesInRange(1100) > 0)
                {
                    Q.CastIfWillHit(TargetSelector.GetTarget(1100, DamageType.Physical), 2);
                    var goodQTarget =
                        ValidTargets.FirstOrDefault(
                            t =>
                            t.Distance(ObjectManager.Player) < 1150 && t.Health < Q.GetDamage(t) ||
                            SquishyTargets.Contains(t.CharData.BaseSkinName));
                    if (goodQTarget != null)
                    {
                        var pred = Q.GetPrediction(goodQTarget);
                        if ((int)pred.Hitchance > (int)HitChance.Medium)
                        {
                            Q.Cast(pred.UnitPosition);
                        }
                    }
                }
            }
            if (Orbwalker.ActiveMode != OrbwalkingMode.None && Orbwalker.ActiveMode != OrbwalkingMode.Combo &&
                ObjectManager.Player.CountEnemyHeroesInRange(850) == 0)
            {
                var qHarassMode = QHarassMode.SelectedValue;
                if (qHarassMode != "DISABLED")
                {
                    var qTarget = TargetSelector.GetTarget(1100, DamageType.Physical);
                    if (qTarget != null)
                    {
                        var pred = Q.GetPrediction(qTarget);
                        if ((int)pred.Hitchance > (int)HitChance.Medium)
                        {
                            if (qHarassMode == "ALLOWMINIONS")
                            {
                                Q.Cast(pred.UnitPosition);
                            }
                            else if (pred.CollisionObjects.Count == 0)
                            {
                                Q.Cast(pred.UnitPosition);
                            }
                        }
                    }
                }
            }

            #region ELogic

            if (!W.IsReady())
            {
                return;
            }
            var goodTarget =
                ValidTargets.FirstOrDefault(
                    e =>
                    e.IsValidTarget(820) && e.HasBuffOfType(BuffType.Knockup) || e.HasBuffOfType(BuffType.Snare) ||
                    e.HasBuffOfType(BuffType.Stun) || e.HasBuffOfType(BuffType.Suppression) || e.IsCharmed ||
                    e.IsCastingInterruptableSpell() || e.HasBuff("ChronoRevive") || e.HasBuff("ChronoShift"));
            if (goodTarget != null)
            {
                var pos = goodTarget.ServerPosition;
                if (pos.Distance(ObjectManager.Player.ServerPosition) < 820)
                {
                    W.Cast(goodTarget.ServerPosition);
                }
            }
            foreach (
                var enemyMinion in
                ObjectManager.Get <Obj_AI_Base>()
                .Where(
                    m =>
                    m.IsEnemy && m.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < W.Range &&
                    m.HasBuff("teleport_target")))
            {
                W.Cast(enemyMinion.ServerPosition);
            }

            #endregion ELogic

            #region RLogic


            if (UseRCombo.Active && R.IsReady() && ObjectManager.Player.CountEnemyHeroesInRange(900) == 0)
            {
                foreach (
                    var rTarget in
                    ValidTargets.Where(
                        e =>
                        SquishyTargets.Contains(e.CharData.BaseSkinName) && R.GetDamage(e) > 0.1 * e.MaxHealth ||
                        R.GetDamage(e) > e.Health)
                    )
                {
                    if (rTarget.Distance(ObjectManager.Player) > 1400)
                    {
                        var pred = R.GetPrediction(rTarget);
                        if (!pred.CollisionObjects.Any(obj => obj is Obj_AI_Hero))
                        {
                            R.CastOnUnit(rTarget);
                        }
                        break;
                    }
                    R.CastOnUnit(rTarget);
                }
            }

            #endregion RLogic
        }
Пример #18
0
        //private Items.Item ZZrot = new Items.Item(3512, 400);
        #endregion

        #region Events

        public override void OnUpdate(EventArgs args)
        {
            base.OnUpdate(args);
            if (UseEBool && E.IsReady())
            {
                foreach (var enemy in ValidTargets.Where(e => e.IsValidTarget(550)))
                {
                    /*if (ZZrot.IsReady && enemy.IsValidTarget(ZZrot.Range))
                     * {
                     *  if (E.CastOnUnit(enemy))
                     *  {
                     *      DelayAction.Add(100,
                     *          () =>
                     *              {
                     *                  this.ZZrot.Cast(
                     *                      enemy.Position.ToVector2()
                     *                          .Extend(ObjectManager.Player.ServerPosition.ToVector2(), -100));
                     *              });
                     *      return;
                     *  }
                     * }*/
                    if (enemy.IsCastingInterruptableSpell())
                    {
                        E.CastOnUnit(enemy);
                    }
                    if (IsCondemnable(enemy))
                    {
                        if (EDelaySlider.Value > 0)
                        {
                            var thisEnemy = enemy;
                            DelayAction.Add(EDelaySlider.Value, () => E.CastOnUnit(thisEnemy));
                            return;
                        }
                        E.CastOnUnit(enemy);
                    }
                }
            }
            if (SemiAutomaticCondemnKey.Active)
            {
                foreach (
                    var hero in
                    ValidTargets.Where(
                        h => h.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 550))
                {
                    var prediction = E.GetPrediction(hero);
                    for (var i = 40; i < 425; i += 125)
                    {
                        var flags = NavMesh.GetCollisionFlags(
                            prediction.UnitPosition.ToVector2()
                            .Extend(ObjectManager.Player.ServerPosition.ToVector2(),
                                    -i)
                            .ToVector3());
                        if (flags.HasFlag(CollisionFlags.Wall) || flags.HasFlag(CollisionFlags.Building))
                        {
                            if (EDelaySlider.Value > 0)
                            {
                                var thisEnemy = hero;
                                DelayAction.Add(EDelaySlider.Value, () => E.CastOnUnit(thisEnemy));
                                return;
                            }
                            E.CastOnUnit(hero);
                            return;
                        }
                    }
                }
            }
            if (UseEInterruptBool)
            {
                var possibleChannelingTarget =
                    ValidTargets.FirstOrDefault(
                        e =>
                        e.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 550 &&
                        e.IsCastingInterruptableSpell());
                if (possibleChannelingTarget.IsValidTarget())
                {
                    if (EDelaySlider.Value > 0)
                    {
                        var thisEnemy = possibleChannelingTarget;
                        DelayAction.Add(EDelaySlider.Value, () => E.CastOnUnit(thisEnemy));
                        return;
                    }
                    E.CastOnUnit(possibleChannelingTarget);
                }
            }
        }
Пример #19
0
        private void OnOrbwalkingAction(object sender, OrbwalkingActionArgs orbwalkingActionArgs)
        {
            if (orbwalkingActionArgs.Type == OrbwalkingType.AfterAttack)
            {
                Orbwalker.ForceTarget = null;
                var possible2WTarget = ValidTargets.FirstOrDefault(
                    h =>
                    h.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 500 &&
                    h.GetBuffCount("vaynesilvereddebuff") == 2);
                if (Orbwalker.ActiveMode != OrbwalkingMode.Combo)
                {
                    if (possible2WTarget.IsValidTarget() && UseEAs3rdWProcBool && possible2WTarget.GetWaypoints().LastOrDefault().Distance(ObjectManager.Player.ServerPosition) < 1000)
                    {
                        if (EDelaySlider.Value > 0)
                        {
                            var thisEnemy = possible2WTarget;
                            DelayAction.Add(EDelaySlider.Value, () => E.CastOnUnit(thisEnemy));
                            return;
                        }
                        E.CastOnUnit(possible2WTarget);
                    }
                }
                if (orbwalkingActionArgs.Target is Obj_AI_Hero && UseQBool)
                {
                    if (Q.IsReady())
                    {
                        var tg = orbwalkingActionArgs.Target as Obj_AI_Hero;
                        if (tg != null)
                        {
                            var mode           = QModeStringList.SelectedValue;
                            var tumblePosition = Game.CursorPos;
                            switch (mode)
                            {
                            case "PRADA":
                                tumblePosition = GetTumblePos(tg);
                                break;

                            default:
                                tumblePosition = Game.CursorPos;
                                break;
                            }
                            if (tumblePosition.Distance(ObjectManager.Player.Position) > 2000 || IsDangerousPosition(tumblePosition))
                            {
                                return;
                            }
                            Q.Cast(tumblePosition);
                        }
                    }
                }
                if (orbwalkingActionArgs.Target is Obj_AI_Minion && Orbwalker.ActiveMode == OrbwalkingMode.LaneClear)
                {
                    var tg = orbwalkingActionArgs.Target as Obj_AI_Minion;
                    if (E.IsReady())
                    {
                        if (this.IsMinionCondemnable(tg) && GameObjects.Jungle.Any(m => m.NetworkId == tg.NetworkId) && tg.IsValidTarget() && this.UseEJungleFarm)
                        {
                            if (this.EDelaySlider.Value > 0)
                            {
                                var thisEnemy = tg;
                                DelayAction.Add(EDelaySlider.Value, () => E.CastOnUnit(thisEnemy));
                                return;
                            }
                            E.CastOnUnit(tg);
                        }
                    }
                    if (this.UseQFarm && this.Q.IsReady())
                    {
                        if (tg.CharData.BaseSkinName.Contains("SRU_") && !tg.CharData.BaseSkinName.Contains("Mini") && tg.IsValidTarget() && !this.IsDangerousPosition(Game.CursorPos))
                        {
                            Q.Cast(Game.CursorPos);
                        }
                        if (ObjectManager.Player.UnderAllyTurret() && GameObjects.EnemyMinions.Count(
                                m =>
                                m.Position.Distance(ObjectManager.Player.Position) < 550 && m.Health < ObjectManager.Player.GetAutoAttackDamage(m) && Health.GetPrediction(m, (int)(100 + (Game.Ping / 2) + ObjectManager.Player.AttackCastDelay * 1000)) > 3) > 1 &&
                            !this.IsDangerousPosition(Game.CursorPos))
                        {
                            Q.Cast(Game.CursorPos);
                        }
                        if (ObjectManager.Player.UnderAllyTurret())
                        {
                            if (GameObjects.EnemyMinions.Count(
                                    m =>
                                    m.Position.Distance(ObjectManager.Player.Position) < 550 &&
                                    m.Health < ObjectManager.Player.GetAutoAttackDamage(m) + Q.GetDamage(m)) > 0 && !this.IsDangerousPosition(Game.CursorPos))
                            {
                                Q.Cast(Game.CursorPos);
                            }
                        }
                    }
                }
                if (UseQOnlyAt2WStacksBool && Orbwalker.ActiveMode != OrbwalkingMode.Combo && possible2WTarget.IsValidTarget())
                {
                    Q.Cast(GetTumblePos(possible2WTarget));
                }
            }
            if (orbwalkingActionArgs.Type == OrbwalkingType.BeforeAttack)
            {
                var possible2WTarget = ValidTargets.FirstOrDefault(
                    h =>
                    h.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 500 &&
                    h.GetBuffCount("vaynesilvereddebuff") == 2);
                if (TryToFocus2WBool && possible2WTarget.IsValidTarget())
                {
                    Orbwalker.ForceTarget = possible2WTarget;
                }
                if (ObjectManager.Player.HasBuff("vaynetumblefade") && DontAttackWhileInvisibleAndMeelesNearBool)
                {
                    if (
                        ValidTargets.Any(
                            e => e.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 350 && e.IsMelee))
                    {
                        orbwalkingActionArgs.Process = false;
                    }
                }
                var possibleTarget = Variables.TargetSelector.GetTarget(615, DamageType.Physical);
                if (possibleTarget != null && orbwalkingActionArgs.Target is Obj_AI_Minion &&
                    UseQBonusOnEnemiesNotCS && ObjectManager.Player.HasBuff("vaynetumblebonus"))
                {
                    Orbwalker.ForceTarget = possibleTarget;
                    Orbwalker.Attack(possibleTarget);
                    orbwalkingActionArgs.Process = false;
                }
                var possibleNearbyMeleeChampion =
                    ValidTargets.FirstOrDefault(
                        e => e.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 350);

                if (possibleNearbyMeleeChampion.IsValidTarget())
                {
                    if (Q.IsReady() && UseQBool)
                    {
                        var pos = ObjectManager.Player.ServerPosition.Extend(possibleNearbyMeleeChampion.ServerPosition,
                                                                             -350);
                        if (!IsDangerousPosition(pos))
                        {
                            Q.Cast(pos);
                            orbwalkingActionArgs.Process = false;
                        }
                    }
                    if (UseEWhenMeleesNearBool && !Q.IsReady() && E.IsReady())
                    {
                        var possibleMeleeChampionsGapclosers = from tuplet in CachedGapclosers
                                                               where tuplet.Item1 == possibleNearbyMeleeChampion.CharData.BaseSkinName
                                                               select tuplet.Item2;
                        if (possibleMeleeChampionsGapclosers.FirstOrDefault() != null)
                        {
                            if (
                                possibleMeleeChampionsGapclosers.Any(
                                    gapcloserEntry =>
                                    possibleNearbyMeleeChampion.Spellbook.GetSpell(gapcloserEntry.Slot).IsReady()))
                            {
                                return;
                            }
                        }
                        if (
                            possibleNearbyMeleeChampion.GetWaypoints()
                            .LastOrDefault()
                            .Distance(ObjectManager.Player.ServerPosition) < possibleNearbyMeleeChampion.AttackRange)
                        {
                            if (EDelaySlider.Value > 0)
                            {
                                var thisEnemy = possibleNearbyMeleeChampion;
                                DelayAction.Add(EDelaySlider.Value, () => E.CastOnUnit(thisEnemy));
                                return;
                            }
                            E.CastOnUnit(possibleNearbyMeleeChampion);
                        }
                    }
                }
            }
        }
Пример #20
0
        private void Orbwalker_OnPreAttack(AttackableUnit target, Orbwalker.PreAttackArgs args)
        {
            if (args.Process)
            {
                IsWindingUp = true;
            }
            else
            {
                IsWindingUp = false;
            }
            if (R.IsReady() && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) && UseRBool && args.Target is EloBuddy.AIHeroClient && (!(args.Target as EloBuddy.AIHeroClient).IsUnderEnemyTurret() || EloBuddy.ObjectManager.Player.IsUnderEnemyTurret()) && EloBuddy.ObjectManager.Player.CountAllyHeroesInRange(800) >= EloBuddy.ObjectManager.Player.CountEnemyHeroesInRange(800))
            {
                R.Cast();
            }
            var possible2WTarget = ValidTargets.FirstOrDefault(
                h =>
                h.ServerPosition.Distance(EloBuddy.ObjectManager.Player.ServerPosition) < 500 &&
                h.GetBuffCount("vaynesilvereddebuff") == 2);

            if (TryToFocus2WBool && possible2WTarget.LSIsValidTarget())
            {
                Orbwalker.ForcedTarget = (possible2WTarget);
            }
            if (EloBuddy.ObjectManager.Player.HasBuff("vaynetumblefade") && DontAttackWhileInvisibleAndMeelesNearBool)
            {
                if (
                    ValidTargets.Any(
                        e => e.ServerPosition.Distance(EloBuddy.ObjectManager.Player.ServerPosition) < 350 && e.IsMelee))
                {
                    args.Process = false;
                }
            }
            var possibleTarget = TargetSelector.GetTarget(615, EloBuddy.DamageType.Physical);

            if (possibleTarget != null && args.Target is EloBuddy.Obj_AI_Minion &&
                UseQBonusOnEnemiesNotCS && EloBuddy.ObjectManager.Player.HasBuff("vaynetumblebonus"))
            {
                Orbwalker.ForcedTarget = (possibleTarget);
                args.Process           = false;
            }
            var possibleNearbyMeleeChampion =
                ValidTargets.FirstOrDefault(
                    e => e.ServerPosition.Distance(EloBuddy.ObjectManager.Player.ServerPosition) < 350);

            if (possibleNearbyMeleeChampion.LSIsValidTarget())
            {
                if (Q.IsReady() && UseQBool)
                {
                    var pos = EloBuddy.ObjectManager.Player.ServerPosition.LSExtend(possibleNearbyMeleeChampion.ServerPosition,
                                                                                    -350);
                    if (!IsDangerousPosition(pos))
                    {
                        Q.Cast(pos);
                        args.Process = false;
                    }
                }
                if (UseEWhenMeleesNearBool && !Q.IsReady() && E.IsReady())
                {
                    var possibleMeleeChampionsGapclosers = from tuplet in CachedGapclosers
                                                           where tuplet.Item1 == possibleNearbyMeleeChampion.CharData.BaseSkinName
                                                           select tuplet.Item2;
                    if (possibleMeleeChampionsGapclosers.FirstOrDefault() != null)
                    {
                        if (
                            possibleMeleeChampionsGapclosers.Any(
                                gapcloserEntry =>
                                possibleNearbyMeleeChampion.Spellbook.GetSpell(gapcloserEntry.Slot).IsReady()))
                        {
                            return;
                        }
                    }
                    if (
                        LeagueSharp.SDK.Core.Utils.MathUtils.GetWaypoints(possibleNearbyMeleeChampion)
                        .LastOrDefault()
                        .Distance(EloBuddy.ObjectManager.Player.ServerPosition) < possibleNearbyMeleeChampion.AttackRange)
                    {
                        if (EDelaySlider > 0)
                        {
                            var thisEnemy = possibleNearbyMeleeChampion;
                            LeagueSharp.SDK.Core.Utils.DelayAction.Add(EDelaySlider, () => E.CastOnUnit(thisEnemy));
                            return;
                        }
                        E.CastOnUnit(possibleNearbyMeleeChampion);
                    }
                }
            }
        }