Exemplo n.º 1
0
        void OnUpdate(EventArgs args)
        {
            if (Syndra.IsRecalling() || Syndra.IsDead)
            {
                return;
            }

            if (GetKeyBind("qekey"))
            {
                var mode = GetQEMode;
                if (mode == QEMode.Normal)
                {
                    CastQE();
                }

                if (mode == QEMode.Fast)
                {
                    CastQEFast();
                }
            }

            if (GetKeyBind("h.enabled"))
            {
                Harass();
            }

            if (GetBool("m.utilw"))
            {
                UtilizeW();
            }

            if (GetBool("ks.enabled"))
            {
                KillSteal();
            }


            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
            {
                Combo();
            }

            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed)
            {
                if (GetBool("h.inmixed"))
                {
                    Harass();
                }
            }

            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
            {
                Waveclear();
            }

            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit)
            {
                FarmHandler();
            }
        }
Exemplo n.º 2
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());
             }
         }
     }
 }
Exemplo n.º 3
0
 void Obj_AI_Base_OnPauseAnimation(Obj_AI_Base sender, Obj_AI_BasePauseAnimationEventArgs args)
 {
     if (Syndra.IsRecalling() || Syndra.IsDead)
     {
         return;
     }
     if (sender is Obj_AI_Minion && sender.Name == "Seed" && sender.Team == Syndra.Team)
     {
         GrabbedObject = sender;
     }
 }
Exemplo n.º 4
0
        void FarmHandler()
        {
            if (Syndra.ManaPercent < GetSliderFloat("lh.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("lh.q"))
            {
                var KillableMinionsQ = Minions.Where(m => m.Health <Syndra.GetSpellDamage(m, SpellSlot.Q) && Vector3.Distance(m.ServerPosition, Syndra.ServerPosition)> Syndra.AttackRange);
                if (KillableMinionsQ.Any())
                {
                    SpellManager.Q.Cast(KillableMinionsQ.FirstOrDefault().ServerPosition);
                    return;
                }
            }
            if (SpellSlot.W.IsReady() && GetBool("lh.w"))
            {
                var KillableMinionsW = Minions.Where(m => m.Health < Syndra.GetSpellDamage(m, SpellSlot.W) && Vector3.Distance(Syndra.ServerPosition, m.ServerPosition) < SpellManager.W.Range);
                var unit             = KillableMinionsW.FirstOrDefault();
                if (unit != null)
                {
                    SpellManager.W.CastOnUnit(unit);
                    return;
                }
            }

            if (SpellSlot.E.IsReady() && GetBool("lh.e"))
            {
                var KillableMinionsE = Minions.Where(m => m.Health <Syndra.GetSpellDamage(m, SpellSlot.E) && Vector3.Distance(m.ServerPosition, Syndra.ServerPosition)> Syndra.AttackRange);
                if (KillableMinionsE.Any())
                {
                    SpellManager.E.Cast(KillableMinionsE.FirstOrDefault().ServerPosition);
                    return;
                }
            }
        }
Exemplo n.º 5
0
        void CastRSpecific(Obj_AI_Hero candidate)
        {
            var orbcount = GetOrbcount();

            if (candidate.HealthPercent < GetSliderFloat("c.rminh"))
            {
                return;
            }
            var basedamage = Syndra.GetSpellDamage(candidate, SpellSlot.R);
            var orbdamage  = Syndra.GetSpellDamage(candidate, SpellSlot.R, 1) * orbcount;
            var total      = basedamage + orbdamage;

            if (candidate.Health <= total)
            {
                SpellManager.R.Cast(candidate);
            }
        }
Exemplo n.º 6
0
        void OnDraw(EventArgs args)
        {
            if (Syndra.IsRecalling() || Syndra.IsDead)
            {
                return;
            }

            if (!GetBool("d.enabled"))
            {
                return;
            }

            var drawq = GetCircle("d.q");
            var draww = GetCircle("d.w");
            var drawe = GetCircle("d.e");
            var drawr = GetCircle("d.r");

            if (drawq.Active)
            {
                Render.Circle.DrawCircle(Syndra.Position, SpellManager.Q.Range, drawq.Color);
            }

            if (draww.Active)
            {
                Render.Circle.DrawCircle(Syndra.Position, SpellManager.W.Range, draww.Color);
            }

            if (drawe.Active)
            {
                Render.Circle.DrawCircle(Syndra.Position, SpellManager.E.Range, drawe.Color);
            }

            if (drawr.Active)
            {
                Render.Circle.DrawCircle(Syndra.Position, SpellManager.R.Range, drawr.Color);
            }

            if (GetBool("m.dbg"))
            {
                foreach (var poly in Polygons)
                {
                    poly.Draw(Color.Aqua, 5);
                }
            }
        }
Exemplo n.º 7
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));
             }
         }
     }
 }
Exemplo n.º 8
0
        void CastR()
        {
            var candidates = HeroManager.Enemies.Where(x => x.IsValidTarget(SpellManager.R.Range)).OrderBy(x => TargetSelector.GetPriority(x));
            var orbcount   = GetOrbcount();

            foreach (var candidate in candidates.Where(x => !x.IsBlackListed()))
            {
                if (candidate.HealthPercent < GetSliderFloat("c.rminh"))
                {
                    continue;
                }
                var basedamage = Syndra.GetSpellDamage(candidate, SpellSlot.R);
                var orbdamage  = Syndra.GetSpellDamage(candidate, SpellSlot.R, 1) * orbcount;
                var total      = basedamage + orbdamage;
                if (candidate.Health <= total)
                {
                    SpellManager.R.Cast(candidate);
                }
            }
        }
Exemplo n.º 9
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);
                    }
                }
            }
        }
Exemplo n.º 10
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());
             }
         }
     }
 }
Exemplo n.º 11
0
        void UtilizeW()
        {
            var wbuff = Syndra.GetBuff("SyndraW");

            if (wbuff != null)
            {
                var duration    = wbuff.EndTime - wbuff.StartTime;
                var timeleft    = wbuff.EndTime - Game.Time;
                var percentleft = timeleft / duration * 100;
                if (percentleft <= 3)
                {
                    var minion = ObjectManager.Get <Obj_AI_Minion>().Where(x => x.IsValidTarget(SpellManager.W.Range)).FirstOrDefault();
                    if (minion != null)
                    {
                        SpellManager.W2.Cast(minion.ServerPosition);
                    }
                    else
                    {
                        var pos = Syndra.ServerPosition.Extend(Syndra.ServerPosition, -350);
                        SpellManager.W2.Cast(pos);
                    }
                }
            }
        }
Exemplo n.º 12
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));
                        }
                    }
                }
            }
        }
Exemplo n.º 13
0
 static void Main(string[] args)
 {
     Syndra syn = new Syndra();
 }
Exemplo n.º 14
0
 public static void Main()
 {
     Syndra syn = new Syndra();
 }