Exemplo n.º 1
0
        private float GetComboDamage(Obj_AI_Base target)
        {
            double comboDamage = 0;

            if (Q.IsReady())
            {
                comboDamage += Player.GetSpellDamage(target, SpellSlot.Q);
            }

            if (E.IsReady())
            {
                comboDamage += Player.GetSpellDamage(target, SpellSlot.E);
            }
            if (IgniteSlot.IsReady())
            {
                comboDamage += Player.GetSpellDamage(target, IgniteSlot);
            }
            if (R.IsReady())
            {
                comboDamage += Player.GetSpellDamage(target, SpellSlot.R);
                comboDamage += comboDamage * 1.12;
            }
            else if (target.HasBuff("vladimirhemoplaguedebuff", true))
            {
                comboDamage += comboDamage * 1.12;
            }

            return((float)(comboDamage + Player.GetAutoAttackDamage(target)));
        }
Exemplo n.º 2
0
        private static void KillSteal()
        {
            var useQ      = Menu.Item("useQKS").GetValue <bool>();
            var useR      = Menu.Item("useRKS").GetValue <bool>();
            var useIgnite = Menu.Item("useIgniteKS").GetValue <bool>();

            if (useQ && Q.IsReady())
            {
                var bestTarget =
                    ObjectManager.Get <Obj_AI_Hero>()
                    .Where(x => x.IsValidTarget(Q.Range))
                    .Where(x => Player.GetSpellDamage(x, SpellSlot.Q) > x.Health)
                    .OrderBy(x => x.Distance(Player))
                    .FirstOrDefault();

                if (bestTarget != null)
                {
                    Q.Cast(bestTarget, Packets);
                }
            }

            if (useR && (R.IsReady() || UltActivated))
            {
                //TODO: Account for all 4 Charges
                var bestTarget =
                    ObjectManager.Get <Obj_AI_Hero>()
                    .Where(x => x.IsValidTarget(R.Range))
                    .Where(x => Player.GetSpellDamage(x, SpellSlot.Q) > x.Health)
                    .OrderBy(x => x.Distance(Player))
                    .FirstOrDefault();

                if (bestTarget != null)
                {
                    R.Cast(bestTarget, Packets);
                }
            }

            if (useIgnite && IgniteSlot.IsReady())
            {
                var bestTarget =
                    ObjectManager.Get <Obj_AI_Hero>()
                    .Where(x => x.IsValidTarget(600))
                    .Where(x => Player.GetSummonerSpellDamage(x, Damage.SummonerSpell.Ignite) / 5 > x.Health)
                    .OrderBy(x => x.ChampionsKilled)
                    .FirstOrDefault();

                if (bestTarget != null)
                {
                    Player.Spellbook.CastSpell(IgniteSlot, bestTarget);
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        ///     Steals kills.
        /// </summary>
        private static void KillSteal()
        {
            var useQ      = getCheckBoxItem(ksMenu, "useQKS");
            var useR      = getCheckBoxItem(ksMenu, "useRKS");
            var useIgnite = getCheckBoxItem(ksMenu, "useIgniteKS");

            if (useQ && Q.IsReady())
            {
                var bestTarget =
                    ObjectManager.Get <AIHeroClient>()
                    .Where(x => x.LSIsValidTarget(Q.Range) && Player.LSGetSpellDamage(x, SpellSlot.Q) > x.Health)
                    .OrderBy(x => x.LSDistance(Player))
                    .FirstOrDefault();

                if (bestTarget != null)
                {
                    Q.Cast(bestTarget);
                }
            }

            if (useR && (R.IsReady() || UltActivated))
            {
                var bestTarget =
                    ObjectManager.Get <AIHeroClient>()
                    .Where(x => x.LSIsValidTarget(R.Range))
                    .Where(x => Player.LSGetSpellDamage(x, SpellSlot.Q) > x.Health)
                    .OrderBy(x => x.LSDistance(Player))
                    .FirstOrDefault();

                if (bestTarget != null)
                {
                    R.Cast(bestTarget);
                }
            }

            if (useIgnite && IgniteSlot.IsReady())
            {
                var bestTarget =
                    ObjectManager.Get <AIHeroClient>()
                    .Where(x => x.LSIsValidTarget(600))
                    .Where(x => Player.GetSummonerSpellDamage(x, LeagueSharp.Common.Damage.SummonerSpell.Ignite) / 5 > x.Health)
                    .OrderBy(x => x.ChampionsKilled)
                    .FirstOrDefault();

                if (bestTarget != null)
                {
                    Player.Spellbook.CastSpell(IgniteSlot, bestTarget);
                }
            }
        }
Exemplo n.º 4
0
        private static void Combo()
        {
            var useQ         = Menu.Item("useQ").GetValue <bool>();
            var useW         = Menu.Item("useW").GetValue <bool>();
            var useE         = Menu.Item("useE").GetValue <bool>();
            var useR         = Menu.Item("useR").GetValue <bool>();
            var minQRange    = Menu.Item("minQRange").GetValue <Slider>().Value;
            var useEStun     = Menu.Item("useEStun").GetValue <bool>();
            var useQGapclose = Menu.Item("useQGapclose").GetValue <bool>();
            var useWBeforeQ  = Menu.Item("useWBeforeQ").GetValue <bool>();
            var procSheen    = Menu.Item("procSheen").GetValue <bool>();
            var useIgnite    = Menu.Item("useIgnite").GetValue <bool>();
            var useRGapclose = Menu.Item("useRGapclose").GetValue <bool>();

            var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);

            if (target == null && useQGapclose)
            {
                var minionQ =
                    ObjectManager.Get <Obj_AI_Minion>()
                    .Where(x => x.IsValidTarget())
                    .Where(x => Player.GetSpellDamage(x, SpellSlot.Q) > x.Health)
                    .FirstOrDefault(
                        x =>
                        x.Distance(TargetSelector.GetTarget(Q.Range * 5, TargetSelector.DamageType.Physical)) <
                        Q.Range);

                if (minionQ != null)
                {
                    Q.CastOnUnit(minionQ, Packets);
                    return;
                }

                if (useRGapclose)
                {
                    var minionR =
                        ObjectManager.Get <Obj_AI_Minion>()
                        .Where(x => x.IsValidTarget())
                        .Where(x => x.Distance(Player) < Q.Range)     // Use Q.Range so we follow up with a Q
                        .Where(x => x.CountEnemiesInRange(Q.Range) >= 1)
                        .FirstOrDefault(
                            x =>
                            x.Health - Player.GetSpellDamage(x, SpellSlot.R) <
                            Player.GetSpellDamage(x, SpellSlot.Q));

                    if (minionR != null)
                    {
                        R.Cast(minionR, Packets);
                    }
                }
            }

            if (!target.IsValidTarget())
            {
                return;
            }

            if (Botrk.IsReady())
            {
                Botrk.Cast(target);
            }

            if (Cutlass.IsReady())
            {
                Cutlass.Cast(target);
            }

            if (Omen.IsReady() && Omen.IsInRange(target) &&
                target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(Player))
            {
                Omen.Cast();
            }

            if (useIgnite && target != null && target.IsValidTarget(600) &&
                (IgniteSlot.IsReady() &&
                 Player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite) > target.Health))
            {
                Player.Spellbook.CastSpell(IgniteSlot, target);
            }

            if (useWBeforeQ)
            {
                if (useW && W.IsReady())
                {
                    W.Cast(Packets);
                }

                if (useQ && Q.IsReady() && target.Distance(Player.ServerPosition) > minQRange)
                {
                    Q.CastOnUnit(target, Packets);
                }
            }
            else
            {
                if (useQ && Q.IsReady() && target.Distance(Player.ServerPosition) > minQRange)
                {
                    Q.CastOnUnit(target, Packets);
                }

                if (useW && W.IsReady())
                {
                    W.Cast(Packets);
                }
            }

            if (useEStun)
            {
                if (target.CanStunTarget() && useE && E.IsReady())
                {
                    E.Cast(target, Packets);
                }
            }
            else
            {
                if (useE && E.IsReady())
                {
                    E.Cast(target, Packets);
                }
            }

            if (useR && R.IsReady() && !UltActivated)
            {
                R.Cast(target, Packets);
            }

            // Get target that is in the R range
            var rTarget = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);

            if (useR && UltActivated)
            {
                if (!procSheen)
                {
                    return;
                }

                // Fire Ult if player is out of AA range, with Q not up or not in range
                if (target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(Player))
                {
                    R.Cast(rTarget, Packets);
                }
                else
                {
                    if (!HasSheenBuff)
                    {
                        R.Cast(rTarget, Packets);
                    }
                }
            }
            else
            {
                R.Cast(rTarget, Packets);
            }
        }
Exemplo n.º 5
0
        /// <summary>
        ///     Does the combo.
        /// </summary>
        private static void Combo()
        {
            var useQ         = getCheckBoxItem(comboMenu, "useQ");
            var useW         = getCheckBoxItem(comboMenu, "useW");
            var useE         = getCheckBoxItem(comboMenu, "useE");
            var useR         = getCheckBoxItem(comboMenu, "useR");
            var minQRange    = getSliderItem(comboMenu, "minQRange");
            var useEStun     = getCheckBoxItem(comboMenu, "useEStun");
            var useQGapclose = getCheckBoxItem(comboMenu, "useQGapclose");
            var useWBeforeQ  = getCheckBoxItem(comboMenu, "useWBeforeQ");
            var procSheen    = getCheckBoxItem(comboMenu, "procSheen");
            var useIgnite    = getCheckBoxItem(comboMenu, "useIgnite");
            var useRGapclose = getCheckBoxItem(comboMenu, "useRGapclose");

            var target = TargetSelector.GetTarget(Q.Range, DamageType.Physical);

            if (target == null && useQGapclose)
            {
                /** var minionQ =
                 *  ObjectManager.Get<Obj_AI_Minion>()
                 *      .Where(x => x.LSIsValidTarget())
                 *      .Where(x => Player.LSGetSpellDamage(x, SpellSlot.Q) > x.Health)
                 *      .FirstOrDefault(
                 *          x =>
                 *              x.LSDistance(TargetSelector.GetTarget(Q.Range * 5, TargetSelector.DamageType.Physical)) <
                 *              Q.Range);*/
                var minionQ =
                    MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly)
                    .FirstOrDefault(
                        x =>
                        Q.IsKillable(x) && Q.IsInRange(x) &&
                        x.LSDistance(HeroManager.Enemies.OrderBy(y => y.LSDistance(Player)).FirstOrDefault())
                        < Player.LSDistance(HeroManager.Enemies.OrderBy(z => z.LSDistance(Player)).FirstOrDefault()));

                if (minionQ != null && Player.Mana > Q.ManaCost * 2)
                {
                    Q.CastOnUnit(minionQ);
                    return;
                }

                if (useRGapclose)
                {
                    var minionR =
                        ObjectManager.Get <Obj_AI_Minion>()
                        .Where(
                            x =>
                            x.LSIsValidTarget() && x.LSDistance(Player) < Q.Range && x.LSCountEnemiesInRange(Q.Range) >= 1)
                        .FirstOrDefault(
                            x =>
                            x.Health - Player.LSGetSpellDamage(x, SpellSlot.R) < Player.LSGetSpellDamage(x, SpellSlot.Q));

                    if (minionR != null)
                    {
                        R.Cast(minionR);
                    }
                }
            }

            // Get target that is in the R range
            var rTarget = TargetSelector.GetTarget(R.Range, DamageType.Physical);

            if (useR && UltActivated && rTarget.LSIsValidTarget())
            {
                if (procSheen)
                {
                    // Fire Ult if player is out of AA range, with Q not up or not in range
                    if (target.LSDistance(Player) > Orbwalking.GetRealAutoAttackRange(Player))
                    {
                        R.Cast(rTarget);
                    }
                    else
                    {
                        if (!HasSheenBuff)
                        {
                            R.Cast(rTarget);
                        }
                    }
                }
                else
                {
                    R.Cast(rTarget);
                }
            }

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

            if (Botrk.IsReady())
            {
                Botrk.Cast(target);
            }

            if (Cutlass.IsReady())
            {
                Cutlass.Cast(target);
            }

            if (Omen.IsReady() && Omen.IsInRange(target) &&
                target.LSDistance(Player) > Orbwalking.GetRealAutoAttackRange(Player))
            {
                Omen.Cast();
            }

            if (useIgnite && target != null && target.LSIsValidTarget(600) &&
                (IgniteSlot.IsReady() &&
                 Player.GetSummonerSpellDamage(target, LeagueSharp.Common.Damage.SummonerSpell.Ignite) > target.Health))
            {
                Player.Spellbook.CastSpell(IgniteSlot, target);
            }

            if (useWBeforeQ)
            {
                if (useW && W.IsReady())
                {
                    W.Cast();
                }

                if (useQ && Q.IsReady() && target.LSDistance(Player.ServerPosition) > minQRange)
                {
                    Q.CastOnUnit(target);
                }
            }
            else
            {
                if (useQ && Q.IsReady() && target.LSDistance(Player.ServerPosition) > minQRange)
                {
                    Q.CastOnUnit(target);
                }

                if (useW && W.IsReady())
                {
                    W.Cast();
                }
            }

            if (useEStun)
            {
                if (target.CanStunTarget() && useE && E.IsReady())
                {
                    E.Cast(target);
                }
            }
            else
            {
                if (useE && E.IsReady())
                {
                    E.Cast(target);
                }
            }

            if (useR && R.IsReady() && !UltActivated)
            {
                R.Cast(target);
            }
        }
Exemplo n.º 6
0
 public static bool IgniteReady()
 {
     return(IgniteSlot != SpellSlot.Unknown && IgniteSlot.IsReady());
 }