private static void UseE(Obj_AI_Base enemy) { foreach (var orb in OrbManager.GetOrbs(true)) if (Player.LSDistance(orb) < E.Range + 100) { var startPoint = orb.LSTo2D().LSExtend(Player.ServerPosition.LSTo2D(), 100); var endPoint = Player.ServerPosition.LSTo2D() .LSExtend(orb.LSTo2D(), Player.LSDistance(orb) > 200 ? 1300 : 1000); Eq.Delay = E.Delay + Player.LSDistance(orb) / E.Speed; Eq.From = orb; var enemyPred = Eq.GetPrediction(enemy); if (enemyPred.Hitchance >= HitChance.High && enemyPred.UnitPosition.LSTo2D().LSDistance(startPoint, endPoint, false) < Eq.Width + enemy.BoundingRadius) { E.Cast(orb, true); W.LastCastAttemptT = Utils.TickCount; return; } } }
private static void UseE(Obj_AI_Base enemy) { foreach (var orb in OrbManager.GetOrbs(true)) { if (Player.Distance(orb) < E.Range + 100) { var startPoint = orb.To2D().Extend(Player.ServerPosition.To2D(), 100); var endPoint = Player.ServerPosition.To2D() .Extend(orb.To2D(), Player.Distance(orb) > 200 ? 1300 : 1000); EQ.Delay = E.Delay + Player.Distance(orb) / E.Speed; EQ.From = orb; var enemyPred = EQ.GetPrediction(enemy); if (enemyPred.Hitchance >= HitChance.High && E.IsReady() && enemyPred.UnitPosition.To2D().Distance(startPoint, endPoint, false) < EQ.Width + enemy.BoundingRadius) { E.Cast(orb, packets()); E.LastCastAttemptT = Environment.TickCount; return; } } } }