Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- 21x21 base, 15 high
- local height = 1 -- 15
- local width = 21
- local depth = 21
- local heightToMove = 11
- local turningRight = false
- local function forward()
- if turtle.detect() then
- turtle.dig()
- turtle.forward()
- shell.run("go", "up", heightToMove)
- turtle.placeUp()
- shell.run("go", "down", heightToMove)
- else
- turtle.forward()
- end
- end
- local function turnRight()
- turtle.turnRight()
- forward()
- turtle.turnRight()
- end
- local function turnLeft()
- turtle.turnLeft()
- forward()
- turtle.turnLeft()
- end
- local function turn()
- if turningRight == true then
- turnRight()
- turningRight = false
- else
- turnLeft()
- turningRight = true
- end
- end
- for z = 1, height do
- for x = 1, width do
- for y = 1, depth do
- forward()
- end
- turn()
- end
- turtle.digDown()
- turtle.down()
- turtle.placeUp()
- turningRight = not turningRight
- end
Add Comment
Please, Sign In to add comment