示例#1
0
        private static void OnEnemyGapcloser(ActiveGapcloser gapcloser, SpellSlot slot)
        {
            if (getCheckBoxItem(MenuGenerator.miscMenu, "dz191.vhr.misc.general.antigp") && Variables.spells[slot].IsReady())
            {
                LeagueSharp.Common.Utility.DelayAction.Add(getSliderItem(MenuGenerator.miscMenu, "dz191.vhr.misc.general.antigpdelay"),
                                                           () =>
                {
                    if (gapcloser.Sender.LSIsValidTarget(Variables.spells[SpellSlot.E].Range) &&
                        getCheckBoxItem(MenuGenerator.miscMenu, "dz191.vhr.misc.general.antigp") &&
                        (Variables.spells[slot].IsReady()))
                    {
                        switch (slot)
                        {
                        case SpellSlot.Q:
                            var senderPos = gapcloser.End;
                            var backOut   = ObjectManager.Player.ServerPosition.LSExtend(senderPos, 300f);
                            if (backOut.IsSafe())
                            {
                                if (gapcloser.Start.LSDistance(ObjectManager.Player.ServerPosition) >
                                    gapcloser.End.LSDistance(ObjectManager.Player.ServerPosition))
                                {
                                    Variables.spells[SpellSlot.Q].Cast(backOut);
                                }
                            }

                            break;

                        case SpellSlot.E:
                            if (gapcloser.Start.LSDistance(ObjectManager.Player.ServerPosition) >
                                gapcloser.End.LSDistance(ObjectManager.Player.ServerPosition))
                            {
                                Variables.spells[SpellSlot.E].CastOnUnit(gapcloser.Sender);
                            }
                            break;
                        }
                    }
                });
            }
        }
示例#2
0
        private static void OnEnemyGapcloser(ActiveGapcloser gapcloser, SpellSlot slot)
        {
            if (ObjectManager.Player.Position.Distance(gapcloser.End) > 365f)
            {
                return;
            }

            SpellSlot FlashSlot = ObjectManager.Player.GetSpellSlot("summonerflash");

            if (MenuExtensions.GetItemValue <bool>("dz191.vhr.misc.general.antigp") &&
                gapcloser.Sender.IsEnemy && gapcloser.SkillType == GapcloserType.Targeted &&
                gapcloser.Sender.ChampionName == "Alistar" && Variables.spells[SpellSlot.E].IsReady())
            {
                if (FlashSlot.IsReady() &&
                    ObjectManager.Player.GetEnemiesInRange(1500f).Count >= 3 && ObjectManager.Player.HealthPercent < 40)
                {
                    ObjectManager.Player.Spellbook.CastSpell(FlashSlot, GetSelectedPosition(gapcloser.Sender.Position, 450, 0));
                    Variables.spells[SpellSlot.E].CastOnUnit(gapcloser.Sender);
                    return;
                }
            }


            if (MenuExtensions.GetItemValue <bool>("dz191.vhr.misc.general.antigp") && Variables.spells[slot].IsReady())
            {
                LeagueSharp.Common.Utility.DelayAction.Add(MenuExtensions.GetItemValue <Slider>("dz191.vhr.misc.general.antigpdelay").Value,
                                                           () =>
                {
                    if (gapcloser.Sender.IsValidTarget(Variables.spells[SpellSlot.E].Range) &&
                        MenuExtensions.GetItemValue <bool>("dz191.vhr.misc.general.antigp") &&
                        (Variables.spells[slot].IsReady()))
                    {
                        switch (slot)
                        {
                        case SpellSlot.Q:
                            var senderPos = gapcloser.End;
                            var backOut   = ObjectManager.Player.ServerPosition.Extend(senderPos, -300f);
                            if (backOut.IsSafe())
                            {
                                if (gapcloser.Start.Distance(ObjectManager.Player.ServerPosition) >
                                    gapcloser.End.Distance(ObjectManager.Player.ServerPosition))
                                {
                                    Variables.spells[SpellSlot.Q].Cast(backOut);
                                }
                            }

                            break;

                        case SpellSlot.E:
                            if (gapcloser.Start.Distance(ObjectManager.Player.ServerPosition) >
                                gapcloser.End.Distance(ObjectManager.Player.ServerPosition))
                            {
                                var predictedEndPost = gapcloser.End.Extend(
                                    ObjectManager.Player.ServerPosition, -425f);
                                if (predictedEndPost.Distance(ObjectManager.Player.ServerPosition)
                                    > gapcloser.End.Distance(ObjectManager.Player.ServerPosition))
                                {
                                    Variables.spells[SpellSlot.E].CastOnUnit(gapcloser.Sender);
                                }
                            }
                            break;
                        }
                    }
                });
            }
        }
