Пример #1
0
        private static void CastE()
        {
            var target = TargetSelector.GetTarget(EMaxRange, DamageType.Magical);

            if (target != null && target.IsEnemy && target.IsVisible)
            {
                if (player.ServerPosition.LSDistance(target.ServerPosition) < EELO.Range)
                {
                    EELO.SourcePosition = target.ServerPosition;
                    var prediction = EELO.GetPrediction(target);
                    if (prediction.HitChance >= EloBuddy.SDK.Enumerations.HitChance.High)
                    {
                        Player.CastSpell(SpellSlot.E, prediction.UnitPosition, target.ServerPosition);
                    }
                }
                else if (player.ServerPosition.LSDistance(target.ServerPosition) < EMaxRange)
                {
                    startPos = player.ServerPosition.LSTo2D().Extend(target.ServerPosition, E.Range).To3D();
                    var prediction = EELO.GetPrediction(target);
                    EELO.SourcePosition = startPos;
                    if (prediction.HitChance >= EloBuddy.SDK.Enumerations.HitChance.High)
                    {
                        Player.CastSpell(SpellSlot.E, prediction.UnitPosition, startPos);
                    }
                }
            }
        }
Пример #2
0
        public virtual bool HitChanceCast(EloBuddy.SDK.Spell.Skillshot spell, Obj_AI_Base target, float chance = 85)
        {
            var pred = spell.GetPrediction(target);

            if (pred.HitChancePercent >= chance)
            {
                if (spell.Cast(pred.CastPosition))
                {
                    return(true);
                }
            }

            return(false);
        }
