Exemplo n.º 1
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            SoulBoundSaver();

            foreach (
                var e in
                HeroManager.Enemies.Where(e => e.IsRendKillable())
                .Where(e => E.CanCast(e) && e.IsKillableTarget(SpellSlot.E)))
            {
                E.Cast();
            }

            //if (GetValue<KeyBind>("JumpTo").Active)
            //{
            //    JumpTo();
            //}

            foreach (var myBoddy in
                     ObjectManager.Get <Obj_AI_Minion>()
                     .Where(obj => obj.Name == "RobotBuddy" && obj.IsAlly && ObjectManager.Player.Distance(obj) < 1500))
            {
                Render.Circle.DrawCircle(myBoddy.Position, 75f, Color.Red);
            }


            Obj_AI_Hero t;

            if (Q.IsReady() && GetValue <KeyBind>("UseQTH").Active)
            {
                if (ObjectManager.Player.HasBuff("Recall"))
                {
                    return;
                }

                t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget(Q.Range) && ObjectManager.Player.Mana > E.ManaCost + Q.ManaCost)
                {
                    Q.Cast(t);
                }
            }

            if (ComboActive || HarassActive)
            {
                if (Orbwalking.CanMove(100))
                {
                    if (Q.IsReady())
                    {
                        t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
                        if (!t.HasKindredUltiBuff() && t.IsValidTarget(Q.Range) &&
                            ObjectManager.Player.Mana > E.ManaCost + Q.ManaCost)
                        {
                            Q.Cast(t);
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            if (Orbwalking.CanMove(100) && (ComboActive || HarassActive))
            {
                var useW = GetValue <bool>("UseW" + (ComboActive ? "C" : "H"));
                var useE = GetValue <bool>("UseE" + (ComboActive ? "C" : "H"));

                var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);
                if (!t.LSIsValidTarget() || t.HasKindredUltiBuff())
                {
                    return;
                }

                if (useW)
                {
                    if (W.IsReady() && t.LSIsValidTarget(W.Range))
                    {
                        W.Cast(t, false, true);
                    }
                }

                if (useE && E.IsReady() && t.GetBuffCount("TwitchDeadlyVenom") == 6)
                {
                    E.Cast();
                }

                if (ObjectManager.Get <Obj_AI_Hero>().Find(e1 => e1.LSIsValidTarget(E.Range) && E.IsKillable(e1)) != null)
                {
                    E.Cast();
                }
            }

            if (GetValue <bool>("UseEM") && E.IsReady())
            {
                foreach (
                    var hero in
                    ObjectManager.Get <Obj_AI_Hero>()
                    .Where(
                        hero =>
                        hero.LSIsValidTarget(E.Range) &&
                        (ObjectManager.Player.GetSpellDamage(hero, SpellSlot.E) - 10 > hero.Health)))
                {
                    E.Cast();
                }
            }
        }
Exemplo n.º 3
0
        public override void GameOnUpdate(EventArgs args)
        {
            if (!Orbwalking.CanMove(100))
            {
                return;
            }

            var useQ = GetValue <bool>("UseQ" + (ComboActive ? "C" : "H"));

            if (ComboActive || HarassActive)
            {
                if (Q.IsReady() && useQ)
                {
                    var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
                    if (t != null)
                    {
                        Q.Cast(t, false, true);
                    }
                }
            }
        }
Exemplo n.º 4
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            if (R1.IsReady() && GetValue <bool>("UseRM"))
            {
                bool bigRocket = HasBigRocket();
                foreach (
                    Obj_AI_Hero hero in
                    ObjectManager.Get <Obj_AI_Hero>()
                    .Where(
                        hero =>
                        hero.IsValidTarget(bigRocket ? R2.Range : R1.Range) &&
                        R1.GetDamage(hero) * (bigRocket ? 1.5f : 1f) > hero.Health))
                {
                    if (bigRocket)
                    {
                        R2.Cast(hero, false, true);
                    }
                    else
                    {
                        R1.Cast(hero, false, true);
                    }
                }
            }

            if ((!ComboActive && !HarassActive) || !Orbwalking.CanMove(100))
            {
                return;
            }

            var useQ = GetValue <bool>("UseQ" + (ComboActive ? "C" : "H"));
            var useE = GetValue <bool>("UseE" + (ComboActive ? "C" : "H"));
            var useR = GetValue <bool>("UseR" + (ComboActive ? "C" : "H"));
            var rLim = GetValue <Slider>("Rlim" + (ComboActive ? "C" : "H")).Value;

            if (useQ && Q.IsReady())
            {
                var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);
                if (t != null)
                {
                    if (Q.Cast(t, false, true) == Spell.CastStates.SuccessfullyCasted)
                    {
                        return;
                    }
                }
            }

            if (useE && E.IsReady())
            {
                var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (E.Cast(t, false, true) == Spell.CastStates.SuccessfullyCasted)
                    {
                        return;
                    }
                }
            }

            if (useR && R1.IsReady() && ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Ammo > rLim)
            {
                bool        bigRocket = HasBigRocket();
                Obj_AI_Hero t         = TargetSelector.GetTarget(bigRocket ? R2.Range : R1.Range, TargetSelector.DamageType.Magical);

                if (t.IsValidTarget())
                {
                    if (bigRocket)
                    {
                        R2.Cast(t, false, true);
                    }
                    else
                    {
                        R1.Cast(t, false, true);
                    }
                }
            }
        }
