Example #1
0
        void AutoShieldHp()
        {
            var allies =
                EntityManager.Heroes.Allies.OrderBy(a => a.Health).FirstOrDefault(a => W.IsInRange(a) && !a.IsMe);

            if (allies != null)
            {
                if (Q.IsReady() && TarickTheTrollMeNu.AutoQ() && allies.IsValidTarget(Q.Range) &&
                    allies.HealthPercent <= TarickTheTrollMeNu.HpallyQ() &&
                    Player.ManaPercent >= TarickTheTrollMeNu.Automanaheal())
                {
                    Q.Cast();
                }
            }
            if (W.IsReady())
            {
                var usew = allies != null && allies.IsValidTarget(W.Range) &&
                           TarickTheTrollMeNu.AUtoMenu["Autoshield.Champion"
                                                       + allies.ChampionName].Cast <CheckBox>().CurrentValue;
                if (usew && allies.HealthPercent <= TarickTheTrollMeNu.Hpally() &&
                    Player.ManaPercent >= TarickTheTrollMeNu.AUtomanaShield())
                {
                    W.Cast(allies);
                }
                if (allies != null && (R.IsReady() && TarickTheTrollMeNu.AutoR() && allies.IsValidTarget(R.Range) &&
                                       allies.HealthPercent <= TarickTheTrollMeNu.AutoRhp()))
                {
                    R.Cast();
                }
            }
        }