コード例 #1
0
        private void Combo()
        {
            Obj_AI_Hero target = DrawHelper.GetBetterTarget(1490, TargetSelector.DamageType.Physical);

            if (target == null)
            {
                return;
            }
            if (config.Item("selected").GetValue <bool>())
            {
                target = CombatHelper.SetTarget(target, TargetSelector.GetSelectedTarget());
                orbwalker.ForceTarget(target);
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            if (config.Item("useq").GetValue <bool>() && Q.IsReady() && !QEnabled &&
                player.Distance(target) >= config.Item("useqmin").GetValue <Slider>().Value&&
                player.Distance(target) < (player.MoveSpeed * MsBonus(target)) * 3.0f)
            {
                Q.Cast();
            }
            if (config.Item("usew").GetValue <bool>() && CanW && W.CanCast(target) &&
                (player.CalcDamage(target, Damage.DamageType.Physical, Wdmg(target)) > target.Health ||
                 player.HealthPercent < 10))
            {
                W.Cast(target);
            }
            if (config.Item("usee").GetValue <bool>() && E.CanCast(target) &&
                ((config.Item("useenotccd").GetValue <bool>() &&
                  (!target.HasBuffOfType(BuffType.Snare) && !target.HasBuffOfType(BuffType.Slow) &&
                   !target.HasBuffOfType(BuffType.Stun) && !target.HasBuffOfType(BuffType.Suppression))) ||
                 !config.Item("useenotccd").GetValue <bool>()))
            {
                E.Cast();
            }
            if (R.IsReady() && player.HealthPercent > 20 &&
                ((config.Item("user").GetValue <bool>() && player.Distance(target) < 200 &&
                  ComboDamage(target) + R.GetDamage(target) * 10 > target.Health && ComboDamage(target) < target.Health) ||
                 (config.Item("usertf").GetValue <Slider>().Value <= player.CountEnemiesInRange(300))))
            {
                R.Cast();
            }
            var  ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("useIgnite").GetValue <bool>() && ignitedmg > target.Health && hasIgnite &&
                !W.CanCast(target))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
コード例 #2
0
ファイル: Skarner.cs プロジェクト: q199230217/LeagueSharp
        private void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);

            if (target == null)
            {
                return;
            }
            if (config.Item("selected").GetValue <bool>())
            {
                target = CombatHelper.SetTarget(target, TargetSelector.GetSelectedTarget());
                orbwalker.ForceTarget(target);
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            if (SkarnerR)
            {
                return;
            }
            var dist = player.Distance(target);

            if (config.Item("useq").GetValue <bool>() && Q.CanCast(target))
            {
                Q.Cast(config.Item("packets").GetValue <bool>());
            }
            if (config.Item("usew").GetValue <bool>() || player.Distance(target) < 600)
            {
                W.Cast(config.Item("packets").GetValue <bool>());
            }
            if (config.Item("usee").GetValue <bool>() && E.CanCast(target) &&
                ((dist < config.Item("useeMaxRange").GetValue <Slider>().Value&&
                  dist > config.Item("useeMinRange").GetValue <Slider>().Value) || target.Health < ComboDamage(target)))
            {
                E.Cast(target, config.Item("packets").GetValue <bool>());
            }
            if (config.Item("user").GetValue <bool>() && R.CanCast(target) &&
                (!config.Item("ult" + target.SkinName).GetValue <bool>() || player.CountEnemiesInRange(1500) == 1) &&
                CountPassive(target) >= config.Item("userstacks").GetValue <Slider>().Value)
            {
                R.Cast(target, config.Item("packets").GetValue <bool>());
            }
            var  ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("useIgnite").GetValue <bool>() && ignitedmg > target.Health && hasIgnite &&
                !E.CanCast(target))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