Exemplo n.º 5
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            var enemy =
                HeroManager.Enemies.Find(
                    e => e.Buffs.Any(b => b.Name.ToLower() == "quinnw_cosmetic" && e.IsValidTarget(E.Range)));

            if (enemy != null)
            {
                if (enemy.Distance(ObjectManager.Player.Position) > Orbwalking.GetRealAutoAttackRange(null) + 65)
                {
                    ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, enemy);
                }
                Orbwalker.ForceTarget(enemy);
            }

            if (Q.IsReady() && GetValue <KeyBind>("UseQTH").Active)
            {
                if (ObjectManager.Player.HasBuff("Recall"))
                {
                    return;
                }
                var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
                if (t != null)
                {
                    Q.Cast(t, false, true);
                }
            }

            if (ComboActive || HarassActive)
            {
                var useQ = GetValue <bool>("UseQ" + (ComboActive ? "C" : "H"));
                var useE = GetValue <bool>("UseE" + (ComboActive ? "C" : "H"));

                if (Orbwalking.CanMove(100))
                {
                    if (E.IsReady() && useE)
                    {
                        var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);
                        if (t.IsValidTarget() && !t.IsZombie && !isHePantheon(t) && !t.HasBuff("QuinnW_Cosmetic"))
                        {
                            E.CastOnUnit(t);
                        }
                    }

                    if (Q.IsReady() && useQ)
                    {
                        var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
                        if (t.IsValidTarget() && !t.IsZombie)
                        {
                            Q.Cast(t);
                        }
                    }

                    if (IsValorMode && !E.IsReady())
                    {
                        var vTarget = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);
                        if (vTarget != null)
                        {
                            calculateValorDamage();
                            if (vTarget.Health >= ValorMinDamage && vTarget.Health <= ValorMaxDamage)
                            {
                                R.Cast();
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 6
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            if (ObjectManager.Player.IsDead)
            {
                return;
            }
            if (!Orbwalking.CanMove(100))
            {
                return;
            }

            var getEMarkedEnemy = TristanaData.GetEMarkedEnemy;

            if (getEMarkedEnemy != null)
            {
                TargetSelector.SetTarget(getEMarkedEnemy);
            }
            else
            {
                var attackRange = Orbwalking.GetRealAutoAttackRange(Player);
                TargetSelector.SetTarget(TargetSelector.GetTarget(attackRange, TargetSelector.DamageType.Physical));
            }

            Q.Range = 600 + 5 * (Player.Level - 1);
            E.Range = 630 + 7 * (Player.Level - 1);
            R.Range = 630 + 7 * (Player.Level - 1);

            if (!Player.HasBuff("Recall") && GetValue <KeyBind>("UseETH").Active&& ToggleActive && E.IsReady())
            {
                var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);

                if (t.LSIsValidTarget(E.Range))
                {
                    if (Program.Config.Item("DontEToggleHarass" + t.ChampionName) != null &&
                        Program.Config.Item("DontEToggleHarass" + t.ChampionName).GetValue <bool>() == false)
                    {
                        E.CastOnUnit(t);
                    }
                }
            }

            var useW   = W.IsReady() && GetValue <bool>("UseWC");
            var useWc  = W.IsReady() && GetValue <bool>("UseWCS");
            var useWks = W.IsReady() && GetValue <bool>("UseWKs");
            var useE   = E.IsReady() && GetValue <bool>("UseEC");
            var useR   = R.IsReady() && GetValue <bool>("UseRM") && R.IsReady();

            if (ComboActive)
            {
                Obj_AI_Hero t;
                if (TristanaData.GetEMarkedEnemy != null)
                {
                    t = TristanaData.GetEMarkedEnemy;
                    TargetSelector.SetTarget(TristanaData.GetEMarkedEnemy);
                }
                else
                {
                    t = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);
                }

                if (useE && E.IsReady())
                {
                    if (E.IsReady() && t.LSIsValidTarget(E.Range))
                    {
                        E.CastOnUnit(t);
                    }
                }

                if (useW)
                {
                    t = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);
                    if (t.LSIsValidTarget())
                    {
                        W.Cast(t);
                    }
                }

                /*
                 * else if (useWks)
                 * {
                 *  t = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);
                 *  if (t.LSIsValidTarget() && t.Health < TristanaData.GetWDamage)
                 *      W.Cast(t);
                 * }
                 * else if (useWc)
                 * {
                 *  t = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);
                 *  if (t.LSIsValidTarget() && TristanaData.GetEMarkedCount == 4)
                 *      W.Cast(t);
                 * }
                 */
            }

            if (ComboActive)
            {
                if (useR)
                {
                    var t = TargetSelector.GetTarget(R.Range - 10, TargetSelector.DamageType.Physical);

                    if (!t.LSIsValidTarget())
                    {
                        return;
                    }

                    if (Player.GetSpellDamage(t, SpellSlot.R) - 30 < t.Health ||
                        t.Health < Player.GetAutoAttackDamage(t, true))
                    {
                        return;
                    }

                    R.CastOnUnit(t);
                }
            }
        }
