Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- blocksMoved = 0
- invSlot = 1
- torchSlot = 16
- length = 30
- function placeBlocks()
- if blocksMoved >= 4 then
- turtle.placeDown()
- placeTorch()
- blocksMoved = 0
- turtle.select(invSlot)
- else
- turtle.placeDown()
- turtle.forward()
- blocksMoved = blocksMoved + 1
- end
- end
- function moveOver()
- turtle.turnRight()
- for i = 0, 5 do
- turtle.forward()
- end
- turtle.turnRight()
- turtle.forward()
- end
- function placeTorch()
- turtle.select(torchSlot)
- turtle.up()
- turtle.placeDown()
- turtle.forward()
- turtle.down()
- end
- function run()
- for i = 0, 1 do
- for i = 0, length do
- placeBlocks()
- if turtle.getItemCount(invSlot) < 1 then
- return
- else
- if turtle.getItemCount(invSlot + 1) < 1 and turtle.getItemCount(invSlot) < 1 then
- return
- elseif turtle.getItemCount(invSlot) < 1 then
- invSlot = invSlot + 1
- end
- turtle.select(invSlot)
- end
- end
- moveOver()
- end
- end
- run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement