Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function findeSlot()
- local i
- for i=1,16 do
- if turtle.getItemCount(i)>0 then
- return i
- end
- end
- return 0
- end
- function moveN(n)
- local i
- for i=1,n do
- turtle.dig()
- turtle.forward()
- end
- end
- function moveNplace(n)
- local i
- for i=1,n do
- if turtle.getItemCount(slot)==0 then
- slot=findeSlot()
- if slot==0 then slot=1 end
- turtle.select(slot)
- end
- turtle.placeDown()
- turtle.dig()
- turtle.forward()
- end
- end
- -------------------
- --global variables:
- slot=1
- turtle.select(slot)
- local i
- turtle.up()
- moveN(1)
- turtle.turnRight()
- for i=1,16 do
- moveNplace(15)
- turtle.turnLeft()
- moveNplace(1)
- turtle.turnLeft()
- moveNplace(15)
- turtle.turnRight()
- moveNplace(1)
- turtle.turnRight()
- moveNplace(15)
- turtle.turnLeft()
- moveNplace(1)
- turtle.turnLeft()
- moveNplace(15)
- turtle.turnLeft()
- moveNplace(1)
- turtle.up()
- moveN(2)
- turtle.turnLeft()
- end
- turtle.turnRight()
- moveN(1)
- for i=1,17 do
- turtle.down()
- end
- turtle.turnRight()
- turtle.turnRight()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement