Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = {...}
- height = args[1]
- width = args[2]
- length = args[3]
- --length step 2
- --hight step 3
- local x=0
- local y=0
- local z=0
- 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 up()
- while turtle.up()==false do
- turtle.digUp()
- os.sleep(0.5)
- end
- end
- function down()
- while turtle.down()==false do
- turtle.digDown()
- os.sleep(0.5)
- end
- end
- function forward()
- while turtle.forward()==false do
- os.sleep(1)
- dig()
- end
- end
- function clear()
- dig()
- forward()
- digUp()
- turtle.digDown()
- end
- -------------
- for x=1,length,1 do
- z=0+height
- while z>0 do
- turtle.turnLeft()
- for y=1,width-1,1 do
- clear()
- end
- turtle.turnRight()
- turtle.turnRight()
- z=z-3
- if z>0 then
- up()
- up()
- up()
- digUp()
- end
- for y=1,width-1,1 do
- clear()
- end
- turtle.turnLeft()
- z=z-3
- if z>0 then
- up()
- up()
- up()
- digUp()
- end
- end
- z=0+height-3
- while z>0 do
- down()
- down()
- down()
- z=z-3
- end
- clear()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement