Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local i,j,ok
- i=1
- j=1
- local x
- local n
- n=5
- x=1
- while x<= n do
- i=1
- while i<=n do
- j=1
- while j<=n-1 do
- local a,x=turtle.inspect()
- a=x.name
- if a=="minecraft:bedrock" then
- if j<(n-1) then
- turtle.up()
- turtle.forward()
- turtle.forward()
- turtle.digDown()
- turtle.down()
- j=j+1
- ok=0
- else
- turtle.up()
- turtle.forward()
- ok=1
- end
- else turtle.dig()
- turtle.forward()
- end
- j=j+1
- end
- if i==5 then
- turtle.turnRight()
- turtle.turnRight()
- else
- if i%2==0 then
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- else
- if ok==1 then
- turtle.turnRight()
- turtle.forward()
- turtle.digDown()
- turtle.turnRight()
- turtle.down()
- else
- turtle.turnLeft()
- x=turtle.inspect()
- a=x.name
- if a=="minecraft:bedrock" then
- turtle.up()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.down()
- i=i+1
- else
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- end
- end
- end
- end
- i=i+1
- end
- turtle.digDown()
- turtle.down()
- x=x+1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement