void CastQE() { if (SpellManager.E.IsReady()) { CastE(); } var mana = SpellManager.Q.ManaCost + SpellManager.E.ManaCost; if (Syndra.Mana < mana * 1.5) { return; } if (SpellManager.Q.IsReady() && SpellManager.E.IsReady()) { var targ = TargetSelector.GetTarget(1200, TargetSelector.DamageType.Magical); if (targ != null) { var qpos = Syndra.ServerPosition.Extend(targ.ServerPosition, SpellManager.Q.Range / 1.4f); var xdd = qpos.Extend(Syndra.ServerPosition, -Math.Max((1200 - qpos.Distance(Syndra.ServerPosition)), 700)).To2D(); var rect = new PolyUtils.Rectangle(qpos.To2D(), xdd, 48).ToPolygon(); Polygons.Add(rect); if (rect.PointInPolygon(targ.ServerPosition.To2D()) == 1) { SpellManager.Q.Cast(qpos); } } } }
void CastE() { Polygons.Clear(); var orbs = GetEOrbs(); foreach (var orb in orbs) { var predictedposition = orb.ServerPosition.Extend(Syndra.ServerPosition, -Math.Max((1200 - orb.Distance(Syndra.ServerPosition)), 700)).To2D(); var rect = new PolyUtils.Rectangle(orb.ServerPosition.To2D(), predictedposition, orb.BoundingRadius).ToPolygon(); Polygons.Add(rect); var enemies = HeroManager.Enemies.Where(x => x.IsValidTarget(1300)); foreach (var enemy in enemies) { var delay = Syndra.Distance(enemy) / SpellManager.E.Speed; var pos = LeagueSharp.Common.Prediction.GetPrediction(enemy, delay).CastPosition.To2D(); if (rect.PointInPolygon(pos) == 1) { SpellManager.E.Cast(orb.Position); } } } }
private void Obj_AI_Hero_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (Syndra.IsRecalling() || Syndra.IsDead) { return; } if (!sender.IsMe) { return; } if ((Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && GetBool("c.e")) || (GetKeyBind("h.enabled") && GetBool("h.e"))) { var name = args.SData.Name; var castpos = args.End; if (name == "SyndraQ" || name == "syndrawcast") { var radius = 48; var predictedposition = castpos.Extend(Syndra.ServerPosition, -Math.Max((1200 - castpos.Distance(Syndra.ServerPosition)), 700)).To2D(); var rect = new PolyUtils.Rectangle(castpos.To2D(), predictedposition, radius).ToPolygon(); Polygons.Add(rect); var enemies = HeroManager.Enemies.Where(x => x.IsValidTarget(1300)); foreach (var enemy in enemies) { var delay = Syndra.Distance(enemy) / SpellManager.E.Speed; var pos = LeagueSharp.Common.Prediction.GetPrediction(enemy, delay).CastPosition.To2D(); if (rect.PointInPolygon(pos) == 1) { LeagueSharp.Common.Utility.DelayAction.Add(100, () => SpellManager.E.Cast(castpos)); } } } } }
void Waveclear() { if (Syndra.ManaPercent < GetSliderFloat("lc.mana")) { return; } var Minions = ObjectManager.Get <Obj_AI_Minion>() .Where( m => m.IsValidTarget() && (Vector3.Distance(m.ServerPosition, Syndra.ServerPosition) <= SpellManager.Q.Range || Vector3.Distance(m.ServerPosition, Syndra.ServerPosition) <= SpellManager.W.Range || Vector3.Distance(m.ServerPosition, Syndra.ServerPosition) <= SpellManager.E.Range)); if (SpellSlot.Q.IsReady() && GetBool("lc.q")) { var qminions = Minions.Where(m => Vector3.Distance(m.ServerPosition, Syndra.ServerPosition) <= SpellManager.Q.Range); MinionManager.FarmLocation QLocation = MinionManager.GetBestCircularFarmLocation(qminions.Select(m => m.ServerPosition.To2D()).ToList(), SpellManager.Q.Width, SpellManager.Q.Range); if (QLocation.Position != null && QLocation.MinionsHit > 1) { SpellManager.Q.Cast(QLocation.Position); } } if (SpellSlot.W.IsReady() && GetBool("lc.w")) { var wminions = Minions.Where( m => Vector3.Distance(m.ServerPosition, Syndra.ServerPosition) <= SpellManager.W.Range); MinionManager.FarmLocation wLocation = MinionManager.GetBestCircularFarmLocation(wminions.Select(m => m.ServerPosition.To2D()).ToList(), SpellManager.W2.Width, SpellManager.W2.Range); if (wLocation.Position != null && wLocation.MinionsHit > 0) { if (!HasSecondW && WGood) { ForceGrab(); } else if (HasSecondW) { SpellManager.W.Cast(wLocation.Position); } } } if (SpellSlot.E.IsReady() && GetBool("lc.e")) { int hitcount = 0; foreach (var min in Minions.Where(x => x.IsInRange(SpellManager.E.Range))) { var predictedposition = min.ServerPosition.Extend(Syndra.ServerPosition, -Math.Max((1200 - min.Distance(Syndra.ServerPosition)), 700)).To2D(); var rect = new PolyUtils.Rectangle(min.ServerPosition.To2D(), predictedposition, min.BoundingRadius).ToPolygon(); Polygons.Add(rect); if (rect.PointInPolygon(min.ServerPosition.To2D()) == 1) { hitcount++; } if (hitcount >= 3) { SpellManager.E.Cast(min.ServerPosition); } } } }