Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkCoal()
- bendzoKiekis = turtle.getFuelLevel()
- if bendzoKiekis==0 then
- turtle.select(1)
- while not turtle.refuel(1) do
- print('out of fuel')
- sleep(1)
- end
- end
- end
- function moveForward(force)
- checkCoal()
- if force == true then
- while turtle.detect() do
- turtle.dig()
- end
- end
- return turtle.forward()
- end
- function moveUp(force)
- checkCoal()
- if force == true then
- while turtle.detectUp() do
- turtle.digUp()
- end
- end
- return turtle.up()
- end
- function moveDown(force)
- checkCoal()
- if force == true then
- while turtle.detectDown() do
- turtle.digDown()
- end
- end
- return turtle.down()
- end
- function moveBack()
- checkCoal()
- turtle.back()
- end
- curSlot = 2
- function selectBlocks()
- if turtle.getItemCount(curSlot) == 0 then
- curSlot = curSlot + 1
- end
- turtle.select(curSlot)
- end
- while true do
- moveUp()
- selectBlocks()
- turtle.placeDown()
- moveUp()
- selectBlocks()
- turtle.placeDown()
- moveUp()
- selectBlocks()
- turtle.placeDown()
- moveBack()
- selectBlocks()
- turtle.place()
- selectBlocks()
- turtle.placeUp()
- moveDown()
- selectBlocks()
- turtle.placeUp()
- selectBlocks()
- turtle.placeDown()
- moveBack()
- selectBlocks()
- turtle.place()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement