Beispiel #1
0
 public void UseItem(int id, Obj_AI_Hero target = null)
 {
     if (Items.HasItem(id) && Items.CanUseItem(id))
     {
         Items.UseItem(id, target);
     }
 }
Beispiel #2
0
 public static void castHydra(Obj_AI_Hero target)
 {
     if (player.Distance(target) < hydra.Range && !LeagueSharp.Common.Orbwalking.CanAttack())
     {
         if (Items.HasItem(tiamat.Id) && Items.CanUseItem(tiamat.Id))
         {
             Items.UseItem(tiamat.Id);
         }
         if (Items.HasItem(hydra.Id) && Items.CanUseItem(hydra.Id))
         {
             Items.UseItem(hydra.Id);
         }
     }
 }
Beispiel #3
0
        public static void UseItems(Obj_AI_Hero target)
        {
            if (player.BaseSkinName != "Renekton")
            {
                castHydra(target);
            }
            if (Items.HasItem(hexmk2.Id) && Items.CanUseItem(hexmk2.Id))
            {
                if (ARAMSimulator.balance > -50)
                {
                    hexmk2.Cast(target.Position);
                }
                else
                {
                    hexmk2.Cast(player.Position.Extend(ARAMSimulator.fromNex.Position, 677));
                }
            }

            if (Items.HasItem(Zhonya.Id) && Items.CanUseItem(Zhonya.Id))
            {
                if (player.HealthPercent < 30 && ARAMSimulator.balance < -60)
                {
                    Items.UseItem(Zhonya.Id);
                }
            }
            if (Items.HasItem(locket.Id) && Items.CanUseItem(locket.Id))
            {
                if (player.HealthPercent < 80 && player.CountEnemiesInRange(550) > 0)
                {
                    Items.UseItem(locket.Id);
                }
            }
            if (Items.HasItem(randuins.Id) && Items.CanUseItem(randuins.Id))
            {
                if (player.Distance(target) < randuins.Range && player.Distance(target) > player.AttackRange + 100)
                {
                    Items.UseItem(randuins.Id);
                }
            }
            if (Items.HasItem(odins.Id) && Items.CanUseItem(odins.Id))
            {
                if (player.Distance(target) < odins.Range &&
                    (player.CountEnemiesInRange(odins.Range) > 1 ||
                     target.Health < Damage.GetItemDamage(player, target, Damage.DamageItems.OdingVeils)))
                {
                    Items.UseItem(odins.Id);
                }
            }
            if (Items.HasItem(bilgewater.Id) && Items.CanUseItem(bilgewater.Id))
            {
                bilgewater.Cast(target);
            }
            if (Items.HasItem(botrk.Id) && Items.CanUseItem(botrk.Id) && (player.Health < player.MaxHealth / 2 || Damage.GetItemDamage(player, target, Damage.DamageItems.Botrk) < target.Health))
            {
                botrk.Cast(target);
            }
            if (Items.HasItem(hexgun.Id) && Items.CanUseItem(hexgun.Id))
            {
                hexgun.Cast(target);
            }
            if (Items.HasItem(Dfg.Id) && Items.CanUseItem(Dfg.Id))
            {
                Dfg.Cast(target);
            }
            if (Items.HasItem(Bft.Id) && Items.CanUseItem(Bft.Id))
            {
                Bft.Cast(target);
            }
            if (Items.HasItem(youmuu.Id) && Items.CanUseItem(youmuu.Id) && player.Distance(target) < player.AttackRange + 50)
            {
                youmuu.Cast();
            }
            if (Items.HasItem(banner.Id) && Items.CanUseItem(banner.Id))
            {
                var min = MinionManager.GetMinions(500, MinionTypes.Ranged, MinionTeam.Ally).FirstOrDefault();
                if (min != null && min.HealthPercent > 75)
                {
                    banner.Cast(min);
                }
            }
            if (Items.HasItem(hexmk1.Id) && Items.CanUseItem(hexmk1.Id))
            {
                hexmk1.Cast(target.Position);
            }
        }
Beispiel #4
0
        private static void UseItem(int id, float range)
        {
            if (id == 3190)
            {
                foreach (var hero in ObjectManager.Get <AIHeroClient>()
                         .Where(x =>
                                x.IsAlly &&
                                ObjectManager.Player.LSDistance(x.Position) <= range &&
                                !x.IsDead))
                {
                    if (hero.HpPercents() < 20)
                    {
                        LCItems.UseItem(id, hero);
                    }
                }
            }

            if (id == 3143)
            {
                var ReqValue = Program.getSliderItem(ItemMenu, "Randuin");

                if (HeroManager.Enemies.Where(x => x.LSIsValidTarget(range)).Count() >= ReqValue)
                {
                    LCItems.UseItem(3143);
                }
            }

            if (id == 3401)
            {
                foreach (var hero in ObjectManager.Get <AIHeroClient>()
                         .Where(x =>
                                x.IsAlly &&
                                ObjectManager.Player.LSDistance(x.Position) <= range &&
                                !x.IsDead))
                {
                    if (hero.HpPercents() < 20)
                    {
                        LCItems.UseItem(id, hero);
                    }
                }
            }

            if (id == 3222)
            {
                foreach (var hero in ObjectManager.Get <AIHeroClient>()
                         .Where(x =>
                                x.IsAlly &&
                                ObjectManager.Player.LSDistance(x.Position) <= range &&
                                !x.IsDead))
                {
                    if (Program.getCheckBoxItem(Allymenu, hero.ChampionName))
                    {
                        if (Program.getCheckBoxItem(BuffTypemenu, "blind") && hero.HasBuffOfType(BuffType.Blind))
                        {
                            LCItems.UseItem(id, hero);
                        }

                        if (Program.getCheckBoxItem(BuffTypemenu, "charm") && hero.HasBuffOfType(BuffType.Charm))
                        {
                            LCItems.UseItem(id, hero);
                        }

                        if (Program.getCheckBoxItem(BuffTypemenu, "fear") && hero.HasBuffOfType(BuffType.Fear))
                        {
                            LCItems.UseItem(id, hero);
                        }

                        if (Program.getCheckBoxItem(BuffTypemenu, "flee") && hero.HasBuffOfType(BuffType.Flee))
                        {
                            LCItems.UseItem(id, hero);
                        }

                        if (Program.getCheckBoxItem(BuffTypemenu, "snare") && hero.HasBuffOfType(BuffType.Snare))
                        {
                            LCItems.UseItem(id, hero);
                        }

                        if (Program.getCheckBoxItem(BuffTypemenu, "taunt") && hero.HasBuffOfType(BuffType.Taunt))
                        {
                            LCItems.UseItem(id, hero);
                        }

                        if (Program.getCheckBoxItem(BuffTypemenu, "suppression") && hero.HasBuffOfType(BuffType.Suppression))
                        {
                            LCItems.UseItem(id, hero);
                        }

                        if (Program.getCheckBoxItem(BuffTypemenu, "stun") && hero.HasBuffOfType(BuffType.Stun))
                        {
                            LCItems.UseItem(id, hero);
                        }

                        if (Program.getCheckBoxItem(BuffTypemenu, "polymorph") && hero.HasBuffOfType(BuffType.Polymorph))
                        {
                            LCItems.UseItem(id, hero);
                        }

                        if (Program.getCheckBoxItem(BuffTypemenu, "silence") && hero.HasBuffOfType(BuffType.Silence))
                        {
                            LCItems.UseItem(id, hero);
                        }
                    }
                }
            }
        }
Beispiel #5
0
        private static void UseItem(int id, float range)
        {
            if (id == 3190)
            {
                foreach (var hero in ObjectManager.Get <Obj_AI_Hero>()
                         .Where(x =>
                                x.IsAlly &&
                                ObjectManager.Player.Distance(x.Position) <= range &&
                                !x.IsDead))
                {
                    if (hero.HpPercents() < 20)
                    {
                        LCItems.UseItem(id, hero);
                    }
                }
            }

            if (id == 3143)
            {
                var ReqValue = config.GetValue("Randuin");

                if (HeroManager.Enemies.Where(x => x.IsValidTarget(range)).Count() >= ReqValue)
                {
                    LCItems.UseItem(3143);
                }
            }

            if (id == 3401)
            {
                foreach (var hero in ObjectManager.Get <Obj_AI_Hero>()
                         .Where(x =>
                                x.IsAlly &&
                                ObjectManager.Player.Distance(x.Position) <= range &&
                                !x.IsDead))
                {
                    if (hero.HpPercents() < 20)
                    {
                        LCItems.UseItem(id, hero);
                    }
                }
            }

            if (id == 3222)
            {
                foreach (var hero in ObjectManager.Get <Obj_AI_Hero>()
                         .Where(x =>
                                x.IsAlly &&
                                ObjectManager.Player.Distance(x.Position) <= range &&
                                !x.IsDead))
                {
                    if (config.IsBool(hero.ChampionName))
                    {
                        if (config.IsBool("blind") && hero.HasBuffOfType(BuffType.Blind))
                        {
                            LCItems.UseItem(id, hero);
                        }

                        if (config.IsBool("charm") && hero.HasBuffOfType(BuffType.Charm))
                        {
                            LCItems.UseItem(id, hero);
                        }

                        if (config.IsBool("fear") && hero.HasBuffOfType(BuffType.Fear))
                        {
                            LCItems.UseItem(id, hero);
                        }

                        if (config.IsBool("flee") && hero.HasBuffOfType(BuffType.Flee))
                        {
                            LCItems.UseItem(id, hero);
                        }

                        if (config.IsBool("snare") && hero.HasBuffOfType(BuffType.Snare))
                        {
                            LCItems.UseItem(id, hero);
                        }

                        if (config.IsBool("taunt") && hero.HasBuffOfType(BuffType.Taunt))
                        {
                            LCItems.UseItem(id, hero);
                        }

                        if (config.IsBool("suppression") && hero.HasBuffOfType(BuffType.Suppression))
                        {
                            LCItems.UseItem(id, hero);
                        }

                        if (config.IsBool("stun") && hero.HasBuffOfType(BuffType.Stun))
                        {
                            LCItems.UseItem(id, hero);
                        }

                        if (config.IsBool("polymorph") && hero.HasBuffOfType(BuffType.Polymorph))
                        {
                            LCItems.UseItem(id, hero);
                        }

                        if (config.IsBool("silence") && hero.HasBuffOfType(BuffType.Silence))
                        {
                            LCItems.UseItem(id, hero);
                        }
                    }
                }
            }
        }
Beispiel #6
0
        public static void UseItems(Obj_AI_Hero target)
        {
            if (player.BaseSkinName != "Renekton")
            {
                castHydra(target);
            }

            if (Items.HasItem(Zhonya.Id) && Items.CanUseItem(Zhonya.Id))
            {
                if (player.HealthPercent < 30 && ARAMSimulator.balance < -60)
                {
                    Items.UseItem(Zhonya.Id);
                }
            }
            if (Items.HasItem(locket.Id) && Items.CanUseItem(locket.Id))
            {
                if (player.HealthPercent < 80 && player.CountEnemiesInRange(550) > 0)
                {
                    Items.UseItem(locket.Id);
                }
            }
            if (Items.HasItem(randuins.Id) && Items.CanUseItem(randuins.Id))
            {
                if (player.Distance(target) < randuins.Range && player.Distance(target) > player.AttackRange + 100)
                {
                    Items.UseItem(randuins.Id);
                }
            }
            if (Items.HasItem(odins.Id) && Items.CanUseItem(odins.Id))
            {
                if (player.Distance(target) < odins.Range &&
                    (player.CountEnemiesInRange(odins.Range) > 1 ||
                     target.Health < Damage.GetItemDamage(player, target, Damage.DamageItems.OdingVeils)))
                {
                    Items.UseItem(odins.Id);
                }
            }
            if (Items.HasItem(bilgewater.Id) && Items.CanUseItem(bilgewater.Id))
            {
                bilgewater.Cast(target);
            }
            if (Items.HasItem(botrk.Id) && Items.CanUseItem(botrk.Id) && (player.Health < player.MaxHealth / 2 || Damage.GetItemDamage(player, target, Damage.DamageItems.Botrk) < target.Health))
            {
                botrk.Cast(target);
            }
            if (Items.HasItem(hexgun.Id) && Items.CanUseItem(hexgun.Id))
            {
                hexgun.Cast(target);
            }
            if (Items.HasItem(Dfg.Id) && Items.CanUseItem(Dfg.Id))
            {
                Dfg.Cast(target);
            }
            if (Items.HasItem(Bft.Id) && Items.CanUseItem(Bft.Id))
            {
                Bft.Cast(target);
            }
            if (Items.HasItem(youmuu.Id) && Items.CanUseItem(youmuu.Id) && player.Distance(target) < player.AttackRange + 50)
            {
                youmuu.Cast();
            }
        }