Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- height = 10
- function farmUp()
- for i = 1, height do
- turtle.select(1)
- if turtle.compareDown() then
- turtle.digDown()
- end
- turtle.up()
- while not turtle.placeDown() do
- sleep(1)
- end
- sleep(3)
- if turtle.detectUp() then
- break
- end
- end
- end
- function farmDown()
- for i = 1, height do
- if turtle.compareDown() then
- turtle.digDown()
- end
- turtle.down()
- while not turtle.placeDown() do
- sleep(1)
- end
- sleep(3)
- end
- end
- function check()
- turtle.select(2)
- for i= 1,4 do
- turtle.turnLeft()
- if turtle.compare() then
- turtle.turnLeft()
- turtle.turnLeft()
- break
- end
- end
- end
- function deploy()
- turtle.turnLeft()
- turtle.turnLeft()
- for i = 3, 16 do
- if turtle.getItemCount(i) > 0 then
- turtle.select(i)
- while not turtle.drop() do
- sleep(1)
- end
- end
- end
- turtle.turnLeft()
- turtle.turnLeft()
- end
- check()
- while true do
- farmUp()
- farmDown()
- deploy()
- sleep(30)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement