private static void KillSteal() { var ksq = KillStealMenu["KSQ"].Cast <CheckBox>().CurrentValue; var ksr = KillStealMenu["KSR"].Cast <CheckBox>().CurrentValue; if (ksq) { var target = EntityManager.Heroes.Enemies.Where( t => t.IsValidTarget() && Q.IsInRange(t) && DamageLibrary.CalculateDamage(t, true, false, false, false) >= t.Health) .OrderBy(t => t.Health) .FirstOrDefault(); if (target != null && Q.IsReady()) { Q.Cast(target); } } if (!ksr) { return; } var rTarget = EntityManager.Heroes.Enemies.Where( t => t.IsValidTarget() && R.IsInRange(t) && DamageLibrary.CalculateDamage(t, false, false, false, true) >= t.Health) .OrderBy(t => t.Health) .FirstOrDefault(); if (rTarget == null || !R.IsReady()) { return; } var pred = R.GetPrediction(rTarget); if (pred.HitChance >= HitChance.High) { R.Cast(pred.CastPosition); } }
private static void LaneClear() { var qClear = LaneClearMenu["qclear"].Cast <CheckBox>().CurrentValue; var qManaManager = LaneClearMenu["qManaManager"].Cast <Slider>().CurrentValue; var qMinion = EntityManager.MinionsAndMonsters.EnemyMinions.Where( t => Q.IsInRange(t) && t.IsValidTarget()); foreach (var m in qMinion.Where(m => Q.IsReady() && qClear && m.Health <= DamageLibrary.CalculateDamage(m, true, false, false, false) && qManaManager <= (int)Player.Instance.ManaPercent)) { Q.Cast(m); } var useR = LaneClearMenu["rclear"].Cast <CheckBox>().CurrentValue; if (useR) { var allMinionsR = EntityManager.MinionsAndMonsters.EnemyMinions.Where(t => R.IsInRange(t) && t.IsValidTarget()) .OrderBy(t => t.Health); var rLocation = EntityManager.MinionsAndMonsters.GetCircularFarmLocation(allMinionsR, R.Width, (int)R.Range); var minionR = LaneClearMenu["minionR"].Cast <Slider>().CurrentValue; if (rLocation.HitNumber >= minionR && Environment.TickCount - LaneClearLastR >= Delay) { R.Cast(rLocation.CastPosition); LaneClearLastR = Environment.TickCount; } } }