Code:
case "testgb7":
int phase = Integer.valueOf(cmd[1]);
int[] xstart = {3090, 3026, 3090, 3026};//Phase start locations for X, 1, 2, 3, 4
int[] ystart = {6098, 6034, 6034, 5970};//Phase start locations for Y, 1, 2, 3, 4
WorldTasksManager.schedule(new WorldTask() {
int count = 0;
@Override
public void run() {
if (count == 1) {
World.spawnObjectTemporary(new WorldObject(84873, 10, 1, new WorldTile(xstart[phase-1], ystart[phase-1], 0)), 5000);
World.spawnObjectTemporary(new WorldObject(84871, 10, 1, new WorldTile(xstart[phase-1], ystart[phase-1]+9, 0)), 5000);
World.spawnObjectTemporary(new WorldObject(84873, 10, 2, new WorldTile(xstart[phase-1], ystart[phase-1]+18, 0)), 5000);
World.spawnObjectTemporary(new WorldObject(84871, 10, 0, new WorldTile(xstart[phase-1]+9, ystart[phase-1], 0)), 5000);
World.spawnObjectTemporary(new WorldObject(84869, 10, 0, new WorldTile(xstart[phase-1]+9, ystart[phase-1]+9, 0)), 5000);
World.spawnObjectTemporary(new WorldObject(84871, 10, 2, new WorldTile(xstart[phase-1]+9, ystart[phase-1]+18, 0)), 5000);
World.spawnObjectTemporary(new WorldObject(84873, 10, 0, new WorldTile(xstart[phase-1]+18, ystart[phase-1], 0)), 5000);
World.spawnObjectTemporary(new WorldObject(84871, 10, 3, new WorldTile(xstart[phase-1]+18, ystart[phase-1]+9, 0)), 5000);
World.spawnObjectTemporary(new WorldObject(84873, 10, 3, new WorldTile(xstart[phase-1]+18, ystart[phase-1]+18, 0)), 5000);
} else if (count == 2) {
player.setNextAnimation(new Animation(20402));
stop();
}
count++;
}
},0, 1);
return true;