Beispiel #1
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);
                     }
                 }
             }
         }
     }
 }
Beispiel #2
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);
                     }
                 }
             }
         }
     }
 }
Beispiel #3
0
 void 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 = Prediction.GetPrediction(rTarget, R);
                 if (!pred.Item3.Any(obj => obj is Obj_AI_Hero))
                 {
                     R.CastOnUnit(rTarget);
                 }
                 break;
             }
             R.CastOnUnit(rTarget);
         }
     }
 }
Beispiel #4
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
        }