Exemplo n.º 1
0
        /// <summary>
        /// Does the Combo
        /// </summary>
        public static void Combo()
        {
            var checkCamo = Essentials.Config.SubMenu("Combo").Item("checkCamo").GetValue <bool>();

            if (checkCamo && Essentials.Player.HasBuff("CamouflageStealth"))
            {
                return;
            }

            var enemies =
                HeroManager.Enemies.FirstOrDefault(t => t.IsValidTarget() && Essentials.Orbwalker.InAutoAttackRange(t));
            var rtarget = TargetSelector.GetTarget(Essentials.R.Range, TargetSelector.DamageType.Magical);
            var useW    = Essentials.Config.SubMenu("Combo").Item("wcombo").GetValue <bool>();
            var useR    = Essentials.Config.SubMenu("Combo").Item("rcombo").GetValue <bool>();
            var wCombat = Essentials.Config.SubMenu("Combo").Item("wCombat").GetValue <bool>();
            var rCount  = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Ammo;
            var rCharge = Essentials.Config.SubMenu("Combo").Item("rCharge").GetValue <Slider>().Value;

            if (Essentials.W.IsReady() && useW && !wCombat)
            {
                Essentials.W.Cast();
            }

            if (enemies == null)
            {
                return;
            }

            if (useW && wCombat)
            {
                if (Essentials.W.IsReady())
                {
                    Essentials.W.Cast();
                }
            }

            if (Essentials.R.IsReady() && useR && Essentials.R.IsInRange(rtarget) && rCharge <= rCount &&
                rtarget.IsValidTarget() &&
                !Essentials.IsShroomed(rtarget.Position))
            {
                Essentials.R.CastIfHitchanceEquals(rtarget, HitChance.VeryHigh);
            }
            else if (Essentials.R.IsReady() && useR && rCharge <= rCount)
            {
                var shroom = ObjectManager.Get <Obj_AI_Base>().FirstOrDefault(t => t.Name == "Noxious Trap");

                if (shroom != null)
                {
                    var shroomPosition     = shroom.Position;
                    var predictionPosition = shroomPosition.Extend(rtarget.Position,
                                                                   Essentials.Player.CharData.AcquisitionRange * Essentials.R.Level + 2);

                    if (Essentials.R.IsInRange(rtarget, Essentials.Player.CharData.AcquisitionRange * Essentials.R.Level + 2) &&
                        Essentials.IsShroomed(shroomPosition))
                    {
                        Essentials.R.Cast(predictionPosition);
                    }
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Does the AutoShroom
        /// </summary>
        public static void AutoShroom()
        {
            var autoRPanic = Essentials.Config.SubMenu("Misc").Item("autoRPanic").IsActive();

            // Panic Key now makes you move
            if (autoRPanic)
            {
                ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
            }

            if (!Essentials.R.IsReady() || ObjectManager.Player.IsRecalling() || autoRPanic)
            {
                return;
            }

            var target = HeroManager.Enemies.FirstOrDefault(t => Essentials.R.IsInRange(t) && t.IsValidTarget());

            if (target != null)
            {
                if (target.HasBuff("zhonyasringshield") && Essentials.R.IsReady() && Essentials.R.IsInRange(target))
                {
                    Essentials.R.Cast(target.Position);
                }
            }
            else
            {
                var rCharge = Essentials.Config.SubMenu("Misc").Item("rCharge").GetValue <Slider>().Value;
                var rCount  = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Ammo;

                switch (Utility.Map.GetMap().Type)
                {
                case Utility.Map.MapType.SummonersRift:
                    if (Essentials.ShroomPositions.SummonersRift.Any())
                    {
                        foreach (
                            var place in
                            Essentials.ShroomPositions.SummonersRift.Where(
                                pos =>
                                pos.Distance(ObjectManager.Player.Position) <= Essentials.R.Range &&
                                !Essentials.IsShroomed(pos))
                            .Where(
                                place =>
                                rCharge <= rCount && Environment.TickCount - Essentials.LastR > 5000))
                        {
                            Essentials.R.Cast(place);
                        }
                    }
                    break;

                case Utility.Map.MapType.HowlingAbyss:
                    if (Essentials.ShroomPositions.HowlingAbyss.Any())
                    {
                        foreach (
                            var place in
                            Essentials.ShroomPositions.HowlingAbyss.Where(
                                pos =>
                                pos.Distance(ObjectManager.Player.Position) <= Essentials.R.Range &&
                                !Essentials.IsShroomed(pos))
                            .Where(
                                place =>
                                rCharge <= rCount && Environment.TickCount - Essentials.LastR > 5000))
                        {
                            Essentials.R.Cast(place);
                        }
                    }
                    break;

                case Utility.Map.MapType.CrystalScar:
                    if (Essentials.ShroomPositions.CrystalScar.Any())
                    {
                        foreach (
                            var place in
                            Essentials.ShroomPositions.CrystalScar.Where(
                                pos =>
                                pos.Distance(ObjectManager.Player.Position) <= Essentials.R.Range &&
                                !Essentials.IsShroomed(pos))
                            .Where(
                                place =>
                                rCharge <= rCount && Environment.TickCount - Essentials.LastR > 5000))
                        {
                            Essentials.R.Cast(place);
                        }
                    }
                    break;

                case Utility.Map.MapType.TwistedTreeline:
                    if (Essentials.ShroomPositions.TwistedTreeline.Any())
                    {
                        foreach (
                            var place in
                            Essentials.ShroomPositions.TwistedTreeline.Where(
                                pos =>
                                pos.Distance(ObjectManager.Player.Position) <= Essentials.R.Range &&
                                !Essentials.IsShroomed(pos))
                            .Where(
                                place =>
                                rCharge <= rCount && Environment.TickCount - Essentials.LastR > 5000))
                        {
                            Essentials.R.Cast(place);
                        }
                    }
                    break;

                default:
                    if (Utility.Map.GetMap().Type.ToString() == "Unknown")
                    {
                        if (Essentials.ShroomPositions.ButcherBridge.Any())
                        {
                            foreach (
                                var place in
                                Essentials.ShroomPositions.ButcherBridge.Where(
                                    pos =>
                                    pos.Distance(ObjectManager.Player.Position) <= Essentials.R.Range &&
                                    !Essentials.IsShroomed(pos))
                                .Where(
                                    place =>
                                    rCharge <= rCount &&
                                    Environment.TickCount - Essentials.LastR > 5000))
                            {
                                Essentials.R.Cast(place);
                            }
                        }
                    }
                    break;
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Called when Game Draws
        /// </summary>
        /// <param name="args">
        /// The Args
        /// </param>
        private static void Drawing_OnDraw(EventArgs args)
        {
            if (Essentials.Config.SubMenu("Drawing").SubMenu("debug").Item("debugdraw").GetValue <bool>())
            {
                Drawing.DrawText(Essentials.Config.SubMenu("Drawing").SubMenu("debug").Item("x").GetValue <Slider>().Value, Essentials.Config.SubMenu("Drawing").SubMenu("debug").Item("y").GetValue <Slider>().Value,
                                 Color.Red, Essentials.Player.Position.ToString());
            }

            var drawQ      = Essentials.Config.SubMenu("Drawing").Item("drawQ").GetValue <bool>();
            var drawR      = Essentials.Config.SubMenu("Drawing").Item("drawR").GetValue <bool>();
            var colorBlind = Essentials.Config.SubMenu("Drawing").Item("colorBlind").GetValue <bool>();
            var player     = ObjectManager.Player.Position;

            if (drawQ && colorBlind)
            {
                Render.Circle.DrawCircle(player, Essentials.Q.Range, Essentials.Q.IsReady() ? Color.YellowGreen : Color.Red);
            }

            if (drawQ && !colorBlind)
            {
                Render.Circle.DrawCircle(player, Essentials.Q.Range, Essentials.Q.IsReady() ? Color.LightGreen : Color.Red);
            }

            if (drawR && colorBlind)
            {
                Render.Circle.DrawCircle(player, Essentials.R.Range, Essentials.R.IsReady() ? Color.YellowGreen : Color.Red);
            }

            if (drawR && !colorBlind)
            {
                Render.Circle.DrawCircle(player, Essentials.R.Range, Essentials.R.IsReady() ? Color.LightGreen : Color.Red);
            }

            var drawautoR = Essentials.Config.SubMenu("Drawing").Item("drawautoR").GetValue <bool>();

            if (drawautoR && LeagueSharp.Common.Utility.Map.GetMap().Type == LeagueSharp.Common.Utility.Map.MapType.SummonersRift && Essentials.ShroomPositions.SummonersRift.Any())
            {
                foreach (
                    var place in
                    Essentials.ShroomPositions.SummonersRift.Where(
                        pos =>
                        pos.Distance(ObjectManager.Player.Position) <= Essentials.Config.SubMenu("Drawing").Item("DrawVision").GetValue <Slider>().Value))
                {
                    if (colorBlind)
                    {
                        Render.Circle.DrawCircle(place, 100,
                                                 Essentials.IsShroomed(place) ? Color.Red : Color.YellowGreen);
                    }
                    else
                    {
                        Render.Circle.DrawCircle(place, 100, Essentials.IsShroomed(place) ? Color.Red : Color.LightGreen);
                    }
                }
            }
            else if (drawautoR && LeagueSharp.Common.Utility.Map.GetMap().Type == LeagueSharp.Common.Utility.Map.MapType.CrystalScar && Essentials.ShroomPositions.CrystalScar.Any())
            {
                foreach (
                    var place in
                    Essentials.ShroomPositions.CrystalScar.Where(
                        pos =>
                        pos.Distance(ObjectManager.Player.Position) <= Essentials.Config.SubMenu("Drawing").Item("DrawVision").GetValue <Slider>().Value))
                {
                    if (colorBlind)
                    {
                        Render.Circle.DrawCircle(place, 100,
                                                 Essentials.IsShroomed(place) ? Color.Red : Color.YellowGreen);
                    }
                    else
                    {
                        Render.Circle.DrawCircle(place, 100,
                                                 Essentials.IsShroomed(place) ? Color.Red : Color.LightGreen);
                    }
                }
            }
            else if (drawautoR && LeagueSharp.Common.Utility.Map.GetMap().Type == LeagueSharp.Common.Utility.Map.MapType.HowlingAbyss && Essentials.ShroomPositions.HowlingAbyss.Any())
            {
                foreach (
                    var place in
                    Essentials.ShroomPositions.HowlingAbyss.Where(
                        pos =>
                        pos.Distance(ObjectManager.Player.Position) <= Essentials.Config.SubMenu("Drawing").Item("DrawVision").GetValue <Slider>().Value))
                {
                    if (colorBlind)
                    {
                        Render.Circle.DrawCircle(place, 100,
                                                 Essentials.IsShroomed(place) ? Color.Red : Color.YellowGreen);
                    }
                    else
                    {
                        Render.Circle.DrawCircle(place, 100,
                                                 Essentials.IsShroomed(place) ? Color.Red : Color.LightGreen);
                    }
                }
            }
            else if (drawautoR && LeagueSharp.Common.Utility.Map.GetMap().Type == LeagueSharp.Common.Utility.Map.MapType.TwistedTreeline && Essentials.ShroomPositions.TwistedTreeline.Any())
            {
                foreach (
                    var place in
                    Essentials.ShroomPositions.TwistedTreeline.Where(
                        pos =>
                        pos.Distance(ObjectManager.Player.Position) <= Essentials.Config.SubMenu("Drawing").Item("DrawVision").GetValue <Slider>().Value))
                {
                    if (colorBlind)
                    {
                        Render.Circle.DrawCircle(place, 100,
                                                 Essentials.IsShroomed(place) ? Color.Red : Color.YellowGreen);
                    }
                    else
                    {
                        Render.Circle.DrawCircle(place, 100,
                                                 Essentials.IsShroomed(place) ? Color.Red : Color.LightGreen);
                    }
                }
            }
            else if (drawautoR && LeagueSharp.Common.Utility.Map.GetMap().Type == LeagueSharp.Common.Utility.Map.MapType.Unknown && Essentials.ShroomPositions.ButcherBridge.Any())
            {
                foreach (
                    var place in
                    Essentials.ShroomPositions.ButcherBridge.Where(
                        pos =>
                        pos.Distance(ObjectManager.Player.Position) <= Essentials.Config.SubMenu("Drawing").Item("DrawVision").GetValue <Slider>().Value))
                {
                    if (colorBlind)
                    {
                        Render.Circle.DrawCircle(place, 100,
                                                 Essentials.IsShroomed(place) ? Color.Red : Color.YellowGreen);
                    }
                    else
                    {
                        Render.Circle.DrawCircle(place, 100,
                                                 Essentials.IsShroomed(place) ? Color.Red : Color.LightGreen);
                    }
                }
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Does the LaneClear
        /// </summary>
        public static void LaneClear()
        {
            var useQ         = Essentials.Config.SubMenu("LaneClear").Item("qclear").GetValue <bool>();
            var qMinion      = MinionManager.GetMinions(ObjectManager.Player.Position, Essentials.Q.Range);
            var qManaManager = Essentials.Config.SubMenu("LaneClear").Item("qManaManager").GetValue <Slider>().Value;

            if (useQ && Essentials.Q.IsReady() && qMinion != null)
            {
                foreach (var m in qMinion)
                {
                    if (Essentials.Q.IsInRange(m) && Essentials.Q.GetDamage(m) >= m.Health &&
                        (int)Essentials.Player.ManaPercent >= qManaManager)
                    {
                        Essentials.Q.CastOnUnit(m);
                    }
                }
            }

            var allMinionsR    = MinionManager.GetMinions(ObjectManager.Player.Position, Essentials.R.Range, MinionTypes.Melee);
            var rangedMinionsR = MinionManager.GetMinions(ObjectManager.Player.Position, Essentials.R.Range,
                                                          MinionTypes.Ranged);
            var rLocation  = Essentials.R.GetCircularFarmLocation(allMinionsR, Essentials.R.Range);
            var r2Location = Essentials.R.GetCircularFarmLocation(rangedMinionsR, Essentials.R.Range);
            var useR       = Essentials.Config.SubMenu("LaneClear").Item("rclear").GetValue <bool>();
            var userKill   = Essentials.Config.SubMenu("LaneClear").Item("userKill").GetValue <bool>();
            var minionR    = Essentials.Config.SubMenu("LaneClear").Item("minionR").GetValue <Slider>().Value;

            if (minionR <= rLocation.MinionsHit && useR ||
                minionR <= r2Location.MinionsHit && useR ||
                minionR <= rLocation.MinionsHit + r2Location.MinionsHit && useR)
            {
                if (userKill)
                {
                    foreach (var minion in allMinionsR)
                    {
                        if (minion.Health <= ObjectManager.Player.GetSpellDamage(minion, SpellSlot.R) &&
                            Essentials.R.IsReady() &&
                            Essentials.R.IsInRange(rLocation.Position.To3D()) &&
                            !Essentials.IsShroomed(rLocation.Position.To3D()) &&
                            minionR <= rLocation.MinionsHit)
                        {
                            Essentials.R.Cast(rLocation.Position);
                            return;
                        }

                        if (minion.Health <= ObjectManager.Player.GetSpellDamage(minion, SpellSlot.R) &&
                            Essentials.R.IsReady() &&
                            Essentials.R.IsInRange(r2Location.Position.To3D()) &&
                            !Essentials.IsShroomed(r2Location.Position.To3D()) &&
                            minionR <= r2Location.MinionsHit)
                        {
                            Essentials.R.Cast(r2Location.Position);
                            return;
                        }
                    }
                }
                else
                {
                    if (Essentials.R.IsReady() &&
                        Essentials.R.IsInRange(rLocation.Position.To3D()) &&
                        !Essentials.IsShroomed(rLocation.Position.To3D()) &&
                        minionR <= rLocation.MinionsHit)
                    {
                        Essentials.R.Cast(rLocation.Position);
                    }
                    else if (Essentials.R.IsReady() &&
                             Essentials.R.IsInRange(r2Location.Position.To3D()) &&
                             !Essentials.IsShroomed(r2Location.Position.To3D()) &&
                             minionR <= r2Location.MinionsHit)
                    {
                        Essentials.R.Cast(r2Location.Position);
                    }
                }
            }
        }