Example #1
0
            private static void Items()
            {
                if (ObjectManager.GetLocalPlayer().IsDead || ObjectManager.GetLocalPlayer().IsRecalling() ||
                    ObjectManager.GetLocalPlayer().IsInFountainRange() ||
                    !ItemsMenu["SharpShooter.UtilityMenu.ItemsMenu.Enabled"].Enabled)
                {
                    return;
                }

                #region Youmuu

                if (ItemsMenu["SharpShooter.UtilityMenu.ItemsMenu.YoumuusEnabled"].Enabled && Youmuus.IsMine && Youmuus.Ready)
                {
                    var target = GetTarget(800);

                    if (target != null && target.IsValidTarget(800) && MyLogic.Orbwalker.Mode == OrbwalkingMode.Combo)
                    {
                        Youmuus.Cast();
                        return;
                    }
                }

                #endregion

                #region Cutlass

                if (ItemsMenu["SharpShooter.UtilityMenu.ItemsMenu.CutlassEnabled"].Enabled && Cutlass.IsMine && Cutlass.Ready)
                {
                    var target = GetTarget(Cutlass.Range);

                    if (target != null && target.IsValidTarget(Cutlass.Range))
                    {
                        if (Cutlass.GetDamage(target) > target.Health)
                        {
                            Cutlass.CastOnUnit(target);
                            return;
                        }

                        if (MyLogic.Orbwalker.Mode == OrbwalkingMode.Combo)
                        {
                            if (target.IsValidAutoRange())
                            {
                                Cutlass.CastOnUnit(target);
                                return;
                            }
                        }
                    }
                }

                #endregion

                #region Botrk

                if (ItemsMenu["SharpShooter.UtilityMenu.ItemsMenu.BOTRKEnabled"].Enabled && Botrk.IsMine && Botrk.Ready)
                {
                    var target = GetTarget(Botrk.Range);

                    if (target != null && target.IsValidTarget(Botrk.Range))
                    {
                        if (Botrk.GetDamage(target) > target.Health)
                        {
                            Botrk.CastOnUnit(target);
                            return;
                        }

                        if (MyLogic.Orbwalker.Mode == OrbwalkingMode.Combo)
                        {
                            if (target.IsValidAutoRange())
                            {
                                Botrk.CastOnUnit(target);
                                return;
                            }
                        }
                    }
                }

                #endregion

                #region Hextech

                if (ItemsMenu["SharpShooter.UtilityMenu.ItemsMenu.GunbladeEnabled"].Enabled && Hextech.IsMine && Hextech.Ready)
                {
                    var target = GetTarget(Hextech.Range);

                    if (target != null && target.IsValidTarget(Hextech.Range))
                    {
                        if (Hextech.GetDamage(target) > target.Health)
                        {
                            Hextech.CastOnUnit(target);
                            return;
                        }

                        if (MyLogic.Orbwalker.Mode == OrbwalkingMode.Combo)
                        {
                            if (target.IsValidAutoRange())
                            {
                                if (target.HealthPercent() <= 80)
                                {
                                    Hextech.CastOnUnit(target);
                                    return;
                                }
                            }
                        }
                    }
                }

                #endregion

                #region Randuin

                if (ItemsMenu["SharpShooter.UtilityMenu.ItemsMenu.RanduinsOmenEnabled"].Enabled && Randuin.IsMine && Randuin.Ready)
                {
                    if (MyLogic.Orbwalker.Mode == OrbwalkingMode.Combo)
                    {
                        if (ObjectManager.GetLocalPlayer().CountEnemyHeroesInRange(Randuin.Range) >= 3)
                        {
                            Randuin.Cast();
                        }
                    }
                }

                #endregion
            }