Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = {...}
- length = args[1]
- function dig()
- while turtle.detect() do
- turtle.dig()
- os.sleep(0.5)
- end
- end
- function digUp()
- while turtle.detectUp() do
- turtle.digUp()
- os.sleep(0.5)
- end
- end
- function forward()
- while turtle.forward()==false do
- os.sleep(1)
- dig()
- end
- end
- function row()
- digUp()
- turtle.digDown()
- for m=1,4,1 do
- dig()
- forward()
- digUp()
- turtle.digDown()
- end
- end
- ----------------------------
- for i=1,length,1 do
- dig()
- forward()
- turtle.turnRight()
- row()
- turtle.down()
- turtle.digDown()
- turtle.turnRight()
- turtle.turnRight()
- for u=1,4,1 do
- forward()
- turtle.digDown()
- end
- turtle.up()
- turtle.turnRight()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement