private static void Edetonation() { var target = TargetSelector.GetTarget(R1.Range, TargetSelector.DamageType.Magical); if (target != null) { if (Lux_E == null) { return; } var rooted = target.HasBuff("LuxLightBindingMis"); var debuff = target.HasBuff("luxilluminatingfraulein"); var qcollision = Q1.GetCollision(player.Position.To2D(), new List <Vector2> { Q1.GetPrediction(target).CastPosition.To2D() }); var minioncol = qcollision.Where(x => (x is AIHeroClient) && x.IsEnemy).Count(); //Lux E detonation (Object Bounding Radius) if (Lux_E != null && rooted && target.Distance(player.Position) <= Orbwalking.GetRealAutoAttackRange(player) && target.Health > E1.GetDamage(target) && debuff) { Printchat("[E] Detonation Blocked. Reason: AA-able"); return; } if (Lux_E != null && rooted && target.Distance(player.Position) <= Orbwalking.GetRealAutoAttackRange(player) + 300 && target.Health > E1.GetDamage(target) && debuff && target.CountEnemiesInRange(600) <= 1) { Printchat("[E] Detonation Blocked. Reason: AA-able"); return; } if (Lux_E != null && Lux_E.Position.CountEnemiesInRange(E1.Width) >= 1) { E1.Cast(); Printchat("[E] Toggle Cast. Reason: Enemy Detected"); } } else if (Lux_E != null && Lux_E.Position.CountEnemiesInRange(E1.Width) >= 1) { E1.Cast(); Printchat("[E] Toggle Cast. Reason: Enemy Detected"); } }
public static void SpellCastR(AIHeroClient target) { if (target == null) { return; } if (!target.IsValid) { return; } var rslider = Config.Item("combo.r.slider").GetValue <Slider>().Value; #region variables/floats //[R] Combo Sequences double qdmg = Q1.GetDamage(target); double edmg = E1.GetDamage(target); double rdmg = R1.GetDamage(target); double aa = Player.GetAutoAttackDamage(target); Ignite = player.GetSpellSlot("summonerdot"); var insideE = Lux_E != null && target.Distance(Lux_E.Position) < E1.Width; var thp = target.Health; var AArange = Orbwalking.GetRealAutoAttackRange(player); var debuff = target.HasBuff("luxilluminatingfraulein"); if (debuff) { rdmg += PassiveDMG(target); } if (debuff) { aa += PassiveDMG(target); } if (insideE) { rdmg += edmg; } var qcollision = Q1.GetCollision(player.Position.To2D(), new List <Vector2> { Q1.GetPrediction(target).CastPosition.To2D() }); var minioncol = qcollision.Where(x => (x is AIHeroClient) && x.IsEnemy).Count(); var qpred = Q1.GetPrediction(target).Hitchance >= HitChance.High; var epred = E1.GetPrediction(target).Hitchance >= HitChance.High; var rooted = target.HasBuff("LuxLightBindingMis"); if (target.Distance(player.Position) < rslider && !rooted) { return; } #endregion if (insideE && Lux_E != null) { return; } //Checks if Allies can kill the bitch if (AllyCheck(target, 600) >= 2 && target.Health < rdmg / 2) { return; } //Checks if an Ally can kill le bitch if (AllyCheck(target, 600) >= 1 && target.Health < rdmg / 2) { return; } if (rooted && insideE && rdmg + edmg > thp && target.IsValidTarget(R1.Range)) { SpellCast(target, R1.Range, R1, false, 1, false, PredR("prediction.R")); } if (E1.IsReady() && thp < edmg && target.IsValidTarget(E1.Range) && epred) { return; } if (Q1.IsReady() && thp < qdmg && target.IsValidTarget(Q1.Range) && minioncol <= 1 && qpred) { return; } if (insideE && thp < edmg) { return; } if (insideE && thp < edmg + aa && target.IsValidTarget(AArange)) { return; } if (thp < aa && target.IsValidTarget(AArange)) { return; } if (thp < edmg && E1.IsReady() && rooted && target.IsValidTarget(E1.Range)) { return; } if (Q1.IsReady() && !E1.IsReady() && thp < qdmg && target.IsValidTarget(Q1.Range) && minioncol <= 1 && qpred) { return; } if (E1.IsReady() && !Q1.IsReady() && thp < edmg && target.IsValidTarget(E1.Range) && epred) { return; } if (rooted && debuff && thp < aa && target.IsValidTarget(AArange)) { return; } if (Environment.TickCount - E1.LastCastAttemptT < 100 || Environment.TickCount - Q1.LastCastAttemptT < 800 && !rooted) { return; } if (rooted && insideE && thp < rdmg + edmg && target.IsValidTarget(R1.Range)) { SpellCast(target, R1.Range, R1, false, 1, false, PredR("prediction.R")); } if (rooted && E1.IsReady() && target.IsValidTarget(E1.Range) && thp < rdmg + edmg && target.IsValidTarget(R1.Range)) { SpellCast(target, R1.Range, R1, false, 1, false, PredR("prediction.R")); } if (rooted && debuff && thp < rdmg + aa && target.IsValidTarget(AArange)) { SpellCast(target, R1.Range, R1, false, 1, false, PredR("prediction.R")); } if (rooted && debuff && thp < rdmg && target.IsValidTarget(R1.Range)) { SpellCast(target, R1.Range, R1, false, 1, false, PredR("prediction.R")); } if (thp < rdmg) { SpellCast(target, R1.Range, R1, false, 1, false, PredR("prediction.R")); } }
public static void Routine() { var targetR = TargetSelector.GetTarget(R1.Range, TargetSelector.DamageType.Magical); var target = TargetSelector.GetTarget(Q1.Range, TargetSelector.DamageType.Magical); if (target == null || !target.IsValid || targetR == null || !targetR.IsValid) { return; } Ignite = player.GetSpellSlot("summonerdot"); //[R] Aoe Cast byte hitcount; hitcount = (byte)Config.Item("advanced.R.aoe.count").GetValue <Slider>().Value; if (Config.Item("advanced.R.aoe").GetValue <bool>() && R1.IsReady() && !E1.IsReady() && target.IsValidTarget(E1.Range + E1.Width)) { R1.CastIfWillHit(target, hitcount); } #region -- Variables/Floats etc. float qdmg = Q1.GetDamage(target); float edmg = E1.GetDamage(target); float rdmg = R1.GetDamage(target); float aa = (float)Player.GetAutoAttackDamage(target); var insideE = Lux_E != null && target.Distance(Lux_E.Position) <= E1.Width; var thp = target.Health; var AArange = Orbwalking.GetRealAutoAttackRange(player); var debuff = target.HasBuff("luxilluminatingfraulein"); if (debuff) { rdmg += PassiveDMG(target); } if (debuff) { aa += PassiveDMG(target); } if (insideE) { rdmg += edmg; } var rooted = target.HasBuff("LuxLightBindingMis"); #endregion if (insideE && thp < edmg && target.IsValidTarget(R1.Range)) { return; } if (rooted && insideE && rdmg + edmg > thp && target.IsValidTarget(R1.Range)) { SpellCastR(targetR); } #region -- Q spellcast var prediction = Q1.GetPrediction(target, true); var collision = Q1.GetCollision(Player.Position.To2D(), new List <Vector2> { prediction.UnitPosition.To2D() }); if (Config.Item("combo.Q").GetValue <bool>() && Environment.TickCount - E1.LastCastAttemptT > 400 && Environment.TickCount - R1.LastCastAttemptT > 800 && prediction.Hitchance >= PredQ("prediction.Q")) { if (collision.Count == 2) { if (collision[0].IsChampion() || collision[1].IsChampion()) { Q1.Cast(prediction.CastPosition); } } else if (collision.Count == 1 && collision[0].IsChampion()) { Q1.Cast(prediction.CastPosition); } else if (collision.Count <= 1) { Q1.Cast(prediction.CastPosition); } #endregion -- Q spellcast end if (rooted && thp < aa && target.IsValidTarget(AArange)) { return; } if (Config.Item("combo.E").GetValue <bool>() && Environment.TickCount - Q1.LastCastAttemptT > 875 && Environment.TickCount - R1.LastCastAttemptT > 800) { SpellCast(target, E1.Range, E1, false, 1, true, PredE("prediction.E")); } if (IgniteKillCheck() < thp && target.HasBuff("summonerdot")) { return; } if (Config.Item("combo.R").GetValue <bool>() && R1.IsReady()) { SpellCastR(targetR); } if (!target.IsValidTarget(600)) { return; } var ignitemenu = Config.Item("autospells.ignite").GetValue <bool>(); if (thp > IgniteDamage(target) && thp < IgniteDamage(target) + edmg + aa && rooted && E1.IsReady() && target.IsValidTarget(600) && Ignite.IsReady() && ignitemenu) { player.Spellbook.CastSpell(Ignite, target); Printchat("Ignite casted"); } if (thp < IgniteDamage(target) + rdmg + aa && rooted && Ignite.IsReady() && R1.IsReady() && ignitemenu) { player.Spellbook.CastSpell(Ignite, target); Printchat("Ignite casted"); } if (thp < IgniteDamage(target) + rdmg + aa && Ignite.IsReady() && R1.IsReady() && ignitemenu) { player.Spellbook.CastSpell(Ignite, target); Printchat("Ignite casted"); } if (thp < IgniteDamage(target) && target.IsValidTarget(600) && AllyCheck(target, 600) < 1 && Ignite.IsReady() && ignitemenu) { player.Spellbook.CastSpell(Ignite, target); Printchat("Ignite casted"); } } }