Exemplo n.º 7
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            //var t1 = TargetSelector.GetTarget(2000, TargetSelector.DamageType.Physical);
            //if (t1.IsValidTarget())
            //{
            //    if (t1.IsFacing(ObjectManager.Player))
            //    {
            //        Console.WriteLine("--> Face " + t1.ChampionName);
            //    }
            //    else
            //    {
            //        Console.WriteLine(t1.ChampionName + " <-- Back");
            //    }
            //}

            /*
             * var x = HeroManager.Enemies.Find(e => !e.IsValidTarget(Orbwalking.GetRealAutoAttackRange(null)) && e.IsValidTarget(Orbwalking.GetRealAutoAttackRange(null) + QAddRange));
             * if (x != null && !FishBoneActive && Q.IsReady())
             * {
             *  Q.Cast();
             *  Program.ChampionClass.Orbwalker.ForceTarget(x);
             * }
             */
            if (Q.IsReady() && GetValue <bool>("SwapDistance") && Program.ChampionClass.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
            {
                var activeQ = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).Level * 25 + 650;
                var t       = TargetSelector.GetTarget(activeQ, TargetSelector.DamageType.Physical);

                if (t.IsValidTarget() && ObjectManager.Player.Distance(t) > Orbwalking.GetRealAutoAttackRange(null) + 65)
                {
                    if (!FishBoneActive)
                    {
                        Q.Cast();
                        Orbwalker.ForceTarget(t);
                        return;
                    }
                }
                if (!t.IsValidTarget() && FishBoneActive)
                {
                    Q.Cast();
                    return;
                }
            }

            if (GetValue <bool>("PingCH"))
            {
                foreach (var enemy in
                         HeroManager.Enemies.Where(
                             t =>
                             R.IsReady() && t.IsValidTarget() && R.GetDamage(t) > t.Health &&
                             t.Distance(ObjectManager.Player) > Orbwalking.GetRealAutoAttackRange(null) + 65 + QAddRange))
                {
                    Utils.Utils.MPing.Ping(enemy.Position.To2D(), 2, PingCategory.Normal);
                }
            }

            var autoEi = GetValue <bool>("AutoEI");
            var autoEs = GetValue <bool>("AutoES");
            var autoEd = GetValue <bool>("AutoED");

            //foreach (var e in HeroManager.Enemies.Where(e => e.IsValidTarget(E.Range)))
            //{
            //    if (E.IsReady()
            //        && (e.HasBuffOfType(BuffType.Stun) || e.HasBuffOfType(BuffType.Snare)
            //            || e.HasBuffOfType(BuffType.Charm) || e.HasBuffOfType(BuffType.Fear) ||
            //            e.HasBuffOfType(BuffType.Slow)
            //            || e.HasBuffOfType(BuffType.Taunt) || e.HasBuff("zhonyasringshield")
            //            || e.HasBuff("Recall")))
            //    {
            //        E.Cast(e);
            //    }
            //}

            if (autoEs || autoEi || autoEd)
            {
                foreach (
                    var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.IsValidTarget(E.Range - 50)))
                {
                    if (autoEs && E.IsReady() && enemy.HasBuffOfType(BuffType.Slow))
                    {
                        var castPosition =
                            Prediction.GetPrediction(
                                new PredictionInput
                        {
                            Unit = enemy, Delay = 0.7f, Radius = 120f, Speed = 1750f, Range = 900f,
                            Type = SkillshotType.SkillshotCircle
                        }).CastPosition;


                        if (GetSlowEndTime(enemy) >= (Game.Time + E.Delay + 0.5f))
                        {
                            E.Cast(castPosition);
                        }
                    }

                    if (E.IsReady() &&
                        (enemy.HasBuffOfType(BuffType.Stun) ||
                         enemy.HasBuffOfType(BuffType.Snare) ||
                         enemy.HasBuffOfType(BuffType.Charm) ||
                         enemy.HasBuffOfType(BuffType.Fear) ||
                         enemy.HasBuffOfType(BuffType.Slow) ||
                         enemy.HasBuffOfType(BuffType.Taunt) ||
                         enemy.HasBuff("zhonyasringshield") ||
                         enemy.HasBuff("Recall")))
                    {
                        E.CastIfHitchanceEquals(enemy, HitChance.High);
                    }
                    else
                    if (W.IsReady() &&
                        (enemy.HasBuffOfType(BuffType.Stun) ||
                         enemy.HasBuffOfType(BuffType.Snare) ||
                         enemy.HasBuffOfType(BuffType.Charm) ||
                         enemy.HasBuffOfType(BuffType.Fear) ||
                         enemy.HasBuffOfType(BuffType.Slow) ||
                         enemy.HasBuffOfType(BuffType.Taunt) ||
                         enemy.HasBuff("zhonyasringshield") ||
                         enemy.HasBuff("Recall")))
                    {
                        W.CastIfHitchanceEquals(enemy, HitChance.High);
                    }

                    if (autoEd && E.IsReady() && enemy.IsDashing())
                    {
                        E.CastIfHitchanceEquals(enemy, HitChance.Dashing);
                    }
                }
            }

            if (GetValue <KeyBind>("CastR").Active&& R.IsReady())
            {
                var t = TargetSelector.GetTarget(1500, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (ObjectManager.Player.GetSpellDamage(t, SpellSlot.R) > t.Health && !t.IsZombie)
                    {
                        R.CastIfHitchanceGreaterOrEqual(t);
                        //R.CastIfHitchanceEquals(t, HitChance.High, false);
                    }
                }
            }

            if (GetValue <bool>("SwapQ") && FishBoneActive && !ComboActive)
            {
                Q.Cast();
            }

            if (HarassActive)
            {
                if (GetValue <bool>("UseQMH"))
                {
                    var t = TargetSelector.GetTarget(Q.Range * 2, TargetSelector.DamageType.Magical);
                    foreach (var m in ObjectManager.Get <Obj_AI_Minion>().Where(m => m.Distance(ObjectManager.Player.Position) < Orbwalking.GetRealAutoAttackRange(null) + QAddRange).OrderBy(m => m.Distance(t)))
                    {
                    }
                }
            }

            /*
             * if (GetValue<bool>("SwapQ") && FishBoneActive && (LaneClearActive ||
             *   (HarassActive && TargetSelector.GetTarget(675f + QAddRange, TargetSelector.DamageType.Physical) == null)))
             * {
             *  Q.Cast();
             * }
             */

            if ((!ComboActive && !HarassActive) || !Orbwalking.CanMove(100))
            {
                return;
            }

            var useW = GetValue <bool>("UseW" + (ComboActive ? "C" : "H"));
            var useR = GetValue <bool>("UseRC");

            if (useW && W.IsReady())
            {
                var t    = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);
                var minW = GetValue <Slider>("MinWRange").Value;

                if (t.IsValidTarget() && !t.HasKindredUltiBuff() && GetRealDistance(t) >= minW)
                {
                    W.CastIfHitchanceGreaterOrEqual(t);
                }
            }

            /*
             * if (useQ)
             * {
             *  foreach (var t in
             *      ObjectManager.Get<Obj_AI_Hero>()
             *          .Where(t => t.IsValidTarget(GetRealPowPowRange(t) + QAddRange + 20f)))
             *  {
             *      var swapDistance = GetValue<bool>("SwapDistance");
             *      var swapAoe = GetValue<bool>("SwapAOE");
             *      var distance = GetRealDistance(t);
             *      var powPowRange = GetRealPowPowRange(t);
             *
             *      if (swapDistance && Q.IsReady())
             *      {
             *          if (distance > powPowRange && !FishBoneActive)
             *          {
             *              if (Q.Cast())
             *              {
             *                  return;
             *              }
             *          }
             *          else if (distance < powPowRange && FishBoneActive)
             *          {
             *              if (Q.Cast())
             *              {
             *                  return;
             *              }
             *          }
             *      }
             *
             *      if (swapAoe && Q.IsReady())
             *      {
             *          if (distance > powPowRange && PowPowStacks > 2 && !FishBoneActive && CountEnemies(t, 150) > 1)
             *          {
             *              if (Q.Cast())
             *              {
             *                  return;
             *              }
             *          }
             *      }
             *  }
             * }
             *
             */
            if (useR && R.IsReady())
            {
                var checkRok = GetValue <bool>("ROverKill");
                var minR     = GetValue <Slider>("MinRRange").Value;
                var maxR     = GetValue <Slider>("MaxRRange").Value;
                var t        = TargetSelector.GetTarget(maxR, TargetSelector.DamageType.Physical);

                if (t.IsValidTarget() && !t.HasKindredUltiBuff())
                {
                    var distance = GetRealDistance(t);

                    if (!checkRok)
                    {
                        if (ObjectManager.Player.GetSpellDamage(t, SpellSlot.R, 1) > t.Health && !t.IsZombie)
                        {
                            R.CastIfHitchanceGreaterOrEqual(t);
                            //R.CastIfHitchanceEquals(t, HitChance.High, false);
                            //if (R.Cast(t) == Spell.CastStates.SuccessfullyCasted) { }
                        }
                    }
                    else if (distance > minR)
                    {
                        var aDamage     = ObjectManager.Player.GetAutoAttackDamage(t);
                        var wDamage     = ObjectManager.Player.GetSpellDamage(t, SpellSlot.W);
                        var rDamage     = ObjectManager.Player.GetSpellDamage(t, SpellSlot.R);
                        var powPowRange = GetRealPowPowRange(t);

                        if (distance < (powPowRange + QAddRange) && !(aDamage * 3.5 > t.Health))
                        {
                            if (!W.IsReady() || !(wDamage > t.Health) || W.GetPrediction(t).CollisionObjects.Count > 0)
                            {
                                if (CountAlliesNearTarget(t, 500) <= 3)
                                {
                                    if (rDamage > t.Health && !t.IsZombie /*&& !ObjectManager.Player.IsAutoAttacking &&
                                                                           * !ObjectManager.Player.IsChanneling*/)
                                    {
                                        R.CastIfHitchanceGreaterOrEqual(t);
                                        //R.CastIfHitchanceEquals(t, HitChance.High, false);
                                        //if (R.Cast(t) == Spell.CastStates.SuccessfullyCasted) { }
                                    }
                                }
                            }
                        }
                        else if (distance > (powPowRange + QAddRange))
                        {
                            if (!W.IsReady() || !(wDamage > t.Health) || distance > W.Range ||
                                W.GetPrediction(t).CollisionObjects.Count > 0)
                            {
                                if (CountAlliesNearTarget(t, 500) <= 3)
                                {
                                    if (rDamage > t.Health && !t.IsZombie /*&& !ObjectManager.Player.IsAutoAttacking &&
                                                                           * !ObjectManager.Player.IsChanneling*/)
                                    {
                                        R.CastIfHitchanceGreaterOrEqual(t);
                                        //R.CastIfHitchanceEquals(t, HitChance.High, false);
                                        //if (R.Cast(t) == Spell.CastStates.SuccessfullyCasted) { }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 8
0
        public override void GameOnUpdate(EventArgs args)
        {
            //Game.PrintChat(ObjectManager.Player.BaseAbilityDamage.ToString() + " : " + ObjectManager.Player.BaseAttackDamage.ToString());
            UltiBuffStacks = GetUltimateBuffStacks();

            W.Range = 110 + 20 * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Level;
            R.Range = 900 + 300 * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Level;

            if (R.IsReady() && GetValue <bool>("UseRM"))
            {
                foreach (
                    var hero in
                    ObjectManager.Get <Obj_AI_Hero>()
                    .Where(
                        hero => hero.IsValidTarget(R.Range) && R.GetDamage(hero) > hero.Health))
                {
                    CastR(hero);
                }
            }
            //R.Cast(hero, false, true);

            if ((!ComboActive && !HarassActive) || (!Orbwalking.CanMove(100) &&
                                                    !(ObjectManager.Player.BaseAbilityDamage + ObjectManager.Player.FlatMagicDamageMod > 100)))
            {
                return;
            }

            var useQ = GetValue <bool>("UseQ" + (ComboActive ? "C" : "H"));
            var useE = GetValue <bool>("UseE" + (ComboActive ? "C" : "H"));
            var useR = GetValue <bool>("UseR" + (ComboActive ? "C" : "H"));
            var rLim = GetValue <Slider>("Rlim" + (ComboActive ? "C" : "H")).Value;

            var t = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical);

            if (useQ && Q.IsReady() && t.IsValidTarget(Q.Range))
            {
                CastQ(t);
                //if (Q.Cast(t) == Spell.CastStates.SuccessfullyCasted)
                //    return;
            }

            if (useE && E.IsReady() && t.IsValidTarget(E.Range))
            {
                CastE(t);
                //if (Q.Cast(t) == Spell.CastStates.SuccessfullyCasted)
                //    return;
            }
            if (R.IsReady() && t.IsValidTarget(R.Range) && t.HealthPercent <= Program.Config.Item(t.ChampionName + "RHPPercent").GetValue <Slider>().Value)
            //if (GetValue<bool>("UseRSC") && R.IsReady() && t.IsValidTarget(R.Range))
            {
                if (t.IsValidTarget() &&
                    (t.HasBuffOfType(BuffType.Stun) || t.HasBuffOfType(BuffType.Snare) || t.HasBuffOfType(BuffType.Slow) ||
                     t.HasBuffOfType(BuffType.Fear) ||
                     t.HasBuffOfType(BuffType.Taunt)))
                {
                    CastR(t);
                    //R.Cast(t, false, true);
                }
            }

            if (useR && R.IsReady() && UltiBuffStacks < rLim && t.IsValidTarget(R.Range) && t.HealthPercent <= Program.Config.Item(t.ChampionName + "RHPPercent").GetValue <Slider>().Value)
            {
                CastR(t);
                //R.Cast(t, false, true);
            }
        }
Exemplo n.º 9
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            if (Q.IsReady() && GetValue <KeyBind>("UseQTH").Active)
            {
                if (ObjectManager.Player.HasBuff("Recall"))
                {
                    return;
                }
                var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
                if (t != null)
                {
                    Q.Cast(t, false, true);
                }
            }

            if (GetValue <KeyBind>("CastR").Active&& R.IsReady())
            {
                var t = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (ObjectManager.Player.GetSpellDamage(t, SpellSlot.R) > t.Health && !t.IsZombie)
                    {
                        R.CastIfHitchanceEquals(t, HitChance.High, false);
                    }
                }
            }


            if ((!ComboActive && !HarassActive) || !Orbwalking.CanMove(100))
            {
                return;
            }
            var useQ = GetValue <bool>("UseQ" + (ComboActive ? "C" : "H"));
            var useW = GetValue <bool>("UseW" + (ComboActive ? "C" : "H"));
            var useR = GetValue <bool>("UseR" + (ComboActive ? "C" : "H"));

            if (Q.IsReady() && useQ)
            {
                var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
                if (t != null)
                {
                    Q.Cast(t, false, true);
                }
            }

            if (W.IsReady() && useW)
            {
                var t = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget(W.Range) &&
                    (t.HasBuffOfType(BuffType.Stun) || t.HasBuffOfType(BuffType.Snare) ||
                     t.HasBuffOfType(BuffType.Taunt) || t.HasBuff("zhonyasringshield") ||
                     t.HasBuff("Recall")))
                {
                    W.Cast(t, false, true);
                }
            }

            if (R.IsReady() && useR)
            {
                foreach (
                    var hero in
                    ObjectManager.Get <Obj_AI_Hero>()
                    .Where(
                        hero =>
                        hero.IsValidTarget(R.Range) &&
                        ObjectManager.Player.GetSpellDamage(hero, SpellSlot.R, 1) - 20 > hero.Health))
                {
                    R.Cast(hero, false, true);
                }
            }
        }