Advertisement
CrushDust

Latex + Andesite casing production

Dec 21st, 2024
10
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. -- This program is made for turning a
  2. -- oak log into a stripped log from
  3. -- 4 fluid extractors from industrial
  4. -- forgoing, then apply an andesite to
  5. -- create andesite casing from create.
  6.  
  7. -- Put this turtle on top of the log.
  8. -- Input is to the right, andesite
  9. -- casing output on the left, and
  10. -- stripped logs in the back.
  11.  
  12.  
  13. t = 30
  14.  
  15. while t > 0 do
  16. term.clear()
  17. term.setCursorPos(1,1)
  18. print("Automatic latex production and andesite casing production has started")
  19. turtle.select(2)
  20. turtle.turnRight()
  21. if turtle.getItemDetail() == nil then
  22. turtle.suck(1)
  23. end
  24. if (turtle.suck(1)) == true then
  25. print("Turtle has picked up 1 log")
  26. turtle.placeDown()
  27. print("Turtle has placed down the log")
  28.  
  29. turtle.select(3)
  30. turtle.turnLeft()
  31. if turtle.suck(1) == true then
  32. print("Turtle has picked up 1 andesite")
  33. a = 1
  34. else
  35. print("There is no more andesite in input inventory. Turtle will now only create stripped logs")
  36. a = 0
  37. end
  38.  
  39. i = 1
  40. while i == 1 do
  41. print("Turtle will now wait", t, "seconds for the fluid extractors to finish extracting fluid")
  42. sleep(t)
  43. print("Checking if log has been stripped")
  44. turtle.select(2)
  45. if turtle.compareDown() == false then
  46. i = 0
  47. else
  48. print("The log is not yet stripped, trying again later..")
  49. end
  50. end
  51.  
  52.  
  53. if a == 1 then
  54. turtle.select(3)
  55. turtle.placeDown()
  56. print("Andesite casing created!")
  57. print("Digging up the andesite casing!")
  58. else
  59. print("Digging up the stripped wood!")
  60. end
  61.  
  62. turtle.select(1)
  63. turtle.digDown()
  64. turtle.turnLeft()
  65. if a == 0 then
  66. turtle.turnLeft()
  67. turtle.drop()
  68. turtle.turnRight()
  69. turtle.turnRight()
  70. else
  71. turtle.drop()
  72. turtle.turnRight()
  73. end
  74.  
  75. print("All contents stored. Starting new iteration in 5 seconds")
  76. sleep(5)
  77. else
  78. print("Turtle has run out of logs. Refill input inventory!")
  79. t = 0
  80. end
  81. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement