Example #1
0
        /// <summary>
        /// Called when Game Draws
        /// </summary>
        /// <param name="args">The Args</param>
        private static void Drawing_OnDraw(EventArgs args)
        {
            if (Essentials.CatForm())
            {
                return;
            }

            if (NidaleeMenu.DrawingMenu["drawQH"].Cast <CheckBox>().CurrentValue)
            {
                Circle.Draw(QHuman.IsReady() ? SharpDX.Color.Green : SharpDX.Color.Red, QHuman.Range,
                            Player.Instance.Position);
            }

            if (NidaleeMenu.DrawingMenu["drawPred"].Cast <CheckBox>().CurrentValue)
            {
                var enemy =
                    EntityManager.Heroes.Enemies.Where(t => t.IsValidTarget() && QHuman.IsInRange(t))
                    .OrderBy(t => t.Distance(Player.Instance))
                    .FirstOrDefault();

                if (enemy != null)
                {
                    var qPred = QHuman.GetPrediction(enemy).CastPosition;
                    Essentials.DrawLineRectangle(qPred.To2D(), Player.Instance.Position.To2D(), QHuman.Width, 1,
                                                 QHuman.IsReady() ? System.Drawing.Color.Yellow : System.Drawing.Color.Red);
                }
            }
        }
Example #2
0
        /// <summary>
        /// Called when a Minion is unkillable
        /// </summary>
        /// <param name="target"></param>
        /// <param name="args"></param>
        private static void Orbwalker_OnUnkillableMinion(Obj_AI_Base target, Orbwalker.UnkillableMinionArgs args)
        {
            var useQC = NidaleeMenu.LastHitMenu["useQC"].Cast <CheckBox>().CurrentValue;
            var useEC = NidaleeMenu.LastHitMenu["useEC"].Cast <CheckBox>().CurrentValue;
            var useR  = NidaleeMenu.LastHitMenu["useR"].Cast <CheckBox>().CurrentValue;

            if (target == null)
            {
                return;
            }

            if (Essentials.CatForm())
            {
                if (useQC && QCat.IsReady() && target.IsValidTarget(QCat.Range) &&
                    Essentials.DamageLibrary.CalculateDamage(target, true, false, false, false) >= args.RemainingHealth)
                {
                    QCat.Cast(target);
                }

                if (useEC && ECat.IsReady() && target.IsValidTarget(ECat.Range) &&
                    Essentials.DamageLibrary.CalculateDamage(target, false, false, true, false) >= args.RemainingHealth)
                {
                    ECat.Cast(target.ServerPosition);
                }

                if (useR && R.IsReady() && !Player.Instance.IsInAutoAttackRange(target) &&
                    Player.Instance.Distance(target) <= Essentials.HumanRange &&
                    args.RemainingHealth <= Player.Instance.GetAutoAttackDamage(target))
                {
                    R.Cast();
                    Orbwalker.ForcedTarget = target;
                }
            }
        }
Example #3
0
        /// <summary>
        /// Automatically Heals Player and Allies
        /// </summary>
        /// <param name="args"></param>
        public static void AutoE(EventArgs args)
        {
            if (Essentials.CatForm())
            {
                return;
            }

            if (!Program.EHuman.IsReady() || Player.Instance.IsRecalling())
            {
                return;
            }

            var lowestHealthAlly = EntityManager.Heroes.Allies.Where(a => Program.EHuman.IsInRange(a) && !a.IsMe).OrderBy(a => a.Health).FirstOrDefault();

            if (Player.Instance.HealthPercent <= NidaleeMenu.MiscMenu["autoHealPercent"].Cast <Slider>().CurrentValue&&
                NidaleeMenu.MiscMenu["autoHeal_" + Player.Instance.BaseSkinName].Cast <CheckBox>().CurrentValue)
            {
                Program.EHuman.Cast(Player.Instance);
            }

            if (lowestHealthAlly == null)
            {
                return;
            }

            if (!(lowestHealthAlly.Health <= NidaleeMenu.MiscMenu["autoHealPercent"].Cast <Slider>().CurrentValue))
            {
                return;
            }
            if (NidaleeMenu.MiscMenu["autoHeal_" + lowestHealthAlly.BaseSkinName].Cast <CheckBox>().CurrentValue)
            {
                Program.EHuman.Cast(lowestHealthAlly);
            }
        }
Example #4
0
        /// <summary>
        /// Called when Loading is Completed
        /// </summary>
        /// <param name="args">The Args</param>
        private static void Loading_OnLoadingComplete(EventArgs args)
        {
            if (Player.Instance.Hero != Champion.Nidalee)
            {
                return;
            }

            // Human Form
            QHuman = new Spell.Skillshot(SpellSlot.Q, 1500, SkillShotType.Linear, 250, 1300, 40)
            {
                AllowedCollisionCount = 0
            };
            WHuman = new Spell.Skillshot(SpellSlot.W, 875, SkillShotType.Circular, 250, int.MaxValue, 100);
            EHuman = new Spell.Targeted(SpellSlot.E, 600);
            R      = new Spell.Active(SpellSlot.R, int.MaxValue);

            // Javelin Toss -> Pounce
            WExtended = new Spell.Skillshot(SpellSlot.W, 740, SkillShotType.Circular, 500, int.MaxValue, 400);

            // Cougar Form
            QCat = new Spell.Targeted(SpellSlot.Q, 400);
            WCat = new Spell.Skillshot(SpellSlot.W, 375, SkillShotType.Circular, 500, int.MaxValue, 400);
            ECat = new Spell.Skillshot(SpellSlot.E, 300, SkillShotType.Cone, 250, int.MaxValue, (int)(15.00 * Math.PI / 180.00));

            // Ignite
            if (Essentials.HasSpell("ignite"))
            {
                Ignite = new Spell.Targeted(ObjectManager.Player.GetSpellSlotFromName("summonerdot"), 600);
            }

            // Smite
            if (Essentials.HasSpell("smite"))
            {
                //Essentials.SetSmiteSlot();
            }

            // Initializes the Menu
            NidaleeMenu.Create();

            // Initializes the DamageIndicator
            Indicator = new DamageIndicator.DamageIndicator();

            // Prints Success Message
            Chat.Print("Sucessfully Injected NidaleeBuddy Evolution", System.Drawing.Color.Green);

            // Events
            Game.OnUpdate                  += Game_OnUpdate;
            Game.OnUpdate                  += Events.SpellsOnUpdate;
            Game.OnUpdate                  += Events.KillSteal;
            Game.OnUpdate                  += Events.JungleSteal;
            Game.OnUpdate                  += Events.AutoE;
            Orbwalker.OnPostAttack         += Orbwalker_OnPostAttack;
            Orbwalker.OnPreAttack          += Orbwalker_OnPreAttack;
            Orbwalker.OnUnkillableMinion   += Orbwalker_OnUnkillableMinion;
            Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;
            GameObject.OnDelete            += GameObject_OnDelete;
            Drawing.OnDraw                 += Drawing_OnDraw;
        }
Example #5
0
        /// <summary>
        /// Called when a Game Object Gets Deleted
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private static void GameObject_OnDelete(GameObject sender, EventArgs args)
        {
            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                return;
            }

            var missile = sender as MissileClient;

            if (missile != null)
            {
                if (missile.SpellCaster.IsMe && missile.SData.Name == "JavelinToss")
                {
                    var target =
                        EntityManager.Heroes.Enemies.FirstOrDefault(Essentials.IsHunted);

                    if (target == null)
                    {
                        return;
                    }

                    if (!WExtended.IsInRange(target))
                    {
                        Essentials.LastHuntedTarget = target;
                        return;
                    }

                    if (Essentials.IsReady(Essentials.SpellTimer["ExPounce"]))
                    {
                        if (!Essentials.CatForm() && Essentials.ShouldUseSpell(target, SpellSlot.R, NidaleeMenu.ComboMenu))
                        {
                            R.Cast();
                            Core.DelayAction(() =>
                            {
                                if (Essentials.ShouldUseSpell(target, SpellSlot.W, NidaleeMenu.ComboMenu))
                                {
                                    WExtended.Cast(target.ServerPosition);
                                }
                            }, R.CastDelay);
                        }
                        else if (Essentials.CatForm())
                        {
                            if (Essentials.ShouldUseSpell(target, SpellSlot.W, NidaleeMenu.ComboMenu))
                            {
                                WExtended.Cast(target.ServerPosition);
                            }
                        }
                    }
                }
            }
        }
Example #6
0
        /// <summary>
        /// Called when a spell gets casted.
        /// </summary>
        /// <param name="sender">The Sender</param>
        /// <param name="args">The Args</param>
        private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (sender.IsMe && args.SData.Name.ToLower() == "pounce")
            {
                var unit = args.Target as AIHeroClient;

                if (unit == null)
                {
                    return;
                }

                if (unit.IsValidTarget() && Essentials.IsHunted(unit))
                {
                    Essentials.TimeStamp["Pounce"] = Game.Time + 1.5f;
                }
                else
                {
                    Essentials.TimeStamp["Pounce"] = Game.Time + (5 + (5 * Player.Instance.PercentCooldownMod));
                }
            }

            if (sender.IsMe && args.SData.Name.ToLower() == "swipe")
            {
                Essentials.TimeStamp["Swipe"] = Game.Time + (5 + (5 * Player.Instance.PercentCooldownMod));
            }

            if (sender.IsMe && args.SData.Name.ToLower() == "primalsurge")
            {
                Essentials.TimeStamp["Primalsurge"] = Game.Time + (12 + (12 * Player.Instance.PercentCooldownMod));
            }

            if (sender.IsMe && args.SData.Name.ToLower() == "bushwhack")
            {
                var wperlevel = new[] { 0, 13, 12, 11, 10, 9 }[WCat.Level];
                Essentials.TimeStamp["Bushwhack"] = Game.Time +
                                                    (wperlevel + (wperlevel * Player.Instance.PercentCooldownMod));
            }

            if (sender.IsMe && args.SData.Name.ToLower() == "javelintoss")
            {
                Essentials.TimeStamp["Javelin"] = Game.Time + (6 + (6 * Player.Instance.PercentCooldownMod));
            }

            if (sender.IsMe && args.SData.IsAutoAttack() && Player.Instance.HasBuff("Takedown"))
            {
                Essentials.TimeStamp["Takedown"] = Game.Time + (5 + (5 * Player.Instance.PercentCooldownMod));
            }
        }
        /// <summary>
        /// Executes the Spells to steal jungle
        /// </summary>
        /// <param name="mob"></param>
        private static void StealJungle(Obj_AI_Base mob)
        {
            if (mob == null)
            {
                return;
            }

            if (!NidaleeMenu.JungleStealMenu[mob.BaseSkinName].Cast <CheckBox>().CurrentValue)
            {
                return;
            }

            var useSmite = NidaleeMenu.JungleStealMenu["useSmite"].Cast <CheckBox>().CurrentValue;
            var toggleK  = NidaleeMenu.JungleStealMenu["toggleK"].Cast <KeyBind>().CurrentValue;

            if (useSmite && toggleK)
            {
                if (Program.Smite != null)
                {
                    if (mob.IsValidTarget(Program.Smite.Range) &&
                        mob.Health <= Essentials.GetSmiteDamage(mob))
                    {
                        Program.Smite.Cast(mob);
                    }
                }
            }

            var useQ = NidaleeMenu.JungleStealMenu["useQH"].Cast <CheckBox>().CurrentValue;

            if (useQ && !Essentials.CatForm())
            {
                if (mob.IsValidTarget() &&
                    Essentials.IsReady(Essentials.SpellTimer["Javelin"]) &&
                    mob.Health <= Essentials.DamageLibrary.CalculateDamage(mob, true, false, false, false))
                {
                    var pred = Program.QHuman.GetPrediction(mob);

                    if (pred != null &&
                        pred.HitChancePercent >=
                        NidaleeMenu.JungleStealMenu["predQH"].Cast <Slider>().CurrentValue)
                    {
                        Program.QHuman.Cast(pred.CastPosition);
                    }
                }
            }
        }
        /// <summary>
        /// Does Harass
        /// </summary>
        public static void Harass()
        {
            if (Essentials.CatForm() && Essentials.IsReady(Essentials.SpellTimer["Javelin"]) &&
                Essentials.ShouldUseSpell(null, SpellSlot.R, NidaleeMenu.HarassMenu))
            {
                Program.R.Cast();
            }

            var qTarget = TargetSelector.GetTarget(Program.QHuman.Range, DamageType.Magical);

            if (!Essentials.CatForm() && Essentials.ShouldUseSpell(qTarget, SpellSlot.Q, NidaleeMenu.HarassMenu))
            {
                var pred = Program.QHuman.GetPrediction(qTarget);

                if (pred != null &&
                    pred.HitChancePercent >= NidaleeMenu.HarassMenu["predQH"].Cast <Slider>().CurrentValue)
                {
                    Program.QHuman.Cast(pred.CastPosition);
                }
            }
        }
        /// <summary>
        /// Steals Jungle Mobs
        /// </summary>
        /// <param name="args"></param>
        public static void JungleSteal(EventArgs args)
        {
            if (Essentials.HasSpell("smite"))
            {
                Essentials.SetSmiteSlot();
            }

            if (Game.MapId == GameMapId.SummonersRift)
            {
                var mob =
                    EntityManager.MinionsAndMonsters.GetJungleMonsters(Player.Instance.ServerPosition,
                                                                       Program.QHuman.Range)
                    .Where(t => Essentials.JungleMobsList.Contains(t.BaseSkinName))
                    .OrderByDescending(t => t.MaxHealth)
                    .FirstOrDefault();

                if (mob != null)
                {
                    StealJungle(mob);
                }
            }

            if (Game.MapId == GameMapId.TwistedTreeline)
            {
                var mob = EntityManager.MinionsAndMonsters.GetJungleMonsters(Player.Instance.ServerPosition,
                                                                             Program.QHuman.Range)
                          .Where(t => Essentials.JungleMobsListTwistedTreeline.Contains(t.BaseSkinName))
                          .OrderByDescending(t => t.MaxHealth)
                          .FirstOrDefault();

                if (mob != null)
                {
                    StealJungle(mob);
                }
            }
        }
        /// <summary>
        /// Does Jungle Clear
        /// </summary>
        public static void JungleClear()
        {
            var useQH    = NidaleeMenu.JungleClearMenu["useQH"].Cast <CheckBox>().CurrentValue;
            var useQC    = NidaleeMenu.JungleClearMenu["useQC"].Cast <CheckBox>().CurrentValue;
            var useWC    = NidaleeMenu.JungleClearMenu["useWC"].Cast <CheckBox>().CurrentValue;
            var useEC    = NidaleeMenu.JungleClearMenu["useEC"].Cast <CheckBox>().CurrentValue;
            var useR     = NidaleeMenu.JungleClearMenu["useR"].Cast <CheckBox>().CurrentValue;
            var predQH   = NidaleeMenu.JungleClearMenu["predQH"].Cast <Slider>().CurrentValue;
            var predWC   = NidaleeMenu.JungleClearMenu["predWC"].Cast <Slider>().CurrentValue;
            var predEC   = NidaleeMenu.JungleClearMenu["predEC"].Cast <Slider>().CurrentValue;
            var onUpdate = NidaleeMenu.MiscMenu["useQC_OnUpdate"].Cast <CheckBox>().CurrentValue;

            if (!Essentials.CatForm())
            {
                if (useQH)
                {
                    var jungleMob =
                        EntityManager.MinionsAndMonsters.GetJungleMonsters(Player.Instance.ServerPosition,
                                                                           Program.QHuman.Range)
                        .Where(t => t.IsValidTarget() && Essentials.JungleMobsList.Contains(t.BaseSkinName))
                        .OrderByDescending(t => t.MaxHealth)
                        .FirstOrDefault();

                    if (jungleMob != null && Program.QHuman.IsReady())
                    {
                        var pred = Program.QHuman.GetPrediction(jungleMob);

                        if (pred != null && pred.HitChancePercent >= predQH)
                        {
                            Program.QHuman.Cast(pred.CastPosition);
                        }
                    }
                }

                var m = EntityManager.MinionsAndMonsters.GetJungleMonsters(Player.Instance.ServerPosition,
                                                                           Essentials.CatRange).FirstOrDefault();

                if (useR && m != null && Program.R.IsReady() && !Essentials.IsReady(Essentials.SpellTimer["Javelin"]) &&
                    Essentials.IsReady(Essentials.SpellTimer["Takedown"]) &&
                    Essentials.IsReady(Essentials.SpellTimer["Pounce"]) &&
                    Essentials.IsReady(Essentials.SpellTimer["Swipe"]))
                {
                    Program.R.Cast();
                }

                var huntedMob = EntityManager.MinionsAndMonsters.GetJungleMonsters(Player.Instance.ServerPosition,
                                                                                   Program.WExtended.Range)
                                .FirstOrDefault(t => Essentials.IsHunted(t) && t.IsValidTarget(Program.WExtended.Range));

                if (useR && Program.R.IsReady() && huntedMob != null &&
                    Essentials.IsReady(Essentials.SpellTimer["ExPounce"]))
                {
                    Program.R.Cast();
                    Core.DelayAction(() =>
                    {
                        if (useWC)
                        {
                            var pred = Program.WExtended.GetPrediction(huntedMob);

                            if (pred != null && pred.HitChancePercent >= predWC)
                            {
                                Program.WExtended.Cast(pred.CastPosition);
                            }
                        }
                    }, Program.R.CastDelay);
                }
            }
            else if (Essentials.CatForm())
            {
                if (useQC && onUpdate)
                {
                    var qTarget = EntityManager.MinionsAndMonsters.GetJungleMonsters(Player.Instance.ServerPosition,
                                                                                     Program.QCat.Range).OrderByDescending(t => t.MaxHealth).FirstOrDefault(t => t.IsValidTarget());

                    if (qTarget != null)
                    {
                        Program.QCat.Cast(qTarget);
                    }
                }

                if (useWC)
                {
                    if (Essentials.LastHuntedTarget != null)
                    {
                        var pred = Program.WExtended.GetPrediction(Essentials.LastHuntedTarget);

                        if (pred != null && pred.HitChancePercent >= predWC)
                        {
                            Program.WExtended.Cast(pred.CastPosition);
                        }
                    }

                    var huntedMob = EntityManager.MinionsAndMonsters.GetJungleMonsters(Player.Instance.ServerPosition,
                                                                                       Program.WExtended.Range)
                                    .FirstOrDefault(t => Essentials.IsHunted(t) && t.IsValidTarget(Program.WExtended.Range));

                    if (huntedMob != null)
                    {
                        var pred = Program.WExtended.GetPrediction(huntedMob);

                        if (pred != null && pred.HitChancePercent >= predWC)
                        {
                            Program.WExtended.Cast(pred.CastPosition);
                        }
                    }

                    var wTarget =
                        EntityManager.MinionsAndMonsters.GetJungleMonsters(Player.Instance.ServerPosition,
                                                                           Program.WCat.Range)
                        .OrderByDescending(t => t.MaxHealth)
                        .FirstOrDefault(t => t.IsValidTarget());

                    if (wTarget != null)
                    {
                        var pred = Program.WCat.GetPrediction(wTarget);

                        if (pred != null && pred.HitChancePercent >= predWC)
                        {
                            Program.WCat.Cast(pred.CastPosition);
                        }
                    }
                }

                if (useEC)
                {
                    var eTarget =
                        EntityManager.MinionsAndMonsters.Monsters.Where(t => t.IsValidTarget(Program.ECat.Range))
                        .ToArray();

                    var ePrediction = EntityManager.MinionsAndMonsters.GetCircularFarmLocation(eTarget,
                                                                                               Program.ECat.Range,
                                                                                               Program.ECat.ConeAngleDegrees, Program.ECat.CastDelay, Program.ECat.Speed);

                    if (ePrediction.HitNumber >= predEC)
                    {
                        Program.ECat.Cast(ePrediction.CastPosition);
                    }
                }

                var qHTarget =
                    EntityManager.MinionsAndMonsters.GetJungleMonsters(Player.Instance.ServerPosition,
                                                                       Program.QHuman.Range).FirstOrDefault();

                if (qHTarget == null)
                {
                    return;
                }

                if (useR && Program.R.IsReady() && Essentials.IsReady(Essentials.SpellTimer["Javelin"]))
                {
                    Program.R.Cast();
                }
            }
        }
        /// <summary>
        /// Does Lane Clear
        /// </summary>
        public static void LaneClear()
        {
            var useQC    = NidaleeMenu.LaneClearMenu["useQC"].Cast <CheckBox>().CurrentValue;
            var useWC    = NidaleeMenu.LaneClearMenu["useWC"].Cast <CheckBox>().CurrentValue;
            var useEC    = NidaleeMenu.LaneClearMenu["useEC"].Cast <CheckBox>().CurrentValue;
            var useR     = NidaleeMenu.LaneClearMenu["useR"].Cast <CheckBox>().CurrentValue;
            var predWC   = NidaleeMenu.LaneClearMenu["predWC"].Cast <Slider>().CurrentValue;
            var predEC   = NidaleeMenu.LaneClearMenu["predEC"].Cast <Slider>().CurrentValue;
            var onUpdate = NidaleeMenu.MiscMenu["useQC_OnUpdate"].Cast <CheckBox>().CurrentValue;

            if (Essentials.CatForm())
            {
                if (useQC && onUpdate)
                {
                    var minion = EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy,
                                                                                 Player.Instance.ServerPosition, Program.QCat.Range).FirstOrDefault(t => t.IsValidTarget());

                    if (minion != null &&
                        minion.Health <= Essentials.DamageLibrary.CalculateDamage(minion, true, false, false, false))
                    {
                        Program.QCat.Cast(minion);
                    }
                }

                if (useWC)
                {
                    var turret =
                        EntityManager.Turrets.Enemies.FirstOrDefault(
                            t => t.IsValidTarget() && t.IsInAutoAttackRange(Player.Instance));

                    if (turret == null)
                    {
                        var minion = EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy,
                                                                                     Player.Instance.ServerPosition, Program.WExtended.Range)
                                     .Where(t => t.IsValidTarget() && !Essentials.IsHunted(t));

                        var minionH = EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy,
                                                                                      Player.Instance.ServerPosition, Program.WExtended.Range)
                                      .Where(t => t.IsValidTarget() && Essentials.IsHunted(t));

                        var pred = EntityManager.MinionsAndMonsters.GetCircularFarmLocation(minion, Program.WCat.Width,
                                                                                            (int)Program.WCat.Range);

                        var predH = EntityManager.MinionsAndMonsters.GetCircularFarmLocation(minionH,
                                                                                             Program.WExtended.Width,
                                                                                             (int)Program.WExtended.Range);

                        if (pred.HitNumber >= predWC)
                        {
                            Program.WCat.Cast(pred.CastPosition);
                        }

                        if (predH.HitNumber >= predWC)
                        {
                            Program.WExtended.Cast(predH.CastPosition);
                        }
                    }
                }

                if (useEC)
                {
                    var minion = EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy,
                                                                                 Player.Instance.ServerPosition, Program.ECat.Range).Where(t => t.IsValidTarget());

                    var ePrediction = EntityManager.MinionsAndMonsters.GetCircularFarmLocation(minion,
                                                                                               Program.ECat.Range,
                                                                                               Program.ECat.ConeAngleDegrees, Program.ECat.CastDelay, Program.ECat.Speed);

                    if (ePrediction.HitNumber >= predEC)
                    {
                        Program.ECat.Cast(ePrediction.CastPosition);
                    }
                }

                if (useR && Program.R.IsReady() && !Essentials.IsReady(Essentials.SpellTimer["Takedown"]) &&
                    !Essentials.IsReady(Essentials.SpellTimer["Pounce"]) &&
                    !Essentials.IsReady(Essentials.SpellTimer["Swipe"]))
                {
                    Program.R.Cast();
                }
            }
            else if (!Essentials.CatForm())
            {
                var minion =
                    EntityManager.MinionsAndMonsters.EnemyMinions.FirstOrDefault(
                        t => t.IsValidTarget(Essentials.CatRange));

                if (minion == null)
                {
                    return;
                }

                if (useR && Program.R.IsReady() &&
                    Essentials.IsReady(Essentials.SpellTimer["Takedown"]) &&
                    Essentials.IsReady(Essentials.SpellTimer["Pounce"]) &&
                    Essentials.IsReady(Essentials.SpellTimer["Swipe"]))
                {
                    Program.R.Cast();
                }
            }
        }
        /// <summary>
        /// Does Combo
        /// </summary>
        public static void Combo()
        {
            var onUpdate = NidaleeMenu.MiscMenu["useQC_OnUpdate"].Cast <CheckBox>().CurrentValue;

            // Sliders
            var predQH = NidaleeMenu.ComboMenu["predQH"].Cast <Slider>().CurrentValue;
            var predWH = NidaleeMenu.ComboMenu["predWH"].Cast <Slider>().CurrentValue;
            var predWC = NidaleeMenu.ComboMenu["predWC"].Cast <Slider>().CurrentValue;
            var predEC = NidaleeMenu.ComboMenu["predEC"].Cast <Slider>().CurrentValue;

            if (!Essentials.CatForm())
            {
                var qTarget = TargetSelector.GetTarget(Program.QHuman.Range, DamageType.Magical);

                if (qTarget != null && Essentials.ShouldUseSpell(qTarget, SpellSlot.Q, NidaleeMenu.ComboMenu))
                {
                    var pred = Program.QHuman.GetPrediction(qTarget);

                    if (pred != null && pred.HitChancePercent >= predQH)
                    {
                        Program.QHuman.Cast(pred.CastPosition);
                    }
                }

                var wTarget = TargetSelector.GetTarget(Program.WHuman.Range, DamageType.Magical);

                if (wTarget != null && Essentials.ShouldUseSpell(wTarget, SpellSlot.W, NidaleeMenu.ComboMenu))
                {
                    var pred = Program.WHuman.GetPrediction(wTarget);

                    if (pred != null && pred.HitChancePercent >= predWH)
                    {
                        Program.WHuman.Cast(pred.CastPosition);
                    }
                }

                #region R Logic

                /* Changing to Cat Form Logic */

                if (!Essentials.ShouldUseSpell(null, SpellSlot.R, NidaleeMenu.HarassMenu))
                {
                    return;
                }

                if (Essentials.LastHuntedTarget != null && Program.WExtended.IsLearned &&
                    Program.WExtended.IsInRange(Essentials.LastHuntedTarget) &&
                    Essentials.IsReady(Essentials.SpellTimer["Takedown"]) &&
                    Essentials.IsReady(Essentials.SpellTimer["Pounce"]) &&
                    Essentials.IsReady(Essentials.SpellTimer["ExPounce"]) &&
                    Essentials.IsReady(Essentials.SpellTimer["Swipe"]))
                {
                    Program.R.Cast();
                    Core.DelayAction(() =>
                    {
                        if (Essentials.ShouldUseSpell(Essentials.LastHuntedTarget, SpellSlot.W, NidaleeMenu.ComboMenu))
                        {
                            Program.WExtended.Cast(Essentials.LastHuntedTarget.ServerPosition);
                            Essentials.LastHuntedTarget = null;
                        }
                    }, Program.R.CastDelay);
                }

                var wETarget = TargetSelector.GetTarget(Program.WExtended.Range, DamageType.Magical);

                if (wETarget != null && Program.WExtended.IsLearned && Essentials.IsHunted(wETarget) &&
                    (Essentials.IsReady(Essentials.SpellTimer["Takedown"]) &&
                     Essentials.IsReady(Essentials.SpellTimer["ExPounce"]) &&
                     Essentials.IsReady(Essentials.SpellTimer["Swipe"])))
                {
                    Program.R.Cast();
                }

                var wCTarget = TargetSelector.GetTarget(Program.WCat.Range, DamageType.Magical);

                if (wCTarget != null && Program.WCat.IsLearned &&
                    (Essentials.IsReady(Essentials.SpellTimer["Takedown"]) &&
                     Essentials.IsReady(Essentials.SpellTimer["Pounce"]) &&
                     Essentials.IsReady(Essentials.SpellTimer["Swipe"])))
                {
                    Program.R.Cast();
                    Core.DelayAction(() =>
                    {
                        if (Essentials.ShouldUseSpell(wCTarget, SpellSlot.W, NidaleeMenu.ComboMenu))
                        {
                            Program.WCat.Cast(wCTarget.ServerPosition);
                        }
                    }, Program.R.CastDelay);
                }

                #endregion
            }
            else
            {
                var qTarget = TargetSelector.GetTarget(Program.QCat.Range, DamageType.Mixed);

                if (qTarget != null && onUpdate &&
                    Essentials.ShouldUseSpell(qTarget, SpellSlot.Q, NidaleeMenu.ComboMenu))
                {
                    Program.QCat.Cast(qTarget);
                }

                var wTarget = TargetSelector.GetTarget(Program.WExtended.Range, DamageType.Magical);

                if (wTarget != null && Essentials.ShouldUseSpell(wTarget, SpellSlot.W, NidaleeMenu.ComboMenu))
                {
                    if (Essentials.IsHunted(wTarget))
                    {
                        var pred = Program.WExtended.GetPrediction(wTarget);

                        if (pred != null && pred.HitChancePercent >= predWC)
                        {
                            Program.WExtended.Cast(pred.CastPosition);
                        }
                    }
                    else if (!Essentials.IsHunted(wTarget))
                    {
                        var pred = Program.WCat.GetPrediction(wTarget);

                        if (pred != null && pred.HitChancePercent >= predWC)
                        {
                            Program.WCat.Cast(pred.CastPosition);
                        }
                    }
                }

                var eTarget = TargetSelector.GetTarget(Program.ECat.Range, DamageType.Magical);

                if (eTarget != null && Essentials.ShouldUseSpell(eTarget, SpellSlot.E, NidaleeMenu.ComboMenu))
                {
                    var pred = Program.ECat.GetPrediction(eTarget);

                    if (pred != null && pred.HitChancePercent >= predEC)
                    {
                        Program.ECat.Cast(pred.CastPosition);
                    }
                }

                #region R Logic

                /* Changing to Human Form Logic */

                if (!Essentials.ShouldUseSpell(null, SpellSlot.R, NidaleeMenu.ComboMenu) ||
                    !Essentials.IsReady(Essentials.SpellTimer["Swipe"]) ||
                    !Essentials.IsReady(Essentials.SpellTimer["Pounce"]) ||
                    !Essentials.IsReady(Essentials.SpellTimer["ExPounce"]) ||
                    !Essentials.IsReady(Essentials.SpellTimer["Takedown"]))
                {
                    return;
                }

                var qHTarget = TargetSelector.GetTarget(Program.QHuman.Range, DamageType.Magical);

                if (qHTarget != null && (Essentials.IsReady(Essentials.SpellTimer["Javelin"])))
                {
                    Program.R.Cast();
                    Core.DelayAction(() =>
                    {
                        if (!Essentials.ShouldUseSpell(qHTarget, SpellSlot.Q, NidaleeMenu.ComboMenu))
                        {
                            return;
                        }

                        var pred = Program.QHuman.GetPrediction(qHTarget);

                        if (pred != null && pred.HitChancePercent >= predQH)
                        {
                            Program.QHuman.Cast(pred.CastPosition);
                        }
                    }, Program.R.CastDelay);
                }

                var eHTarget =
                    EntityManager.Heroes.Allies.FirstOrDefault(
                        t =>
                        Program.EHuman.IsInRange(t) &&
                        t.Health <= NidaleeMenu.MiscMenu["autoHealPercent"].Cast <Slider>().CurrentValue);

                if (eHTarget != null && NidaleeMenu.MiscMenu["autoHeal"].Cast <CheckBox>().CurrentValue&&
                    NidaleeMenu.MiscMenu["autoHeal_" + eHTarget.BaseSkinName].Cast <CheckBox>().CurrentValue&&
                    (Essentials.IsReady(Essentials.SpellTimer["Primalsurge"])))
                {
                    Program.R.Cast();
                    Core.DelayAction(() =>
                    {
                        if (Essentials.ShouldUseSpell(eHTarget, SpellSlot.E, NidaleeMenu.ComboMenu))
                        {
                            Program.EHuman.Cast(eHTarget);
                        }
                    }, Program.R.CastDelay);
                }

                #endregion
            }
        }
Example #13
0
        /// <summary>
        /// Called when a Game Object Gets Deleted
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private static void GameObject_OnDelete(GameObject sender, EventArgs args)
        {
            var missile = sender as MissileClient;

            if (missile == null)
            {
                return;
            }

            if (missile.SpellCaster.IsMe && missile.SData.Name == "JavelinToss")
            {
                var target =
                    EntityManager.Heroes.Enemies.FirstOrDefault(t => t.IsValidTarget() && Essentials.IsHunted(t));

                if (target == null)
                {
                    return;
                }

                Essentials.LastHuntedTarget = target;
            }
        }