public Print(Mode mode, IRadius radius, bool swalk, bool nmovmenet) { this.totalRadius = radius; this.mode = mode; this.swalk = swalk; this.nmovement = nmovmenet; }
public override void OnStart() { var radius = new IRadius(Setting.At(0).Get <ILocation>(), Setting.At(1).Get <ILocation>()); RegisterTask(new Print((Mode)Setting.At(2).Get <int>(), radius, Setting.At(3).Get <bool>(), Setting.At(4).Get <bool>()) ); }
public override void OnStart() { var startSplit = Setting[0].Get <string>().Split(' '); var endSplit = Setting[1].Get <string>().Split(' '); if (startSplit.Length != 3 || endSplit.Length != 3) { return; } var radius = new IRadius(new Location(int.Parse(startSplit[0]), int.Parse(startSplit[1]), int.Parse(startSplit[2])), new Location(int.Parse(endSplit[0]), int.Parse(endSplit[1]), int.Parse(endSplit[2]))); RegisterTask(new Print((Mode)Setting[2].Get <int>(), radius, Setting[3].Get <bool>(), Setting[4].Get <bool>()) ); }
public Path(ShareManager shareManager, ILocation start, ILocation end, PathMode pathMode, MacroSync macro) { this.shareManager = shareManager; this.pathMode = pathMode; this.macro = macro; if (pathMode == PathMode.Advanced) { ZMO.Mine = true; } else { ZMO.Mine = false; } radius = new IRadius(start, end); this.shareManager.SetArea(radius); }
public static bool InviteCustomer(IO handler, IRadius radius, Input input) { Inviter customerInviter = new Inviter(handler, input.InputFilePath, radius); return(customerInviter.InviteCustomers(input.OutputFilePath)); }
private ILocation FindNext() { //Get the area from the radius. IRadius playerRadius = shareManager.Get(player); if (playerRadius == null) { return(null); } //Search from top to bottom. //(As that is easier to manager) ILocation closest = null; double distance = int.MaxValue; for (int y = (int)playerRadius.start.y + playerRadius.height; y >= (int)playerRadius.start.y; y--) { if (closest == null) { for (int x = playerRadius.start.x; x <= playerRadius.start.x + playerRadius.xSize; x++) { for (int z = playerRadius.start.z; z <= playerRadius.start.z + playerRadius.zSize; z++) { var tempLocation = new Location(x, y, z); //Check if the block is valid for mining. if (player.world.GetBlockId(x, y, z) == 0) { continue; } if (broken.ContainsKey(tempLocation) && broken[tempLocation].Subtract(DateTime.Now).TotalSeconds < -15) { continue; } if (ignore?.Contains(player.world.GetBlockId(x, y, z)) == true) { continue; } // Check if this block is safe to mine. if (!IsSafe(tempLocation)) { continue; } if (closest == null) { distance = tempLocation.Distance(player.status.entity.location.ToLocation(0)); closest = new Location(x, y, z); } else if (tempLocation.Distance(player.status.entity.location.ToLocation(0)) < distance) { distance = tempLocation.Distance(player.status.entity.location.ToLocation(0)); closest = tempLocation; } } } } } return(closest); }
public SharedRadiusState(IRadius radius) { this.radius = radius; }
public void Add(IPlayer player, IRadius radius) { zones.TryAdd(player, new SharedRadiusState(radius)); Calculate(); }
public void SetArea(IRadius radius) { this.radius = radius; }
public Inviter(IO fh, string fileName, IRadius radius) { FileHanlder = fh; Customers = FileHanlder.ReadFromFile(fileName); Radius = radius; }
public void Update(ILocation loc, ILocation loc2) { reached = false; radius = new IRadius(loc, loc2); }
static void Main(string[] args) { if (!GetParameters()) { return; } _rd = new Radius(_parameters); _rd.AddDebugDelegate(DebugMessage); if (args.Length > 0) { switch (args[0]) { case "access": { if (args.Length == 3) { Access(args); } else { Console.WriteLine("Error args!!! Example:"); Console.WriteLine(accessExample); } break; } case "writelogin": { if (args.Length == 5) { WriteLogin(args); } else { Console.WriteLine("Error args!!! Example:"); Console.WriteLine(writeLoginExample); } break; } case "writelogout": { if (args.Length == 8) { WriteLogout(args); } else { Console.WriteLine("Error args!!! Example:"); Console.WriteLine(writeLogoutExample); } break; } default: Help(); break; } } else { Help(); } if (_debug) { Console.ReadLine(); } }