Posted 25 September 2012 - 12:26 AM
I wrote a rather complicated Turtle program that can be used to build parapets, towers, rooms, and the like. The bells and whistles are still in progress, like adding roofs, crenellations, etc. automatically. For now, just have the turtle build different levels at different widths to get interesting effects. I figured for now I'd include it as-is because it's still quite useful. I for example used it to build a massive castle, screenshotted below:
I'll include more screenshots later of other structures.
I recommend downloading the lua file, naming it "tower" and then dropping it into ComputerCraft/lua/rom/programs/turtle . However, I've also pasted the source code below.
I've written separate moveTo, turnTo, buildCircle, and buildSquare programs that I have used tower to call, but this version simply has all that code included in functions.
If the turtle runs out of items or for some reason isn't able to build a particular block (like a mob or player gets in his way) then he will move back to the center where he started before he turns off. This is so you can fix the problem and then turn him back on and he'll continue where he left off (provided you give him the same diameter value and account for height already built). In general for extremely large structures you'll need to babysit the turtles a bit but for most purposes they will do just fine. They have a bit of functionality for digging out blocks that are in their way, but for the most part they won't do this yet. Make sure they have an empty area to work in first.
USAGE:
Pastebin
[attachment=481:tower.zip]
I'll include more screenshots later of other structures.
I recommend downloading the lua file, naming it "tower" and then dropping it into ComputerCraft/lua/rom/programs/turtle . However, I've also pasted the source code below.
I've written separate moveTo, turnTo, buildCircle, and buildSquare programs that I have used tower to call, but this version simply has all that code included in functions.
If the turtle runs out of items or for some reason isn't able to build a particular block (like a mob or player gets in his way) then he will move back to the center where he started before he turns off. This is so you can fix the problem and then turn him back on and he'll continue where he left off (provided you give him the same diameter value and account for height already built). In general for extremely large structures you'll need to babysit the turtles a bit but for most purposes they will do just fine. They have a bit of functionality for digging out blocks that are in their way, but for the most part they won't do this yet. Make sure they have an empty area to work in first.
USAGE:
tower #diameter #height square|round
Pastebin
[attachment=481:tower.zip]