MCPaule

Untitled

Sep 22nd, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. function refuel()
  2. if turtle.getFuelLevel() < 10 then
  3. turtle.select(1)
  4. turtle.refuel(1)
  5. print("refueling")
  6. end
  7. end
  8.  
  9. function plant()
  10. turtle.select(2)
  11. turtle.placeDown()
  12. end
  13.  
  14. function harvest()
  15. turtle.digDown()
  16. end
  17.  
  18. function prepare()
  19. turtle.attackDown()
  20. end
  21.  
  22. function turnLeft()
  23. turtle.turnLeft()
  24. turtle.forward()
  25. turtle.turnLeft()
  26. end
  27.  
  28. function turnRight()
  29. turtle.turnRight()
  30. turtle.forward()
  31. turtle.turnRight()
  32. end
  33.  
  34. function work()
  35. refuel()
  36. harvest()
  37. prepare()
  38. plant()
  39. turtle.forward()
  40. end
  41.  
  42. function main()
  43. print("Starting")
  44. refuel()
  45. turtle.up()
  46. turtle.forward()
  47. turtle.turnRight()
  48.  
  49. for i=1,8 do
  50. work()
  51. end
  52. turnLeft()
  53. turtle.forward()
  54. for i=1,8 do
  55. work()
  56. end
  57. turnRight()
  58. turtle.forward()
  59.  
  60. print("end")
  61. end
  62.  
  63.  
  64. main()
Advertisement
Add Comment
Please, Sign In to add comment