Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function refuel()
- if turtle.getFuelLevel() < 10 then
- turtle.select(1)
- turtle.refuel(1)
- print("refueling")
- end
- end
- function plant()
- if turtle.getItemCount(2) and not 0 then
- turtle.select(2)
- turtle.placeDown()
- else
- turtle.select(3)
- turtle.placeDown()
- end
- end
- function harvest()
- turtle.digDown()
- end
- function prepare()
- turtle.attackDown()
- end
- function turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- end
- function turnRight()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- function work()
- refuel()
- harvest()
- prepare()
- plant()
- turtle.forward()
- end
- function main()
- print("Starting")
- refuel()
- turtle.up()
- turtle.forward()
- turtle.turnRight()
- for j=1,8 do
- for i=1,8 do
- work()
- end
- turnLeft()
- turtle.forward()
- for i=1,8 do
- work()
- end
- turnRight()
- turtle.forward()
- end
- turtle.turnRight()
- for i=1,16 do
- turtle.forward()
- end
- turtle.down()
- turtle.turnRight()
- turtle.turnRight()
- print("...Finished!")
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement