Exemple #1
0
 private void Interrupter2_OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
 {
     if (Syndra.IsRecalling() || Syndra.IsDead)
     {
         return;
     }
     if (GetBool("m.interrupter"))
     {
         if (SpellSlot.Q.IsReady() && SpellSlot.E.IsReady())
         {
             if (sender.IsValidTarget(SpellManager.E.Range))
             {
                 SpellManager.Q.Cast(sender.ServerPosition);
                 SpellManager.E.Cast(sender.ServerPosition);
             }
             else if (sender.IsValidTarget(1200))
             {
                 var dist = Syndra.Distance(sender);
                 var pos  = sender.ServerPosition.Extend(Syndra.ServerPosition, dist);
                 SpellManager.Q.Cast(pos);
                 CastE();
                 LeagueSharp.Common.Utility.DelayAction.Add(200, () => CastE());
             }
         }
     }
 }
Exemple #2
0
 void CastQEFast()
 {
     if (SpellManager.E.IsReady() && SpellManager.Q.IsReady())
     {
         var target = TargetSelector.GetTarget(1200, TargetSelector.DamageType.Magical);
         if (target != null)
         {
             var dist = Syndra.Distance(target);
             var pos  = Syndra.ServerPosition.Extend(target.ServerPosition, 0.75f * dist);
             var pred = SpellManager.QE.GetPrediction(target);
             if (pred.Hitchance >= HitChance.Medium)
             {
                 SpellManager.Q.Cast(pos);
                 Utility.DelayAction.Add(150, () => SpellManager.E.Cast(pos));
             }
         }
     }
 }
Exemple #3
0
        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);
                    }
                }
            }
        }
Exemple #4
0
 private void AntiGapcloser_OnEnemyGapcloser(ActiveGapcloser gapcloser)
 {
     if (GetBool("m.ag"))
     {
         var sender = gapcloser.Sender;
         if (SpellSlot.Q.IsReady() && SpellSlot.E.IsReady())
         {
             if (sender.IsValidTarget(SpellManager.E.Range))
             {
                 SpellManager.Q.Cast(sender.ServerPosition);
                 SpellManager.E.Cast(sender.ServerPosition);
             }
             else if (sender.IsValidTarget(1200))
             {
                 var dist = Syndra.Distance(sender);
                 var pos  = sender.ServerPosition.Extend(Syndra.ServerPosition, dist);
                 SpellManager.Q.Cast(pos);
                 CastE();
                 LeagueSharp.Common.Utility.DelayAction.Add(200, () => CastE());
             }
         }
     }
 }
Exemple #5
0
        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));
                        }
                    }
                }
            }
        }