Add this in commands.java
Code:
if (command[0].equalsIgnoreCase("regioncoords")) {
player.sendMessage("RegionX: "+player.getLocation().getRegionX()+" RegionY: "
+player.getLocation().getRegionY()+" RegionId: "+
player.getLocation().getRegionId());
}
Add this where ever
Code:
public static int[] chuncks = new int[2];
Add this under your method that will be the region creator
Code:
chuncks = RegionBuilder.findEmptyMap(125, 125);
I'm going to use my Fight Caves as an example.
First, I used the "regioncoords" command inside the Fight Caves area and got RegionX: 298 RegionY: 633.
The RegionX and RegionY are the coordinates of the region you are going to create.
You will need to use this method to create the region
Code:
RegionBuilder.copyAllPlanesMap(RegionX, RegionY, RegionBuilder.getRegion(chuncks[0]), RegionBuilder.getRegion(chuncks[1]), ratio);
player.teleport(chuncks[0]+10, chuncks[1]+10, 0)
I have no idea what the ratio is. Maybe I could learn some RS Protocol and find out.
Credits: Me