예제 #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 = Prediction.GetPrediction(eTarget, E);
                 if (pred.Item3.Count == 0 && (int)pred.Item1 >= (int)HitChance.High && ShouldE(pred.Item2))
                 {
                     E.Cast(pred.Item2);
                 }
             }
         }
         else
         {
             var eTarget =
                 ValidTargets.FirstOrDefault(
                     e =>
                     e.IsMelee && e.Distance(ObjectManager.Player) < UseEOnEnemiesCloserThanSlider &&
                     !e.IsZombie);
             var pred = Prediction.GetPrediction(eTarget, E);
             if (pred.Item3.Count == 0 && (int)pred.Item1 > (int)HitChance.Medium && ShouldE(pred.Item2))
             {
                 E.Cast(pred.Item2);
             }
         }
     }
 }
예제 #2
0
 private void OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     base.OnProcessSpellCast(sender, args);
     if (sender is AIHeroClient && sender.IsEnemy)
     {
         if (args.SData.Name == "summonerflash" && args.End.Distance(ObjectManager.Player.ServerPosition) < 650)
         {
             var pred = Prediction.GetPrediction((AIHeroClient)args.Target, E);
             if (!pred.Item3.Any(o => o.IsMinion && !o.IsDead && !o.IsAlly) && ShouldE(args.End))
             {
                 E.Cast(args.End);
             }
         }
     }
 }
예제 #3
0
 void QLogic()
 {
     if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
     {
         if (UseQCombo && Q.IsReady() && ObjectManager.Player.CountEnemyHeroesInRange(800) == 0 &&
             ObjectManager.Player.CountEnemyHeroesInRange(1100) > 0)
         {
             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 && pred.Item2.Distance(ObjectManager.Player.Position) < 1100)
                 {
                     Q.Cast(pred.Item2);
                 }
             }
         }
     }
     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 = Prediction.GetPrediction(qTarget, Q);
                 if ((int)pred.Item1 > (int)HitChance.Medium && pred.Item2.Distance(ObjectManager.Player.Position) < 1100)
                 {
                     if (qHarassMode == 1)
                     {
                         Q.Cast(pred.Item2);
                     }
                     else if (pred.Item3.Count == 0)
                     {
                         Q.Cast(pred.Item2);
                     }
                 }
             }
         }
     }
 }
예제 #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);
            }
            if (UseWCombo)
            {
                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 && ObjectManager.Player.Distance(pred.Item2) < W.Range)
                    {
                        W.Cast(pred.Item2);
                    }
                }
            }
        }
예제 #5
0
        public void QLogic()
        {
            if (!Q.IsReady() || (ObjectManager.Player.Mana < 3 * GetWManaCost() && CanW()))
            {
                return;
            }
            var shouldntKS =
                EntityManager.Heroes.Allies.Any(
                    h => h.Position.Distance(ObjectManager.Player.Position) < 600 && !h.IsDead && !h.IsMe);

            foreach (var hero in ValidTargets.Where(h => h.LSIsValidTarget(925)))
            {
                if (shouldntKS && Q.GetDamage(hero) > hero.Health)
                {
                    continue;
                }
                var pred = Prediction.GetPrediction(hero, Q);
                if (((int)pred.Item1 > (int)HitChance.Medium || hero.HasBuff("SorakaEPacify")) && pred.Item2.Distance(ObjectManager.Player.ServerPosition) < Q.Range)
                {
                    Q.Cast(pred.Item2);
                }
            }
        }
예제 #6
0
 void RLogic()
 {
     if (UseRCombo && ObjectManager.Player.CountEnemyHeroesInRange(900) == 0)
     {
         foreach (var rTarget in
                  ValidTargets.Where(
                      e =>
                      SquishyTargets.Contains(e.CharData.BaseSkinName) && R.GetDamage(e) > 0.15 * e.MaxHealth ||
                      R.GetDamage(e) > e.Health))
         {
             if (rTarget.Distance(ObjectManager.Player) > 1400)
             {
                 var pred = Prediction.GetPrediction(rTarget, R);
                 if (!pred.Item3.Any(obj => obj is AIHeroClient))
                 {
                     R.CastOnUnit(rTarget);
                 }
                 break;
             }
             R.CastOnUnit(rTarget);
         }
     }
 }
예제 #7
0
 private void OnPlayAnimation(Obj_AI_Base sender, GameObjectPlayAnimationEventArgs args)
 {
     if (sender.IsMe && args.Animation == "Spell3")
     {
         var target = TargetSelector.GetTarget(1000, DamageType.Physical);
         var pred   = Prediction.GetPrediction(target, Q);
         if (AlwaysQAfterE)
         {
             if ((int)pred.Item1 >= (int)HitChance.Medium &&
                 pred.Item2.Distance(ObjectManager.Player.ServerPosition) < 1100)
             {
                 Q.Cast(pred.Item2);
             }
         }
         else
         {
             if ((int)pred.Item1 > (int)HitChance.Medium &&
                 pred.Item2.Distance(ObjectManager.Player.ServerPosition) < 1100)
             {
                 Q.Cast(pred.Item2);
             }
         }
     }
 }