Weastwood

RodGod 1 stack v01

Sep 9th, 2022
1,066
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.99 KB | None | 0 0
  1. local reactor = peripheral.wrap("front")
  2. local chest = peripheral.wrap("back")
  3. local status = reactor.getReactorCore().getMetadata().reactor.active
  4.  
  5. function CheckRods()
  6.   while true do
  7.     Quad1 = reactor.getReactorCore().getItem(2).getMetadata().displayName
  8.     Quad2 = reactor.getReactorCore().getItem(4).getMetadata().displayName
  9.     Quad3 = reactor.getReactorCore().getItem(6).getMetadata().displayName
  10.     Quad4 = reactor.getReactorCore().getItem(13).getMetadata().displayName
  11.     Quad5 = reactor.getReactorCore().getItem(15).getMetadata().displayName
  12.     Quad6 = reactor.getReactorCore().getItem(17).getMetadata().displayName
  13.  
  14.     if Quad1 == "Quad Fuel Rod (Depleted Uranium)" then
  15.       chest.pullItems(peripheral.getName(reactor), 2, 1, 27)
  16.       chest.pushItems(peripheral.getName(reactor), 1, 1, 2)
  17.       print("Replaced Quad1")
  18.     end
  19.     if Quad2 == "Quad Fuel Rod (Depleted Uranium)" then
  20.       chest.pullItems(peripheral.getName(reactor), 4, 1, 27)
  21.       chest.pushItems(peripheral.getName(reactor), 1, 1, 4)
  22.       print("Replaced Quad2")
  23.     end
  24.     if Quad3 == "Quad Fuel Rod (Depleted Uranium)" then
  25.       chest.pullItems(peripheral.getName(reactor), 6, 1, 27)
  26.       chest.pushItems(peripheral.getName(reactor), 1, 1, 6)
  27.       print("Replaced Quad3")
  28.     end
  29.     if Quad4 == "Dual Fuel Rod (Depleted Uranium)" then
  30.       chest.pullItems(peripheral.getName(reactor), 13, 1, 27)
  31.       chest.pushItems(peripheral.getName(reactor), 1, 1, 13)
  32.       print("Replaced Quad4")
  33.     end
  34.     if Quad5 == "Dual Fuel Rod (Depleted Uranium)" then
  35.       chest.pullItems(peripheral.getName(reactor), 15, 1, 27)
  36.       chest.pushItems(peripheral.getName(reactor), 1, 1, 15)
  37.       print("Replaced Quad5")
  38.     end
  39.     if Quad6 == "Dual Fuel Rod (Depleted Uranium)" then
  40.       chest.pullItems(peripheral.getName(reactor), 17, 1, 27)
  41.       chest.pushItems(peripheral.getName(reactor), 1, 1, 17)
  42.       print("Replaced Quad6")
  43.     end
  44.     sleep(35)
  45.     print("all good")
  46.   end
  47. end
  48.  
  49. CheckRods()
Advertisement
Add Comment
Please, Sign In to add comment