コード例 #3
0
ファイル: Volibear.cs プロジェクト: commonsharp/PortAIO
        private void Combo()
        {
            var target = TargetSelector.GetTarget(1490, DamageType.Physical);

            if (target == null)
            {
                return;
            }
            if (getCheckBoxItem(menuC, "selected"))
            {
                target = CombatHelper.SetTarget(target, (AIHeroClient)Orbwalker.LastTarget);
                Orbwalker.ForcedTarget = target;
            }
            if (getCheckBoxItem(menuC, "useq") && Q.IsReady() && !QEnabled &&
                player.Distance(target) >= getSliderItem(menuC, "useqmin") &&
                player.Distance(target) < player.MoveSpeed * MsBonus(target) * 3.0f)
            {
                Q.Cast(getCheckBoxItem(config, "packets"));
            }
            if (getCheckBoxItem(menuC, "usew") && CanW && W.CanCast(target) &&
                (player.CalcDamage(target, DamageType.Physical, Wdmg(target)) > target.Health ||
                 player.HealthPercent < 10))
            {
                W.Cast(target, getCheckBoxItem(config, "packets"));
            }
            if (getCheckBoxItem(menuC, "usee") && E.CanCast(target) &&
                ((getCheckBoxItem(menuC, "useenotccd") && !target.HasBuffOfType(BuffType.Snare) &&
                  !target.HasBuffOfType(BuffType.Slow) && !target.HasBuffOfType(BuffType.Stun) &&
                  !target.HasBuffOfType(BuffType.Suppression)) ||
                 !getCheckBoxItem(menuC, "useenotccd")))
            {
                E.Cast(getCheckBoxItem(config, "packets"));
            }
            if (R.IsReady() && player.HealthPercent > 20 &&
                ((getCheckBoxItem(menuC, "user") && player.Distance(target) < 200 &&
                  ComboDamage(target) + R.GetDamage(target) * 10 > target.Health && ComboDamage(target) < target.Health) ||
                 (getSliderItem(menuC, "usertf") <= player.CountEnemiesInRange(300))))
            {
                R.Cast(getCheckBoxItem(config, "packets"));
            }
            var ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            var hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (getCheckBoxItem(menuC, "useIgnite") && ignitedmg > target.Health && hasIgnite &&
                !W.CanCast(target))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
コード例 #4
0
        private void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical);

            if (target == null)
            {
                return;
            }
            if (config.Item("selected", true).GetValue <bool>())
            {
                target = CombatHelper.SetTarget(target, TargetSelector.GetSelectedTarget());
                orbwalker.ForceTarget(target);
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("useq", true).GetValue <bool>() && Q.IsReady())
            {
                Q.Cast();
            }
            if (config.Item("usew", true).GetValue <bool>() && W.IsReady() && checkSlows())
            {
                W.Cast();
            }
            if (config.Item("usee", true).GetValue <bool>() && E.CanCast(target))
            {
                E.CastOnUnit(target);
            }
            var Ultpos =
                Environment.Hero.bestVectorToAoeSpell(
                    ObjectManager.Get <Obj_AI_Hero>().Where(i => (i.IsEnemy && R.CanCast(i))), R.Range, 250f);

            if (config.Item("user", true).GetValue <bool>() && R.IsReady() &&
                config.Item("useRmin", true).GetValue <Slider>().Value <= Ultpos.CountEnemiesInRange(250f) &&
                R.Range > player.Distance(Ultpos))
            {
                R.Cast(Ultpos);
            }
            var ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);

            if (config.Item("useIgnite", true).GetValue <bool>() && ignitedmg > target.Health && hasIgnite &&
                !E.CanCast(target))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
コード例 #5
0
        private static void Combo()
        {
            AIHeroClient target = LeagueSharp.Common.TargetSelector.GetTarget(1000, LeagueSharp.Common.TargetSelector.DamageType.Magical);

            if (config.Item("usee", true).GetValue <bool>() && !VorpalSpikes && E.GetHitCount() > 0 &&
                (Environment.Turret.countTurretsInRange(player) < 1 || target.Health < 150))
            {
                E.Cast();
            }
            if (target == null)
            {
                return;
            }
            if (config.Item("selected", true).GetValue <bool>())
            {
                target = CombatHelper.SetTarget(target, LeagueSharp.Common.TargetSelector.GetSelectedTarget());
            }
            var combodmg = ComboDamage(target);

            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, combodmg);
            }
            bool hasFlash  = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerFlash")) == SpellState.Ready;
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;
            var  ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);

            if (hasIgnite && ignitedmg > target.Health && !R.CanCast(target) && !W.CanCast(target) && !Q.CanCast(target))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            if (hasIgnite && combodmg > target.Health && R.CanCast(target) &&
                (float)Damage.GetSpellDamageLS(player, target, SpellSlot.R) < target.Health)
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            if (hasIgnite)
            {
                flashRblock = true;
            }
            else
            {
                flashRblock = false;
            }
            if (config.Item("useq", true).GetValue <bool>() && Q.IsReady())
            {
                int qHit = config.Item("qHit", true).GetValue <Slider>().Value;
                var hitC = HitChance.VeryHigh;
                switch (qHit)
                {
                case 1:
                    hitC = HitChance.Low;
                    break;

                case 2:
                    hitC = HitChance.Medium;
                    break;

                case 3:
                    hitC = HitChance.High;
                    break;

                case 4:
                    hitC = HitChance.VeryHigh;
                    break;
                }
                if (Program.IsSPrediction)
                {
                    Q.SPredictionCast(target, hitC);
                }
                else
                {
                    var pred = Q.GetPrediction(target);
                    if (pred.Hitchance >= hitC)
                    {
                        if (target.IsMoving)
                        {
                            if (pred.CastPosition.Distance(target.ServerPosition) > 250f)
                            {
                                Q.Cast(target.Position.Extend(pred.CastPosition, 250f));
                            }
                            else
                            {
                                Q.Cast(pred.CastPosition);
                            }
                        }
                        else
                        {
                            Q.CastIfHitchanceEquals(target, hitC);
                        }
                    }
                }
            }
            if (config.Item("usew", true).GetValue <bool>() && W.CanCast(target))
            {
                if (Program.IsSPrediction)
                {
                    W.SPredictionCast(target, HitChance.High);
                }
                else
                {
                    W.Cast(target);
                }
            }
            if (config.Item("UseFlashC", true).GetValue <bool>() && !flashRblock && R.IsReady() && hasFlash &&
                !CombatHelper.CheckCriticalBuffs(target) && player.GetSpell(SpellSlot.R).SData.Mana <= player.Mana &&
                player.Distance(target.Position) >= 400 && player.GetSpellDamageLS(target, SpellSlot.R) > target.Health &&
                !Q.IsReady() && !W.IsReady() && player.Distance(target.Position) <= RFlash.Range &&
                !player.Position.Extend(target.Position, 400).IsWall())
            {
                player.Spellbook.CastSpell(
                    player.GetSpellSlot("SummonerFlash"), player.Position.Extend(target.Position, 400).To3DWorld());
                LeagueSharp.Common.Utility.DelayAction.Add(50, () => R.Cast(target));
            }
            var rtarget =
                HeroManager.Enemies.Where(e => e.IsValidTargetLS() && R.CanCast(e))
                .OrderByDescending(e => LeagueSharp.Common.TargetSelector.GetPriority(e))
                .FirstOrDefault();

            if (config.Item("user", true).GetValue <bool>() && rtarget != null &&
                player.GetSpellDamageLS(target, SpellSlot.R) > rtarget.Health)
            {
                R.Cast(rtarget);
            }
        }
