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 OnGapClose(ActiveGapcloser args) { if (Player.IsDead || Player.IsRecalling()) { return; } var sender = args.Sender; if (sender != null && LuxUtils.Active("Interrupter.AntiGapClose") && sender.IsValidTarget()) { if (LuxUtils.Active("Interrupter.AG.UseQ") && Vector3.Distance(sender.ServerPosition, Player.ServerPosition) <= Spells[SpellSlot.Q].Range) { Spells[SpellSlot.Q].Cast(sender.ServerPosition); } } }
static void MixedModeLogic(Obj_AI_Hero target, bool isMixed) { if (isMixed && target != null) { Harass(target); } if (!LuxUtils.Active("Farm.Enable") || target == null || Player.ManaPercent < LuxUtils.GetSlider("Farm.Mana")) { return; } var Minions = ObjectManager.Get <Obj_AI_Minion>() .Where( m => m.IsValidTarget() && (Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells[SpellSlot.E].Range)).ToList(); if (!Minions.Any()) { return; } if (SpellSlot.Q.IsReady() && LuxUtils.Active("Farm.UseQ")) { var KillableMinionsQ = Minions.Where(m => m.Health <Player.GetSpellDamage(m, SpellSlot.Q) && Vector3.Distance(m.ServerPosition, Player.ServerPosition)> Player.AttackRange); if (KillableMinionsQ.Any()) { Spells[SpellSlot.Q].Cast(KillableMinionsQ.FirstOrDefault().ServerPosition); } } if (SpellSlot.E.IsReady() && LuxUtils.Active("Farm.UseE")) { var KillableMinionsE = Minions.Where(m => m.Health < Player.GetSpellDamage(m, SpellSlot.W) && Vector3.Distance(Player.ServerPosition, m.ServerPosition) < Spells[SpellSlot.E].Range); if (KillableMinionsE.Any()) { Spells[SpellSlot.E].Cast(KillableMinionsE.FirstOrDefault().ServerPosition); } } if (LuxE != null && LuxE.Position == LuxE.EndPosition) { Spells[SpellSlot.E].Cast(); } }
static void Harass(Obj_AI_Hero 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(); } }
private static void OnUpdate(EventArgs args) { if (Player.IsDead || Player.IsRecalling()) { return; } Killsteal(); var target = TargetSelector.GetTarget( Spells[SpellSlot.Q].Range, TargetSelector.DamageType.Magical, true, LuxMenu.BlackList); if (target != null && LuxUtils.ActiveKeyBind("Keys.HarassT")) { Harass(target); } var Orbwalkmode = LuxMenu.Orbwalker.ActiveMode; switch (Orbwalkmode) { case Orbwalking.OrbwalkingMode.Combo: if (target != null) { Combo(target); } break; case Orbwalking.OrbwalkingMode.LaneClear: WaveClear(); break; case Orbwalking.OrbwalkingMode.Mixed: MixedModeLogic(target, true); break; case Orbwalking.OrbwalkingMode.LastHit: MixedModeLogic(target, false); break; } }
public static bool IsKillableFromPoint(this Obj_AI_Hero target, Vector3 Point) { double totaldmgavailable = 0; if (SpellSlot.Q.IsReady() && LuxUtils.Active("Combo.UseQ") && Vector3.Distance(Point, target.ServerPosition) < Spells[SpellSlot.Q].Range) { totaldmgavailable += Player.GetSpellDamage(target, SpellSlot.Q); } if (SpellSlot.E.IsReady() && LuxUtils.Active("Combo.UseE") && Vector3.Distance(Point, target.ServerPosition) < Spells[SpellSlot.E].Range + 35 && LuxE == null) { totaldmgavailable += Player.GetSpellDamage(target, SpellSlot.E); } if (SpellSlot.R.IsReady() && LuxUtils.Active("Combo.UseR") && Vector3.Distance(Point, target.ServerPosition) < Spells[SpellSlot.R].Range) { totaldmgavailable += Player.GetSpellDamage(target, SpellSlot.R); } if (Spells[IgniteSlot].IsReady() && LuxUtils.Active("Killsteal.UseIgnite") && Vector3.Distance(Point, target.ServerPosition) < Spells[IgniteSlot].Range) { totaldmgavailable += Player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite); } return(totaldmgavailable > target.Health); }
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 WaveClear() { var Minions = ObjectManager.Get <Obj_AI_Minion>() .Where( m => m.IsValidTarget() && (Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells[SpellSlot.R].Range)); if (SpellSlot.Q.IsReady() && LuxUtils.Active("Waveclear.UseQ")) { var qminions = Minions.Where( m => Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells[SpellSlot.Q].Range && m.IsValidTarget()); MinionManager.FarmLocation QLocation = MinionManager.GetBestLineFarmLocation( qminions.Select(m => m.ServerPosition.To2D()).ToList(), Spells[SpellSlot.Q].Width, Spells[SpellSlot.Q].Range); if (QLocation.MinionsHit > 1) { Spells[SpellSlot.Q].Cast(QLocation.Position); } } if (SpellSlot.E.IsReady() && LuxUtils.Active("Waveclear.UseE")) { if (LuxE == null) { var Eminions = Minions.Where( m => Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells[SpellSlot.E].Range + Spells[SpellSlot.E].Width); MinionManager.FarmLocation ELocation = MinionManager.GetBestCircularFarmLocation( Eminions.Select(m => m.ServerPosition.To2D()).ToList(), Spells[SpellSlot.E].Width, Spells[SpellSlot.E].Range); if (ELocation.MinionsHit >= 2) { Spells[SpellSlot.E].Cast(ELocation.Position); } } if (LuxUtils.Active("Waveclear.UseE2") && LuxE != null && LuxE.Position == LuxE.EndPosition) { Spells[SpellSlot.E].Cast(); } } if (SpellSlot.R.IsReady() && LuxUtils.Active("Waveclear.UseR")) { MinionManager.FarmLocation RLocation = MinionManager.GetBestLineFarmLocation( Minions.Select(m => m.ServerPosition.To2D()).ToList(), Spells[SpellSlot.R].Width, Spells[SpellSlot.R].Range); if (RLocation.MinionsHit > LuxUtils.GetSlider("Waveclear.Rcount")) { Spells[SpellSlot.R].Cast(RLocation.Position); } } }
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); } } }