Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = {...}
- width = tonumber(tArgs[1])
- height = tonumber(tArgs[2])
- depth = tonumber(tArgs[3])
- local function layer(iWidth, iHeight)
- side = "left"
- curHeight = 1
- turtle.turnRight()
- while curHeight <= iHeight do
- for i = 1,width-1 do
- if curHeight ~= iHeight then
- turtle.digUp()
- end
- turtle.dig()
- turtle.forward()
- end
- if side == "left" then
- side = "right"
- else
- side = "left"
- end
- if curHeight == iHeight then
- if side == "right" then
- turtle.turnRight()
- turtle.turnRight()
- for j = 1,width-1 do
- turtle.forward()
- end
- end
- turtle.turnRight()
- for i = 1,iHeight-1 do
- turtle.down()
- end
- break
- else
- turtle.digUp()
- turtle.up()
- curHeight = curHeight + 1
- if curHeight ~= height then
- turtle.digUp()
- turtle.up()
- curHeight = curHeight + 1
- end
- turtle.turnRight()
- turtle.turnRight()
- end
- end
- end
- layer(width, height)
Advertisement
Add Comment
Please, Sign In to add comment