Пример #3
0
        private static void OnTick(EventArgs args)
        {
            if (myHero.IsDead) return;

            W = new EloBuddy.SDK.Spell.Active(SpellSlot.W, (uint)(565 + 60 + W.Level * 30 + 65));
            R = new EloBuddy.SDK.Spell.Skillshot(SpellSlot.R, (uint)(900 + R.Level * 300), SkillShotType.Circular, 1500, int.MaxValue,
                225);

            if (Orbwalker.CanMove)
            {
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                {
                    if (useQ)
                    {
                        if (QIsReadyPerfectly())
                        {
                            if (!manaW || W.Level <= 0 || myHero.Mana - getSpellMana(SpellSlot.Q) >= getSpellMana(SpellSlot.W))
                            {
                                var target = TargetSelector.GetTarget(Q.Range, DamageType.Magical);
                                if (target != null)
                                {
                                    Q.Cast(target);
                                }
                            }
                        }
                    }

                    if (useW)
                    {
                        if (WIsReadyPerfectly())
                        {
                            if (EntityManager.Heroes.Enemies.Any(x => x.IsValidTarget(W.Range)))
                            {
                                W.Cast();
                            }
                        }
                    }

                    if (useE)
                    {
                        if (EIsReadyPerfectly())
                        {
                            if (!manaW || W.Level <= 0 || myHero.Mana - getSpellMana(SpellSlot.E) >= getSpellMana(SpellSlot.W))
                            {
                                var target = TargetSelector.GetTarget(E.Range, DamageType.Magical);
                                if (target != null)
                                {
                                    E.Cast(target);
                                }
                            }
                        }
                    }

                    if (useR)
                    {
                        if (RIsReadyPerfectly())
                        {
                            if (!manaW || W.Level <= 0 || myHero.Mana - getSpellMana(SpellSlot.R) >= getSpellMana(SpellSlot.W))
                            {
                                if (myHero.GetBuffCount("kogmawlivingartillerycost") < rLimit)
                                {
                                    var target = TargetSelector.GetTarget(R.Range, DamageType.Magical);
                                    if (target != null)
                                    {
                                        if (onlyRHP)
                                        {
                                            if (target.HealthPercent < hpOfTarget)
                                            {
                                                R.Cast(target);
                                            }
                                        }
                                        else
                                        {
                                            R.Cast(target);
                                        }
                                    }
                                }
                                else
                                {
                                    var killableTarget = EntityManager.Heroes.Enemies.FirstOrDefault(x => x.IsKillableAndValidTarget(myHero.GetSpellDamage(x, SpellSlot.R), DamageType.Magical, R.Range) && R.GetPrediction(x).HitChance >= EloBuddy.SDK.Enumerations.HitChance.High);
                                    if (killableTarget != null)
                                    {
                                        R.Cast(killableTarget);
                                    }
                                }
                            }
                        }
                    }
                }
                else if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
                {
                    if (useQH)
                    {
                        if (QIsReadyPerfectly())
                            if (myHero.IsManaPercentOkay(manaH))
                            {
                                var target = TargetSelector.GetTarget(Q.Range, DamageType.Magical);
                                if (target != null)
                                    Q.Cast(target);
                            }
                    }

                    if (useEH)
                    {
                        if (EIsReadyPerfectly())
                            if (myHero.IsManaPercentOkay(manaH))
                            {
                                var target = TargetSelector.GetTarget(E.Range, DamageType.Magical);
                                if (target != null)
                                    E.Cast(target);
                            }
                    }

                    if (useRH)
                    {
                        if (RIsReadyPerfectly())
                        {
                            if (myHero.IsManaPercentOkay(manaH))
                            {
                                if (myHero.GetBuffCount("kogmawlivingartillerycost") < rLimitH)
                                {
                                    var target = TargetSelector.GetTarget(R.Range, DamageType.Magical);
                                    if (target != null)
                                        R.Cast(target);
                                }
                            }
                        }
                    }
                }
                else if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
                {
                    foreach (
                        var minion in
                            EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy,
                                myHero.ServerPosition, myHero.GetAutoAttackRange()))
                    {
                        if (useELC)
                        {
                            if (myHero.IsManaPercentOkay(manaLC))
                            {
                                if (EIsReadyPerfectly())
                                {
                                    var minions =
                                        EntityManager.MinionsAndMonsters.GetLaneMinions(
                                            EntityManager.UnitTeam.Enemy, myHero.ServerPosition, E.Range);
                                    var farmLocation = EntityManager.MinionsAndMonsters.GetLineFarmLocation(
                                        minions, E.Width, (int)E.Range);
                                    if (farmLocation.HitNumber >= 3)
                                        E.Cast(farmLocation.CastPosition);
                                }
                            }
                        }

                        if (useRLC)
                        {
                            if (myHero.IsManaPercentOkay(manaLC))
                            {
                                if (RIsReadyPerfectly())
                                {
                                    if (myHero.GetBuffCount("kogmawlivingartillerycost") < rLimitLC)
                                    {
                                        var minions =
                                            EntityManager.MinionsAndMonsters.GetLaneMinions(
                                                EntityManager.UnitTeam.Enemy, myHero.ServerPosition, R.Range);
                                        var farmLocation =
                                            EntityManager.MinionsAndMonsters.GetCircularFarmLocation(minions,
                                                R.Width, (int)R.Range);
                                        if (farmLocation.HitNumber >= 2)
                                        {
                                            R.Cast(farmLocation.CastPosition);
                                        }
                                    }
                                }
                            }
                        }
                    }

                    foreach (
                        var jungleMobs in
                            ObjectManager.Get<Obj_AI_Minion>()
                                .Where(
                                    o =>
                                        o.IsValidTarget(W.Range) && o.Team == GameObjectTeam.Neutral && o.IsVisible &&
                                        !o.IsDead))
                    {
                        if (WIsReadyPerfectly())
                            if (useWJG)
                                W.Cast();

                        if (useEJG)
                        {
                            if (myHero.IsManaPercentOkay(manaJG))
                            {
                                if (EIsReadyPerfectly())
                                {
                                    var minions =
                                        EntityManager.MinionsAndMonsters.GetJungleMonsters(myHero.ServerPosition,
                                            E.Range);
                                    var farmLocation = EntityManager.MinionsAndMonsters.GetLineFarmLocation(
                                        minions, E.Width, (int)E.Range);
                                    if (farmLocation.HitNumber >= 2)
                                    {
                                        E.Cast(farmLocation.CastPosition);
                                    }
                                }
                            }
                        }

                        if (useRJG)
                        {
                            if (myHero.IsManaPercentOkay(manaJG))
                            {
                                if (RIsReadyPerfectly())
                                {
                                    if (myHero.GetBuffCount("kogmawlivingartillerycost") < rLimitJG)
                                    {
                                        var minions =
                                            EntityManager.MinionsAndMonsters.GetJungleMonsters(
                                                myHero.ServerPosition, R.Range);
                                        var farmLocation =
                                            EntityManager.MinionsAndMonsters.GetCircularFarmLocation(minions,
                                                R.Width, (int)R.Range);
                                        if (farmLocation.HitNumber >= 2)
                                        {
                                            R.Cast(farmLocation.CastPosition);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Пример #4
0
        static void Combo()
        {
            var target = EloBuddy.SDK.TargetSelector.GetTarget(Q.Range, EloBuddy.DamageType.Magical);

            if (EloBuddy.SDK.Extensions.CountEnemiesInRange(EloBuddy.ObjectManager.Player, Q.Range) <= 2)
            {
                target = EloBuddy.SDK.TargetSelector.GetTarget(Q.Range, EloBuddy.DamageType.Magical);
            }
            else if (2 < EloBuddy.SDK.Extensions.CountEnemiesInRange(EloBuddy.ObjectManager.Player, Q.Range))
            {
                target = EloBuddy.SDK.TargetSelector.GetTarget(W.Range, EloBuddy.DamageType.Magical);
            }
            if (!EloBuddy.Player.Instance.HasBuff("RyzePassiveStack") && !EloBuddy.Player.HasBuff("RyzePassiveCharged"))
            {
                if (!E.IsReady())
                {
                    if (EloBuddy.SDK.Extensions.IsValidTarget(target, Q.Range) && Q.IsReady() && QSpellCB && EloBuddy.SDK.Enumerations.HitChance.High <= Q.GetPrediction(target).HitChance)
                    {
                        Q.Cast(target);
                    }
                    if (EloBuddy.SDK.Extensions.IsValidTarget(target, W.Range) && W.IsReady() && WSpellCB)
                    {
                        W.Cast(target);
                    }
                }
                if (E.IsReady())
                {
                    if (EloBuddy.SDK.Extensions.IsValidTarget(target, E.Range) && ESpellCB)
                    {
                        E.Cast(target);
                    }
                    if (EloBuddy.SDK.Extensions.IsValidTarget(target, W.Range) && W.IsReady() && WSpellCB)
                    {
                        W.Cast(target);
                    }
                    if (EloBuddy.SDK.Extensions.IsValidTarget(target, Q.Range) && Q.IsReady() && QSpellCB && EloBuddy.SDK.Enumerations.HitChance.High <= Q.GetPrediction(target).HitChance)
                    {
                        Q.Cast(target);
                    }
                }
            }
            if (EloBuddy.Player.Instance.HasBuff("RyzePassiveStack"))
            {
                if (EloBuddy.Player.Instance.GetBuff("RyzePassiveStack").Count == 1)
                {
                    if (R.IsReady() && RSpellCB)
                    {
                        if (EloBuddy.SDK.Extensions.IsValidTarget(target, Q.Range) && !(!Q.IsReady() && E.IsReady()) || !(Q.IsReady() && !E.IsReady()))
                        {
                            R.Cast();
                        }
                    }
                    if (EloBuddy.SDK.Extensions.IsValidTarget(target, E.Range) && E.IsReady() && ESpellCB)
                    {
                        E.Cast(target);
                    }
                    if (EloBuddy.SDK.Extensions.IsValidTarget(target, Q.Range) && Q.IsReady() && QSpellCB && EloBuddy.SDK.Enumerations.HitChance.High <= Q.GetPrediction(target).HitChance)
                    {
                        Q.Cast(target);
                    }
                    if (EloBuddy.SDK.Extensions.IsValidTarget(target, W.Range) && W.IsReady() && WSpellCB)
                    {
                        W.Cast(target);
                    }
                }
                if (EloBuddy.Player.GetBuff("RyzePassiveStack").Count == 2)
                {
                    if (R.IsReady() && RSpellCB)
                    {
                        if (EloBuddy.SDK.Extensions.IsValidTarget(target, Q.Range) && !Q.IsReady() && E.IsReady())
                        {
                            R.Cast();
                        }
                        if (EloBuddy.SDK.Extensions.IsValidTarget(target, Q.Range) && Q.IsReady() && !E.IsReady())
                        {
                            R.Cast();
                        }
                        if (EloBuddy.SDK.Extensions.IsValidTarget(target, Q.Range) && !Q.IsReady() && !E.IsReady() && W.IsReady())
                        {
                            R.Cast();
                        }
                    }

                    if (EloBuddy.SDK.Extensions.IsValidTarget(target, Q.Range) && Q.IsReady() && QSpellCB && EloBuddy.SDK.Enumerations.HitChance.High <= Q.GetPrediction(target).HitChance)
                    {
                        Q.Cast(target);
                    }
                    if (EloBuddy.SDK.Extensions.IsValidTarget(target, E.Range) && E.IsReady() && ESpellCB)
                    {
                        E.Cast(target);
                    }
                    if (EloBuddy.SDK.Extensions.IsValidTarget(target, W.Range) && W.IsReady() && WSpellCB)
                    {
                        W.Cast(target);
                    }
                }
                if (EloBuddy.Player.GetBuff("RyzePassiveStack").Count == 3)
                {
                    if (R.IsReady() && RSpellCB)
                    {
                        if (EloBuddy.SDK.Extensions.IsValidTarget(target, Q.Range) && Q.IsReady())
                        {
                            R.Cast();
                        }
                    }
                    if (EloBuddy.SDK.Extensions.IsValidTarget(target, Q.Range) && Q.IsReady() && QSpellCB && EloBuddy.SDK.Enumerations.HitChance.High <= Q.GetPrediction(target).HitChance)
                    {
                        Q.Cast(target);
                    }
                    if (EloBuddy.SDK.Extensions.IsValidTarget(target, E.Range) && E.IsReady() && ESpellCB)
                    {
                        E.Cast(target);
                    }
                    if (EloBuddy.SDK.Extensions.IsValidTarget(target, W.Range) && W.IsReady() && WSpellCB && !Q.IsReady() && !E.IsReady() && !R.IsReady())
                    {
                        W.Cast(target);
                    }
                }
                if (EloBuddy.Player.GetBuff("RyzePassiveStack").Count == 4)
                {
                    if (EloBuddy.SDK.Extensions.IsValidTarget(target, W.Range) && W.IsReady() && WSpellCB)
                    {
                        W.Cast(target);
                    }
                    if (EloBuddy.SDK.Extensions.IsValidTarget(target, Q.Range) && Q.IsReady() && !W.IsReady() && QSpellCB && EloBuddy.SDK.Enumerations.HitChance.High <= Q.GetPrediction(target).HitChance)
                    {
                        Q.Cast(target);
                    }
                    if (EloBuddy.SDK.Extensions.IsValidTarget(target, E.Range) && E.IsReady() && !W.IsReady() && ESpellCB)
                    {
                        E.Cast(target);
                    }
                }
            }
            if (EloBuddy.Player.HasBuff("RyzePassiveCharged"))
            {
                if (EloBuddy.SDK.Extensions.IsValidTarget(target, W.Range) && W.IsReady() && WSpellCB)
                {
                    W.Cast(target);
                }
                if (EloBuddy.SDK.Extensions.IsValidTarget(target, Q.Range) && Q.IsReady() && QSpellCB && EloBuddy.SDK.Enumerations.HitChance.High <= Q.GetPrediction(target).HitChance&& !W.IsReady())
                {
                    Q.Cast(target);
                }
                if (EloBuddy.SDK.Extensions.IsValidTarget(target, E.Range) && E.IsReady() && ESpellCB && !W.IsReady())
                {
                    E.Cast(target);
                }
            }
        }
Пример #5
0
        private static void OnTick(EventArgs args)
        {
            if (myHero.IsDead)
            {
                return;
            }

            W = new EloBuddy.SDK.Spell.Active(SpellSlot.W, (uint)(565 + 60 + W.Level * 30 + 65));
            R = new EloBuddy.SDK.Spell.Skillshot(SpellSlot.R, (uint)(900 + R.Level * 300), SkillShotType.Circular, 1500, int.MaxValue,
                                                 225);

            if (Orbwalker.CanMove)
            {
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                {
                    if (useQ)
                    {
                        if (QIsReadyPerfectly())
                        {
                            if (!manaW || W.Level <= 0 || myHero.Mana - getSpellMana(SpellSlot.Q) >= getSpellMana(SpellSlot.W))
                            {
                                var target = TargetSelector.GetTarget(Q.Range, DamageType.Magical);
                                if (target != null)
                                {
                                    Q.Cast(target);
                                }
                            }
                        }
                    }


                    if (useW)
                    {
                        if (WIsReadyPerfectly())
                        {
                            if (EntityManager.Heroes.Enemies.Any(x => x.IsValidTarget(W.Range)))
                            {
                                W.Cast();
                            }
                        }
                    }


                    if (useE)
                    {
                        if (EIsReadyPerfectly())
                        {
                            if (!manaW || W.Level <= 0 || myHero.Mana - getSpellMana(SpellSlot.E) >= getSpellMana(SpellSlot.W))
                            {
                                var target = TargetSelector.GetTarget(E.Range, DamageType.Magical);
                                if (target != null)
                                {
                                    E.Cast(target);
                                }
                            }
                        }
                    }


                    if (useR)
                    {
                        if (RIsReadyPerfectly())
                        {
                            if (!manaW || W.Level <= 0 || myHero.Mana - getSpellMana(SpellSlot.R) >= getSpellMana(SpellSlot.W))
                            {
                                if (myHero.GetBuffCount("kogmawlivingartillerycost") < rLimit)
                                {
                                    var target = TargetSelector.GetTarget(R.Range, DamageType.Magical);
                                    if (target != null)
                                    {
                                        if (onlyRHP)
                                        {
                                            if (target.HealthPercent < hpOfTarget)
                                            {
                                                R.Cast(target);
                                            }
                                        }
                                        else
                                        {
                                            R.Cast(target);
                                        }
                                    }
                                }
                                else
                                {
                                    var killableTarget = EntityManager.Heroes.Enemies.FirstOrDefault(x => x.IsKillableAndValidTarget(myHero.GetSpellDamage(x, SpellSlot.R), DamageType.Magical, R.Range) && R.GetPrediction(x).HitChance >= EloBuddy.SDK.Enumerations.HitChance.High);
                                    if (killableTarget != null)
                                    {
                                        R.Cast(killableTarget);
                                    }
                                }
                            }
                        }
                    }
                }
                else if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
                {
                    if (useQH)
                    {
                        if (QIsReadyPerfectly())
                        {
                            if (myHero.IsManaPercentOkay(manaH))
                            {
                                var target = TargetSelector.GetTarget(Q.Range, DamageType.Magical);
                                if (target != null)
                                {
                                    Q.Cast(target);
                                }
                            }
                        }
                    }

                    if (useEH)
                    {
                        if (EIsReadyPerfectly())
                        {
                            if (myHero.IsManaPercentOkay(manaH))
                            {
                                var target = TargetSelector.GetTarget(E.Range, DamageType.Magical);
                                if (target != null)
                                {
                                    E.Cast(target);
                                }
                            }
                        }
                    }


                    if (useRH)
                    {
                        if (RIsReadyPerfectly())
                        {
                            if (myHero.IsManaPercentOkay(manaH))
                            {
                                if (myHero.GetBuffCount("kogmawlivingartillerycost") < rLimitH)
                                {
                                    var target = TargetSelector.GetTarget(R.Range, DamageType.Magical);
                                    if (target != null)
                                    {
                                        R.Cast(target);
                                    }
                                }
                            }
                        }
                    }
                }
                else if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
                {
                    foreach (
                        var minion in
                        EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy,
                                                                        myHero.ServerPosition, myHero.GetAutoAttackRange()))
                    {
                        if (useELC)
                        {
                            if (myHero.IsManaPercentOkay(manaLC))
                            {
                                if (EIsReadyPerfectly())
                                {
                                    var minions =
                                        EntityManager.MinionsAndMonsters.GetLaneMinions(
                                            EntityManager.UnitTeam.Enemy, myHero.ServerPosition, E.Range);
                                    var farmLocation = EntityManager.MinionsAndMonsters.GetLineFarmLocation(
                                        minions, E.Width, (int)E.Range);
                                    if (farmLocation.HitNumber >= 3)
                                    {
                                        E.Cast(farmLocation.CastPosition);
                                    }
                                }
                            }
                        }

                        if (useRLC)
                        {
                            if (myHero.IsManaPercentOkay(manaLC))
                            {
                                if (RIsReadyPerfectly())
                                {
                                    if (myHero.GetBuffCount("kogmawlivingartillerycost") < rLimitLC)
                                    {
                                        var minions =
                                            EntityManager.MinionsAndMonsters.GetLaneMinions(
                                                EntityManager.UnitTeam.Enemy, myHero.ServerPosition, R.Range);
                                        var farmLocation =
                                            EntityManager.MinionsAndMonsters.GetCircularFarmLocation(minions,
                                                                                                     R.Width, (int)R.Range);
                                        if (farmLocation.HitNumber >= 2)
                                        {
                                            R.Cast(farmLocation.CastPosition);
                                        }
                                    }
                                }
                            }
                        }
                    }

                    foreach (
                        var jungleMobs in
                        ObjectManager.Get <Obj_AI_Minion>()
                        .Where(
                            o =>
                            o.IsValidTarget(W.Range) && o.Team == GameObjectTeam.Neutral && o.IsVisible &&
                            !o.IsDead))
                    {
                        if (WIsReadyPerfectly())
                        {
                            if (useWJG)
                            {
                                W.Cast();
                            }
                        }

                        if (useEJG)
                        {
                            if (myHero.IsManaPercentOkay(manaJG))
                            {
                                if (EIsReadyPerfectly())
                                {
                                    var minions =
                                        EntityManager.MinionsAndMonsters.GetJungleMonsters(myHero.ServerPosition,
                                                                                           E.Range);
                                    var farmLocation = EntityManager.MinionsAndMonsters.GetLineFarmLocation(
                                        minions, E.Width, (int)E.Range);
                                    if (farmLocation.HitNumber >= 2)
                                    {
                                        E.Cast(farmLocation.CastPosition);
                                    }
                                }
                            }
                        }

                        if (useRJG)
                        {
                            if (myHero.IsManaPercentOkay(manaJG))
                            {
                                if (RIsReadyPerfectly())
                                {
                                    if (myHero.GetBuffCount("kogmawlivingartillerycost") < rLimitJG)
                                    {
                                        var minions =
                                            EntityManager.MinionsAndMonsters.GetJungleMonsters(
                                                myHero.ServerPosition, R.Range);
                                        var farmLocation =
                                            EntityManager.MinionsAndMonsters.GetCircularFarmLocation(minions,
                                                                                                     R.Width, (int)R.Range);
                                        if (farmLocation.HitNumber >= 2)
                                        {
                                            R.Cast(farmLocation.CastPosition);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }