Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local size= tonumber(read())
- turtle.select(1)
- slot = 1
- for i=1, (size^2)/2 do
- for j=1, size do
- if not turtle.detectDown() then
- if turtle.getItemCount(slot) == 0 then
- else
- slot = slot+1
- turtle.select(slot)
- end
- turtle.placeDown()
- turtle.forward()
- else
- turtle.forward()
- end
- end
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- for j=1, size do
- if not turtle.detectDown() then
- if turtle.getItemCount(slot) == 0 then
- else
- slot = slot+1
- turtle.select(slot)
- end
- turtle.placeDown()
- turtle.forward()
- else
- turtle.forward()
- end
- end
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement