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(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 Unit_OnDash(Obj_AI_Base sender, Dash.DashItem args) { if (sender.IsEnemy && Player.Distance(args.EndPos) > Player.Distance(args.StartPos)) { if (E.IsInRange(args.StartPos)) { Utill.Debug("DEBUG:Unit_OnDash E"); E.Cast(sender); } if (Config.Item("位移Q").GetValue <bool>() && SpellQ.GetState() == QState.ThreshQ && Q.IsInRange(args.EndPos) && !E.IsInRange(args.EndPos) && Math.Abs(args.Duration - args.EndPos.Distance(sender) / Q.Speed * 1000) < 150) { List <Vector2> to = new List <Vector2>(); to.Add(args.EndPos); var QCollision = Q.GetCollision(Player.Position.To2D(), to); if (QCollision == null || QCollision.Count == 0 || QCollision.All(a => !a.IsMinion)) { if (Q.Cast(args.EndPos)) { Utill.Debug("DEBUG:Unit_OnDash Q"); return; } } } } }
private static void AutoPushTower() { var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical); if (target == null) { return; } var tower = target.GetMostCloseTower(); if (tower != null && tower.IsAlly && tower.Target == null) { if (Player.IsInTurret(tower) && target.Distance(tower) < Q.Range / 2 && SpellQ.GetState() == QState.ThreshQ) { SpellQ.CastQ1(target); } if (tower != null && tower.IsAlly && E.CanCast(target) && target.Distance(tower) < tower.AttackRange + E.Range) { if (target.Distance(tower) < Player.Distance(tower)) { E.Cast(target); } else { E.CastToReverse(target); } } } }
private static void Combo() { var target = GetTarget(); if (target != null && target.IsValid) { ELogic(target); //Q2逻辑 if (SpellQ.GetState() == QState.threshqleap && QTarget.Position.CountEnemiesInRange(700) - Player.Position.CountEnemiesInRange(700) <= Config.Item("人数比").GetValue <Slider>().Value) { SpellQ.CastQ2(); } //Q1逻辑 if (!E.IsInRange(target) && SpellQ.GetState() == QState.ThreshQ) { SpellQ.CastQ1(target); } if (SpellQ.GetState() == QState.threshqleap) { //W拉最远队友 var FurthestAlly = GetFurthestAlly(); if (FurthestAlly != null) { W.Cast(Prediction.GetPrediction(FurthestAlly, W.Delay).CastPosition); } } } }
private static void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args) { if ((args.Slot == SpellSlot.E || args.Slot == SpellSlot.R) && sender.Owner.IsDashing()) { args.Process = false; } if (Config.Item("Q不进敌塔").GetValue <bool>()) { if (sender.Owner.IsMe && args.Slot == SpellSlot.Q && SpellQ.GetState() == QState.threshqleap && Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.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.obj_AI_Hero && ((Obj_AI_Hero)QTarget).InFountain())) { args.Process = false; } } } }
private static void Interrupter2_OnInterruptableTarget(Obj_AI_Hero 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 AntiGapcloser_OnEnemyGapcloser(ActiveGapcloser gapcloser) { if (gapcloser.Sender.ChampionName == "MasterYi" && gapcloser.Slot == SpellSlot.Q) { return; } if (E.CanCast(gapcloser.Sender) && E.CastToReverse(gapcloser.Sender)) { Utill.Debug("DEBUG:AntiGapcloser E"); return; } else if (Q.CanCast(gapcloser.Sender) && SpellQ.GetState() == QState.ThreshQ) { if (gapcloser.Sender.ChampionName == "JarvanIV" && gapcloser.Slot == SpellSlot.Q) { return; } Utill.Debug("DEBUG:AntiGapcloser Q"); SpellQ.CastQ1(gapcloser.Sender); } }
private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { #region 自动QE塔下敌人 if (Config.Item("控制塔攻击的敌人").GetValue <bool>() && sender.IsAlly && sender is Obj_AI_Turret && args.Target.IsEnemy && args.Target.Type == GameObjectType.obj_AI_Hero) { var target = args.Target as Obj_AI_Hero; var turret = sender as Obj_AI_Turret; if (turret.IsAlly && E.CanCast(target) && target.Distance(turret) < turret.AttackRange + E.Range) { if (target.Distance(turret) < Player.Distance(turret)) { E.Cast(target); } else { E.CastToReverse(target); } } if (Player.Distance(turret) < turret.AttackRange && SpellQ.GetState() == QState.ThreshQ) { SpellQ.CastQ1(target); } } #endregion #region 自动W if (!W.IsReady() || !sender.IsEnemy || !sender.IsValidTarget(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.Distance(ally.ServerPosition) < W.Range + 200)) { double dmg = 0; if (args.Target != null && args.Target.NetworkId == ally.NetworkId) { dmg = dmg + sender.GetSpellDamage(ally, args.SData.Name); } else { var castArea = ally.Distance(args.End) * (args.End - ally.ServerPosition).Normalized() + ally.ServerPosition; if (castArea.Distance(ally.ServerPosition) < ally.BoundingRadius / 2) { dmg = dmg + sender.GetSpellDamage(ally, args.SData.Name); } else { continue; } } if (dmg > 0) { if (dmg > value) { W.Cast(ally.Position); } else if (Player.Health - dmg < Player.CountEnemiesInRange(700) * Player.Level * 20) { W.Cast(ally.Position); } else if (ally.Health - dmg < ally.Level * 10) { W.Cast(ally.Position); } } } #endregion }