Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local h = 9 --treeHeight (spurce9)
- h = h - 2
- term.clear()
- term.setCursorPos(1,1)
- print("Waiting 20 mins to start operation!")
- sleep(1200) --20 min
- function plant()
- turtle.forward()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.select(15)
- turtle.place()
- turtle.select(1)
- turtle.turnLeft()
- turtle.turnLeft()
- end
- function plantUp()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.up()
- turtle.select(15)
- turtle.placeDown()
- turtle.select(1)
- end
- local s = 0
- while s == 0 do
- print("Operation started")
- if turtle.getFuelLevel() < 200 then
- turtle.turnLeft()
- turtle.select(16)
- if turtle.suck(8) == false then
- s = 1
- end
- turtle.refuel(8)
- turtle.select(1)
- turtle.turnRight()
- end
- turtle.select(15)
- if turtle.suckUp(16) == false then
- s = 1
- end
- turtle.select(1)
- for x = 1, 2 do --First row
- plantUp()
- for x = 1, h do
- turtle.digUp()
- turtle.up()
- end --Turtle on top of tree
- for x = 1, 4 do
- turtle.dig()
- turtle.forward()
- end --Turtle on top of second tree
- for x = 1, h+1 do
- turtle.digDown()
- turtle.down()
- end --Turtle on bottom of second tree
- plant()
- for x = 1, 2 do
- turtle.forward()
- end --Turtle on bottom of third tree
- end --End of first row
- turtle.turnRight() --Middle point start
- for x = 1, 4 do
- turtle.forward()
- end
- turtle.turnRight()
- for x = 1, 2 do
- turtle.forward()
- end --Middle point end
- for x = 1, 2 do --Second row
- plantUp()
- for x = 1, h do
- turtle.digUp()
- turtle.up()
- end --Turtle on top of tree
- for x = 1, 4 do
- turtle.dig()
- turtle.forward()
- end --Turtle on top of second tree
- for x = 1, h+1 do
- turtle.digDown()
- turtle.down()
- end --Turtle on bottom of second tree
- plant()
- for x = 1, 2 do
- turtle.forward()
- end --Turtle on bottom of third tree
- end --End of second row
- turtle.turnLeft() --Middle point start
- for x = 1, 4 do
- turtle.forward()
- end
- turtle.turnLeft()
- for x = 1, 2 do
- turtle.forward()
- end --Middle point end
- for x = 1, 2 do --Third row
- plantUp()
- for x = 1, h do
- turtle.digUp()
- turtle.up()
- end --Turtle on top of tree
- for x = 1, 4 do
- turtle.dig()
- turtle.forward()
- end --Turtle on top of second tree
- for x = 1, h+1 do
- turtle.digDown()
- turtle.down()
- end --Turtle on bottom of second tree
- plant()
- for x = 1, 2 do
- turtle.forward()
- end --Turtle on bottom of third tree
- end --End of Thrid row
- turtle.turnRight() --Middle point start
- for x = 1, 4 do
- turtle.forward()
- end
- turtle.turnRight()
- for x = 1, 2 do
- turtle.forward()
- end --Middle point end
- for x = 1, 2 do --Fourth row
- plantUp()
- for x = 1, h do
- turtle.digUp()
- turtle.up()
- end --Turtle on top of tree
- for x = 1, 4 do
- turtle.dig()
- turtle.forward()
- end --Turtle on top of second tree
- for x = 1, h+1 do
- turtle.digDown()
- turtle.down()
- end --Turtle on bottom of second tree
- plant()
- for x = 1, 2 do
- turtle.forward()
- end --Turtle on bottom of third tree
- end --End of Fourth row
- turtle.turnRight()
- for x = 1, 12 do
- turtle.forward()
- end
- turtle.turnRight()
- for x = 1, 2 do
- turtle.forward()
- end
- turtle.turnRight()
- for x = 2, 13 do
- if turtle.drop(64) == false then
- s = 1
- end
- turtle.select(x)
- end
- turtle.turnLeft()
- print("Operation completed, waiting 20 minutes to start over")
- shell.run("startup")
- end
- print("Out of fuel or storage!")
Add Comment
Please, Sign In to add comment