Guest User

Untitled

a guest
Aug 22nd, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.49 KB | None | 0 0
  1. public static bool Enemies() {
  2.     msg = "Looking for enemies.";
  3.     var units = Unit.Get().Where(x =>
  4.         x.Type == UnitType.Monster
  5.          && GetDistance(moves[move], new Point((int)x.X, (int)x.Y)) < 50.0f
  6.          &&  x.ActorId != SNOActorId.DH_Companion_Ferret
  7.          && x.ActorId != SNOActorId.a3_Battlefield_demonic_forge
  8.     ).FirstOrDefault();
  9.  
  10.     if (units != null) {
  11.         msg = "Attacking: " + units.Name;
  12.         MoveTo(units);
  13.                 Attack(units);
  14.         return false;
  15.             } else return true;
  16. }
Add Comment
Please, Sign In to add comment