private void Game_OnUpdate(EventArgs args) { var enemies = EntityManager.Heroes.Enemies.ToList(); enemies.RemoveAll(x => x.Distance(AutoWalker.p) > E.Range * 2.5f); if (!enemies.Any() && EIsActive) { E.Cast(AutoWalker.p); } foreach (var enemy in EntityManager.Heroes.Enemies) { if (enemy.Distance(AutoWalker.p) > 800) { return; } var missingHealth = enemy.TotalMissingHealth(); var damage = new[] { 0f, 175f, 350f, 525f }[R.Level] +new[] { 0f, 0.286f, 0.333f, 0.4f }[R.Level] *missingHealth; var predict = AutoWalker.p.CalculateDamageOnUnit(enemy, DamageType.Magical, damage); if (predict >= enemy.Health && R.CanCast(enemy)) { R.Cast(enemy); return; } } }
//Harass Mode private static void Harass() { var useQ = HarassMenu["HQ"].Cast <CheckBox>().CurrentValue; var useW = HarassMenu["HW"].Cast <CheckBox>().CurrentValue; var useE = HarassMenu["HE"].Cast <CheckBox>().CurrentValue; var mana = HarassMenu["HM"].Cast <Slider>().CurrentValue; var target = TargetSelector.GetTarget(Q.Range, DamageType.Physical); if (Player.Instance.ManaPercent <= mana) { return; } if (target != null) { if (useW && W.CanCast(target) && !target.HasBuffOfType(BuffType.Stun)) { W.Cast(target); } if (useQ && Q.CanCast(target)) { Q.Cast(target); } if (useE && E.CanCast(target)) { var pred = E.GetPrediction(target); if (!W.IsReady() || !W.IsLearned) { if (pred.HitChance >= HitChance.Medium) { E.Cast(pred.CastPosition); } } else if (target.HasBuffOfType(BuffType.Stun) || target.HasBuffOfType(BuffType.Snare) || target.HasBuffOfType(BuffType.Knockup)) { E.Cast(target.Position); } } } }
public static void tryE() { //MUST BE RUN ON TICK TO GET TARGET var target = TargetSelector.GetTarget(E.Range, DamageType.Magical); if (target != null && E.CanCast(target) == true && E.IsOnCooldown == false) { E.Cast(); } }
public void Harass(AIHeroClient target) { if (_E.State == SpellState.Ready && _E.CanCast(target)) { _E.Cast(target); } else if (_Q.State == SpellState.Ready && _Q.IsInRange(target)) { _Q.CastMinimumHitchance(target, HitChance.High); } }
private static void Jungleclear() { var Monsters = EntityManager.MinionsAndMonsters.GetJungleMonsters(myhero.Position, 1800f); if (Monsters != null) { if (check(jungleclear, "JQ") && DemSpells.Q.IsLearned && DemSpells.Q.IsReady()) { switch (comb(jungleclear, "JQMODE")) { case 0: foreach (var monster in Monsters.Where(x => !x.IsDead && x.IsValidTarget(DemSpells.Q.Range) && x.Health > 30)) { DemSpells.Q.Cast(monster.Position); } break; case 1: foreach (var monster in Monsters.Where(x => !x.IsDead && x.IsValidTarget(DemSpells.Q.Range) && x.Health > 30 && !x.Name.ToLower().Contains("mini"))) { var pred = DemSpells.Q.GetPrediction(monster); if (!pred.Collision) { DemSpells.Q.Cast(pred.CastPosition); } } break; } } if (check(jungleclear, "JW") && DemSpells.W.IsLearned && DemSpells.W.IsReady()) { int count = Monsters.Where(x => x.Distance(myhero.Position) < DemSpells.W.Range) .Count(); if (count >= slider(jungleclear, "JWMIN")) { DemSpells.W.Cast(); } } if (check(jungleclear, "JE") && DemSpells.E.IsLearned && DemSpells.E.IsReady()) { switch (comb(jungleclear, "JEMODE")) { case 0: foreach (var monster in Monsters.Where(x => !x.IsDead && x.IsValidTarget(DemSpells.E.Range) && x.Health > 30)) { DemSpells.E.Cast(monster.Position); } break; case 1: foreach (var monster in Monsters.Where(x => !x.IsDead && x.IsValidTarget(DemSpells.E.Range) && x.Health > 30 && !x.Name.ToLower().Contains("mini"))) { var pred = DemSpells.E.GetPrediction(monster); if (pred.HitChancePercent >= 80) { DemSpells.E.Cast(pred.CastPosition); } } break; } } if (check(jungleclear, "JR") && DemSpells.R.IsLearned && DemSpells.R.IsReady()) { if (myhero.HasBuff("kogmawlivingartillerycost") && myhero.GetBuffCount("kogmawlivingartillerycost") == 3) { return; } foreach (var monster in EntityManager.MinionsAndMonsters.GetJungleMonsters().Where(x => !x.Name.ToLower().Contains("mini") && !x.IsDead && x.Health > 50 && x.IsValidTarget(DemSpells.R.Range) && RDamage(x) > x.Health)) { var pred = DemSpells.R.GetPrediction(monster); if (pred.HitChancePercent >= 80) { DemSpells.R.Cast(monster); } } } if (check(jungleclear, "AUTOSMITE") && smite.Slot != SpellSlot.Unknown && smite.IsReady()) { var SmiteDamage = new int[] { 0, 390, 410, 430, 450, 480, 510, 540, 570, 600, 640, 680, 720, 760, 800, 850, 900, 950, 1000 }[Player.Instance.Level]; foreach (var monster in EntityManager.MinionsAndMonsters.GetJungleMonsters().Where(x => !x.Name.ToLower().Contains("mini") && !x.IsDead && x.Health > 50 && smite.CanCast(x) && SmiteDamage > x.Health)) { smite.Cast(monster); } } } }
private static void Combo() { var target = TargetSelector.GetTarget(1900, DamageType.Mixed, myhero.Position); if (target != null && !target.IsInvulnerable) { var qpred = DemSpells.Q.GetPrediction(target); var epred = DemSpells.E.GetPrediction(target); var rpred = DemSpells.R.GetPrediction(target); if (check(combo, "CQ") && DemSpells.Q.CanCast(target) && qpred.HitChancePercent >= slider(pred, "QPred") && !qpred.Collision) { DemSpells.Q.Cast(qpred.CastPosition); } if (check(combo, "CW") && target.Distance(myhero.Position) < DemSpells.W.Range) { DemSpells.W.Cast(); } if (check(combo, "CE") && DemSpells.E.CanCast(target) && epred.HitChancePercent >= slider(pred, "EPred")) { DemSpells.E.Cast(epred.CastPosition); } if (check(combo, "CR") && DemSpells.R.CanCast(target) && rpred.HitChancePercent >= slider(pred, "RPred") && myhero.GetBuffCount("kogmawlivingartillerycost") <= slider(combo, "CRMAX")) { switch (comb(combo, "CRMIN")) { case 0: if (target.HealthPercent <= 100.00f) { DemSpells.R.Cast(rpred.CastPosition); } break; case 1: if (target.HealthPercent <= 49.99f) { DemSpells.R.Cast(rpred.CastPosition); } break; case 2: if (target.HealthPercent <= 24.99f) { DemSpells.R.Cast(rpred.CastPosition); } break; } } ItemManager(target); if (check(combo, "Cignt") && ignt.CanCast(target)) { if (target.Health > ComboDamage(target) && myhero.GetSummonerSpellDamage(target, DamageLibrary.SummonerSpells.Ignite) > target.Health && !check(misc, "autoign")) { ignt.Cast(target); } else if (target.Health > ComboDamage(target) && (ComboDamage(target) + (myhero.GetSummonerSpellDamage(target, DamageLibrary.SummonerSpells.Ignite) - 5)) > target.Health) { ignt.Cast(target); } } } }