예제 #1
0
        private void Combo()
        {
            AIHeroClient target = DrawHelper.GetBetterTarget(W.Range, TargetSelector.DamageType.Magical);

            if (target != null)
            {
                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("usew", true).GetValue <bool>() && W.IsReady())
                {
                    CastW(target);
                }
                if (config.Item("usee", true).GetValue <bool>() && E.CanCast(target) && player.Distance(target) < E.Range)
                {
                    E.CastIfHitchanceEquals(target, HitChance.High);
                }
                var ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
                var canUlt    = config.Item("user", true).GetValue <bool>() && !MordeGhost &&
                                !config.Item("ult" + target.BaseSkinName, true).GetValue <bool>() &&
                                (!config.Item("ultDef", true).GetValue <bool>() ||
                                 (config.Item("ultDef", true).GetValue <bool>() && !CombatHelper.HasDef(target)));
                if (canUlt &&
                    (((player.Distance(target.Position) <= 400f ||
                       (R.CanCast(target) && target.Health < 250f && target.Position.CountAlliesInRange(600f) >= 1)) &&
                      R.GetDamage(target) * 0.8f > target.Health) ||
                     (player.HealthPercent < 40 && target.HealthPercent < 40 && target.Distance(player) < 300f)))
                {
                    R.CastOnUnit(target);
                }
                if (canUlt && hasIgnite && player.Distance(target) < 600 &&
                    R.GetDamage(target) * 0.8f + ignitedmg > HealthPrediction.GetHealthPrediction(target, 400))
                {
                    IgniteTarget = target;
                    LeagueSharp.Common.Utility.DelayAction.Add(
                        150, () =>
                    {
                        player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), IgniteTarget);
                        IgniteTarget = null;
                    });
                    R.CastOnUnit(target);
                }
                if (config.Item("useIgnite").GetValue <bool>() && ignitedmg > target.Health && hasIgnite)
                {
                    if (IgniteTarget != null)
                    {
                        player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), IgniteTarget);
                        return;
                    }
                    player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
                }
            }
        }
예제 #2
0
        private void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Magical);

            if (MordeGhost && !GhostDelay && config.Item("moveGhost", true).GetValue <bool>() &&
                !config.Item("autoMoveGhost", true).GetValue <bool>())
            {
                moveGhost();
            }
            if (target == null)
            {
                if (MordeGhost && !GhostDelay && config.Item("follow", true).GetValue <bool>())
                {
                    R.Cast(Game.CursorPos.Extend(player.Position, 100));
                    GhostDelay = true;
                    Utility.DelayAction.Add(200, () => GhostDelay = false);
                }
                return;
            }
            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("usew", true).GetValue <bool>() && W.IsReady())
            {
                CastW();
            }
            if (config.Item("usee", true).GetValue <bool>() && E.CanCast(target) && player.Distance(target) < E.Range)
            {
                E.CastIfHitchanceEquals(target, HitChance.High, config.Item("packets").GetValue <bool>());
            }
            var ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            var canUlt    = config.Item("user", true).GetValue <bool>() && !MordeGhost &&
                            !config.Item("ult" + target.SkinName, true).GetValue <bool>() &&
                            (!config.Item("ultDef", true).GetValue <bool>() ||
                             (config.Item("ultDef", true).GetValue <bool>() && !CombatHelper.HasDef(target)));

            if (canUlt &&
                (player.Distance(target.Position) <= 400f ||
                 (R.CanCast(target) && target.Health < 250f &&
                  Environment.Hero.countChampsAtrangeA(target.Position, 600f) >= 1)) &&
                R.GetDamage(target) * 0.8f > target.Health)
            {
                R.CastOnUnit(target, config.Item("packets").GetValue <bool>());
            }
            if (canUlt && hasIgnite && player.Distance(target) < 600 &&
                R.GetDamage(target) * 0.8f + ignitedmg > HealthPrediction.GetHealthPrediction(target, 400))
            {
                IgniteTarget = target;
                Utility.DelayAction.Add(500, () => IgniteTarget = null);
                R.CastOnUnit(target, config.Item("packets").GetValue <bool>());
            }
            if (config.Item("useIgnite").GetValue <bool>() && ignitedmg > target.Health && hasIgnite)
            {
                if (IgniteTarget != null)
                {
                    player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), IgniteTarget);
                    return;
                }
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
예제 #3
0
        private void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical);

            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target);
            }
            if (target == null)
            {
                return;
            }
            var  combodmg  = ComboDamage(target);
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("usew").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").GetValue <bool>() && E.CanCast(target))
            {
                E.Cast(target.Position, config.Item("packets").GetValue <bool>());
            }
            if (config.Item("user").GetValue <bool>() && !MordeGhost && (!config.Item("ultDef").GetValue <bool>() || (config.Item("ultDef").GetValue <bool>() && CombatHelper.HasDef(target))) && (player.Distance(target.Position) <= 400f || (R.CanCast(target) && target.Health < 250f && Environment.Hero.countChampsAtrangeA(player.Position, 600f) >= 1)) && !config.Item("ult" + target.SkinName).GetValue <bool>() && combodmg > 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").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);
                }
            }
        }
