Ejemplo n.º 1
0
        private static void AutoPushTower()
        {
            var target = TargetSelector.GetTarget(Q.Range, DamageType.Physical);

            if (target == null)
            {
                return;
            }

            var tower = target.GetMostCloseTower();

            if (tower != null && tower.IsAlly)
            {
                if (Player.IsInTurret(tower) && target.LSDistance(tower) < Q.Range / 2 && SpellQ.GetState() == QState.ThreshQ)
                {
                    SpellQ.CastQ1(target);
                }

                if (tower != null && tower.IsAlly && E.CanCast(target) && target.LSDistance(tower) < tower.AttackRange + E.Range)
                {
                    if (target.LSDistance(tower) < Player.LSDistance(tower))
                    {
                        E.Cast(target);
                    }
                    else
                    {
                        E.CastToReverse(target);
                    }
                }
            }
        }
Ejemplo n.º 2
0
 private static void Game_OnWndProc(WndEventArgs args)
 {
     if (args.Msg == 'Q')
     {
         var Qtarget = Q.GetTarget(0, Qignored);
         if (Qtarget != null && SpellQ.GetState() == QState.ThreshQ)
         {
             SpellQ.CastQ1(Qtarget);
         }
         else
         {
             args.Process = false;
         }
     }
     if (args.Msg == 'W')
     {
         var FurthestAlly = GetFurthestAlly();
         if (FurthestAlly != null)
         {
             W.Cast(LeagueSharp.Common.Prediction.GetPrediction(FurthestAlly, W.Delay).CastPosition);
         }
     }
     if (args.Msg == 'E')
     {
         var Etarget = E.GetTarget();
         if (Etarget != null)
         {
             ELogic(Etarget);
         }
         else
         {
             args.Process = false;
         }
     }
 }
Ejemplo n.º 3
0
        private static void Combo()
        {
            //     var target = TargetSelector.GetTarget(Q.Range, DamageType.Magical);

            var QT = TargetSelector.GetTarget(Q.Range, DamageType.Magical);

            if (QT != null && getCheckBoxItem(SpellConfig, "QList" + QT.NetworkId))
            {
                return;
            }


            if (QT != null && QT.IsValid)
            {
                ELogic(QT);

                if (QT.HasBuffOfType(BuffType.Stun) || QT.HasBuffOfType(BuffType.Knockup) || QT.HasBuffOfType(BuffType.Fear) || QT.HasBuffOfType(BuffType.Slow))
                {
                    SpellQ.CastQ1(QT);
                }
                //Q2逻辑
                if (SpellQ.GetState() == QState.threshqleap && QTarget.Position.LSCountEnemiesInRange(700) - Player.Position.LSCountEnemiesInRange(700) <= getSliderItem(SpellConfig, "dQ2if"))
                {
                    SpellQ.CastQ2();
                }

                //Q1逻辑
                if (!E.IsInRange(QT) && SpellQ.GetState() == QState.ThreshQ)
                {
                    SpellQ.CastQ1(QT);
                }

                if (SpellQ.GetState() == QState.threshqleap)
                {
                    //W拉最远队友
                    var FurthestAlly = GetFurthestAlly();
                    if (FurthestAlly != null)
                    {
                        W.Cast(LeagueSharp.Common.Prediction.GetPrediction(FurthestAlly, W.Delay).CastPosition);
                    }
                }
            }
        }
Ejemplo n.º 4
0
        private static void AntiGapcloser_OnEnemyGapcloser(ActiveGapcloser gapcloser)
        {
            if (gapcloser.Sender.ChampionName == "MasterYi" && gapcloser.Slot == SpellSlot.Q)
            {
                return;
            }

            if (E.CanCast(gapcloser.Sender) && E.CastToReverse(gapcloser.Sender))
            {
                return;
            }
            else if (Q.CanCast(gapcloser.Sender) && SpellQ.GetState() == QState.ThreshQ)
            {
                if (gapcloser.Sender.ChampionName == "JarvanIV" && gapcloser.Slot == SpellSlot.Q)
                {
                    return;
                }
                SpellQ.CastQ1(gapcloser.Sender);
            }
        }
Ejemplo n.º 5
0
        private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            #region 自动QE塔下敌人
            if (getCheckBoxItem(TowerConfig, "QEallyTurrettarget") && sender.IsAlly && sender is Obj_AI_Turret && args.Target.IsEnemy && args.Target.Type == GameObjectType.AIHeroClient)
            {
                var target = args.Target as AIHeroClient;
                var turret = sender as Obj_AI_Turret;

                if (turret.IsAlly && E.CanCast(target) && target.LSDistance(turret) < turret.AttackRange + E.Range)
                {
                    if (target.LSDistance(turret) < Player.LSDistance(turret))
                    {
                        E.Cast(target);
                    }
                    else
                    {
                        E.CastToReverse(target);
                    }
                }
                if (Player.LSDistance(turret) < turret.AttackRange && SpellQ.GetState() == QState.ThreshQ)
                {
                    SpellQ.CastQ1(target);
                }
            }
            #endregion

            #region 自动W
            if (!W.IsReady() || !sender.IsEnemy || !sender.LSIsValidTarget(1500))
            {
                return;
            }
            double value = 20 + (Player.Level * 20) + (0.4 * Player.FlatMagicDamageMod);

            foreach (var ally in HeroManager.Allies.Where(ally => ally.IsValid && !ally.IsDead && Player.LSDistance(ally.ServerPosition) < W.Range + 200))
            {
                double dmg = 0;
                if (args.Target != null && args.Target.NetworkId == ally.NetworkId)
                {
                    dmg = dmg + sender.LSGetSpellDamage(ally, args.SData.Name);
                }
                else
                {
                    var castArea = ally.LSDistance(args.End) * (args.End - ally.ServerPosition).LSNormalized() + ally.ServerPosition;
                    if (castArea.LSDistance(ally.ServerPosition) < ally.BoundingRadius / 2)
                    {
                        dmg = dmg + sender.LSGetSpellDamage(ally, args.SData.Name);
                    }
                    else
                    {
                        continue;
                    }
                }

                if (dmg > 0)
                {
                    if (dmg > value)
                    {
                        W.Cast(ally.Position);
                    }
                    else if (Player.Health - dmg < Player.LSCountEnemiesInRange(700) * Player.Level * 20)
                    {
                        W.Cast(ally.Position);
                    }
                    else if (ally.Health - dmg < ally.Level * 10)
                    {
                        W.Cast(ally.Position);
                    }
                }
            }
            #endregion
        }