Advertisement
Ubidibity

mym dsu inventory pooter prog

Nov 11th, 2023 (edited)
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local monitor = peripheral.wrap("top") -- Replace "top" with the side the monitor is on if it's not on top
  2. local orgTerm=term.redirect(monitor)
  3. term.redirect(orgTerm)
  4.  
  5. local dsuItems = {
  6. { row = "R1", pos = 8, item = "lust shard" },
  7. { row = "R1", pos = 7, item = "envy shard" },
  8. { row = "R1", pos = 6, item = "pride shard" },
  9. { row = "R1", pos = 5, item = "wrath shard" },
  10. { row = "R1", pos = 4, item = "greed shard" },
  11. { row = "R1", pos = 3, item = "sloth shard" },
  12. { row = "R1", pos = 2, item = "coal dust" },
  13. { row = "R1", pos = 1, item = "rocky hive" },
  14. { row = "R2", pos = 8, item = "ferrous ingot" },
  15. { row = "R2", pos = 7, item = "charged certus quartz" },
  16. { row = "R2", pos = 6, item = "netherstar" },
  17. { row = "R2", pos = 5, item = "flint" },
  18. { row = "R2", pos = 4, item = "ardite" },
  19. { row = "R2", pos = 3, item = "cobalt" },
  20. { row = "R2", pos = 2, item = "water shard" },
  21. { row = "R2", pos = 1, item = "fire shard" },
  22. { row = "R3", pos = 8, item = "entropy shard" },
  23. { row = "R3", pos = 7, item = "order shard" },
  24. { row = "R3", pos = 6, item = "earth shard" },
  25. { row = "R3", pos = 5, item = "air shard" },
  26. { row = "R3", pos = 4, item = "yellow hearts" },
  27. { row = "R3", pos = 3, item = "saltpeter" },
  28. { row = "R3", pos = 2, item = "steel" },
  29. { row = "R3", pos = 1, item = "netherwart" },
  30. { row = "R4", pos = 8, item = "wither skulls" },
  31. { row = "R4", pos = 7, item = "necrotic bone" },
  32. { row = "R4", pos = 6, item = "rich slag" },
  33. { row = "R4", pos = 5, item = "emerald" },
  34. { row = "R4", pos = 4, item = "cactus green" },
  35. { row = "R4", pos = 3, item = "sugar cane" },
  36. { row = "R4", pos = 2, item = "wool" },
  37. { row = "R4", pos = 1, item = "glowstone" },
  38. { row = "R5", pos = 8, item = "rotten flesh" },
  39. { row = "R5", pos = 7, item = "bonemeal" },
  40. { row = "R5", pos = 6, item = "lapis ore" },
  41. { row = "R5", pos = 5, item = "diamond ore" },
  42. { row = "R5", pos = 4, item = "gold ore" },
  43. { row = "R5", pos = 3, item = "certus quartz ore" },
  44. { row = "R5", pos = 2, item = "dense iron ore" },
  45. { row = "R5", pos = 1, item = "salt ore" },
  46. { row = "R6", pos = 8, item = "aluminum ore" },
  47. { row = "R6", pos = 7, item = "yellorium ore" },
  48. { row = "R6", pos = 6, item = "redstone ore" },
  49. { row = "R6", pos = 5, item = "tin ore" },
  50. { row = "R6", pos = 4, item = "silver ore" },
  51. { row = "R6", pos = 3, item = "lead ore" },
  52. { row = "R6", pos = 2, item = "copper ore" },
  53. { row = "R6", pos = 1, item = "iron ore" },
  54. { row = "R7", pos = 8, item = "coal ore" },
  55. { row = "R7", pos = 7, item = "division sigil" },
  56. { row = "R7", pos = 6, item = "crystalized essence metallum" },
  57. { row = "R7", pos = 5, item = "rubber wood" },
  58. { row = "R7", pos = 4, item = "oak wood" },
  59. { row = "R7", pos = 3, item = "nether brick" },
  60. { row = "R7", pos = 2, item = "wheat" },
  61. { row = "R7", pos = 1, item = "nether quartz ore" },
  62. { row = "R8", pos = 8, item = "netherrack" },
  63. { row = "R8", pos = 7, item = "cobble" },
  64. { row = "R8", pos = 6, item = "salt" },
  65. { row = "R8", pos = 5, item = "gunpowder" },
  66. { row = "R8", pos = 4, item = "blaze rod" },
  67. { row = "R8", pos = 3, item = "vanilla bones" },
  68. { row = "R8", pos = 2, item = "uranium" },
  69. { row = "R8", pos = 1, item = "ferrous" },
  70. { row = "R9", pos = 8, item = "sulfur" },
  71. { row = "R9", pos = 7, item = "ender pearls" },
  72. { row = "R9", pos = 6, item = "nether quartz" },
  73. { row = "R9", pos = 5, item = "glass" },
  74. { row = "R9", pos = 4, item = "niter" },
  75. { row = "R9", pos = 3, item = "soul sand" },
  76. { row = "R9", pos = 2, item = "obsidian" },
  77. { row = "R9", pos = 1, item = "shiny" },
  78. { row = "R10", pos = 8, item = "enderium" },
  79. { row = "R10", pos = 7, item = "invar" },
  80. { row = "R10", pos = 6, item = "diorite" },
  81. { row = "R10", pos = 5, item = "clay" },
  82. { row = "R10", pos = 4, item = "rubber" },
  83. { row = "R10", pos = 3, item = "certus" },
  84. { row = "R10", pos = 2, item = "gravel" },
  85. { row = "R10", pos = 1, item = "coal" },
  86. { row = "R11", pos = 8, item = "dirt" },
  87. { row = "R11", pos = 7, item = "diamond" },
  88. { row = "R11", pos = 6, item = "lapis" },
  89. { row = "R11", pos = 5, item = "marble" },
  90. { row = "R11", pos = 4, item = "redstone" },
  91. { row = "R11", pos = 3, item = "stone" },
  92. { row = "R11", pos = 2, item = "sand" },
  93. { row = "R11", pos = 1, item = "aluminum" },
  94. { row = "R12", pos = 8, item = "copper" },
  95. { row = "R12", pos = 7, item = "yellorium" },
  96. { row = "R12", pos = 6, item = "draconium" },
  97. { row = "R12", pos = 5, item = "tin" },
  98. { row = "R12", pos = 4, item = "lead" },
  99. { row = "R12", pos = 3, item = "silver" },
  100. { row = "R12", pos = 2, item = "gold" },
  101. { row = "R12", pos = 1, item = "iron" },
  102. { row = "R13", pos = 8, item = "awakened drac" },
  103. { row = "R13", pos = 7, item = "draconium infused obsidian" },
  104. { row = "R13", pos = 6, item = "torch" },
  105. { row = "R13", pos = 5, item = "melon" },
  106. { row = "R13", pos = 4, item = "pyrotheum" },
  107. { row = "R13", pos = 3, item = "enderium base" },
  108. { row = "R13", pos = 2, item = "enderium" },
  109. { row = "R13", pos = 1, item = "gluttony shard" },
  110. { row = "R14", pos = 8, item = "pink slime" },
  111. { row = "R14", pos = 7, item = "yellow petal" },
  112. { row = "R14", pos = 6, item = "lt blue petal" },
  113. { row = "R14", pos = 5, item = "purple petal" },
  114. { row = "R14", pos = 4, item = "black petal" },
  115. { row = "R14", pos = 3, item = "vines" },
  116. { row = "R14", pos = 2, item = "orange petal" },
  117. { row = "R14", pos = 1, item = "cinderpearl" },
  118. { row = "R15", pos = 8, item = "brown petal" },
  119. { row = "R15", pos = 7, item = "blue petal" },
  120. { row = "R15", pos = 6, item = "red petal" },
  121. { row = "R15", pos = 5, item = "air infused stone" },
  122. { row = "R15", pos = 4, item = "energetic alloy" },
  123. { row = "R15", pos = 3, item = "green petal" },
  124. { row = "R15", pos = 2, item = "rocky princess" },
  125. { row = "R15", pos = 1, item = "crystalized essence terra" },
  126. { row = "R16", pos = 8, item = "white petal" },
  127. { row = "R16", pos = 7, item = "oak wood planks" },
  128. { row = "R16", pos = 6, item = "sticks" },
  129. { row = "R16", pos = 5, item = "cinnebar ore" },
  130. { row = "R16", pos = 4, item = "grass" },
  131. { row = "R16", pos = 3, item = "shimmerleaf" },
  132. { row = "R16", pos = 2, item = "soybean" },
  133. { row = "R16", pos = 1, item = "carrot" },
  134. { row = "R17", pos = 8, item = "glowstone block" },
  135. { row = "R17", pos = 7, item = "earth infused stone" },
  136. { row = "R17", pos = 6, item = "track 66 (railroad)" },
  137. { row = "R17", pos = 5, item = "lime petal" },
  138. { row = "R17", pos = 4, item = "raw beef" },
  139. { row = "R17", pos = 3, item = "pink petal" },
  140. { row = "R17", pos = 2, item = "hellbark wood" },
  141. { row = "R17", pos = 1, item = "raw firestone" },
  142. { row = "R18", pos = 8, item = "Watermelon" },
  143. { row = "R18", pos = 7, item = "Rubber tree saplings" },
  144. { row = "R18", pos = 6, item = "Oak saplings" },
  145. { row = "R18", pos = 5, item = "crystalized essence permutatio" },
  146. { row = "R18", pos = 4, item = "cyan petal" },
  147. { row = "R18", pos = 3, item = "magenta petal" },
  148. { row = "R18", pos = 2, item = "lt grey petal" },
  149. { row = "R18", pos = 1, item = "grey petal" },
  150. { row = "R19", pos = 3, item = "Pumpkin" },
  151. { row = "R19", pos = 2, item = "Silky propolis" },
  152. { row = "R19", pos = 1, item = "Silver ingot" }
  153. }
  154.  
  155. function findItem(searchKey)
  156. local key = searchKey:lower()
  157. term.clear()
  158. monitor.clear()
  159. for i, v in ipairs(dsuItems) do
  160. if v.item:lower():find(key) then
  161. term.redirect(monitor)
  162. print(v.row..","..v.pos.." contains ".. v.item)
  163. term.redirect(orgTerm)
  164. print(v.row..","..v.pos.." contains ".. v.item)
  165. found=true
  166. end
  167. end
  168.  
  169. if not found then
  170. print("No items found")
  171. end
  172. -- if found then
  173. -- print("Output redirected to monitor.")
  174. -- end
  175. end
  176.  
  177. while true do
  178. print("Enter an item to search (or type 'exit' to stop):")
  179. local searchKey = read()
  180. if searchKey:lower() == "exit" then
  181. break
  182. end
  183. findItem(searchKey)
  184. os.sleep(3) -- Pause for 5 seconds
  185. end
  186.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement