Пример #1
0
        private static void Flee()
        {
            bool canWard    = WardManager.CanCastWard;
            bool enoughMana = me.Mana >= me.Spellbook.GetSpell(SpellSlot.W).SData.Mana;
            bool doWardJump = LeeSinMenu.comboMenu["useWardJump"].Cast <CheckBox>().CurrentValue;
            bool maxRange   = LeeSinMenu.comboMenu["useWardJumpMaxRange"].Cast <CheckBox>().CurrentValue;

            Vector2 maxRangeJumpPos = me.Position.To2D() +
                                      (Game.CursorPos.To2D() - me.Position.To2D()).Normalized() * WardManager.WardRange;
            Vector3 mousePos = me.Distance(Game.CursorPos.To2D()) > WardManager.WardRange ?
                               me.Position.Extend(Game.CursorPos, WardManager.WardRange).To3D() : Game.CursorPos;

            Obj_AI_Base allyobj      = GetAllyAsWard(maxRange ? maxRangeJumpPos : mousePos.To2D());
            bool        allyobjValid = allyobj != null && allyobj.IsValid;

            if (canWard && enoughMana && doWardJump && !allyobjValid)
            {
                WardManager.CastWardTo(maxRange ? maxRangeJumpPos.To3D() : mousePos);
            }
            else if (enoughMana && doWardJump && allyobjValid)
            {
                SpellManager.W1.Cast(allyobj);
                Core.DelayAction(() => { if (SpellManager.CanCastW2)
                                         {
                                             SpellManager.W2.Cast();
                                         }
                                 }, 1000);
            }
        }
Пример #2
0
        static void Main(string[] args)
        {
            Loading.OnLoadingComplete += eventArgs =>
            {
                //config = MainMenu.AddMenu("MoonyLeeSin", "MoonyLeeSin");
                if (ObjectManager.Player.ChampionName == "LeeSin")
                {
                    me = ObjectManager.Player;
                    LeeSinMenu.Init();
                    SelectionHandler.InitListening();
                    WardManager.Init();
                    SpellManager.Init();

                    new MultiKick();
                    new LeeSinInsec();
                    new StarCombo();
                    new BubbaKush();
                    new Smite();

                    Game.OnUpdate += LeeSinOnUpdate;
                    Obj_AI_Base.OnPlayAnimation += ObjAiBaseOnOnPlayAnimation;
                }
            };
        }
Пример #3
0
        private static void GankCombo()
        {
            bool useQ     = LeeSinMenu.comboMenu["useQ"].Cast <CheckBox>().CurrentValue;
            bool useW     = LeeSinMenu.comboMenu["useWGap"].Cast <CheckBox>().CurrentValue;
            bool useE     = LeeSinMenu.comboMenu["useE"].Cast <CheckBox>().CurrentValue;
            bool ksR      = LeeSinMenu.comboMenu["useRKs"].Cast <CheckBox>().CurrentValue;
            bool useItems = LeeSinMenu.comboMenu["useItems"].Cast <CheckBox>().CurrentValue;

            var target = TargetSelector.GetTarget(1000, DamageType.Magical) ?? TargetSelector.GetTarget(1000, DamageType.Physical);

            if (target == null || !target.IsValid || target.IsDead)
            {
                return;
            }

            if (useQ && SpellManager.CanCastQ1 && Orbwalker.CanMove)
            {
                var qPred = SpellManager.Q1.GetPrediction(target);
                if (qPred.HitChance >= HitChance.High)
                {
                    SpellManager.Q1.Cast(qPred.CastPosition);
                }
            }
            if (useQ && SpellManager.CanCastQ2 && Orbwalker.CanMove)
            {
                SpellManager.Q2.Cast();
            }

            if (useE && target.Distance(me) <= SpellManager.E1.Range && SpellManager.CanCastE1 && Orbwalker.CanMove)
            {
                SpellManager.E1.Cast(me.Position);
            }

            if (SpellManager.CanCastE2 && Orbwalker.CanMove)
            {
                SpellManager.E2.Cast(me.Position);
            }

            bool canQFly = ((SpellManager.CanCastQ1 && target.Distance(me) <= 1300) || Environment.TickCount - LastQ1CastTick <= 3000) &&
                           LeeSinMenu.comboMenu["noWAtQ1Fly"].Cast <CheckBox>().CurrentValue;
            bool q2 =
                (Environment.TickCount - LastQ2Tick <= 2000 || GetLastQBuffEnemyHero() != null) &&
                LeeSinMenu.comboMenu["noWAtQ2"].Cast <CheckBox>().CurrentValue;

            if (target.Distance(me) > me.GetAutoAttackRange() && useW && !canQFly && !q2)
            {
                //w gap
                bool canWard = WardManager.CanCastWard;
                bool canW    = SpellManager.W1.IsReady() && me.Mana >= me.Spellbook.GetSpell(SpellSlot.W).SData.Mana;

                var allyobj = ObjectManager.Get <Obj_AI_Base>().
                              Where(x => x != null && x.IsAlly && !x.IsMe && x.IsValid && (x is Obj_AI_Minion || x is AIHeroClient))
                              .OrderBy(x => x.Distance(me))
                              .FirstOrDefault(x => x.Distance(target) <= me.GetAutoAttackRange());
                var allyobjValid = allyobj != null && allyobj.IsValid;

                if (allyobjValid && canW)
                {
                    SpellManager.W1.Cast(allyobj);
                }
                else if (!allyobjValid && canWard && canW)
                {
                    WardManager.CastWardTo(target.Position);
                }
            }

            if (ksR && SpellManager.R.IsReady() && me.Distance(target) <= SpellManager.R.Range &&
                me.GetSpellDamage(target, SpellSlot.R) > target.Health)
            {
                SpellManager.R.Cast(target);
            }

            UseItems(useItems, target);
        }