Advertisement
colhaydutu

atm10 energizing orb automation

Feb 8th, 2025 (edited)
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.00 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2. term.setBackgroundColor(colors.lightGray)
  3. term.setTextColor( colors.lime )
  4. term.clear()
  5. local material1
  6. local material2
  7. local material3
  8. local delaytime
  9. local dropam1
  10. local dropam2
  11. local product
  12. term.setCursorPos(1,1)
  13. print("by Colhaydutu")
  14. term.setCursorPos(1,2)
  15. print("Place an Energizing Orb under the turtle")
  16. print("Place a Chest above the turtle")
  17. print("Put items in the turtle's inventory")
  18. term.setCursorPos(1,6)
  19. print("Select an item for orb")
  20. print("z - Energized Steel")
  21. print("x - Blazing Crystal")
  22. print("c - Niotic Crystal")
  23. print("v - Spirited Crystal")
  24. print("b - Nitro Crystal")
  25. print("n - Dry ice")
  26. print("m - Certus Quartz")
  27.  
  28. local event, key, isHeld = os.pullEvent("key")
  29.  
  30. if key == keys.z then
  31. term.clear()
  32. term.setCursorPos(1,1)
  33. print("Selected item is Energized Steel")
  34. material1 = "minecraft:gold_ingot"
  35. material2 = "minecraft:iron_ingot"
  36. product = "powah:steel_energized"
  37. dropam1 = 1
  38. print("Type delay time for craft (second) ")
  39. delaytime = read()
  40.  
  41. elseif key == keys.x then
  42. term.clear()
  43. term.setCursorPos(1,1)
  44. print("Selected item is Blazing Crystal")
  45. material1 = "minecraft:blaze_rod"
  46. material2 = "minecraft:air"
  47. dropam1 = 1
  48. product = "powah:crystal_blazing"
  49. print("Type delay time for craft (second) ")
  50. delaytime = read()
  51.  
  52. elseif key == keys.c then
  53. term.clear()
  54. term.setCursorPos(1,1)
  55. print("Selected item is Niotic Crystal")
  56. material1 = "minecraft:diamond"
  57. material2 = "minecraft:air"
  58. product = "powah:crystal_niotic"
  59. dropam1 = 1
  60. print("Type delay time for craft (second) ")
  61. delaytime = read()
  62.  
  63. elseif key == keys.v then
  64. term.clear()
  65. term.setCursorPos(1,1)
  66. print("Selected item is Spirited Crystal")
  67. material1 = "minecraft:emerald"
  68. material2 = "minecraft:air"
  69. product = "powah:crystal_spirited"
  70. dropam1 = 1
  71. print("Type delay time for craft (second) ")
  72. delaytime = read()
  73.  
  74. elseif key == keys.b then
  75. term.clear()
  76. term.setCursorPos(1,1)
  77. print("Selected item is Nitro Crystal")
  78. material3 = "minecraft:redstone_block"
  79. material2 = "minecraft:nether_star"
  80. material1 = "powah:blazing_crystal_block"
  81. product = "powah:crystal_nitro"
  82. dropam2 = 2
  83. dropam1 = 1
  84.  
  85. print("Type delay time for craft (second) ")
  86. delaytime = read()
  87.  
  88. elseif key == keys.n then
  89. term.clear()
  90. term.setCursorPos(1,1)
  91. print("Selected the dry ice")
  92. material3 = "minecraft:blue_ice"
  93. material2 = "minecraft:air"
  94. material1 = "minecraft:air"
  95. product = "powah:dry_ice"
  96. dropam2 = 2
  97. print("Type delay time for craft (second) ")
  98. delaytime = read()
  99.  
  100. elseif key == keys.m then
  101. term.clear()
  102. term.setCursorPos(1,1)
  103. print("Selected the charged certus")
  104. material1 = "ae2:certus_quartz_crystal"
  105. material2 = "minecraft:air"
  106. material3 = "minecraft:air"
  107. product = "ae2:charged_certus_quartz_crystal"
  108. dropam1 = 1
  109. print("Type delay time for craft (second) ")
  110. delaytime = read()
  111.  
  112. else
  113. shell.run("startup.lua")
  114. term.clear()
  115. end
  116.  
  117. print("Starting...")
  118. sleep(1)
  119. term.clear()
  120. sleep(1)
  121. term.setCursorPos(1,1)
  122. print("working...")
  123. print("Break the turtle for stop")
  124.  
  125.  
  126. while true do
  127.  
  128. for slot = 1, 16 do
  129. local itemDetail = turtle.getItemDetail(slot)
  130. if itemDetail and itemDetail.name == material1 then
  131. turtle.select(slot)
  132. turtle.dropDown(1)
  133. break
  134. end
  135. end
  136.  
  137. for slot = 1, 16 do
  138. local itemDetail = turtle.getItemDetail(slot)
  139. if itemDetail and itemDetail.name == material2 then
  140. turtle.select(slot)
  141. turtle.dropDown(1)
  142. break
  143. end
  144. end
  145.  
  146. for slot = 1, 16 do
  147. local itemDetail = turtle.getItemDetail(slot)
  148. if itemDetail and itemDetail.name == material3 then
  149. turtle.select(slot)
  150. turtle.dropDown(2)
  151. break
  152. end
  153. end
  154.  
  155. sleep(tonumber(delaytime))
  156. turtle.suckDown()
  157.  
  158. for slot = 1, 16 do
  159. local itemDetail = turtle.getItemDetail(slot)
  160. if itemDetail and itemDetail.name == product then
  161. turtle.select(slot)
  162. turtle.dropUp()
  163. break
  164. end
  165. end
  166. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement