bigbadtom

get items

Oct 17th, 2021 (edited)
422
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local m = peripheral.wrap("right")
  2. m.open(1)
  3. local slot1 = turtle.getItemDetail(1)
  4. local slot2 = turtle.getItemDetail(2)
  5. local slot3 = turtle.getItemDetail(3)
  6. local slot4 = turtle.getItemDetail(4)
  7. local slot5 = turtle.getItemDetail(5)
  8. local slot6 = turtle.getItemDetail(6)
  9. local slot7 = turtle.getItemDetail(7)
  10. local slot8 = turtle.getItemDetail(8)
  11. local slot9 = turtle.getItemDetail(9)
  12. local slot10 = turtle.getItemDetail(10)
  13. local slot11 = turtle.getItemDetail(11)
  14. local slot12 = turtle.getItemDetail(12)
  15. local slot13 = turtle.getItemDetail(13)
  16. local slot14 = turtle.getItemDetail(14)
  17. local slot15 = turtle.getItemDetail(15)
  18. local fuel = turtle.getFuelLevel()
  19.  
  20.  
  21.  
  22. -- send slotone data to monitor
  23. if slot1 ~= nil then
  24. slot1_name = slot1.name:gsub('pickletweaks:','')
  25. slot1name = slot1_name:gsub("_", " ")
  26. local slotone = "Slot 1 " .. slot1name .. " " .. slot1.count
  27. print(slotone)
  28. m.transmit(10,1,slotone)
  29. else
  30. print("slot 1 is empty")
  31. m.transmit(10,1,"slot 1 is empty")
  32. end
  33.  
  34. -- send slottwo data to monitor
  35. if slot2 ~= nil then
  36. slot2_name = slot2.name:gsub('pickletweaks:','')
  37. slot2name = slot2_name:gsub("_", " ")
  38. local slottwo = "Slot 2 " .. slot2name .. " " .. slot2.count
  39. print(slottwo)
  40. m.transmit(10,2,slottwo)
  41. else
  42. print("slot 2 is empty")
  43. m.transmit(10,2,"slot 2 is empty")
  44. end
  45.  
  46. -- send slotthree data to monitor
  47. if slot3 ~= nil then
  48. slot3_name = slot3.name:gsub('minecraft:','')
  49. slot3name = slot3_name:gsub("_", " ")
  50. local slotthree = "Slot 3 " .. slot3name .. " " .. slot3.count
  51. print(slotthree)
  52. m.transmit(10,3,slotthree)
  53. else
  54. print("slot 3 is empty")
  55. m.transmit(10,3,"slot 3 is empty")
  56. end
  57.  
  58. -- send slotfour data to monitor
  59. if slot4 ~= nil then
  60. slot4_name = slot4.name:gsub('minecraft:','')
  61. slot4name = slot4_name:gsub("_", " ")
  62. local slotfour = "Slot 4 " .. slot4name .. " " .. slot4.count
  63. print(slotfour)
  64. m.transmit(10,4,slotfour)
  65. else
  66. print("slot 4 is empty")
  67. m.transmit(10,4,"slot 4 is empty")
  68. end
  69.  
  70. -- send slotfive data to monitor
  71. if slot5 ~= nil then
  72. slot5_name = slot5.name:gsub('minecraft:','')
  73. slot5name = slot5_name:gsub("_", " ")
  74. local slotfive = "Slot 5 " .. slot5name .. " " .. slot5.count
  75. print(slotfive)
  76. m.transmit(10,5,slotfive)
  77. else
  78. print("slot 5 is empty")
  79. m.transmit(10,5,"slot 5 is empty")
  80. end
  81.  
  82. -- send slotsix data to monitor
  83. if slot6 ~= nil then
  84. slot6_name = slot6.name:gsub('minecraft:','')
  85. slot6name = slot6_name:gsub("_", " ")
  86. local slotsix = "Slot 6 " ..slot6name .. " " .. slot6.count
  87. print(slotsix)
  88. m.transmit(10,6,slotsix)
  89. else
  90. print("slot 6 is empty")
  91. m.transmit(10,6,"slot 6 is empty")
  92. end
  93.  
  94. -- send slotseven data to monitor
  95. if slot7 ~= nil then
  96. slot7_name = slot7.name:gsub('minecraft:','')
  97. slot7name = slot7_name:gsub("_", " ")
  98. local slotseven = "Slot 7 " .. slot7name .. " " .. slot7.count
  99. print(slotseven)
  100. m.transmit(10,7,slotseven)
  101. else
  102. print("slot 7 is empty")
  103. m.transmit(10,7,"slot 7 is empty")
  104. end
  105.  
  106. -- send sloteight data to monitor
  107. if slot8 ~= nil then
  108. slot8_name = slot8.name:gsub('minecraft:','')
  109. slot8name = slot8_name:gsub("_", " ")
  110. local sloteight = "Slot 8 " .. slot8name .. " " .. slot8.count
  111. print(sloteight)
  112. m.transmit(10,8,sloteight)
  113. else
  114. print("slot 8 is empty")
  115. m.transmit(10,8,"slot 8 is empty")
  116. end
  117.  
  118. -- send slotnine data to monitor
  119. if slot9 ~= nil then
  120. slot9_name = slot9.name:gsub('minecraft:','')
  121. slot9name = slot9_name:gsub("_", " ")
  122. local slotnine = "Slot 9 " .. slot9name .. " " .. slot9.count
  123. print(slotnine)
  124. m.transmit(10,9,slotnine)
  125. else
  126. print("slot 9 is empty")
  127. m.transmit(10,9,"slot 9 is empty")
  128. end
  129.  
  130. -- send slotten data to monitor
  131. if slot10 ~= nil then
  132. slot10_name = slot10.name:gsub('minecraft:','')
  133. slot10name = slot10_name:gsub("_", " ")
  134. local slotten = "Slot 10 " .. slot10name .. " " .. slot10.count
  135. print(slotten)
  136. m.transmit(10,10,slotten)
  137. else
  138. print("slot 10 is empty")
  139. m.transmit(10,10,"slot 10 is empty")
  140. end
  141.  
  142. -- send sloteleven data to monitor
  143. if slot11 ~= nil then
  144. slot11_name = slot11.name:gsub('minecraft:','')
  145. slot11name = slot11_name:gsub("_", " ")
  146. local sloteleven = "Slot 11 " .. slot11name .. " " .. slot11.count
  147. print(sloteleven)
  148. m.transmit(10,11,sloteleven)
  149. else
  150. print("slot 11 is empty")
  151. m.transmit(10,11,"slot 11 is empty")
  152. end
  153.  
  154. -- send slottweleve data to monitor
  155. if slot12 ~= nil then
  156. slot12_name = slot12.name:gsub('minecraft:','')
  157. slot12name = slot12_name:gsub("_", " ")
  158. local slottweleve = "Slot 12 " .. slot12name .. " " .. slot12.count
  159. print(slottweleve)
  160. m.transmit(10,12,slottweleve)
  161. else
  162. print("slot 12 is empty")
  163. m.transmit(10,12,"slot 12 is empty")
  164. end
  165.  
  166. -- send slotthirteen data to monitor
  167. if slot13 ~= nil then
  168. slot13_name = slot13.name:gsub('minecraft:','')
  169. slot13name = slot13_name:gsub("_", " ")
  170. local slotthirteen = "Slot 13 " .. slot13name .. " " .. slot13.count
  171. print(slotthirteen)
  172. m.transmit(10,13,slotthirteen)
  173. else
  174. print("slot 13 is empty")
  175. m.transmit(10,13,"slot 13 is empty")
  176. end
  177.  
  178. -- send slotfourteen data to monitor
  179. if slot14 ~= nil then
  180. slot14_name = slot14.name:gsub('minecraft:','')
  181. slot14name = slot14_name:gsub("_", " ")
  182. local slotfourteen = "Slot 14 " .. slot14name .. " " .. slot14.count
  183. print(slotfourteen)
  184. m.transmit(10,14,slotfourteen)
  185. else
  186. print("slot 14 is empty")
  187. m.transmit(10,14,"slot 14 is empty")
  188. end
  189.  
  190. -- send slotfifteen data to monitor
  191. if slot15 ~= nil then
  192. slot15_name = slot15.name:gsub('minecraft:','')
  193. slot15name = slot15_name:gsub("_", " ")
  194. local slotfifteen = "Slot 15 " .. slot15name .. " " .. slot15.count
  195. print(slotfifteen)
  196. m.transmit(10,15,slotfifteen)
  197. else
  198. print("slot 15 is empty")
  199. m.transmit(10,15,"slot 15 is empty")
  200. end
  201.  
  202. m.transmit(10,16,fuel)
RAW Paste Data