ScoutMaester

Untitled

Jan 12th, 2021 (edited)
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. count = 1
  2. slot = 2
  3. temp = 1
  4.  
  5. print("Reseting flower")
  6. turtle.turnLeft()
  7. turtle.suck(1)
  8. turtle.turnRight()
  9. turtle.place()
  10. print("Done")
  11.  
  12. while true do
  13. turtle.turnLeft()
  14. print("Restocking")
  15. for i = 1,16 do
  16. turtle.select(i)
  17. turtle.suck()
  18. end
  19. print("I've restocked! Selecting Slot 1")
  20. turtle.select(1)
  21. turtle.turnRight()
  22. if turtle.getItemCount() < 64 then
  23. print("Please reboot me when I have items... or wait 1000 seconds ;)")
  24. sleep(1000)
  25. end
  26. if turtle.detect() == true then
  27. temp = 2
  28. print("Flower still not reset, waiting")
  29. while temp == 2 do
  30. turtle.detect()
  31. if turtle.detect() == false then
  32. temp = 1
  33. print("Looks like it reset! Ill wait a sec then begin my run")
  34. sleep(10)
  35. end
  36. end
  37. else
  38. print("Im going to wait a sec, flower may still be reseting")
  39. sleep(10)
  40. end
  41. for i = 1, 6 do
  42. turtle.place()
  43. turtle.up()
  44. turtle.forward()
  45. turtle.forward()
  46. turtle.placeDown()
  47. turtle.forward()
  48. turtle.placeDown()
  49. turtle.turnRight()
  50. turtle.forward()
  51. turtle.placeDown()
  52. turtle.forward()
  53. turtle.placeDown()
  54. turtle.turnRight()
  55. turtle.forward()
  56. turtle.placeDown()
  57. turtle.forward()
  58. turtle.placeDown()
  59. turtle.turnRight()
  60. turtle.forward()
  61. turtle.placeDown()
  62. turtle.forward()
  63. turtle.turnRight()
  64. turtle.back()
  65. count = count + 8
  66. print("I've completed layer", i)
  67. if count >= 64 then
  68. count = 1
  69. turtle.select(slot)
  70. slot = slot + 1
  71. if slot == 17 then
  72. slot = 1
  73. end
  74. end
  75. end
  76. while turtle.detectDown() == false do
  77. turtle.down()
  78. end
  79. if turtle.getFuelLevel() < 100 then
  80. print("Im out of fuel... please refuel me and reboot!")
  81. while true do
  82. sleep(10)
  83. end
  84. end
  85. end
Add Comment
Please, Sign In to add comment