Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function PickupItems()
- turtle.turnRight()
- turtle.select(1)
- --Imports coal & 2 stacks of seeds
- --from the chest to the right.
- for i = 1, 3 do
- turtle.suck()
- end -- end for
- turtle.turnLeft()
- end -- end function
- function Refuel()
- if turtle.getFuelLevel() < 20 then
- turtle.refuel(1)
- else
- print(turtle.getFuelLevel())
- end -- end if
- end -- end function
- function GetReady()
- --Moves the turtle into a starting
- --position.
- turtle.up(1)
- turtle.forward(1)
- --Selects seeds to plant
- turtle.select(2)
- end -- end function
- function Harvest()
- local turnCount = 1
- for i = 1, 9 do --number of rows
- if i == 5 then -- middle row has sprinkler to avoid
- for j = 1, 4 do
- turtle.forward(1)
- turtle.digDown()
- turtle.placeDown()
- end -- end for
- turtle.forward(1)
- for j =1, 4 do
- turtle.forward(1)
- turtle.digDown()
- turtle.placeDown()
- end -- end for
- else
- for k = 1, 9 do --number of tiles in 1 row
- turtle.forward(1)
- turtle.digDown()
- turtle.placeDown()
- end--end for
- end -- end if
- Refuel()
- if turnCount % 2 == 0 then
- turtle.turnLeft()
- else
- turtle.turnRight()
- end --end if
- turtle.forward(1)
- turtle.digDown()
- turtle.placeDown()
- -- if i == 10 then
- -- break
- -- end--end if
- if turnCount % 2 == 0 then
- turtle.turnLeft()
- else
- turtle.turnRight()
- end -- end if
- turnCount = turnCount + 1
- end --end for loop
- end--end function
- function ReturnToStart()
- end
- --main
- PickupItems()
- Refuel()
- GetReady()
- Harvest()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement