Пример #1
0
        private static void OnUpdate()
        {
            var target = GameObjects.EnemyHeroes.OrderBy(x => x.Distance(Global.Player)).FirstOrDefault(x => x.IsValidTarget(2000));

            if (target == null || Global.Player.IsDead || Global.Orbwalker.IsWindingUp)
            {
                return;
            }

            if (SpellManager.Q.Ready && target.Health < Global.Player.GetSpellDamage(target, SpellSlot.Q) && MenuConfig.Killsteal["Q"].Enabled && target.IsValidTarget(SpellManager.Q.Range))
            {
                SpellManager.CastE(target);
            }
            else if (SpellManager.R.Ready &&
                     target.Health < Dmg.Ult(target) && MenuConfig.Killsteal["R"].Enabled)
            {
                SpellManager.CastR(target);
            }
        }