private static void Killteal() { const int range = 850; const float aoeratio = 0.2f; var enemies = EntityManager.Heroes.Enemies.Where(n => n.IsValidTarget(range)); var selectedTarget = TargetSelector.GetTarget(range, DamageType.Magical); var allTargets = new[] { selectedTarget }.Concat(enemies.Where(n => n.Index != selectedTarget.Index).OrderByDescending(n => Logics.TotalDamage(SpellSlot.Q, n) / n.Health)).Where(n => n.IsValidTarget() && !n.WillDie()); var ksQ = KillSteal["KsQ"].Cast <CheckBox>().CurrentValue&& Player.CanUseSpell(SpellSlot.Q) == SpellState.Ready; var ksW = KillSteal["KsW"].Cast <CheckBox>().CurrentValue&& Player.CanUseSpell(SpellSlot.W) == SpellState.Ready; var ksE = KillSteal["KsE"].Cast <CheckBox>().CurrentValue&& Player.CanUseSpell(SpellSlot.E) == SpellState.Ready; var ksR = KillSteal["KsR"].Cast <CheckBox>().CurrentValue&& Player.CanUseSpell(SpellSlot.R) == SpellState.Ready; foreach (var enemy in allTargets) { if (ksE && Player.Instance.IsInRange(enemy, E.Range) && enemy.Killable(SpellSlot.E)) { E.Cast(enemy); return; } if (ksW && Player.Instance.IsInRange(enemy, W.Range + W.Radius) && enemy.Killable(SpellSlot.W)) { var prediction = W.GetPrediction(enemy); if (prediction.HitChance >= HitChance.High) { W.Cast(prediction.CastPosition); return; } } if (ksQ && Player.Instance.IsInRange(enemy, Q.Range) && enemy.Killable(SpellSlot.Q)) { var prediction = Q.GetPrediction(enemy); if (prediction.HitChance >= HitChance.High) { Q.Cast(prediction.CastPosition); return; } } if (ksR && Player.Instance.IsInRange(enemy, R.Range) && enemy.Killable(SpellSlot.R)) { var prediction = R.GetPrediction(enemy); if (prediction.HitChance >= HitChance.High) { R.Cast(prediction.CastPosition); return; } } } }
private static void ByLast() { var minion = EntityManager.MinionsAndMonsters.Get(EntityManager.MinionsAndMonsters.EntityType.Minion, EntityManager.UnitTeam.Enemy, Player.Instance.ServerPosition, E.Range).FirstOrDefault(m => E.IsReady() && m.IsValidTarget(E.Range) && Prediction.Health.GetPrediction(m, E.CastDelay) <= Logics.GetMinionTarget(m, SpellSlot.E)); if (Farm["Elast"].Cast <CheckBox>().CurrentValue&& !(Farm["Buff"].Cast <CheckBox>().CurrentValue) && E.IsReady() && minion.IsValidTarget(E.Range)) { E.Cast(minion); } if (Farm["Elast"].Cast <CheckBox>().CurrentValue&& Farm["Buff"].Cast <CheckBox>().CurrentValue&& E.IsReady() && minion.IsValidTarget(E.Range) && minion.HasBuffOfType(BuffType.Poison)) { E.Cast(minion); } }
private static void ByLane() { var minion1 = EntityManager.MinionsAndMonsters.GetLaneMinions().Where(m => m.IsValidTarget(E.Range)).OrderBy(m => !(m.Health <= Logics.GetMinionTarget(m, SpellSlot.E))).ThenBy(m => !m.HasBuffOfType(BuffType.Poison)).ThenBy(m => m.Health).FirstOrDefault(); var minion2 = EntityManager.MinionsAndMonsters.GetLaneMinions().FirstOrDefault(m => m.IsValidTarget(E.Range) && m.HasBuffOfType(BuffType.Poison)); var minion3 = EntityManager.MinionsAndMonsters.GetLaneMinions().Where(m => m.IsValidTarget(W.Range)).ToArray(); if (minion3.Length == 0) { return; } var minionlocation = Prediction.Position.PredictCircularMissileAoe(minion3, W.Range, W.Width, W.CastDelay, W.Speed).OrderByDescending(r => r.GetCollisionObjects <Obj_AI_Minion>().Length).FirstOrDefault(); if (Farm["Qf"].Cast <CheckBox>().CurrentValue&& Q.IsReady()) { var predictedMinion = minionlocation.GetCollisionObjects <Obj_AI_Minion>(); if (predictedMinion.Length >= Farm["Qq"].Cast <Slider>().CurrentValue) { Q.Cast(minionlocation.CastPosition); } } if (Farm["Qf"].Cast <CheckBox>().CurrentValue&& Q.IsReady() && _Player.ManaPercent >= Farm["Manal"].Cast <Slider>().CurrentValue) { var predictedMinion = minionlocation.GetCollisionObjects <Obj_AI_Minion>(); if (predictedMinion.Length >= Farm["Qq"].Cast <Slider>().CurrentValue) { Q.Cast(minionlocation.CastPosition); } } if (Farm["Wf"].Cast <CheckBox>().CurrentValue&& W.IsReady() && _Player.ManaPercent >= Farm["Manal"].Cast <Slider>().CurrentValue) { var predictedMinion = minionlocation.GetCollisionObjects <Obj_AI_Minion>(); if (predictedMinion.Length >= Farm["Ww"].Cast <Slider>().CurrentValue) { W.Cast(minionlocation.CastPosition); } } if (Farm["Ef"].Cast <CheckBox>().CurrentValue&& E.IsReady() && Cassio.ManaPercent >= Farm["Manal"].Cast <Slider>().CurrentValue&& minion1.IsValidTarget(E.Range)) { E.Cast(minion2); } }
private static void ByJungle() { var monster = EntityManager.MinionsAndMonsters.GetJungleMonsters().Where(m => m.IsValidTarget(E.Range)).OrderBy(m => !(m.Health <= Logics.GetMinionTarget(m, SpellSlot.E))).ThenBy(m => !m.HasBuffOfType(BuffType.Poison)).ThenBy(m => m.Health).FirstOrDefault(); var monster2 = EntityManager.MinionsAndMonsters.GetJungleMonsters().Where(m => m.IsValidTarget(W.Range)).ToArray(); if (monster2.Length == 0) { return; } var monsterlocation = Prediction.Position.PredictCircularMissileAoe(monster2, W.Range, W.Width, W.CastDelay, W.Speed).OrderByDescending(r => r.GetCollisionObjects <Obj_AI_Minion>().Length).FirstOrDefault(); if (Farm["Ej"].Cast <CheckBox>().CurrentValue&& !Farm["AAw"].Cast <CheckBox>().CurrentValue&& E.IsReady() && Cassio.ManaPercent >= Farm["Manaj"].Cast <Slider>().CurrentValue&& monster.IsValidTarget(E.Range)) { E.Cast(monster); } if (Farm["Ej"].Cast <CheckBox>().CurrentValue&& Farm["AAw"].Cast <CheckBox>().CurrentValue&& !Orbwalker.IsAutoAttacking && E.IsReady() && Cassio.ManaPercent >= Farm["Manaj"].Cast <Slider>().CurrentValue&& monster.IsValidTarget(E.Range)) { E.Cast(monster); } if (Farm["Qj"].Cast <CheckBox>().CurrentValue&& Q.IsReady() && _Player.ManaPercent >= Farm["Manaj"].Cast <Slider>().CurrentValue) { { Q.Cast(monsterlocation.CastPosition); } } if (Farm["Wj"].Cast <CheckBox>().CurrentValue&& W.IsReady() && _Player.ManaPercent >= Farm["Manaj"].Cast <Slider>().CurrentValue) { { W.Cast(monsterlocation.CastPosition); } } }