Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local slot = 1
- local levels = 2
- function turnAround()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- function placeToEnd()
- while true do
- items = turtle.getItemCount(slot)
- if items == 0 then
- if slot == 16 then
- print("Out of all bricks")
- return false
- else
- slot = slot + 1
- turtle.select(slot)
- print("Selected slot #", slot)
- end
- else
- moved = turtle.back()
- if not moved then
- return true
- end
- turtle.place()
- end
- end
- end
- -- Run into wall
- turtle.select(slot)
- for i=1,levels do
- out = placeToEnd()
- if not out then
- break
- end
- print("Moving up level")
- turtle.up()
- turnAround()
- end
Advertisement
Add Comment
Please, Sign In to add comment