Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkInventory(curSlot)
- if turtle.getItemCount(curSlot) == 0 and curSlot < 16 then
- print(curSlot)
- curSlot = curSlot + 1
- print(curSlot)
- end
- turtle.select(curSlot)
- return curSlot
- end
- function rotate(i)
- if i ~= 1 then
- if i%2 == 0 then
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- else
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- end
- end
- print("länge")
- local len = read()
- len = len - 1
- print("breite")
- local wid = read()
- curSlot = 1
- for i=1, wid do
- rotate(i)
- for j=1, len do
- curSlot = checkInventory(curSlot)
- turtle.digDown()
- turtle.placeDown()
- turtle.forward()
- end
- curSlot = checkInventory(curSlot)
- turtle.digDown()
- turtle.placeDown()
- end
Add Comment
Please, Sign In to add comment