Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- local function cutUp()
- if turtle.detect() then
- turtle.up()
- turtle.up()
- turtle.dig()
- turtle.forward()
- end
- while turtle.detect() do
- turtle.dig()
- turtle.digUp()
- turtle.up()
- end
- end
- local function moveLeft()
- if not turtle.detect() then
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- end
- end
- local function cutDown()
- while turtle.detectDown() do
- turtle.dig()
- turtle.digDown()
- turtle.down()
- end
- if not turtle.detectDown() then
- turtle.up()
- turtle.select(15)
- turtle.placeDown()
- end
- end
- local function reset()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.back()
- turtle.down()
- turtle.down()
- end
- local function drop()
- for i = 1, 12 do
- turtle.select(i)
- turtle.drop()
- end
- end
- local function run()
- cutUp()
- moveLeft()
- cutDown()
- reset()
- turtle.turnRight()
- turtle.turnRight()
- drop()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- local function plantTree()
- turtle.select(13)
- turtle.up()
- turtle.up()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.place()
- turtle.turnRight()
- turtle.back()
- turtle.place()
- turtle.turnLeft()
- turtle.place()
- turtle.turnRight()
- turtle.back()
- turtle.place()
- turtle.down()
- turtle.down()
- turtle.select(1)
- end
- local function checkTree()
- turtle.up()
- turtle.up()
- turtle.up()
- if not turtle.detect() then
- turtle.down()
- turtle.down()
- turtle.down()
- sleep(60)
- checkTree()
- else
- turtle.down()
- turtle.down()
- turtle.down()
- sleep(1)
- run()
- end
- end
- checkTree()
- plantTree()
- sleep(90)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement