Example #1
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);
                            }
                        }
                    }
                }
            }
        }
        /// <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>
        /// 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
            }
        }