コード例 #6
0
ファイル: Program.cs プロジェクト: toannatkm0/clgt2
        private static void Combo()
        {
            var target = TargetSelector.GetTarget(1000, DamageType.Magical);

            if (getCheckBoxItem(comboMenu, "usee") && !VorpalSpikes && E.GetHitCount() > 0 &&
                (Environment.Turret.countTurretsInRange(player) < 1 || target.Health < 150))
            {
                E.Cast();
            }

            if (target == null)
            {
                return;
            }

            if (getCheckBoxItem(comboMenu, "selected"))
            {
                target = CombatHelper.SetTarget(target, TargetSelector.SelectedTarget);
            }

            var combodmg = ComboDamage(target);

            var hasFlash  = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerFlash")) == SpellState.Ready;
            var hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;
            var ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);

            if (hasIgnite && ignitedmg > target.Health && !R.CanCast(target) && !W.CanCast(target) && !Q.CanCast(target))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }

            if (hasIgnite && combodmg > target.Health && R.CanCast(target) &&
                (float)player.LSGetSpellDamage(target, SpellSlot.R) < target.Health)
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }

            flashRblock = hasIgnite;

            if (getCheckBoxItem(comboMenu, "useq") && Q.IsReady())
            {
                var qHit = getSliderItem(comboMenu, "qHit");
                var hitC = HitChance.VeryHigh;
                switch (qHit)
                {
                case 1:
                    hitC = HitChance.Low;
                    break;

                case 2:
                    hitC = HitChance.Medium;
                    break;

                case 3:
                    hitC = HitChance.High;
                    break;

                case 4:
                    hitC = HitChance.VeryHigh;
                    break;
                }
                var pred = Q.GetPrediction(target);
                if (pred.Hitchance >= hitC)
                {
                    Q.Cast(pred.CastPosition);
                }
                else
                {
                    Q.CastIfHitchanceEquals(target, hitC);
                }
            }

            if (getCheckBoxItem(comboMenu, "usew") && W.CanCast(target))
            {
                W.Cast(target, getCheckBoxItem(config, "packets"));
            }

            if (getCheckBoxItem(comboMenu, "UseFlashC") && !flashRblock && R.IsReady() && hasFlash &&
                !CombatHelper.CheckCriticalBuffs(target) && player.GetSpell(SpellSlot.R).SData.Mana <= player.Mana &&
                player.LSDistance(target.Position) >= 400 && player.LSGetSpellDamage(target, SpellSlot.R) > target.Health &&
                !Q.IsReady() && !W.IsReady() && player.LSDistance(target.Position) <= RFlash.Range &&
                !player.Position.LSExtend(target.Position, 400).IsWall())
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerFlash"), player.Position.LSExtend(target.Position, 400));
                Utility.DelayAction.Add(50, () => R.Cast(target, getCheckBoxItem(config, "packets")));
            }

            var rtarget = HeroManager.Enemies.Where(e => e.LSIsValidTarget() && R.CanCast(e)).OrderByDescending(TargetSelector.GetPriority).FirstOrDefault();

            if (getCheckBoxItem(comboMenu, "user") && rtarget != null && player.LSGetSpellDamage(target, SpellSlot.R) > rtarget.Health)
            {
                R.Cast(rtarget, getCheckBoxItem(config, "packets"));
            }
        }
