Exemple #1
0
        private static void OnUpdate()
        {
            if (ObjectManager.GetLocalPlayer().IsDead || ObjectManager.GetLocalPlayer().IsRecalling() ||
                ObjectManager.GetLocalPlayer().ChampionName == "Thresh" ||
                GameObjects.AllyHeroes.All(x => x.ChampionName != "Thresh") ||
                Lantern == null || !Lantern.IsValid)
            {
                return;
            }

            if (Lantern != null)
            {
                if (!Lantern.IsValid)
                {
                    Lantern = null;
                }
            }

            if (!AutoLanternMenu["SharpShooter.MyUtility.AutoLanternMenu.Enabled"].Enabled ||
                ObjectManager.GetLocalPlayer().HealthPercent() >
                AutoLanternMenu["SharpShooter.MyUtility.AutoLanternMenu.HP"].Value)
            {
                return;
            }

            if (Lantern.DistanceToPlayer() <= 450)
            {
                ObjectManager.GetLocalPlayer().SpellBook.CastSpell((SpellSlot)62, Lantern);
            }
        }
Exemple #2
0
 public static bool IsValid()
 {
     return(_instance != null && _instance.IsValid && _instance.DistanceToPlayer() < 1900);
 }
Exemple #3
0
        public static bool IsValid()
        {
            var eTime = _lastECast.TimeSince();

            return(_instance != null && _instance.IsValid && _instance.DistanceToPlayer() < 1900 && (eTime > EDuration + Game.Ping || eTime < EDuration - Game.Ping / 2f + 100));
        }