Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkfortree(i)
- turtle.select(16)
- sleep(5)
- local i = 0
- if (turtle.compare() == true) then
- i = 1
- return i
- end
- end
- function minelayer()
- turtle.digUp()
- turtle.up()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- function minetree()
- local i = 0
- local hight = 0
- turtle.dig()
- turtle.forward()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- while (i == 0) do
- minelayer()
- hight = hight + 1
- turtle.select(16)
- if (turtle.compareUp() == false) then
- while (hight ~= 0) do
- turtle.down()
- hight = hight - 1
- end
- turtle.back()
- i = 1
- end
- end
- end
- function dumpitems()
- local i = 0
- local f = 1
- turtle.turnLeft()
- while (f < 14) do
- turtle.select(f)
- if (turtle.compareTo(16) == true) then
- turtle.drop()
- end
- f = f + 1
- end
- turtle.turnRight()
- end
- function replant()
- turtle.select(15)
- turtle.forward()
- turtle.turnRight()
- turtle.place()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- turtle.place()
- turtle.turnLeft()
- turtle.back()
- turtle.place()
- turtle.back()
- turtle.place()
- end
- while (true) do
- local i = 0
- checkfortree()
- while (i == 0) do
- i = minetree(i)
- end
- dumpitems()
- replant()
- end
Advertisement
Add Comment
Please, Sign In to add comment