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); } } } }
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; } } }
private static void Interrupter2_OnInterruptableTarget(AIHeroClient sender, Interrupter2.InterruptableTargetEventArgs args) { if (E.CanCast(sender)) { if (Player.CountAlliesInRange(E.Range + 50) < sender.CountAlliesInRange(E.Range + 50)) { E.Cast(sender); } else { E.CastToReverse(sender); } } if (Q.CanCast(sender) && SpellQ.GetState() == QState.ThreshQ) { Q.Cast(sender); } }
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); } } } }
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); } }
private static void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args) { if ((args.Slot == SpellSlot.E || args.Slot == SpellSlot.R) && sender.Owner.LSIsDashing()) { args.Process = false; } if (getCheckBoxItem(TowerConfig, "DontQ2inenemyturret")) { if (sender.Owner.IsMe && args.Slot == SpellSlot.Q && SpellQ.GetState() == QState.threshqleap && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { if (QTarget.UnderTurret(true) || QTarget.InFountain()) { args.Process = false; } var tower = QTarget.GetMostCloseTower(); if ((tower != null && QTarget.IsInTurret(tower) && tower.IsEnemy) || (QTarget.Type == GameObjectType.AIHeroClient && ((AIHeroClient)QTarget).InFountain())) { args.Process = false; } } } }
private static void Unit_OnDash(Obj_AI_Base sender, Dash.DashItem args) { if (sender.IsEnemy && Player.LSDistance(args.EndPos) > Player.LSDistance(args.StartPos)) { if (E.IsInRange(args.StartPos)) { E.Cast(sender); } if (getCheckBoxItem(SpellConfig, "autoQ") && SpellQ.GetState() == QState.ThreshQ && Q.IsInRange(args.EndPos) && !E.IsInRange(args.EndPos) && Math.Abs(args.Duration - args.EndPos.LSDistance(sender) / Q.Speed * 1000) < 150) { List <Vector2> to = new List <Vector2>(); to.Add(args.EndPos); var QCollision = Q.GetCollision(Player.Position.LSTo2D(), to); if (QCollision == null || QCollision.Count == 0 || QCollision.All(a => !a.IsMinion)) { if (Q.Cast(args.EndPos)) { return; } } } } }
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 }