Пример #1
0
        private void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsEnemy)
            {
                return;
            }

            if (Config.Item("spell" + args.SData.Name) != null && !Config.Item("spell" + args.SData.Name).GetValue <bool>())
            {
                return;
            }

            if (E.IsReady() && Config.Item("autoE", true).GetValue <bool>() && OktwCommon.CanHitSkillShot(Player, args))
            {
                E.Cast(sender.Position);
            }

            if (W.IsReady() && args.SData.MissileSpeed > 0)
            {
                foreach (var ally in Program.Allies.Where(ally => ally.IsValid && !ally.IsMe && Player.Distance(ally.ServerPosition) < W.Range && Config.Item("Eon" + ally.ChampionName).GetValue <bool>()))
                {
                    if (OktwCommon.CanHitSkillShot(ally, args) || OktwCommon.GetIncomingDamage(ally, 1) > ally.Health * Config.Item("Edmg", true).GetValue <Slider>().Value * 0.01)
                    {
                        W.Cast(ally);
                        if (E.IsReady())
                        {
                            Utility.DelayAction.Add(200, () => E.Cast(sender.Position));
                        }
                    }
                }
            }
        }
Пример #2
0
        private void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!E.IsReady() || args.SData.IsAutoAttack() || Player.HealthPercent > Config.Item("Edmg", true).GetValue <Slider>().Value || !Config.Item("autoE", true).GetValue <bool>() ||
                !sender.IsEnemy || sender.IsMinion || !sender.IsValid <AIHeroClient>() || args.SData.Name.ToLower() == "tormentedsoil")
            {
                return;
            }

            if (Config.Item("spell" + args.SData.Name) != null && !Config.Item("spell" + args.SData.Name).GetValue <bool>())
            {
                return;
            }

            if (args.Target != null)
            {
                if (args.Target.IsMe)
                {
                    E.Cast();
                }
            }
            else if (OktwCommon.CanHitSkillShot(Player, args))
            {
                E.Cast();
            }
        }
Пример #3
0
    private void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
    {
        if (!(sender is Obj_AI_Hero) || !sender.IsEnemy)
        {
            return;
        }

        if (sender.Distance(Player.Position) > 1600)
        {
            return;
        }

        if (Zhonya.IsReady() && MainMenu.Item("Zhonya").GetValue <bool>())
        {
            if (MainMenu.Item("spellZ" + args.SData.Name) != null && MainMenu.Item("spellZ" + args.SData.Name).GetValue <bool>())
            {
                if (args.Target != null)
                {
                    if (args.Target.NetworkId == Player.NetworkId)
                    {
                        ZhonyaTryCast();
                    }
                }
                else
                {
                    if (OktwCommon.CanHitSkillShot(Player, args.Start, args.End, args.SData))
                    {
                        ZhonyaTryCast();
                    }
                }
            }
        }
    }
Пример #4
0
        private void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!E.IsReady() || !sender.IsEnemy || sender.IsMinion || args.SData.IsAutoAttack() || !sender.IsValid <Obj_AI_Hero>() || Player.Distance(sender.ServerPosition) > 2000)
            {
                return;
            }

            if (Config.Item("spell" + args.SData.Name, true) != null && !Config.Item("spell" + args.SData.Name, true).GetValue <bool>())
            {
                return;
            }

            foreach (var ally in HeroManager.Allies.Where(ally => ally.IsValid && Player.Distance(ally.ServerPosition) < E.Range))
            {
                //double dmg = 0;

                if (Config.Item("targeted" + ally.ChampionName, true).GetValue <bool>() && args.Target != null && args.Target.NetworkId == ally.NetworkId)
                {
                    E.CastOnUnit(ally);
                    return;
                    //dmg = dmg + sender.GetSpellDamage(ally, args.SData.Name);
                }
                else if (Config.Item("skillshot" + ally.ChampionName, true).GetValue <bool>())
                {
                    if (!OktwCommon.CanHitSkillShot(ally, args.Start, args.End, args.SData))
                    {
                        continue;
                    }
                    //dmg = dmg + sender.GetSpellDamage(ally, args.SData.Name);
                    E.CastOnUnit(ally);
                    return;
                }
            }
        }
Пример #5
0
        private void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsEnemy)
                return;

            if (Config.Item("spell" + args.SData.Name.ToLower()) != null && !Config.Item("spell" + args.SData.Name.ToLower()).GetValue<bool>())
                return;

            if (E.IsReady() && Config.Item("autoE", true).GetValue<bool>() && args.Target == null && OktwCommon.CanHitSkillShot(Player, args.Start, args.End, args.SData))
            {
                E.Cast(sender.Position);
            }

            if (W.IsReady() && args.SData.MissileSpeed > 0)
            {
                foreach (var ally in HeroManager.Allies.Where(ally => ally.IsValid && Player.Distance(ally.ServerPosition) < W.Range && Config.Item("Eon" + ally.ChampionName).GetValue<bool>()))
                {
                    if (OktwCommon.CanHitSkillShot(ally, args.Start, args.End, args.SData) || OktwCommon.GetIncomingDamage(ally) > ally.Health * Config.Item("Edmg", true).GetValue<Slider>().Value * 0.01)
                    {
                        if (E.IsReady())
                            Utility.DelayAction.Add(200, () => E.Cast(sender.Position));

                        if (Player.HealthPercent < 20 && !ally.IsMe)
                            continue;
                        if (Player.HealthPercent < 50 && !ally.IsMe && ally.UnderTurret(true))
                            continue;

                        W.Cast(ally);
                    }
                }
            }
        }
Пример #6
0
        private void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!R.IsReady() || sender.IsMinion || !sender.IsEnemy || args.SData.IsAutoAttack() || !Config.Item("autoR", true).GetValue <bool>() ||
                !sender.IsValid <AIHeroClient>() || args.SData.Name.ToLower() == "tormentedsoil")
            {
                return;
            }

            if (Config.Item("spell" + args.SData.Name, true) == null || !Config.Item("spell" + args.SData.Name, true).GetValue <bool>())
            {
                return;
            }

            if (args.Target != null)
            {
                if (args.Target.IsAlly)
                {
                    var ally = args.Target as AIHeroClient;
                    if (ally != null && Config.Item("Rally" + ally.ChampionName).GetValue <bool>())
                    {
                        R.CastOnUnit(ally);
                    }
                }
            }
            else
            {
                foreach (var ally in HeroManager.Allies.Where(ally => ally.IsValid && !ally.IsDead && ally.HealthPercent < 70 && Player.ServerPosition.Distance(ally.ServerPosition) < R.Range && Config.Item("Rally" + ally.ChampionName).GetValue <bool>()))
                {
                    if (OktwCommon.CanHitSkillShot(ally, args))
                    {
                        R.CastOnUnit(ally);
                    }
                }
            }
        }
Пример #7
0
        private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsEnemy)
            {
                return;
            }

            if (ewMenu["spell" + args.SData.Name] != null &&
                !getCheckBoxItem(ewMenu, "spell" + args.SData.Name))
            {
                return;
            }

            if (E.IsReady() && getCheckBoxItem(ewMenu, "autoE") && OktwCommon.CanHitSkillShot(Player, args))
            {
                E.Cast(sender.Position);
            }

            if (W.IsReady() && args.SData.MissileSpeed > 0)
            {
                foreach (
                    var ally in
                    SebbyLib.Program.Allies.Where(
                        ally =>
                        ally.IsValid && Player.Distance(ally.ServerPosition) < W.Range &&
                        getCheckBoxItem(ewMenu, "Eon" + ally.ChampionName)))
                {
                    if (OktwCommon.CanHitSkillShot(ally, args) ||
                        OktwCommon.GetIncomingDamage(ally, 1) > ally.Health * getSliderItem(ewMenu, "Edmg") * 0.01)
                    {
                        if (E.IsReady())
                        {
                            LeagueSharp.Common.Utility.DelayAction.Add(200, () => E.Cast(sender.Position));
                        }

                        if (Player.HealthPercent < 20 && !ally.IsMe)
                        {
                            continue;
                        }
                        if (Player.HealthPercent < 50 && !ally.IsMe && ally.UnderTurret(true))
                        {
                            continue;
                        }

                        W.Cast(ally);
                    }
                }
            }
        }
Пример #8
0
    private void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
    {
        if (!(sender is Obj_AI_Hero) || !sender.IsEnemy)
        {
            return;
        }

        if (sender.Distance(Player.Position) > 1600)
        {
            return;
        }

        if (CanUse(exhaust) && MainMenu.Item("Exhaust").GetValue <bool>())
        {
            foreach (var ally in HeroManager.Allies.Where(ally => ally.IsValid && !ally.IsDead && ally.HealthPercent < 51 && Player.Distance(ally.ServerPosition) < 700))
            {
                double dmg = 0;
                if (args.Target != null)
                {
                    if (args.Target.NetworkId == ally.NetworkId)
                    {
                        dmg = dmg + sender.GetSpellDamage(ally, args.SData.Name);
                    }
                }
                else
                {
                    if (OktwCommon.CanHitSkillShot(ally, args.Start, args.End, args.SData))
                    {
                        dmg = dmg + sender.GetSpellDamage(ally, args.SData.Name);
                    }
                    else
                    {
                        continue;
                    }
                }

                if (ally.Health - dmg < ally.CountEnemiesInRange(700) * ally.Level * 40)
                {
                    Player.Spellbook.CastSpell(exhaust, sender);
                }
            }
        }
    }
Пример #9
0
        private void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!E.IsReady() || !(sender is Obj_AI_Hero) || !sender.IsEnemy || Player.HealthPercent > Config.Item("Edmg", true).GetValue <Slider>().Value || !Config.Item("autoE", true).GetValue <bool>() ||
                args.SData.Name.ToLower() == "tormentedsoil")
            {
                return;
            }

            if (args.SData.IsAutoAttack())
            {
                switch (args.SData.Name)
                {
                case "UdyrBearAttack":
                case "GoldCardPreAttack":
                case "RedCardPreAttack":
                case "BlueCardPreAttack":
                case "NautilusRavageStrikeAttack":
                {
                    E.Cast();
                }
                break;
                }
                return;
            }

            if (Config.Item("spell" + args.SData.Name) != null && !Config.Item("spell" + args.SData.Name).GetValue <bool>())
            {
                return;
            }

            if (args.Target != null)
            {
                if (args.Target.IsMe)
                {
                    E.Cast();
                }
            }
            else if (OktwCommon.CanHitSkillShot(Player, args.Start, args.End, args.SData))
            {
                E.Cast();
            }
        }
Пример #10
0
        private void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!E.IsReady() || !(sender is AIHeroClient) || !sender.IsEnemy || Player.HealthPercent > Config.Item("Edmg", true).GetValue <Slider>().Value || !Config.Item("autoE", true).GetValue <bool>() ||
                args.SData.Name.ToLower() == "tormentedsoil")
            {
                return;
            }

            if (args.Target != null && args.SData.IsAutoAttack() && args.Target.IsMe)
            {
                if (AAspelss.Any(x => x.ToLower().Contains(args.SData.Name.ToLower())))
                {
                    E.Cast();
                }
                if (AAspelssBuffs.Any(x => sender.HasBuff(x)))
                {
                    E.Cast();
                }

                return;
            }

            if (Config.Item("spell" + args.SData.Name) != null && !Config.Item("spell" + args.SData.Name).GetValue <bool>())
            {
                return;
            }

            if (args.Target != null)
            {
                if (args.Target.IsMe)
                {
                    E.Cast();
                }
            }
            else if (OktwCommon.CanHitSkillShot(Player, args.Start, args.End, args.SData))
            {
                E.Cast();
            }
        }
Пример #11
0
        private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!R.IsReady() || sender.IsMinion || !sender.IsEnemy || args.SData.IsAutoAttack() || !getCheckBoxItem(rMenu, "autoR") || !sender.IsValid <AIHeroClient>() || args.SData.Name.ToLower() == "tormentedsoil")
            {
                return;
            }

            if (rMenu["spell" + args.SData.Name] == null)
            {
                return;
            }

            if (!getCheckBoxItem(rMenu, "spell" + args.SData.Name))
            {
                return;
            }

            if (args.Target != null)
            {
                if (args.Target.IsAlly)
                {
                    var ally = args.Target as AIHeroClient;
                    if (ally != null && getCheckBoxItem(rMenu, "Rally" + ally.ChampionName))
                    {
                        R.CastOnUnit(ally);
                    }
                }
            }
            else
            {
                foreach (var ally in Program.Allies.Where(ally => ally.IsValid && !ally.IsDead && ally.HealthPercent < 70 && Player.ServerPosition.LSDistance(ally.ServerPosition) < R.Range && getCheckBoxItem(rMenu, "Rally" + ally.ChampionName)))
                {
                    if (OktwCommon.CanHitSkillShot(ally, args))
                    {
                        R.CastOnUnit(ally);
                    }
                }
            }
        }