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 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 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 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 }