private static void LastHit() { if (getCheckBoxItem(lhMenu, "Q") && Q.IsReady() && !IsDashing && (!haveQ3 || getCheckBoxItem(lhMenu, "Q3"))) { if (!haveQ3) { var minion = EntityManager.MinionsAndMonsters.EnemyMinions.Where( i => (i.IsMinion() || i.IsPet(false)) && IsInRangeQ(i) && Q.CanLastHit(i, GetQDmg(i))) .MaxOrDefault(i => i.MaxHealth); if (minion != null && Q.Casting(minion).IsCasted()) { return; } } else { var minion = EntityManager.MinionsAndMonsters.EnemyMinions.Where( i => (i.IsMinion() || i.IsPet(false)) && i.IsValidTarget(Q2.Range - i.BoundingRadius / 2) && Q2.CanLastHit(i, GetQDmg(i))).MaxOrDefault(i => i.MaxHealth); if (minion != null && Q2.Casting(minion, false, LeagueSharp.SDK.CollisionableObjects.YasuoWall).IsCasted()) { return; } } } if (getCheckBoxItem(lhMenu, "E") && E.IsReady() && !Orbwalker.IsAutoAttacking) { var minion = EntityManager.MinionsAndMonsters.EnemyMinions.Where(i => (i.IsMinion() || i.IsPet(false)) && i.IsValidTarget(E.Range) && !HaveE(i) && E.CanLastHit(i, GetEDmg(i)) && Evade.IsSafePoint(GetPosAfterDash(i).ToVector2()).IsSafe&& (!GetPosAfterDash(i).IsUnderEnemyTurret() || getCheckBoxItem(lhMenu, "ETower"))).MaxOrDefault(i => i.MaxHealth); if (minion != null && E.CastOnUnit(minion)) { lastE = Variables.TickCount; } } }
private static bool CanDash( Obj_AI_Base target, bool inQCir = false, bool underTower = true, Vector3 pos = new Vector3()) { if (HaveE(target)) { return(false); } if (!pos.IsValid()) { pos = target.ServerPosition; } var posAfterE = GetPosAfterDash(target); return((underTower || !posAfterE.IsUnderEnemyTurret()) && posAfterE.Distance(pos) < (inQCir ? Q3.Range : pos.DistanceToPlayer()) && Evade.IsSafePoint(posAfterE.ToVector2()).IsSafe); }
private static void LaneClear() { var useQ = getCheckBoxItem(lcMenu, "Q"); var useQ3 = getCheckBoxItem(lcMenu, "Q3"); if (haveQ3 && useQ3) { var minions = EntityManager.MinionsAndMonsters.GetJungleMonsters().Where(i => Q2.IsInRange(i)).Cast <Obj_AI_Base>().ToList(); if (minions != null) { Q2.Cast(minions.FirstOrDefault()); } } if (getCheckBoxItem(lcMenu, "E") && E.IsReady()) { var minions = Common.ListMinions().Where(i => i.LSIsValidTarget(E.Range) && !HaveE(i) && (!GetPosAfterDash(i).IsUnderEnemyTurret() || getCheckBoxItem(lcMenu, "ETower")) && Evade.IsSafePoint(GetPosAfterDash(i).ToVector2()).IsSafe).OrderByDescending(i => i.MaxHealth).ToList(); if (minions.Count > 0) { var minion = minions.FirstOrDefault(i => E.CanLastHit(i, GetEDmg(i))); if (useQ && minion == null && Q.IsReady(50) && (!haveQ3 || useQ3)) { var sub = new List <Obj_AI_Minion>(); foreach (var mob in minions) { if ((E2.CanLastHit(mob, GetQDmg(mob), GetEDmg(mob)) || mob.Team == GameObjectTeam.Neutral) && mob.Distance(GetPosAfterDash(mob)) < Q3.Range) { sub.Add(mob); } if (getCheckBoxItem(lcMenu, "ELastHit")) { continue; } var nearMinion = Common.ListMinions() .Where(i => i.IsValidTarget(Q3.Range, true, GetPosAfterDash(mob))) .ToList(); if (nearMinion.Count > 2 || nearMinion.Count(i => mob.Health <= GetQDmg(mob)) > 1) { sub.Add(mob); } } minion = sub.FirstOrDefault(); } if (minion != null && E.CastOnUnit(minion)) { lastE = Variables.TickCount; return; } } } if (useQ && Q.IsReady() && (!haveQ3 || useQ3)) { if (IsDashing) { if (CanCastQCir) { var minions = GetQCirObj.Where(i => i is Obj_AI_Minion).ToList(); if (minions.Any(i => i.Health <= GetQDmg(i) || i.Team == GameObjectTeam.Neutral) || minions.Count > 1) { CastQCir(minions); } } } else { var minions = Common.ListMinions().Where(i => !haveQ3 ? IsInRangeQ(i) : i.IsValidTarget(Q2.Range - i.BoundingRadius / 2)).OrderByDescending(i => i.MaxHealth).ToList(); if (minions.Count == 0) { return; } if (!haveQ3) { var minion = minions.FirstOrDefault(i => Q.CanLastHit(i, GetQDmg(i))); if (minion != null) { Q.Casting(minion); } else { var pos = Q.GetLineFarmLocation(minions); if (pos.MinionsHit > 0) { Q.Cast(pos.Position); } } } else { var pos = Q2.GetLineFarmLocation(minions); if (pos.MinionsHit > 0) { Console.WriteLine("ASKDJLAKSJDLKASJDKSAJD"); Q2.Cast(pos.Position); } } } } }
private static void Combo() { if (R.IsReady() && getKeyBindItem(comboMenu, "R")) { var targetR = GetRTarget; if (targetR.Count > 0) { var targets = (from enemy in targetR let nearEnemy = EntityManager.Heroes.Enemies.Where(i => i.LSIsValidTarget(RWidth, true, enemy.ServerPosition) && HaveR(i)).ToList() where (nearEnemy.Count > 1 && enemy.Health + enemy.AttackShield <= R.GetDamage(enemy)) || nearEnemy.Sum(i => i.HealthPercent) / nearEnemy.Count <= getSliderItem(comboMenu, "RHpU") || nearEnemy.Count >= getSliderItem(comboMenu, "RCountA") orderby nearEnemy.Count descending select enemy).ToList(); if (getCheckBoxItem(comboMenu, "RDelay")) { targets = targets.Where(CanCastDelayR).ToList(); } if (targets.Count > 0) { var target = targets.MaxOrDefault(i => new Priority().GetDefaultPriority(i)); if (target != null && R.CastOnUnit(target)) { return; } } } } if (getCheckBoxItem(comboMenu, "W") && W.IsReady()) { var target = TargetSelector.GetTarget(E.Range, DamageType.Physical); if (target != null && Math.Abs(target.GetProjectileSpeed() - float.MaxValue) > float.Epsilon && (target.HealthPercent > Player.HealthPercent ? Player.CountAllyHeroesInRange(Q.Range) < target.CountEnemyHeroesInRange(Q.Range) : Player.HealthPercent < 30)) { var posPred = W.GetPredPosition(target, true); if (posPred.DistanceToPlayer() > 100 && posPred.DistanceToPlayer() < 375 && W.Cast(posPred)) { return; } } } if (getCheckBoxItem(comboMenu, "E") && E.IsReady() && wallLeft != null && wallRight != null) { var target = TargetSelector.GetTarget(E.Range, DamageType.Physical); if (target != null && Math.Abs(target.GetProjectileSpeed() - float.MaxValue) > float.Epsilon && !HaveE(target) && Evade.IsSafePoint(GetPosAfterDash(target).ToVector2()).IsSafe) { var listPos = Common.ListEnemies() .Where(i => i.LSIsValidTarget(E.Range * 2) && !HaveE(i)) .Select(GetPosAfterDash) .Where( i => target.Distance(i) < target.DistanceToPlayer() || target.Distance(i) < target.GetRealAutoAttackRange() + 100) .ToList(); if (listPos.Any(i => IsThroughWall(target.ServerPosition, i)) && E.CastOnUnit(target)) { lastE = Variables.TickCount; return; } } } if (getCheckBoxItem(comboMenu, "EGap") && E.IsReady()) { var underTower = getCheckBoxItem(comboMenu, "ETower"); if (getBoxItem(comboMenu, "EMode") == 0) { var listDashObj = GetDashObj(underTower); var target = E.GetTarget(Q3.Range); if (target != null && haveQ3 && Q.IsReady(50)) { var nearObj = GetBestObj(listDashObj, target, true); if (nearObj != null && (GetPosAfterDash(nearObj).CountEnemyHeroesInRange(Q3.Range) > 1 || Player.CountEnemyHeroesInRange(Q.Range + E.Range / 2) == 1) && E.CastOnUnit(nearObj)) { lastE = Variables.TickCount; return; } } target = E.GetTarget(); if (target != null && ((cDash > 0 && CanDash(target, false, underTower)) || (haveQ3 && Q.IsReady(50) && CanDash(target, true, underTower))) && E.CastOnUnit(target)) { lastE = Variables.TickCount; return; } target = Q.GetTarget(100) ?? Q2.GetTarget(); if (target != null && (!Player.Spellbook.IsAutoAttacking || Player.HealthPercent < 40)) { var nearObj = GetBestObj(listDashObj, target); var canDash = cDash == 0 && nearObj != null && !HaveE(target); if (Q.IsReady(50)) { var nearObjQ3 = GetBestObj(listDashObj, target, true); if (nearObjQ3 != null) { nearObj = nearObjQ3; canDash = true; } } if (!canDash && target.DistanceToPlayer() > target.GetRealAutoAttackRange() * 0.7) { canDash = true; } if (canDash) { if (nearObj == null && E.IsInRange(target) && CanDash(target, false, underTower)) { nearObj = target; } if (nearObj != null && E.CastOnUnit(nearObj)) { lastE = Variables.TickCount; return; } } } } else { var target = Orbwalker.LastTarget; if (target == null || Player.Distance(target) > target.GetRealAutoAttackRange() * 0.7 || Player.Distance(Game.CursorPos) > E.Range * 1.5) { var obj = GetBestObjToMouse(underTower); if (obj != null && E.CastOnUnit(obj)) { lastE = Variables.TickCount; return; } } } } if (Q.IsReady()) { if (IsDashing) { if (CanCastQCir) { if (CastQCir(GetQCirTarget)) { return; } if (!haveQ3 && getCheckBoxItem(comboMenu, "EGap") && getCheckBoxItem(comboMenu, "EStackQ") && Player.CountEnemyHeroesInRange(700) == 0 && CastQCir(GetQCirObj)) { return; } } } else if (!haveQ3 ? Q.CastingBestTarget(true).IsCasted() : CastQ3()) { return; } } }
private static void Combo() { if (R.IsReady() && getKeyBindItem(comboMenu, "R")) { var target = GetRTarget; if (target != null && R.CastOnUnit(target)) { return; } } if (getCheckBoxItem(comboMenu, "W") && W.IsReady()) { var target = TargetSelector.GetTarget(E.Range, DamageType.Physical); if (target != null && Math.Abs(target.GetProjectileSpeed() - float.MaxValue) > float.Epsilon && (target.HealthPercent > Player.HealthPercent ? Player.CountAllyHeroesInRange(500) < target.CountEnemyHeroesInRange(700) : Player.HealthPercent <= 30)) { var posPred = W.GetPredPosition(target, true); if (posPred.DistanceToPlayer() > 100 && posPred.DistanceToPlayer() < 330 && W.Cast(posPred)) { return; } } } if (getCheckBoxItem(comboMenu, "E") && E.IsReady() && wallLeft != null && wallRight != null) { var target = TargetSelector.GetTarget(E.Range, DamageType.Physical); if (target != null && Math.Abs(target.GetProjectileSpeed() - float.MaxValue) > float.Epsilon && !HaveE(target) && Evade.IsSafePoint(GetPosAfterDash(target).ToVector2()).IsSafe) { var listPos = Common.ListEnemies() .Where(i => i.LSIsValidTarget(E.Range * 2) && !HaveE(i)) .Select(GetPosAfterDash) .Where( i => target.Distance(i) < target.DistanceToPlayer() || target.Distance(i) < target.GetRealAutoAttackRange() + 100) .ToList(); if (listPos.Any(i => IsThroughWall(target.ServerPosition, i)) && E.CastOnUnit(target)) { return; } } } if (getCheckBoxItem(comboMenu, "EGap") && E.IsReady()) { var target = GetBestDashObj(getCheckBoxItem(comboMenu, "ETower")); if (target != null && E.CastOnUnit(target)) { return; } } if (Q.IsReady()) { if (IsDashing) { if (CanCastQCir) { if (CastQCir(GetQCirTarget)) { return; } if (!haveQ3 && getCheckBoxItem(comboMenu, "EGap") && getCheckBoxItem(comboMenu, "EStackQ") && Player.CountEnemyHeroesInRange(700) == 0 && CastQCir(GetQCirObj)) { return; } } } else if ((!getCheckBoxItem(comboMenu, "EGap") || E.Level == 0 || GetBestDashObj(getCheckBoxItem(comboMenu, "ETower")) == null) && (!haveQ3 ? Q.CastingBestTarget(true).IsCasted() : CastQ3())) { return; } } }