コード例 #7
0
ファイル: Maokai.cs プロジェクト: qazji3/LeagueSharp-7
        private void Combo()
        {
            Obj_AI_Hero target = DrawHelper.GetBetterTarget(E.Range, TargetSelector.DamageType.Magical);

            if (target == null)
            {
                if (maoR)
                {
                    if (!turnOff)
                    {
                        turnOff = true;
                        Utility.DelayAction.Add(2600, () => turnOffUlt());
                    }
                }
                return;
            }
            if (config.Item("selected", true).GetValue <bool>())
            {
                target = CombatHelper.SetTarget(target, TargetSelector.GetSelectedTarget());
                orbwalker.ForceTarget(target);
            }
            var manaperc = player.Mana / player.MaxMana * 100;

            if (player.HasBuff("MaokaiSapMagicMelee") &&
                player.Distance(target) < Orbwalking.GetRealAutoAttackRange(target) + 75)
            {
                return;
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            if (config.Item("useq", true).GetValue <bool>() && Q.CanCast(target) && !player.IsWindingUp &&
                ((config.Item("useqroot", true).GetValue <bool>() &&
                  (!target.HasBuffOfType(BuffType.Snare) && !target.HasBuffOfType(BuffType.Stun) &&
                   !target.HasBuffOfType(BuffType.Suppression))) || !config.Item("useqroot", true).GetValue <bool>()) &&
                !W.CanCast(target))
            {
                Q.Cast(target);
            }
            if (config.Item("usew", true).GetValue <bool>())
            {
                if (config.Item("blocke", true).GetValue <bool>() && player.Distance(target) < W.Range && W.IsReady() &&
                    E.CanCast(target))
                {
                    E.Cast(target);
                    CastR(target);
                    Utility.DelayAction.Add(100, () => W.Cast(target));
                }
                else if (W.CanCast(target))
                {
                    CastR(target);
                    W.Cast(target);
                }
            }
            if (config.Item("usee", true).GetValue <bool>() && E.CanCast(target))
            {
                if (!config.Item("blocke", true).GetValue <bool>() ||
                    config.Item("blocke", true).GetValue <bool>() && !W.IsReady())
                {
                    E.Cast(target);
                }
            }

            if (R.IsReady())
            {
                bool enoughEnemies = config.Item("user", true).GetValue <Slider>().Value <=
                                     player.CountEnemiesInRange(R.Range - 50);
                Obj_AI_Hero targetR = DrawHelper.GetBetterTarget(R.Range, TargetSelector.DamageType.Magical);

                if (maoR && targetR != null &&
                    ((config.Item("rks", true).GetValue <bool>() &&
                      (Damage.GetSpellDamage(player, targetR, SpellSlot.R) +
                       player.CalcDamage(target, Damage.DamageType.Magical, maoRStack)) > targetR.Health) ||
                     manaperc < config.Item("rmana", true).GetValue <Slider>().Value ||
                     (!enoughEnemies && player.Distance(targetR) > R.Range - 50)))
                {
                    R.Cast();
                }

                if (targetR != null && !maoR && manaperc > config.Item("rmana", true).GetValue <Slider>().Value&&
                    (enoughEnemies || R.IsInRange(targetR)))
                {
                    R.Cast();
                }
            }
            var  ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("useIgnite").GetValue <bool>() && ignitedmg > target.Health && hasIgnite &&
                !E.CanCast(target))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
コード例 #8
0
ファイル: Kennen.cs プロジェクト: fgpmaia123/LeagueSharp-21
        private void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (target == null)
            {
                return;
            }
            if (config.Item("selected", true).GetValue <bool>())
            {
                target = CombatHelper.SetTarget(target, TargetSelector.GetSelectedTarget());
                orbwalker.ForceTarget(target);
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            if (player.HasBuff("KennenLightningRush") && player.Health > target.Health && target.UnderTurret(true))
            {
                orbwalker.SetMovement(false);
                player.IssueOrder(GameObjectOrder.MoveTo, target);
            }
            bool hasIgnite   = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;
            var  combodamage = ComboDamage(target);
            var  ignitedmg   = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);

            if (config.Item("useIgnite").GetValue <bool>() && ignitedmg > target.Health && hasIgnite &&
                !Q.CanCast(target) && !W.IsReady())
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }

            if (config.Item("useq", true).GetValue <bool>() && Q.CanCast(target) && Orbwalking.CanMove(100) &&
                !target.IsDashing())
            {
                Q.CastIfHitchanceEquals(target, HitChance.High, config.Item("packets").GetValue <bool>());
            }
            if (config.Item("usew", true).GetValue <bool>() && W.IsReady() && W.Range > player.Distance(target) &&
                MarkOfStorm(target) > 0)
            {
                W.Cast(config.Item("packets").GetValue <bool>());
            }
            if (config.Item("usee", true).GetValue <bool>() && !target.UnderTurret(true) && E.IsReady() &&
                (player.Distance(target) < 80 ||
                 (!player.HasBuff("KennenLightningRush") && !Q.CanCast(target) &&
                  config.Item("useemin", true).GetValue <Slider>().Value < player.Health / player.MaxHealth * 100 &&
                  MarkOfStorm(target) > 0 &&
                  CombatHelper.IsPossibleToReachHim(target, 1f, new float[5] {
                2f, 2f, 2f, 2f, 2f
            }[Q.Level - 1]))))
            {
                E.Cast(config.Item("packets").GetValue <bool>());
            }

            if (R.IsReady() && !player.HasBuffOfType(BuffType.Snare) &&
                (config.Item("user", true).GetValue <Slider>().Value <=
                 player.CountEnemiesInRange(config.Item("userrange", true).GetValue <Slider>().Value) ||
                 (config.Item("usertarget", true).GetValue <bool>() &&
                  combodamage + player.GetAutoAttackDamage(target) * 3 > target.Health && !Q.CanCast(target) &&
                  player.Distance(target) < config.Item("userrange", true).GetValue <Slider>().Value)))
            {
                R.Cast(config.Item("packets").GetValue <bool>());
            }
        }
