Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local reactor = peripheral.wrap("right")
- local chest = peripheral.wrap("back")
- local status = reactor.getReactorCore().getMetadata().reactor.active
- function CheckRods()
- while true do
- Dual1 = reactor.getReactorCore().getItem(1).getMetadata().displayName
- Dual2 = reactor.getReactorCore().getItem(5).getMetadata().displayName
- Dual3 = reactor.getReactorCore().getItem(7).getMetadata().displayName
- Dual4 = reactor.getReactorCore().getItem(9).getMetadata().displayName
- Dual5 = reactor.getReactorCore().getItem(13).getMetadata().displayName
- Dual6 = reactor.getReactorCore().getItem(17).getMetadata().displayName
- Dual7 = reactor.getReactorCore().getItem(19).getMetadata().displayName
- Dual8 = reactor.getReactorCore().getItem(21).getMetadata().displayName
- Dual9 = reactor.getReactorCore().getItem(25).getMetadata().displayName
- Dual10 = reactor.getReactorCore().getItem(27).getMetadata().displayName
- Dual11 = reactor.getReactorCore().getItem(29).getMetadata().displayName
- if Dual1 == "Dual Fuel Rod (Depleted Uranium)" then
- chest.pullItems(peripheral.getName(reactor), 1, 1, 27)
- chest.pushItems(peripheral.getName(reactor), 1, 1, 1)
- print("Replaced Dual1")
- end
- if Dual2 == "Dual Fuel Rod (Depleted Uranium)" then
- chest.pullItems(peripheral.getName(reactor), 5, 1, 27)
- chest.pushItems(peripheral.getName(reactor), 1, 1, 5)
- print("Replaced Dual2")
- end
- if Dual3 == "Dual Fuel Rod (Depleted Uranium)" then
- chest.pullItems(peripheral.getName(reactor), 7, 1, 27)
- chest.pushItems(peripheral.getName(reactor), 1, 1, 7)
- print("Replaced Dual3")
- end
- if Dual4 == "Dual Fuel Rod (Depleted Uranium)" then
- chest.pullItems(peripheral.getName(reactor), 9, 1, 27)
- chest.pushItems(peripheral.getName(reactor), 1, 1, 9)
- print("Replaced Dual4")
- end
- if Dual5 == "Dual Fuel Rod (Depleted Uranium)" then
- chest.pullItems(peripheral.getName(reactor), 13, 1, 27)
- chest.pushItems(peripheral.getName(reactor), 1, 1, 13)
- print("Replaced Dual5")
- end
- if Dual6 == "Dual Fuel Rod (Depleted Uranium)" then
- chest.pullItems(peripheral.getName(reactor), 17, 1, 27)
- chest.pushItems(peripheral.getName(reactor), 1, 1, 17)
- print("Replaced Dual6")
- end
- if Dual7 == "Dual Fuel Rod (Depleted Uranium)" then
- chest.pullItems(peripheral.getName(reactor), 19, 1, 27)
- chest.pushItems(peripheral.getName(reactor), 1, 1, 19)
- print("Replaced Dual7")
- end
- if Dual8 == "Dual Fuel Rod (Depleted Uranium)" then
- chest.pullItems(peripheral.getName(reactor), 21, 1, 27)
- chest.pushItems(peripheral.getName(reactor), 1, 1, 21)
- print("Replaced Dual8")
- end
- if Dual9 == "Dual Fuel Rod (Depleted Uranium)" then
- chest.pullItems(peripheral.getName(reactor), 25, 1, 27)
- chest.pushItems(peripheral.getName(reactor), 1, 1, 25)
- print("Replaced Dual9")
- end
- if Dual10 == "Dual Fuel Rod (Depleted Uranium)" then
- chest.pullItems(peripheral.getName(reactor), 27, 1, 27)
- chest.pushItems(peripheral.getName(reactor), 1, 1, 27)
- print("Replaced Dual10")
- end
- if Dual11 == "Dual Fuel Rod (Depleted Uranium)" then
- chest.pullItems(peripheral.getName(reactor), 29, 1, 27)
- chest.pushItems(peripheral.getName(reactor), 1, 1, 29)
- print("Replaced Dual11")
- end
- sleep(10)
- print("alive")
- end
- end
- CheckRods()
Advertisement
Add Comment
Please, Sign In to add comment