Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function Plant()
- turtle.select(1)
- turtle.placeDown()
- end
- local function Till()
- turtle.digDown()
- turtle.placeDown()
- end
- local function Farm()
- turtle.digDown()
- turtle.suckDown()
- turtle.down()
- turtle.suck()
- turtle.turnLeft()
- turtle.suck()
- turtle.turnLeft()
- turtle.suck()
- turtle.turnLeft()
- turtle.suck()
- turtle.turnLeft()
- turtle.up()
- turtle.digDown()
- Plant()
- end
- local function Search()
- success, data = turtle.inspectDown()
- if success == true then
- if data.metadata == 7 then
- Farm()
- end
- else Till()
- end
- end
- local function TurnRight()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- Search()
- end
- local function TurnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- Search()
- end
- local function ForwardRight()
- while turtle.detect() == false do
- turtle.forward()
- Search()
- end
- TurnRight()
- end
- local function ForwardLeft()
- while turtle.detect() == false do
- turtle.forward()
- Search()
- end
- TurnLeft()
- end
- local function DownBack()
- ForwardRight()
- ForwardLeft()
- end
- local function GoBack()
- while turtle.detect() == false do
- turtle.forward()
- Search()
- end
- turtle.turnRight()
- while turtle.detect() == false do
- turtle.forward()
- end
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- turtle.select(1)
- turtle.dropDown()
- for a= 2, 16 do
- turtle.select(a)
- turtle.drop()
- end
- turtle.turnRight()
- end
- local function Setup()
- turtle.select(1)
- turtle.suckDown()
- end
- local function Core()
- Setup()
- DownBack()
- DownBack()
- DownBack()
- DownBack()
- DownBack()
- DownBack()
- DownBack()
- DownBack()
- ForwardRight()
- GoBack()
- sleep(1200)
- end
- n=0
- while n==0 do
- Core()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement