static void Harass(Obj_AI_Hero target) { if (Spells[SpellSlot.Q].IsReady() && LuxUtils.Active("Harass.UseQ") && Player.ManaPercent > LuxUtils.GetSlider("Harass.Mana")) { var pred = Spells[SpellSlot.Q].GetPrediction(target, true); if (pred.CollisionObjects.Count <= 1 && pred.Hitchance > LuxUtils.GetHitChance("Hitchance.Q")) { Spells[SpellSlot.Q].Cast(pred.CastPosition); } } if (Spells[SpellSlot.E].IsReady() && LuxE == null && LuxUtils.Active("Harass.UseE")) { var pred = Spells[SpellSlot.E].GetPrediction(target, true); if (pred.Hitchance >= LuxUtils.GetHitChance("Hitchance.E")) { Spells[SpellSlot.E].Cast(pred.CastPosition); } } else if (LuxUtils.Active("Harass.UseE") && LuxE != null && Vector3.Distance(LuxE.Position, target.ServerPosition) <= LuxE.BoundingRadius + target.BoundingRadius) { Spells[SpellSlot.E].Cast(); } }
private static void Combo(Obj_AI_Hero target) { if (Spells[SpellSlot.Q].IsReady() && LuxUtils.Active("Combo.UseQ")) { var pred = Spells[SpellSlot.Q].GetPrediction(target, true); if (pred.CollisionObjects.Count <= 1 && pred.Hitchance > LuxUtils.GetHitChance("Hitchance.Q")) { Spells[SpellSlot.Q].Cast(pred.CastPosition); } } if (Spells[SpellSlot.E].IsReady() && LuxE == null && LuxUtils.Active("Combo.UseE")) { var pred = Spells[SpellSlot.E].GetPrediction(target, true); if (pred.Hitchance >= LuxUtils.GetHitChance("Hitchance.E")) { Spells[SpellSlot.E].Cast(pred.CastPosition); } } else if (LuxUtils.Active("Combo.UseE2") && LuxE != null && Vector3.Distance(LuxE.Position, target.ServerPosition) <= LuxE.BoundingRadius + target.BoundingRadius) { Spells[SpellSlot.E].Cast(); } if (SpellSlot.R.IsReady() && LuxUtils.Active("Combo.UseR")) { var ulttarget = HeroManager.Enemies.FirstOrDefault(h => h.HasBuff("LuxLightBindingMis")); if (ulttarget != null) { var pred = Spells[SpellSlot.R].GetPrediction(ulttarget, true); if (pred.Hitchance >= LuxUtils.GetHitChance("Hitchance.R")) { Spells[SpellSlot.R].Cast(pred.CastPosition); } } else { var pred = Spells[SpellSlot.R].GetPrediction(target, true); if (pred.Hitchance >= LuxUtils.GetHitChance("Hitchance.R") || pred.CollisionObjects.Count(x => x.Type == GameObjectType.obj_AI_Hero && x.IsEnemy) > 2 && pred.Hitchance >= HitChance.High) { Spells[SpellSlot.R].Cast(pred.CastPosition); } } } }
static void Harass(AIHeroClient target) { if (Player.ManaPercent < LuxUtils.GetSlider("Harass.Mana")) { if (LuxUtils.Active("Harass.UseE") && LuxE != null && Vector3.Distance(LuxE.Position, target.ServerPosition) <= LuxE.BoundingRadius + target.BoundingRadius) { Spells[SpellSlot.E].Cast(); } return; } if (Spells[SpellSlot.Q].IsReady() && LuxUtils.Active("Harass.UseQ") && Player.Distance(target) <= Spells[SpellSlot.Q].Range) { var pred = Spells[SpellSlot.Q].GetPrediction(target, true); if (pred.CollisionObjects.Count <= 1 && pred.Hitchance >= LuxUtils.GetHitChance("Hitchance.Q")) { Spells[SpellSlot.Q].Cast(pred.CastPosition); } } if (Spells[SpellSlot.E].IsReady() && LuxE == null && LuxUtils.Active("Harass.UseE") && Player.Distance(target) <= Spells[SpellSlot.E].Range) { Spells[SpellSlot.E].SPredictionCast(target, LuxUtils.GetHitChance("Hitchance.E")); /* * var pred = Spells[SpellSlot.E].GetPrediction(target, true); * if (pred.Hitchance >= LuxUtils.GetHitChance("Hitchance.E")) * { * Spells[SpellSlot.E].Cast(pred.CastPosition); * } */ } else if (LuxUtils.Active("Harass.UseE") && LuxE != null && Vector3.Distance(LuxE.Position, target.ServerPosition) <= LuxE.BoundingRadius + target.BoundingRadius) { Spells[SpellSlot.E].Cast(); } }
static void Killsteal() { if (!LuxUtils.Active("Killsteal")) { return; } var targets = HeroManager.Enemies.Where(x => x.IsValidTarget() && !x.IsInvulnerable & !x.IsZombie); if (SpellSlot.Q.IsReady() && LuxUtils.Active("Killsteal.UseQ")) { Obj_AI_Hero qtarget = targets.Where(x => x.Distance(Player.Position) < Spells[SpellSlot.Q].Range) .MinOrDefault(x => x.Health); if (qtarget != null) { var qdmg = Player.GetSpellDamage(qtarget, SpellSlot.Q); if (qtarget.Health < qdmg) { var pred = Spells[SpellSlot.Q].GetPrediction(qtarget, true); if (pred != null && pred.Hitchance >= HitChance.Medium && pred.CollisionObjects.Count <= 1) { Spells[SpellSlot.Q].Cast(pred.CastPosition); return; } } } } if (SpellSlot.E.IsReady() && LuxUtils.Active("Killsteal.UseE")) { if (LuxE != null && LuxE.Position == LuxE.EndPosition && HeroManager.Enemies.Any(h => Vector3.Distance(LuxE.Position, h.ServerPosition) <= LuxE.BoundingRadius + h.BoundingRadius && h.Health <= Player.GetSpellDamage(h, SpellSlot.E))) { Spells[SpellSlot.E].Cast(); } else if (LuxE == null) { Obj_AI_Hero etarget = targets.Where(x => x.Distance(Player.Position) < Spells[SpellSlot.E].Range) .MinOrDefault(x => x.Health); if (etarget != null) { if (LuxE == null) { var edmg = Player.GetSpellDamage(etarget, SpellSlot.E); if (etarget.Health < edmg) { var pred = Spells[SpellSlot.E].GetPrediction(etarget, true); if (pred != null && pred.Hitchance >= HitChance.Medium) { Spells[SpellSlot.E].Cast(pred.CastPosition); } } } } } } if (SpellSlot.R.IsReady() && LuxUtils.Active("Killsteal.UseR")) { List <Obj_AI_Hero> targetss = new List <Obj_AI_Hero>(); targetss = HeroManager.Enemies.Where(x => x.Health <= Player.GetSpellDamage(x, SpellSlot.R) && x.Distance(Player) <= Spells[SpellSlot.R].Range).ToList(); List <CastPosition1> Positions = new List <CastPosition1>(); foreach (var h in targetss) { var pred = Spells[SpellSlot.R].GetPrediction(h, true); // List<Obj_AI_Base> collobjs = // pred.CollisionObjects.FindAll(x => x.Type == GameObjectType.obj_AI_Hero && x.IsEnemy); CastPosition1 cp = new CastPosition1 { pos = pred.CastPosition, hc = pred.Hitchance, numberhit = pred.AoeTargetsHitCount + 1, hasbuff = h.HasBuff("LuxLightBindingMis") }; Positions.Add(cp); } var bestpossibleposition = Positions.OrderByDescending(x => x.numberhit).ThenByDescending(x => x.hc).ThenByDescending(h => h.hasbuff).FirstOrDefault(); if (bestpossibleposition != null && bestpossibleposition.hc >= LuxUtils.GetHitChance("Hitchance.R")) { Spells[SpellSlot.R].Cast(bestpossibleposition.pos); } /* * var targ = HeroManager.Enemies.FirstOrDefault(h => h.HasBuff("LuxLightBindingMis") && h.IsValidTarget(Spells[SpellSlot.R].Range) && h.Health < Player.GetSpellDamage(h, SpellSlot.R)); * * if (targ == null) * { * targ = HeroManager.Enemies.FirstOrDefault(x => x.IsValidTarget() && Vector3.Distance(Player.ServerPosition, x.ServerPosition) < Spells[SpellSlot.R].Range && x.Health < Player.GetSpellDamage(x, SpellSlot.R)); * } * * if (targ != null) * { * var pred = Spells[SpellSlot.R].GetPrediction(targ, true); * if (pred.Hitchance >= LuxUtils.GetHitChance("Hitchance.R")) * { * Spells[SpellSlot.R].Cast(pred.CastPosition); * } * else if (pred.AoeTargetsHitCount >= 3 || pred.CollisionObjects.Count(x => x.Type == GameObjectType.obj_AI_Hero) >= 2) * { * Spells[SpellSlot.R].Cast(pred.CastPosition); * } * } */ } if (Spells[IgniteSlot].IsReady() && LuxUtils.Active("Killsteal.UseIgnite")) { var targ = HeroManager.Enemies.FirstOrDefault(x => x.IsValidTarget() && Vector3.Distance(Player.ServerPosition, x.ServerPosition) < Spells[IgniteSlot].Range && x.Health < (Player.GetSummonerSpellDamage(x, Damage.SummonerSpell.Ignite))); if (targ != null) { Spells[IgniteSlot].Cast(targ); } } }
private static void Combo(Obj_AI_Hero target) { if (Spells[SpellSlot.Q].IsReady() && LuxUtils.Active("Combo.UseQ") && Player.Distance(target) <= Spells[SpellSlot.Q].Range) { var pred = Spells[SpellSlot.Q].GetPrediction(target, true); if (pred.CollisionObjects.Count <= 1 && pred.Hitchance >= LuxUtils.GetHitChance("Hitchance.Q")) { Spells[SpellSlot.Q].Cast(pred.CastPosition); } } if (Spells[SpellSlot.E].IsReady() && LuxE == null && LuxUtils.Active("Combo.UseE") && Player.Distance(target) <= Spells[SpellSlot.E].Range) { Spells[SpellSlot.E].SPredictionCast(target, LuxUtils.GetHitChance("Hitchance.E")); /* * var pred = Spells[SpellSlot.E].GetPrediction(target, true); * if (pred.Hitchance >= LuxUtils.GetHitChance("Hitchance.E")) * { * Spells[SpellSlot.E].Cast(pred.CastPosition); * } */ } else if (LuxUtils.Active("Combo.UseE2") && LuxE != null && Vector3.Distance(LuxE.Position, target.ServerPosition) <= LuxE.BoundingRadius + target.BoundingRadius) { Spells[SpellSlot.E].Cast(); } if (SpellSlot.R.IsReady() && LuxUtils.Active("Combo.UseR")) { List <Obj_AI_Hero> targets = new List <Obj_AI_Hero>(); if (LuxUtils.Active("Combo.RKillable")) { targets = HeroManager.Enemies.Where( x => x.Health <= Player.GetSpellDamage(x, SpellSlot.R) && x.Distance(Player) <= Spells[SpellSlot.R].Range).ToList(); } else { targets = HeroManager.Enemies.Where(x => x.Distance(Player) <= Spells[SpellSlot.R].Range).ToList(); } List <CastPosition1> Positions = new List <CastPosition1>(); foreach (var h in targets) { var pred = Spells[SpellSlot.R].GetPrediction(h, true); int hit = pred.AoeTargetsHitCount + 1; // List<Obj_AI_Base> collobjs = // pred.CollisionObjects.FindAll(x => x.Type == GameObjectType.obj_AI_Hero && x.IsEnemy); CastPosition1 cp = new CastPosition1 { pos = pred.CastPosition, hc = pred.Hitchance, numberhit = hit, hasbuff = h.HasBuff("LuxLightBindingMis") }; Positions.Add(cp); } var bestpossibleposition = Positions.OrderByDescending(x => x.numberhit) .ThenByDescending(x => x.hc) .ThenByDescending(h => h.hasbuff) .FirstOrDefault(); if (bestpossibleposition != null && bestpossibleposition.hc >= LuxUtils.GetHitChance("Hitchance.R") && bestpossibleposition.numberhit >= LuxUtils.GetSlider("Combo.Rcount")) { Spells[SpellSlot.R].Cast(bestpossibleposition.pos); } } if (SpellSlot.W.IsReady() && LuxUtils.Active("Combo.UseW")) { var list = HeroManager.Allies; var lowhealthallies = list.Where(ally => ally.HealthPercent <= 40 && Player.Distance(ally) <= Spells[SpellSlot.W].Range); Obj_AI_Hero besthero = null; int amthit = 0; foreach (var hero in lowhealthallies) { var pred = Prediction.GetPrediction(WInput(hero)); if (pred.Hitchance >= HitChance.Collision || pred.Hitchance >= HitChance.Low) { var coll = pred.CollisionObjects.Count; if (coll >= amthit) { amthit = coll; besthero = hero; } } } if (besthero != null && Player.HealthPercent <= 30 && Player.CountEnemiesInRange(800) > 0) { Spells[SpellSlot.W].Cast(besthero.ServerPosition); } } }
private static void AutoSpells(EventArgs args) { foreach (var target in HeroManager.Enemies) { if (LuxUtils.Active("Combo.UseE2") && LuxE != null && Vector3.Distance(LuxE.Position, target.ServerPosition) <= LuxE.BoundingRadius + target.BoundingRadius) { Spells[SpellSlot.E].Cast(); } } if (SpellSlot.R.IsReady() && LuxUtils.Active("Auto.R")) { List <Obj_AI_Hero> targets = new List <Obj_AI_Hero>(); targets = HeroManager.Enemies.Where(x => x.Distance(Player) <= Spells[SpellSlot.R].Range).ToList(); List <CastPosition1> Positions = new List <CastPosition1>(); foreach (var h in targets) { var pred = Spells[SpellSlot.R].GetPrediction(h, true); //List<Obj_AI_Base> collobjs = // pred.CollisionObjects.FindAll(x => x.Type == GameObjectType.obj_AI_Hero && x.IsEnemy); if (pred != null) { CastPosition1 cp = new CastPosition1 { pos = pred.CastPosition, hc = pred.Hitchance, numberhit = pred.AoeTargetsHitCount + 1, hasbuff = h.HasBuff("LuxLightBindingMis") }; Positions.Add(cp); } } var bestpossibleposition = Positions.OrderByDescending(x => x.numberhit) .ThenByDescending(x => x.hc) .ThenByDescending(h => h.hasbuff) .FirstOrDefault(); if (bestpossibleposition != null && bestpossibleposition.hc >= LuxUtils.GetHitChance("Hitchance.R") && bestpossibleposition.numberhit >= LuxUtils.GetSlider("Auto.Rcount")) { Spells[SpellSlot.R].Cast(bestpossibleposition.pos); } } if (SpellSlot.W.IsReady() && LuxUtils.Active("Auto.W")) { var list = HeroManager.Allies; var lowhealthallies = list.Where(ally => ally.HealthPercent <= LuxUtils.GetSlider("Auto.Whp") && Player.Distance(ally) <= Spells[SpellSlot.W].Range); Obj_AI_Hero besthero = null; int amthit = 0; foreach (var hero in lowhealthallies) { var pred = Prediction.GetPrediction(WInput(hero)); if (pred.Hitchance >= HitChance.Collision || pred.Hitchance >= HitChance.Low) { var coll = pred.CollisionObjects.Count; if (coll >= amthit) { amthit = coll; besthero = hero; } } } if (besthero != null && amthit >= LuxUtils.GetSlider("Auto.Wcount")) { Spells[SpellSlot.W].Cast(besthero.ServerPosition); } } }
static void Killsteal() { if (!LuxUtils.Active("Killsteal")) { return; } var targets = HeroManager.Enemies.Where(x => x.IsValidTarget() && !x.IsInvulnerable & !x.IsZombie); if (SpellSlot.Q.IsReady() && LuxUtils.Active("Killsteal.UseQ")) { Obj_AI_Hero qtarget = targets.Where(x => x.Distance(Player.Position) < Spells[SpellSlot.Q].Range) .MinOrDefault(x => x.Health); if (qtarget != null) { var qdmg = Player.GetSpellDamage(qtarget, SpellSlot.Q); if (qtarget.Health < qdmg) { var pred = Spells[SpellSlot.Q].GetPrediction(qtarget, true); if (pred != null && pred.Hitchance > HitChance.Medium && pred.CollisionObjects.Count <= 1) { Spells[SpellSlot.Q].Cast(pred.CastPosition); return; } } } } if (SpellSlot.E.IsReady() && LuxUtils.Active("Killsteal.UseE")) { if (LuxE != null && LuxE.Position == LuxE.EndPosition && HeroManager.Enemies.Any(h => Vector3.Distance(LuxE.Position, h.ServerPosition) <= LuxE.BoundingRadius + h.BoundingRadius && h.Health <= Player.GetSpellDamage(h, SpellSlot.E))) { Spells[SpellSlot.E].Cast(); } else if (LuxE == null) { Obj_AI_Hero etarget = targets.Where(x => x.Distance(Player.Position) < Spells[SpellSlot.E].Range) .MinOrDefault(x => x.Health); if (etarget != null) { if (LuxE == null) { var edmg = Player.GetSpellDamage(etarget, SpellSlot.E); if (etarget.Health < edmg) { var pred = Spells[SpellSlot.Q].GetPrediction(etarget, false); if (pred != null && pred.Hitchance > HitChance.Medium) { Spells[SpellSlot.E].Cast(pred.CastPosition); } } } } } } if (SpellSlot.R.IsReady() && LuxUtils.Active("Killsteal.UseR")) { var targ = HeroManager.Enemies.FirstOrDefault(h => h.HasBuff("LuxLightBindingMis") && h.IsValidTarget(Spells[SpellSlot.R].Range) && h.Health < Player.GetSpellDamage(h, SpellSlot.R)); if (targ == null) { targ = HeroManager.Enemies.FirstOrDefault(x => x.IsValidTarget() && Vector3.Distance(Player.ServerPosition, x.ServerPosition) < Spells[SpellSlot.R].Range && x.Health < Player.GetSpellDamage(x, SpellSlot.R)); } if (targ != null) { var pred = Spells[SpellSlot.R].GetPrediction(targ, true); if (pred.Hitchance >= LuxUtils.GetHitChance("Hitchance.R")) { Spells[SpellSlot.R].Cast(pred.CastPosition); } else if (pred.AoeTargetsHitCount >= 3 || pred.CollisionObjects.Count(x => x.Type == GameObjectType.obj_AI_Hero) >= 2) { Spells[SpellSlot.R].Cast(pred.CastPosition); } } } if (Spells[IgniteSlot].IsReady() && LuxUtils.Active("Killsteal.UseIgnite")) { var targ = HeroManager.Enemies.FirstOrDefault(x => x.IsValidTarget() && Vector3.Distance(Player.ServerPosition, x.ServerPosition) < Spells[IgniteSlot].Range && x.Health < (Player.GetSummonerSpellDamage(x, Damage.SummonerSpell.Ignite))); if (targ != null) { Spells[IgniteSlot].Cast(targ); } } }
private static void Combo(Obj_AI_Hero target) { if (Spells[SpellSlot.Q].IsReady() && LuxUtils.Active("Combo.UseQ")) { var pred = Spells[SpellSlot.Q].GetPrediction(target, true); if (pred.CollisionObjects.Count <= 1 && pred.Hitchance > LuxUtils.GetHitChance("Hitchance.Q")) { Spells[SpellSlot.Q].Cast(pred.CastPosition); } } if (Spells[SpellSlot.E].IsReady() && LuxE == null && LuxUtils.Active("Combo.UseE")) { var pred = Spells[SpellSlot.E].GetPrediction(target, true); if (pred.Hitchance >= LuxUtils.GetHitChance("Hitchance.E")) { Spells[SpellSlot.E].Cast(pred.CastPosition); } } else if (LuxUtils.Active("Combo.UseE2") && LuxE != null && Vector3.Distance(LuxE.Position, target.ServerPosition) <= LuxE.BoundingRadius + target.BoundingRadius) { Spells[SpellSlot.E].Cast(); } if (SpellSlot.R.IsReady() && LuxUtils.Active("Combo.UseR")) { var ulttarget = HeroManager.Enemies.FirstOrDefault(h => h.HasBuff("LuxLightBindingMis")); if (ulttarget != null) { var pred = Spells[SpellSlot.R].GetPrediction(ulttarget, true); if (pred.Hitchance >= LuxUtils.GetHitChance("Hitchance.R")) { Spells[SpellSlot.R].Cast(pred.CastPosition); } } else { var pred = Spells[SpellSlot.R].GetPrediction(target, true); if (pred.Hitchance >= LuxUtils.GetHitChance("Hitchance.R") || pred.CollisionObjects.Count(x => x.Type == GameObjectType.obj_AI_Hero && x.IsEnemy) > 2 && pred.Hitchance >= HitChance.High) { Spells[SpellSlot.R].Cast(pred.CastPosition); } } } if (SpellSlot.W.IsReady() && LuxUtils.Active("Combo.UseW")) { var list = HeroManager.Allies; var lowhealthallies = list.Where(ally => ally.HealthPercent <= 40 && Player.Distance(ally) <= Spells[SpellSlot.W].Range); Obj_AI_Hero besthero = null; int amthit = 0; foreach (var hero in lowhealthallies) { var pred = Prediction.GetPrediction(WInput(hero)); if (pred.Hitchance >= HitChance.Collision || pred.Hitchance >= HitChance.Low) { var coll = pred.CollisionObjects.Count; if (coll >= amthit) { amthit = coll; besthero = hero; } } } if (besthero != null) { Spells[SpellSlot.W].Cast(besthero.ServerPosition); } } }