コード例 #9
0
ファイル: ChoGath.cs プロジェクト: tolgahandereci/LeagueSharp
        private static void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(1000, TargetSelector.DamageType.Magical);

            if (config.Item("usee", true).GetValue <bool>() && !VorpalSpikes && E.GetHitCount() > 0 &&
                (Environment.Turret.countTurretsInRange(player) < 1 || target.Health < 150))
            {
                E.Cast();
            }
            if (target == null)
            {
                return;
            }
            if (config.Item("selected", true).GetValue <bool>())
            {
                target = CombatHelper.SetTarget(target, TargetSelector.GetSelectedTarget());
                orbwalker.ForceTarget(target);
            }
            var combodmg = ComboDamage(target);

            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, combodmg);
            }
            bool hasFlash  = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerFlash")) == SpellState.Ready;
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;
            var  ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);

            if (hasIgnite && ignitedmg > target.Health && !R.CanCast(target) && !W.CanCast(target) && !Q.CanCast(target))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            if (hasIgnite && combodmg > target.Health && R.CanCast(target) &&
                (float)Damage.GetSpellDamage(player, target, SpellSlot.R) < target.Health)
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            if (hasIgnite)
            {
                flashRblock = true;
            }
            else
            {
                flashRblock = false;
            }
            if (config.Item("useq", true).GetValue <bool>() && Q.IsReady())
            {
                if (config.Item("useqfaster", true).GetValue <bool>())
                {
                    if (target.IsValidTarget(Q.Range) && Q.CanCast(target))
                    {
                        var nextpos = target.Position.Extend(target.ServerPosition, target.MoveSpeed * 0.7f);
                        if (target.HasBuff("OdinCaptureChanner"))
                        {
                            nextpos = target.Position;
                        }
                        Q.Cast(nextpos, config.Item("packets").GetValue <bool>());
                    }
                }
                else
                {
                    int qHit = config.Item("qHit", true).GetValue <Slider>().Value;
                    var hitC = HitChance.High;
                    switch (qHit)
                    {
                    case 1:
                        hitC = HitChance.Low;
                        break;

                    case 2:
                        hitC = HitChance.Medium;
                        break;

                    case 3:
                        hitC = HitChance.High;
                        break;

                    case 4:
                        hitC = HitChance.VeryHigh;
                        break;
                    }
                    Q.CastIfHitchanceEquals(target, hitC, config.Item("packets").GetValue <bool>());
                }
            }
            if (config.Item("usew", true).GetValue <bool>() && W.CanCast(target))
            {
                W.Cast(target, config.Item("packets").GetValue <bool>());
            }
            if (config.Item("UseFlashC", true).GetValue <bool>() && !flashRblock && R.IsReady() && hasFlash &&
                !CombatHelper.CheckCriticalBuffs(target) && player.GetSpell(SpellSlot.R).ManaCost <= player.Mana &&
                player.Distance(target.Position) >= 400 && player.GetSpellDamage(target, SpellSlot.R) > target.Health &&
                !Q.IsReady() && !W.IsReady() && player.Distance(target.Position) <= RFlash.Range &&
                !player.Position.Extend(target.Position, 400).IsWall())
            {
                player.Spellbook.CastSpell(
                    player.GetSpellSlot("SummonerFlash"), player.Position.Extend(target.Position, 400));
                Utility.DelayAction.Add(50, () => R.Cast(target, config.Item("packets").GetValue <bool>()));
            }
            var rtarget =
                HeroManager.Enemies.Where(e => e.IsValidTarget() && R.CanCast(e))
                .OrderByDescending(e => TargetSelector.GetPriority(e))
                .FirstOrDefault();

            if (config.Item("user", true).GetValue <bool>() && rtarget != null &&
                player.GetSpellDamage(target, SpellSlot.R) > rtarget.Health)
            {
                R.Cast(rtarget, config.Item("packets").GetValue <bool>());
            }
        }
コード例 #10
0
ファイル: Poppy.cs プロジェクト: fgpmaia123/LeagueSharp-21
        private static void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical);

            if (target == null)
            {
                return;
            }
            if (config.Item("selected").GetValue <bool>())
            {
                target = CombatHelper.SetTarget(target, TargetSelector.GetSelectedTarget());
                orbwalker.ForceTarget(target);
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            bool hasFlash = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerFlash")) == SpellState.Ready;

            if (config.Item("usew").GetValue <bool>() && player.Distance(target.Position) < R.Range && W.IsReady())
            {
                W.Cast(config.Item("packets").GetValue <bool>());
            }

            if (config.Item("usee").GetValue <bool>() && E.IsReady())
            {
                if (config.Item("useewall").GetValue <bool>())
                {
                    var   bestpos = CombatHelper.bestVectorToPoppyFlash2(target);
                    float damage  =
                        (float)
                        (ComboDamage(target) +
                         Damage.CalcDamage(
                             player, target, Damage.DamageType.Magical,
                             (eSecond[E.Level - 1] + 0.8f * player.FlatMagicDamageMod)) +
                         (player.GetAutoAttackDamage(target) * 4));
                    float damageno = (float)(ComboDamage(target) + (player.GetAutoAttackDamage(target) * 4));
                    if (config.Item("useeflash").GetValue <bool>() && hasFlash && !CheckWalls(player, target) &&
                        damage > target.Health && target.Health > damageno &&
                        CombatHelper.bestVectorToPoppyFlash(target).IsValid())
                    {
                        player.Spellbook.CastSpell(player.GetSpellSlot("SummonerFlash"), bestpos);
                        Utility.DelayAction.Add(
                            100, () => E.CastOnUnit(target, config.Item("packets").GetValue <bool>()));
                    }
                    if (E.CanCast(target) &&
                        (CheckWalls(player, target) ||
                         target.Health < E.GetDamage(target) + player.GetAutoAttackDamage(target, true)))
                    {
                        E.CastOnUnit(target, config.Item("packets").GetValue <bool>());
                    }
                    if (E.CanCast(target) && Q.IsReady() && Q.Instance.ManaCost + E.Instance.ManaCost > player.Mana &&
                        target.Health <
                        E.GetDamage(target) + Q.GetDamage(target) + player.GetAutoAttackDamage(target, true))
                    {
                        Q.Cast(config.Item("packets").GetValue <bool>());
                        E.CastOnUnit(target, config.Item("packets").GetValue <bool>());
                    }
                }
                else
                {
                    if (E.CanCast(target))
                    {
                        E.CastOnUnit(target, config.Item("packets").GetValue <bool>());
                    }
                }
            }
            if (config.Item("user").GetValue <bool>())
            {
                if (R.IsReady() && player.Distance(target.Position) < E.Range &&
                    ComboDamage(target) + player.GetAutoAttackDamage(target) * 5 < target.Health &&
                    (ComboDamage(target) + player.GetAutoAttackDamage(target) * 3) * ultMod[R.Level - 1] > target.Health)
                {
                    R.CastOnUnit(target, config.Item("packets").GetValue <bool>());
                }
            }
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;
            var  ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);

            if (config.Item("useIgnite").GetValue <bool>() && ignitedmg > target.Health && hasIgnite &&
                !E.CanCast(target) && !Q.CanCast(target))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            if (config.Item("userindanger").GetValue <Slider>().Value < player.CountEnemiesInRange(R.Range))
            {
                if (config.Item("userOnweakest").GetValue <bool>())
                {
                    var tmpTarg =
                        ObjectManager.Get <Obj_AI_Hero>()
                        .Where(
                            i => i.IsEnemy && i.IsDead && player.Distance(i) < R.Range && i.Health > i.MaxHealth / 2)
                        .OrderBy(i => CombatHelper.GetChampDmgToMe(i))
                        .FirstOrDefault();
                    if (tmpTarg != null)
                    {
                        target = tmpTarg;
                    }
                }
                R.CastOnUnit(target, config.Item("packets").GetValue <bool>());
            }
        }