示例#3
0
        private static void OnEnemyGapcloser(ActiveGapcloser gapcloser, SpellSlot slot)
        {
            if (ObjectManager.Player.Position.Distance(gapcloser.End) > 365f) return;
           
            SpellSlot FlashSlot = ObjectManager.Player.GetSpellSlot("summonerflash");

            if (MenuExtensions.GetItemValue<bool>("dz191.vhr.misc.general.antigp")  &&
                gapcloser.Sender.IsEnemy && gapcloser.SkillType == GapcloserType.Targeted &&
                gapcloser.Sender.ChampionName == "Alistar" && Variables.spells[SpellSlot.E].IsReady())
            {
                if(FlashSlot.IsReady()
                    && ObjectManager.Player.GetEnemiesInRange(1500f).Count >= 3 && ObjectManager.Player.HealthPercent< 40)
                {
                    ObjectManager.Player.Spellbook.CastSpell(FlashSlot, GetSelectedPosition(gapcloser.Sender.Position, 450, 0));
                    Variables.spells[SpellSlot.E].CastOnUnit(gapcloser.Sender);
                    return;
                }
            }


            if (MenuExtensions.GetItemValue<bool>("dz191.vhr.misc.general.antigp") && Variables.spells[slot].IsReady())
            {
                LeagueSharp.Common.Utility.DelayAction.Add(MenuExtensions.GetItemValue<Slider>("dz191.vhr.misc.general.antigpdelay").Value,
                    () =>
                    {
                        if (gapcloser.Sender.IsValidTarget(Variables.spells[SpellSlot.E].Range) && 
                            MenuExtensions.GetItemValue<bool>("dz191.vhr.misc.general.antigp") 
                            && (Variables.spells[slot].IsReady()))
                        {
                            switch (slot)
                            {
                                case SpellSlot.Q:
                                    var senderPos = gapcloser.End;
                                    var backOut = ObjectManager.Player.ServerPosition.Extend(senderPos, -300f);
                                    if (backOut.IsSafe())
                                    {
                                        if (gapcloser.Start.Distance(ObjectManager.Player.ServerPosition) >
                                            gapcloser.End.Distance(ObjectManager.Player.ServerPosition))
                                        {
                                            Variables.spells[SpellSlot.Q].Cast(backOut);
                                        }
                                    }

                                    break;

                                case SpellSlot.E:
                                    if (gapcloser.Start.Distance(ObjectManager.Player.ServerPosition) >
                                        gapcloser.End.Distance(ObjectManager.Player.ServerPosition))
                                    {
                                        var predictedEndPost = gapcloser.End.Extend(
                                            ObjectManager.Player.ServerPosition, -425f);
                                        if (predictedEndPost.Distance(ObjectManager.Player.ServerPosition)
                                            > gapcloser.End.Distance(ObjectManager.Player.ServerPosition))
                                        {
                                            Variables.spells[SpellSlot.E].CastOnUnit(gapcloser.Sender);
                                        }
                                    }
                                    break;
                            }
                        }
                    });
            }
        }
        private static void OnEnemyGapcloser(ActiveGapcloser gapcloser, SpellSlot slot)
        {
            if (getCheckBoxItem(MenuGenerator.miscMenu, "dz191.vhr.misc.general.antigp") && Variables.spells[slot].IsReady())
            {
                LeagueSharp.Common.Utility.DelayAction.Add(getSliderItem(MenuGenerator.miscMenu, "dz191.vhr.misc.general.antigpdelay"),
                    () =>
                    {
                        if (gapcloser.Sender.LSIsValidTarget(Variables.spells[SpellSlot.E].Range) &&
                            getCheckBoxItem(MenuGenerator.miscMenu, "dz191.vhr.misc.general.antigp")
                            && (Variables.spells[slot].IsReady()))
                        {
                            switch (slot)
                            {
                                case SpellSlot.Q:
                                    var senderPos = gapcloser.End;
                                    var backOut = ObjectManager.Player.ServerPosition.LSExtend(senderPos, 300f);
                                    if (backOut.IsSafe())
                                    {
                                        if (gapcloser.Start.LSDistance(ObjectManager.Player.ServerPosition) >
                                            gapcloser.End.LSDistance(ObjectManager.Player.ServerPosition))
                                        {
                                            Variables.spells[SpellSlot.Q].Cast(backOut);
                                        }
                                    }

                                    break;

                                case SpellSlot.E:
                                    if (gapcloser.Start.LSDistance(ObjectManager.Player.ServerPosition) >
                                        gapcloser.End.LSDistance(ObjectManager.Player.ServerPosition))
                                    {
                                        Variables.spells[SpellSlot.E].CastOnUnit(gapcloser.Sender);
                                    }
                                    break;
                            }
                        }
                    });
            }
        }