Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local reactor = peripheral.wrap("front")
- local chest = peripheral.wrap("back")
- local status = reactor.getReactorCore().getMetadata().reactor.active
- function CheckRods()
- while true do
- Quad1 = reactor.getReactorCore().getItem(2).getMetadata().displayName
- Quad2 = reactor.getReactorCore().getItem(4).getMetadata().displayName
- Quad3 = reactor.getReactorCore().getItem(6).getMetadata().displayName
- Quad4 = reactor.getReactorCore().getItem(13).getMetadata().displayName
- Quad5 = reactor.getReactorCore().getItem(15).getMetadata().displayName
- Quad6 = reactor.getReactorCore().getItem(17).getMetadata().displayName
- if Quad1 == "Quad Fuel Rod (Depleted Uranium)" then
- chest.pullItems(peripheral.getName(reactor), 2, 1, 27)
- chest.pushItems(peripheral.getName(reactor), 1, 1, 2)
- print("Replaced Quad1")
- end
- if Quad2 == "Quad Fuel Rod (Depleted Uranium)" then
- chest.pullItems(peripheral.getName(reactor), 4, 1, 27)
- chest.pushItems(peripheral.getName(reactor), 1, 1, 4)
- print("Replaced Quad2")
- end
- if Quad3 == "Quad Fuel Rod (Depleted Uranium)" then
- chest.pullItems(peripheral.getName(reactor), 6, 1, 27)
- chest.pushItems(peripheral.getName(reactor), 1, 1, 6)
- print("Replaced Quad3")
- end
- if Quad4 == "Dual Fuel Rod (Depleted Uranium)" then
- chest.pullItems(peripheral.getName(reactor), 13, 1, 27)
- chest.pushItems(peripheral.getName(reactor), 1, 1, 13)
- print("Replaced Quad4")
- end
- if Quad5 == "Dual Fuel Rod (Depleted Uranium)" then
- chest.pullItems(peripheral.getName(reactor), 15, 1, 27)
- chest.pushItems(peripheral.getName(reactor), 1, 1, 15)
- print("Replaced Quad5")
- end
- if Quad6 == "Dual Fuel Rod (Depleted Uranium)" then
- chest.pullItems(peripheral.getName(reactor), 17, 1, 27)
- chest.pushItems(peripheral.getName(reactor), 1, 1, 17)
- print("Replaced Quad6")
- end
- sleep(35)
- print("all good")
- end
- end
- CheckRods()
Advertisement
Add Comment
Please, Sign In to add comment