Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- empty()
- function refuel()
- if (turtle.getFuelLevel() <= 150)
- turtle.select(16)
- fuel = turtle.getFuelLevel()
- fuel_l = (850 - fuel) / 80
- turtle.suckDown(fuel_l)
- end
- end
- function empty()
- turtle.turnLeft()
- turtle.turnLeft()
- for b = 1, 16 do
- turtle.select(i)
- turtle.drop()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- end
- function farm()
- nbLig = 9
- nbCol = 9
- b = 0
- for i = 1, nbLig do
- for j = 1, nbCol do
- inspect()
- end
- b = b + 1
- if (b%2 ~= 0) then
- turtle.turnLeft()
- inspect()
- turtle.turnLeft()
- else
- turtle.turnRight()
- inspect()
- turtle.turnRight()
- end
- end
- sleep(1)
- maison()
- empty()
- end
- function maison()
- print("Retours Maison")
- for l = 1, 2 do
- for k = 1, nbLig do
- turtle.forward()
- end
- turtle.turnLeft()
- end
- turtle.back()
- end
- function inspect()
- local success, data = turtle.inspectDown()
- if data.metadata == 7 then
- turtle.digDown()
- end
- turtle.placeDown()
- turtle.forward()
- end
- while true do
- refuel()
- farm()
- sleep(60)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement