示例#1
0
        public static void OnLoad()
        {
            if (Me.CharacterName != "Morgana")
                return;
            _q = new Spell(SpellSlot.Q, 1175f);
            _q.SetSkillshot(0.25f, 72f, 1200f, true, false, SkillshotType.Line);

            _w = new Spell(SpellSlot.W, 900f);
            _w.SetSkillshot(0.50f, 225f, 2200f, false, false, SkillshotType.Circle);

            _e = new Spell(SpellSlot.E, 750f);
            _r = new Spell(SpellSlot.R, 600f);


            QRectangle = new EnsoulSharp.SDK.Geometry.Rectangle(ObjectManager.Player.Position, Vector3.Zero, _q.Width);

            CreateMenu();
            Drawing.OnDraw += Drawing_OnDraw;
            Game.OnUpdate += Game_OnGameUpdate;
            Gapcloser.OnGapcloser += AntiGapcloser_OnEnemyGapcloser;
            try
            {
                AIBaseClient.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;
            }
            catch { }
        }
示例#2
0
        private static void Checker(EventArgs args)
        {
            if (Q2())
            {
                Q.Range = 1000f;
            }
            else
            {
                Q.Range = 800f;
            }

            if (QTimer + QFlyingTime < Variables.TickCount)
            {
                Q2Now = true;
            }
            else
            {
                Q2Now = false;
            }

            if (R.IsReady())
            {
                MoveRange = GameObjects.Player.MoveSpeed * 0.5f + R.Range;
            }
            else
            {
                MoveRange = GameObjects.Player.MoveSpeed * 0.5f;
            }


            if (QClient() != null)
            {
                Q.UpdateSourcePosition(QClient().Position, GameObjects.Player.Position);

                if (Q2())
                {
                    var QGeometry = new EnsoulSharp.SDK.Geometry.Rectangle(QClient().Position, QVector, Q.Width + 50);

                    if (QGeometry != null)
                    {
                        var CheckCollision = GameObjects.EnemyMinions.Any(i => i.IsValid() && !i.IsDead && QGeometry.IsInside(i));
                        if (CheckCollision == true)
                        {
                            Q2Now = true;
                        }
                    }
                }
            }
            else
            {
                Q.UpdateSourcePosition(GameObjects.Player.Position, GameObjects.Player.Position);
            }
        }
示例#3
0
文件: Thresh.cs 项目: maglade/Ensoul
        public static void OnLoad()
        {
            Q  = new Spell(SpellSlot.Q, 1100);
            Q2 = new Spell(SpellSlot.Q, 1400);
            W  = new Spell(SpellSlot.W, 950);
            E  = new Spell(SpellSlot.E, 400);
            R  = new Spell(SpellSlot.R, 450);


            Q.SetSkillshot(0.500f, 70, 1900f, true, false, SkillshotType.Line);
            Q2.SetSkillshot(0.500f, 70, 1900f, true, false, SkillshotType.Line);
            QRectangle = new EnsoulSharp.SDK.Geometry.Rectangle(ObjectManager.Player.Position, Vector3.Zero, Q.Width);
            var IsMenu = new Menu("Easy_Sup.Thresh", "Easy_Sup.Thresh", true);
            var combo  = new Menu("Combo", "Combo Config");

            combo.Add(Menubase.thresh_combat.Qpred);
            combo.Add(Menubase.thresh_combat.Q);
            combo.Add(Menubase.thresh_combat.Q2);
            combo.Add(Menubase.thresh_combat.qhit);
            combo.Add(Menubase.thresh_combat.E);
            combo.Add(Menubase.thresh_combat.emodo);
            combo.Add(Menubase.thresh_combat.R);
            combo.Add(Menubase.thresh_combat.Rcount);

            var harass = new Menu("Harass", "Harass Config");

            harass.Add(Menubase.thresh_harass.Q);
            harass.Add(Menubase.thresh_harass.E);

            var misc = new Menu("Misc", "Misc Config");

            misc.Add(Menubase.thresh_misc.Egap);
            misc.Add(Menubase.thresh_misc.Ein);

            var pred = new Menu("pred", "Spred Config");

            IsMenu.Add(combo);
            IsMenu.Add(harass);
            IsMenu.Add(misc);
            SPrediction.Prediction.Initialize(pred);
            IsMenu.Add(pred);
            IsMenu.Attach();

            Tick.OnTick += OnUpdate;
            Interrupter.OnInterrupterSpell += OnPossibleToInterrupt;
            Gapcloser.OnGapcloser          += OnEnemyGapcloser;
            Drawing.OnDraw += OnDraw;
        }
示例#4
0
        private static void DoOrb(EventArgs args)
        {
            if (GameObjects.Player.IsDead)
            {
                return;
            }

            if (Orbwalker.ActiveMode > OrbwalkerMode.Harass)
            {
                return;
            }

            var target = TargetSelector.GetTarget(Q.Range + MoveRange, DamageType.Magical);

            if (target == null)
            {
                return;
            }

            var Epred = SebbyLibPorted.Prediction.Prediction.GetPrediction(E, target);

            if (E.IsReady() && Epred.Hitchance >= SebbyLibPorted.Prediction.HitChance.High && Ecombo.Enabled)
            {
                if (E.SPredictionCast(target, EnsoulSharp.SDK.HitChance.High))
                {
                    return;
                }
            }
            else
            {
                if (QClient() != null)
                {
                }
                if (Q.IsReady() && Qcombo.Enabled)
                {
                    var Qpred = SebbyLibPorted.Prediction.Prediction.GetPrediction(Q, target);
                    if (Q2())
                    {
                        if (Q2Now)
                        {
                            var CastPos = Qpred.CastPosition;
                            if (CastPos.DistanceToPlayer() > Q.Range)
                            {
                                if (R.IsReady())
                                {
                                    if (Q.Cast(CastPos))
                                    {
                                        DelayAction.Add(200, () =>
                                        {
                                            if (Qpred.Hitchance != SebbyLibPorted.Prediction.HitChance.Collision && R.Cast(CastPos))
                                            {
                                                return;
                                            }
                                        });
                                    }
                                }
                            }
                            else
                            {
                                if (Q.Cast(CastPos))
                                {
                                    return;
                                }
                            }
                        }
                    }
                    else
                    {
                        if (EDownClient() == null || EDownClient().DistanceToPlayer() > MoveRange + Q.Range)
                        {
                            var GetCastPos = Vector3.Zero;
                            var QGetPoss   = new EnsoulSharp.SDK.Geometry.Circle(GameObjects.Player.Position, 800f);
                            foreach (var QGetPos in QGetPoss.Points.OrderByDescending(i => i.Distance(Qpred.CastPosition)))
                            {
                                QCollision = new EnsoulSharp.SDK.Geometry.Rectangle(GameObjects.Player.Position.ToVector2(), QGetPos, Q.Width + 50);
                                var CheckCollision = GameObjects.EnemyMinions.Any(i => i.IsValid() && !i.IsDead && QCollision.IsInside(i));
                                if (CheckCollision == false)
                                {
                                    //Check For Collision
                                    {
                                        var QGeometry = new EnsoulSharp.SDK.Geometry.Rectangle(QGetPos.ToVector3(), Qpred.CastPosition, Q.Width + 50);

                                        if (QGeometry != null)
                                        {
                                            var CheckForCollision = GameObjects.EnemyMinions.Any(i => i.IsValid() && !i.IsDead && QGeometry.IsInside(i));
                                            if (CheckForCollision == false)
                                            {
                                                //Add Pos
                                                GetCastPos = QGetPos.ToVector3();
                                                GetBool    = false;
                                                if (Q.Cast(GetCastPos))
                                                {
                                                    break;
                                                }
                                            }
                                            else
                                            {
                                                GetBool = true;
                                                continue;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
示例#5
0
        private static void Game_OnUpdate1(EventArgs args)
        {
            if (GameObjects.Player.IsDead)
            {
                return;
            }

            //Game.Print(QTimer + QFlyingTime + "  ----  " + Variables.TickCount);

            if (Orbwalker.GetTarget() != null)
            {
                if ((Orbwalker.GetTarget() as AIBaseClient).HasBuff("zoeesleepstun") && Q.IsReady())
                {
                    Orbwalker.AttackEnabled = false;
                }
                else
                {
                    Orbwalker.AttackEnabled = true;
                }
            }

            if (Orbwalker.ActiveMode > OrbwalkerMode.Harass)
            {
                return;
            }

            var EclientPos = Vector3.Zero;

            if (EClient() != null || EStunClient() != null)
            {
                if (EClient() != null)
                {
                    EclientPos = EClient().Position;
                }
                if (EStunClient() != null)
                {
                    EclientPos = EStunClient().Position;
                }

                if (EclientPos.DistanceToPlayer() < Q.Range + MoveRange)
                {
                    if (Q.IsReady())
                    {
                        if (Q2())
                        {
                            if (EclientPos.DistanceToPlayer() > Q.Range && QTimer + QFlyingTime < Variables.TickCount)
                            {
                                if (Q.Cast(EclientPos))
                                {
                                    DelayAction.Add(200, () =>
                                    {
                                        if (R.Cast(EclientPos))
                                        {
                                            return;
                                        }
                                    });
                                }
                            }
                            else
                            {
                                if (QTimer + QFlyingTime < Variables.TickCount)
                                {
                                    if (Q.Cast(EclientPos))
                                    {
                                        return;
                                    }
                                }
                            }
                        }

                        if (!Q2())
                        {
                            var GetCastPos = Vector3.Zero;
                            var QGetPoss   = new EnsoulSharp.SDK.Geometry.Circle(GameObjects.Player.Position, 800f);
                            foreach (var QGetPos in QGetPoss.Points.OrderByDescending(i => i.Distance(EclientPos)))
                            {
                                QCollision = new EnsoulSharp.SDK.Geometry.Rectangle(GameObjects.Player.Position.ToVector2(), QGetPos, Q.Width + 50);
                                var CheckCollision = GameObjects.EnemyMinions.Any(i => i.IsValid() && !i.IsDead && QCollision.IsInside(i));
                                if (CheckCollision == false)
                                {
                                    //Check For Collision
                                    {
                                        var QGeometry = new EnsoulSharp.SDK.Geometry.Rectangle(QGetPos.ToVector3(), EclientPos, Q.Width * 2);

                                        if (QGeometry != null)
                                        {
                                            var CheckForCollision = GameObjects.EnemyMinions.Any(i => i.IsValid() && !i.IsDead && QGeometry.IsInside(i));
                                            if (CheckForCollision == false)
                                            {
                                                //Add Pos
                                                GetCastPos = QGetPos.ToVector3();
                                                GetBool    = false;
                                                if (Q.Cast(GetCastPos))
                                                {
                                                    break;
                                                }
                                            }
                                            else
                                            {
                                                GetBool = true;
                                                continue;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }