Example #1
0
        public override void Active()
        {
            if (user.IsDead)
            {
                return;
            }

            if (MiscMenu.keybind("flee"))
            {
                var target = TargetSelector.GetTarget(E.Range, DamageType.Magical);
                if (target != null)
                {
                    E.Cast(target);
                }

                Orbwalker.OrbwalkTo(Game.CursorPos);
            }

            if (MiscMenu.checkbox("autoECC"))
            {
                var ecc = EntityManager.Heroes.Enemies.FirstOrDefault(e => e.IsKillable(E.Range) && e.IsCC());
                if (ecc != null)
                {
                    E.Cast(ecc);
                }
            }

            ScrybingOrb();

            R.Range = (uint)(1925 + R.Level * 1200);

            if (HarassMenu.keybind("toggle"))
            {
                this.Harass();
            }

            Orbwalker.DisableAttacking = IsCastingR;
            Orbwalker.DisableMovement  = IsCastingR;
            RCharge.TapKeyPressed      = RMenu.keybind("Rtap");

            if (IsCastingR)
            {
                WhileCastingR();
                return;
            }

            if (R.IsReady() && MiscMenu.checkbox("Notifications") && Environment.TickCount - Common.lastNotification > 5000)
            {
                foreach (var enemy in
                         EntityManager.Heroes.Enemies.Where(h => h != null && h.IsKillable() && R.GetDamage(h) * 3 > h.Health))
                {
                    Common.ShowNotification(enemy.ChampionName + ": is killable R!!!", 4000);
                    Common.lastNotification = Environment.TickCount;
                }
            }
        }