Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local l,w = ...
- for i=1,3 do turtle.up() end
- local b=true
- local s=0
- local function rotate()
- if b then
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- s=1
- else
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- s=2
- end
- b=not b
- end
- for i=1,w do
- local dl
- if s==1 then dl=l-1 else dl=l end
- for i=1,dl do
- if s==0 then
- turtle.forward()
- turtle.forward()
- elseif s==1 then
- turtle.forward()
- else
- turtle.back()
- end
- turtle.digDown()
- turtle.down()
- turtle.digDown()
- turtle.up()
- s=0
- end
- rotate()
- end
Advertisement
Add Comment
Please, Sign In to add comment