Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- harvest
- function harvest()
- x = 0
- term.clear()
- term.setCursorPos(15,6)
- print("** working **")
- turtle.dig()
- turtle.forward()
- turtle.dig()
- while turtle.detectUp() == true do
- turtle.digUp()
- turtle.up()
- turtle.dig()
- x = x+1
- end
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- turtle.dig()
- for i=1, x do
- turtle.digDown()
- turtle.down()
- turtle.dig()
- end
- turtle.back()
- turtle.turnLeft()
- turtle.back()
- turtle.turnRight()
- x = 0
- end
- --plant
- function plant()
- term.clear()
- term.setCursorPos(15,6)
- print("** working **")
- turtle.digUp()
- turtle.up()
- turtle.forward()
- turtle.select(16)
- turtle.placeDown()
- turtle.forward()
- turtle.placeDown()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- turtle.placeDown()
- turtle.forward()
- turtle.placeDown()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- turtle.down()
- end
- -- refuel
- function fuel()
- while turtle.getFuelLevel() < 1000 do
- turtle.select(15)
- turtle.suck(2)
- turtle.refuel(2)
- end
- end
- --drop
- function drop()
- turtle.select(1)
- turtle.dropDown()
- turtle.select(2)
- turtle.dropDown()
- turtle.select(3)
- turtle.dropDown()
- turtle.select(4)
- turtle.dropDown()
- turtle.select(5)
- turtle.dropDown()
- turtle.select(6)
- turtle.dropDown()
- turtle.select(7)
- turtle.dropDown()
- turtle.select(8)
- turtle.dropDown()
- turtle.select(9)
- turtle.dropDown()
- turtle.select(10)
- turtle.dropDown()
- turtle.select(11)
- turtle.dropDown()
- turtle.select(12)
- turtle.dropDown()
- turtle.select(13)
- turtle.dropDown()
- turtle.select(14)
- turtle.dropDown()
- turtle.select(15)
- turtle.dropDown()
- turtle.select(16)
- turtle.dropDown()
- end
- --compare
- function compare()
- turtle.select(16)
- while turtle.compare() == true do
- term.clear()
- term.setCursorPos(15,6)
- print("** sleep: zZzZzZz **")
- sleep(15)
- end
- harvest()
- end
- while true do
- compare()
- turtle.turnLeft()
- drop()
- turtle.turnLeft()
- fuel()
- turtle.turnLeft()
- turtle.select(16)
- turtle.suck(5)
- turtle.turnLeft()
- plant()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement