Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- quarry = peripheral.wrap("front")
- move = 10
- function bdig()
- while turtle.detect() do
- turtle.dig()
- end
- end
- function buildUp()
- moveToQuarry()
- turtle.turnLeft()
- bdig()
- turtle.forward()
- turtle.select(3)
- turtle.placeDown()
- turtle.back()
- turtle.select(1)
- turtle.place()
- turtle.digUp()
- turtle.up()
- bdig()
- turtle.select(2)
- turtle.place()
- turtle.down()
- turtle.turnLeft()
- moveToQuarry()
- turtle.select(1)
- turtle.dropUp()
- turtle.turnRight()
- bdig()
- turtle.turnRight()
- moveToQuarry()
- turtle.turnLeft()
- end
- function moveToQuarry()
- for i = 0, move do
- if turtle.detect() then
- bdig()
- end
- if turtle.detectUp() then
- turtle.digUp()
- end
- turtle.forward()
- end
- end
- function buildDown()
- bdig()
- turtle.down()
- turtle.turnRight()
- end
- function routine()
- quarry = peripheral.wrap("front")
- while true do
- while (quarry.hasWork()) do
- os.sleep(5)
- end
- turtle.up()
- for i = 2, 16 do
- if not (i == 3) then
- turtle.select(i)
- turtle.drop()
- end
- end
- turtle.select(2)
- buildDown()
- buildUp()
- end
- end
- if not quarry then
- buildUp()
- quarry = peripheral.wrap("front")
- routine()
- else
- routine()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement