Weastwood

superrod

Sep 5th, 2021
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.46 KB | None | 0 0
  1. local reactor = peripheral.wrap("right")
  2. local chest = peripheral.wrap("back")
  3. local status = reactor.getReactorCore().getMetadata().reactor.active
  4.  
  5. function CheckRods()
  6. while true do
  7. Dual1 = reactor.getReactorCore().getItem(1).getMetadata().displayName
  8. Dual2 = reactor.getReactorCore().getItem(5).getMetadata().displayName
  9. Dual3 = reactor.getReactorCore().getItem(7).getMetadata().displayName
  10. Dual4 = reactor.getReactorCore().getItem(9).getMetadata().displayName
  11. Dual5 = reactor.getReactorCore().getItem(13).getMetadata().displayName
  12. Dual6 = reactor.getReactorCore().getItem(17).getMetadata().displayName
  13. Dual7 = reactor.getReactorCore().getItem(19).getMetadata().displayName
  14. Dual8 = reactor.getReactorCore().getItem(21).getMetadata().displayName
  15. Dual9 = reactor.getReactorCore().getItem(25).getMetadata().displayName
  16. Dual10 = reactor.getReactorCore().getItem(27).getMetadata().displayName
  17. Dual11 = reactor.getReactorCore().getItem(29).getMetadata().displayName
  18.  
  19.  
  20.  
  21. if Dual1 == "Dual Fuel Rod (Depleted Uranium)" then
  22. chest.pullItems(peripheral.getName(reactor), 1, 1, 27)
  23. chest.pushItems(peripheral.getName(reactor), 1, 1, 1)
  24. print("Replaced Dual1")
  25. end
  26. if Dual2 == "Dual Fuel Rod (Depleted Uranium)" then
  27. chest.pullItems(peripheral.getName(reactor), 5, 1, 27)
  28. chest.pushItems(peripheral.getName(reactor), 1, 1, 5)
  29. print("Replaced Dual2")
  30. end
  31. if Dual3 == "Dual Fuel Rod (Depleted Uranium)" then
  32. chest.pullItems(peripheral.getName(reactor), 7, 1, 27)
  33. chest.pushItems(peripheral.getName(reactor), 1, 1, 7)
  34. print("Replaced Dual3")
  35. end
  36. if Dual4 == "Dual Fuel Rod (Depleted Uranium)" then
  37. chest.pullItems(peripheral.getName(reactor), 9, 1, 27)
  38. chest.pushItems(peripheral.getName(reactor), 1, 1, 9)
  39. print("Replaced Dual4")
  40. end
  41. if Dual5 == "Dual Fuel Rod (Depleted Uranium)" then
  42. chest.pullItems(peripheral.getName(reactor), 13, 1, 27)
  43. chest.pushItems(peripheral.getName(reactor), 1, 1, 13)
  44. print("Replaced Dual5")
  45. end
  46. if Dual6 == "Dual Fuel Rod (Depleted Uranium)" then
  47. chest.pullItems(peripheral.getName(reactor), 17, 1, 27)
  48. chest.pushItems(peripheral.getName(reactor), 1, 1, 17)
  49. print("Replaced Dual6")
  50. end
  51. if Dual7 == "Dual Fuel Rod (Depleted Uranium)" then
  52. chest.pullItems(peripheral.getName(reactor), 19, 1, 27)
  53. chest.pushItems(peripheral.getName(reactor), 1, 1, 19)
  54. print("Replaced Dual7")
  55. end
  56. if Dual8 == "Dual Fuel Rod (Depleted Uranium)" then
  57. chest.pullItems(peripheral.getName(reactor), 21, 1, 27)
  58. chest.pushItems(peripheral.getName(reactor), 1, 1, 21)
  59. print("Replaced Dual8")
  60. end
  61. if Dual9 == "Dual Fuel Rod (Depleted Uranium)" then
  62. chest.pullItems(peripheral.getName(reactor), 25, 1, 27)
  63. chest.pushItems(peripheral.getName(reactor), 1, 1, 25)
  64. print("Replaced Dual9")
  65. end
  66. if Dual10 == "Dual Fuel Rod (Depleted Uranium)" then
  67. chest.pullItems(peripheral.getName(reactor), 27, 1, 27)
  68. chest.pushItems(peripheral.getName(reactor), 1, 1, 27)
  69. print("Replaced Dual10")
  70. end
  71. if Dual11 == "Dual Fuel Rod (Depleted Uranium)" then
  72. chest.pullItems(peripheral.getName(reactor), 29, 1, 27)
  73. chest.pushItems(peripheral.getName(reactor), 1, 1, 29)
  74. print("Replaced Dual11")
  75. end
  76.  
  77.  
  78.  
  79.  
  80.  
  81. sleep(10)
  82. print("alive")
  83. end
  84. end
  85.  
  86. CheckRods()
  87.  
Advertisement
Add Comment
Please, Sign In to add comment