Ive once bothered making something like this, it was really simple though and not advanced, its pretty much the same over and over :P/>
- First a script to clear the area
- Simple part to dig out a few areas (for a nice basement)
- Simple part to dump blocks every now and then
- Grab blocks from chest to build
- Placing the blocks in the way you want the walls to be there
- Placing the blocks for the roof
Spoiler
local function floor()
length1 = 33 -- length of the floor part
width1 = 13 -- width of the floor part
turtle.turnRight() -- positioning the turtle to where the floor goes
for i = 1, 27 do
turtle.forward()
end
turtle.turnLeft()
turtle.forward() -- positioning ends here
for i = 1, length1 do
turtle.turnRight()
for i = 1, width1 do
blockbelow()
turtle.forward()
end
for i = 1, width1 do
turtle.back()
end
turtle.turnLeft()
turtle.forward()
end
for i = 1, length1 do
turtle.back()
end
turtle.back() -- moving turtle back to starting point
turtle.turnRight()
for i = 1, 27 do
turtle.back()
end
turtle.turnLeft()
end
That code is for a simple floor part, you can repeat this code and/or add parts to it to make different shapes (including editing parts for the positioning btw)
Spoiler
local function outerwall()
turtle.turnRight() -- positioning again
turtle.turnRight()
turtle.forward()
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.turnLeft()
turtle.up()
turtle.forward() -- positioning ends here
for i = 1, 5 do -- the 5 in this loop is the height of the floors (since at the end it does turtle.up() )
for i = 1, 14 do -- the same part repeated over and over, the 14 in this means how long the wall is)
turtle.forward() -- goes forward
blockbelow() -- places a block below (including a check for making sure it has enough blocks in its selected slot, ill post this below)
end -- ends the block placement loop
turtle.turnRight() -- makes a turn for the next part of the wall (if it hits a corner)
for i = 1, 5 do -- same thing repeated for a different situation
turtle.forward()
blockbelow()
end
turtle.turnLeft()
for i = 1, 5 do
turtle.forward()
blockbelow()
end
turtle.turnLeft()
for i = 1, 7 do
turtle.forward()
blockbelow()
end
turtle.turnRight()
for i = 1, 19 do
turtle.forward()
blockbelow()
end
turtle.turnRight()
for i = 1, 25 do
turtle.forward()
blockbelow()
end
turtle.turnRight()
for i = 1, 4 do
turtle.forward()
blockbelow()
end
turtle.turnLeft()
for i = 1, 15 do
turtle.forward()
blockbelow()
end
turtle.turnRight()
for i = 1, 34 do
turtle.forward()
blockbelow()
end
turtle.turnRight()
for i = 1, 14 do
turtle.forward()
blockbelow()
end
turtle.turnRight()
for i = 1, 2 do
turtle.forward()
blockbelow()
end
turtle.turnLeft()
for i = 1, 4 do
turtle.forward()
blockbelow()
end
turtle.turnLeft()
for i = 1, 2 do
turtle.forward()
blockbelow()
end
turtle.turnRight()
for i = 1, 8 do
turtle.forward()
blockbelow()
end
for i = 1, 3 do
turtle.forward()
end
for i = 1, 9 do
turtle.forward()
blockbelow()
end
turtle.turnRight()
turtle.up()
end
turtle.turnLeft() -- positioning back to starting point from here
turtle.forward()
turtle.forward()
turtle.turnRight()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.select(1)
end
This part is the part for putting up the walls, its built up the same pretty much (all the things in it, are copied from what my house looked like)
These script are all just copied, I put some helpfull comments in there but it will give you a general idea of a simple way to do this (in my opinion atleast :P/>)
The blockbelow function is here, it checks how many items it has in its selected slot, if its 0 it selects the next slot, and then places a block. (It does not keep in mind when it used up all slots, but that is an easy fix)
Spoiler
local slot = 1
local function blockbelow()
while turtle.getItemCount(slot) == 0 do
slot = slot + 1
turtle.select(slot)
end
turtle.placeDown()
end
Might be a bit of a messy post, but as I said, should give you a general idea of how to do it, let me know if you have any questions :)/>