コード例 #11
0
ファイル: Ezreal.cs プロジェクト: fgpmaia123/LeagueSharp-21
        private void Combo()
        {
            Obj_AI_Hero target=getTarget();
            Obj_AI_Hero Rtarget = TargetSelector.GetTarget(2000, TargetSelector.DamageType.Magical);
            if (target == null)
            {
                return;
            }
            if (config.Item("selected").GetValue<bool>())
            {
                target = CombatHelper.SetTarget(target, TargetSelector.GetSelectedTarget());
                orbwalker.ForceTarget(target);
            }
            if (config.Item("useItems").GetValue<bool>())
            {
                ItemHandler.UseItems(target, config);
            }
            var cmbDmg = GetComboDamage(target);
            if (config.Item("useq", true).GetValue<bool>() && Q.IsReady() && Orbwalking.CanMove(100) && target.IsValidTarget() && !justJumped)
            {
                var targQ = Q.GetPrediction(target);
                if (Q.Range - 100 > targQ.CastPosition.Distance(player.Position) && targQ.Hitchance >= HitChance.High)
                {
                    Q.Cast(targQ.CastPosition, config.Item("packets").GetValue<bool>());
                    return;
                }
            }
            if (config.Item("usew", true).GetValue<bool>() && W.IsReady() && Orbwalking.CanMove(100) && !justJumped &&
                (cmbDmg + player.GetAutoAttackDamage(target) > target.Health || player.Mana > Q.Instance.ManaCost * 2))
            {
                var tarPered = W.GetPrediction(target);
                if (W.Range - 80 > tarPered.CastPosition.Distance(player.Position))
                {
                    W.CastIfHitchanceEquals(target, HitChance.High, config.Item("packets").GetValue<bool>());
                    return;
                }
            }
            if (R.IsReady() && !justJumped)
            {
                var dist = player.Distance(Rtarget);
                if (config.Item("user", true).GetValue<bool>() && !justQ && !Q.CanCast(target) && !justW &&
                    !W.CanCast(target) && !CombatHelper.CheckCriticalBuffs(Rtarget) &&
                    config.Item("usermin", true).GetValue<Slider>().Value < dist && 3000 > dist &&
                    Rtarget.Health < R.GetDamage(Rtarget) * 0.7 && target.CountAlliesInRange(600) < 1)
                {
                    R.CastIfHitchanceEquals(target, HitChance.High, config.Item("packets").GetValue<bool>());
                }
                if (target.CountAlliesInRange(700) > 0)
                {
                    R.CastIfWillHit(
                        target, config.Item("usertf", true).GetValue<Slider>().Value,
                        config.Item("packets").GetValue<bool>());
                }
            }
            bool canKill = cmbDmg > target.Health;
            if (config.Item("usee", true).GetValue<bool>() && E.IsReady() &&
                ((config.Item("useekill", true).GetValue<bool>() && canKill) ||
                 (!config.Item("useekill", true).GetValue<bool>() &&
                  (target.CountEnemiesInRange(1200) <= target.CountAlliesInRange(1200) && player.Health > target.Health &&
                   TargetSelector.GetPriority(target) >= 2f) || canKill)))
            {
                var bestPositons =
                    (from pos in
                        CombatHelper.PointsAroundTheTarget(target.Position, 750)
                            .Where(
                                p =>
                                    !p.IsWall() && p.IsValid() && p.Distance(player.Position) < E.Range &&
                                    p.Distance(target.Position) < 680 && !p.UnderTurret(true))
                        let mob =
                            ObjectManager.Get<Obj_AI_Base>()
                                .Where(
                                    m =>
                                        m.IsEnemy && m.IsValidTarget() && m.Distance(target.Position) < 750 &&
                                        m.SkinName != target.SkinName)
                                .OrderBy(m => m.Distance(pos))
                                .FirstOrDefault()
                        where (mob != null && mob.Distance(pos) > pos.Distance(target.Position) + 80) || (mob == null)
                        select pos).ToList();

                CastE(bestPositons, target);
            }
            var ignitedmg = (float) player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;
            if (config.Item("useIgnite", true).GetValue<bool>() && ignitedmg > target.Health && hasIgnite &&
                !player.IsChannelingImportantSpell() && !justQ && !Q.CanCast(target) && !justW && !W.CanCast(target) &&
                !justJumped)
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
コード例 #12
0
ファイル: Program.cs プロジェクト: sadnecc/CHportcn
        private void Combo()
        {
            var target = TargetSelector.GetTarget(E.Range, DamageType.Magical);

            if (target == null)
            {
                if (maoR && !getCheckBoxItem(comboMenu, "cancelR"))
                {
                    if (!turnOff)
                    {
                        turnOff = true;
                        Utility.DelayAction.Add(2600, turnOffUlt);
                    }
                }
                return;
            }

            if (getCheckBoxItem(comboMenu, "selected"))
            {
                target = CombatHelper.SetTarget(target, TargetSelector.SelectedTarget);
                if (target != null)
                {
                    Orbwalker.ForcedTarget = target;
                }
                else
                {
                    Orbwalker.ForcedTarget = null;
                }
            }
            else
            {
                Orbwalker.ForcedTarget = null;
            }

            var manaperc = player.Mana / player.MaxMana * 100;

            if (player.HasBuff("MaokaiSapMagicMelee") && player.LSDistance(target) < Orbwalking.GetRealAutoAttackRange(target) + 75)
            {
                return;
            }

            if (getCheckBoxItem(comboMenu, "useq") && Q.CanCast(target) && getCheckBoxItem(comboMenu, "usee") && player.LSDistance(target) <= getSliderItem(comboMenu, "useqrange") && ((getCheckBoxItem(comboMenu, "useqroot") && !target.HasBuffOfType(BuffType.Snare) && !target.HasBuffOfType(BuffType.Slow) && !target.HasBuffOfType(BuffType.Stun) && !target.HasBuffOfType(BuffType.Suppression)) || !getCheckBoxItem(comboMenu, "useqroot")))
            {
                Q.Cast(target, getCheckBoxItem(config, "packets"));
            }

            if (getCheckBoxItem(comboMenu, "usew"))
            {
                if (getCheckBoxItem(comboMenu, "blocke") && player.LSDistance(target) < W.Range && W.IsReady() && E.CanCast(target))
                {
                    E.Cast(target, getCheckBoxItem(config, "packets"));
                    CastR(target);
                    Utility.DelayAction.Add(100, () => W.Cast(target, getCheckBoxItem(config, "packets")));
                }
                else if (W.CanCast(target))
                {
                    CastR(target);
                    W.Cast(target, getCheckBoxItem(config, "packets"));
                }
            }

            if (getCheckBoxItem(comboMenu, "usee") && E.CanCast(target))
            {
                if (!getCheckBoxItem(comboMenu, "blocke") || getCheckBoxItem(comboMenu, "blocke") && !W.IsReady())
                {
                    E.Cast(target, getCheckBoxItem(config, "packets"));
                }
            }

            if (R.IsReady())
            {
                var enoughEnemies = getSliderItem(comboMenu, "user") <=
                                    player.CountEnemiesInRange(R.Range - 50);
                var targetR = TargetSelector.GetTarget(R.Range, DamageType.Magical);

                if (maoR && targetR != null && ((getCheckBoxItem(comboMenu, "rks") && player.LSGetSpellDamage(targetR, SpellSlot.R) + player.CalcDamage(target, DamageType.Magical, maoRStack) > targetR.Health) || manaperc < getSliderItem(comboMenu, "rmana") || (!enoughEnemies && player.LSDistance(targetR) > R.Range - 50)))
                {
                    R.Cast(getCheckBoxItem(config, "packets"));
                }

                if (targetR != null && !maoR && manaperc > getSliderItem(comboMenu, "rmana") && (enoughEnemies || R.IsInRange(targetR)))
                {
                    R.Cast(getCheckBoxItem(config, "packets"));
                }
            }

            var ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            var hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (getCheckBoxItem(comboMenu, "useIgnite") && ignitedmg > target.Health && hasIgnite && !E.CanCast(target))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
コード例 #13
0
        private void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical);

            if (target == null)
            {
                return;
            }
            if (config.Item("selected", true).GetValue <bool>())
            {
                target = CombatHelper.SetTarget(target, TargetSelector.GetSelectedTarget());
                orbwalker.ForceTarget(target);
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            var  combodmg  = ComboDamage(target);
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("usew", true).GetValue <bool>())
            {
                var wTarget = Environment.Hero.mostEnemyAtFriend(player, W.Range, 250f);
                if (wTarget != null)
                {
                    W.Cast(wTarget, config.Item("packets").GetValue <bool>());
                }
            }
            if (config.Item("usee", true).GetValue <bool>() && E.CanCast(target))
            {
                E.Cast(target.Position, config.Item("packets").GetValue <bool>());
            }
            if (config.Item("user", true).GetValue <bool>() && !MordeGhost &&
                (!config.Item("ultDef", true).GetValue <bool>() ||
                 (config.Item("ultDef", true).GetValue <bool>() && !CombatHelper.HasDef(target))) &&
                (player.Distance(target.Position) <= 400f ||
                 (R.CanCast(target) && target.Health < 250f &&
                  Environment.Hero.countChampsAtrangeA(target.Position, 600f) >= 1)) &&
                !config.Item("ult" + target.SkinName, true).GetValue <bool>() && combodmg * 0.7f > target.Health)
            {
                R.CastOnUnit(target, config.Item("packets").GetValue <bool>());
            }
            if (config.Item("useIgnite").GetValue <bool>() && combodmg > target.Health && hasIgnite)
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            if (MordeGhost && !GhostDelay)
            {
                var Gtarget = TargetSelector.GetTarget(GhostRange, TargetSelector.DamageType.Magical);
                switch (config.Item("ghostTarget", true).GetValue <StringList>().SelectedIndex)
                {
                case 0:
                    Gtarget = TargetSelector.GetTarget(GhostRange, TargetSelector.DamageType.Magical);
                    break;

                case 1:
                    Gtarget =
                        ObjectManager.Get <Obj_AI_Hero>()
                        .Where(i => i.IsEnemy && !i.IsDead && player.Distance(i) <= GhostRange)
                        .OrderBy(i => i.Health)
                        .FirstOrDefault();
                    break;

                case 2:
                    Gtarget =
                        ObjectManager.Get <Obj_AI_Hero>()
                        .Where(i => i.IsEnemy && !i.IsDead && player.Distance(i) <= GhostRange)
                        .OrderBy(i => player.Distance(i))
                        .FirstOrDefault();
                    break;

                default:
                    break;
                }
                if (Gtarget.IsValid)
                {
                    R.CastOnUnit(Gtarget, config.Item("packets").GetValue <bool>());
                    GhostDelay = true;
                    Utility.DelayAction.Add(1000, () => GhostDelay = false);
                }
            }
        }