예제 #4
0
        private void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Magical);

            if (target == null)
            {
                return;
            }
            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("usew", true).GetValue <bool>() && W.IsReady())
            {
                CastW();
            }
            if (config.Item("usee", true).GetValue <bool>() && E.CanCast(target) && player.Distance(target) < E.Range)
            {
                E.CastIfHitchanceEquals(target, HitChance.High, config.Item("packets").GetValue <bool>());
            }
            var ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            var canUlt    = config.Item("user", true).GetValue <bool>() && !MordeGhost &&
                            !config.Item("ult" + target.SkinName, true).GetValue <bool>() &&
                            (!config.Item("ultDef", true).GetValue <bool>() ||
                             (config.Item("ultDef", true).GetValue <bool>() && !CombatHelper.HasDef(target)));

            if (canUlt &&
                (player.Distance(target.Position) <= 400f ||
                 (R.CanCast(target) && target.Health < 250f &&
                  Environment.Hero.countChampsAtrangeA(target.Position, 600f) >= 1)) &&
                R.GetDamage(target) * 0.8f > target.Health)
            {
                R.CastOnUnit(target, config.Item("packets").GetValue <bool>());
            }
            if (canUlt && hasIgnite && player.Distance(target) < 600 &&
                R.GetDamage(target) * 0.8f + ignitedmg > HealthPrediction.GetHealthPrediction(target, 400))
            {
                IgniteTarget = target;
                Utility.DelayAction.Add(500, () => IgniteTarget = null);
                R.CastOnUnit(target, config.Item("packets").GetValue <bool>());
            }
            if (config.Item("useIgnite").GetValue <bool>() && ignitedmg > target.Health && hasIgnite)
            {
                if (IgniteTarget != null)
                {
                    player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), IgniteTarget);
                    return;
                }
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            if (MordeGhost && !GhostDelay && config.Item("moveGhost", true).GetValue <bool>())
            {
                var ghost   = ObjectManager.Get <Obj_AI_Minion>().FirstOrDefault(m => m.HasBuff("mordekaisercotgpetbuff2"));
                var Gtarget = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical);
                switch (config.Item("ghostTarget", true).GetValue <StringList>().SelectedIndex)
                {
                case 0:
                    Gtarget = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical);
                    break;

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

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

                default:
                    break;
                }
                if (ghost != null && Gtarget.IsValid && !ghost.IsWindingUp)
                {
                    if (ghost.IsMelee)
                    {
                        if (CanCloneAttack(ghost) || player.HealthPercent < 25)
                        {
                            R.CastOnUnit(Gtarget, config.Item("packets").GetValue <bool>());
                        }
                        else
                        {
                            var prediction = Prediction.GetPrediction(Gtarget, 2);
                            R.Cast(
                                target.Position.Extend(
                                    prediction.UnitPosition, Orbwalking.GetRealAutoAttackRange(Gtarget)),
                                config.Item("packets").GetValue <bool>());
                        }
                    }
                    else
                    {
                        if (CanCloneAttack(ghost) || player.HealthPercent < 25)
                        {
                            R.CastOnUnit(Gtarget, config.Item("packets").GetValue <bool>());
                        }
                        else
                        {
                            var pred  = Orbwalking.AutoAttack.GetPrediction(Gtarget);
                            var point =
                                CombatHelper.PointsAroundTheTargetOuterRing(
                                    pred.UnitPosition, Orbwalking.GetRealAutoAttackRange(Gtarget), 15)
                                .Where(p => !p.IsWall())
                                .OrderBy(p => p.CountEnemiesInRange(500))
                                .ThenBy(p => p.Distance(player.Position))
                                .FirstOrDefault();
                            if (point.IsValid())
                            {
                                R.Cast(point, config.Item("packets").GetValue <bool>());
                            }
                        }
                    }

                    GhostDelay = true;
                    Utility.DelayAction.Add(200, () => GhostDelay = false);
                }
            }
        }