コード例 #14
0
ファイル: Renekton.cs プロジェクト: fgpmaia123/LeagueSharp-21
        private void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(E.Range * 2, TargetSelector.DamageType.Physical);

            if (target == null)
            {
                return;
            }
            if (config.Item("selected").GetValue <bool>())
            {
                target = CombatHelper.SetTarget(target, TargetSelector.GetSelectedTarget());
                orbwalker.ForceTarget(target);
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            bool hasIgnite   = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;
            var  FuryQ       = Damage.GetSpellDamage(player, target, SpellSlot.Q) * 0.5;
            var  FuryW       = Damage.GetSpellDamage(player, target, SpellSlot.W) * 0.5;
            var  eDmg        = Damage.GetSpellDamage(player, target, SpellSlot.E);
            var  combodamage = ComboDamage(target);

            if (config.Item("useIgnite").GetValue <bool>() && hasIgnite &&
                player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite) > target.Health)
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            if (player.Distance(target) > E.Range && E.IsReady() && (W.IsReady() || Q.IsReady()) && lastE.Equals(0) &&
                config.Item("usee").GetValue <bool>())
            {
                var closeGapTarget =
                    ObjectManager.Get <Obj_AI_Base>()
                    .FirstOrDefault(
                        i =>
                        i.IsEnemy && player.Distance(i) < E.Range && !i.IsDead &&
                        i.Distance(target.ServerPosition) < E.Range);
                if (closeGapTarget != null)
                {
                    if ((canBeOpWIthQ(closeGapTarget.Position) || fury) && !rene)
                    {
                        if (E.CanCast(closeGapTarget))
                        {
                            E.Cast(closeGapTarget.Position, config.Item("packets").GetValue <bool>());
                            lastE = System.Environment.TickCount;
                            return;
                        }
                    }
                }
            }
            if (config.Item("useq").GetValue <bool>() && Q.CanCast(target) && !renw && !player.IsDashing() &&
                (!W.IsReady() ||
                 ((W.IsReady() && !fury) || (player.Health < target.Health) ||
                  Environment.Minion.countMinionsInrange(player.Position, Q.Range) + player.CountEnemiesInRange(Q.Range) >
                  3 && fury)))
            {
                Q.Cast(config.Item("packets").GetValue <bool>());
            }
            var distance = player.Distance(target.Position);

            if (config.Item("usee").GetValue <bool>() && lastE.Equals(0) && E.CanCast(target) &&
                (eDmg > target.Health ||
                 (((W.IsReady() && canBeOpWIthQ(target.Position) && !rene) ||
                   (distance > target.Distance(player.Position.Extend(target.Position, E.Range)) - distance)))))
            {
                E.Cast(target.Position, config.Item("packets").GetValue <bool>());
                lastE = System.Environment.TickCount;
                return;
            }
            if (config.Item("usee").GetValue <bool>() && !lastE.Equals(0) &&
                (eDmg + player.GetAutoAttackDamage(target) > target.Health ||
                 (((W.IsReady() && canBeOpWIthQ(target.Position) && !rene) ||
                   (distance < target.Distance(player.Position.Extend(target.Position, E.Range)) - distance) ||
                   player.Distance(target) > E.Range - 100))))
            {
                var time = System.Environment.TickCount - lastE;
                if (time > 3600f || combodamage > target.Health || (player.Distance(target) > E.Range - 100))
                {
                    E.Cast(target.Position, config.Item("packets").GetValue <bool>());
                    lastE = 0;
                }
            }
            if ((player.Health * 100 / player.MaxHealth) <= config.Item("user").GetValue <Slider>().Value ||
                config.Item("userindanger").GetValue <Slider>().Value < player.CountEnemiesInRange(R.Range))
            {
                R.Cast(config.Item("packets").GetValue <bool>());
            }
        }