Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function findPeripheral( periphType )
- for _, side in pairs( rs.getSides() ) do
- if peripheral.isPresent(side) and peripheral.getType(side) == periphType then
- return side
- end
- end
- print("Cannot find "..periphType.." attached to this computer")
- return 0
- end
- local modem = peripheral.wrap(findPeripheral("modem"))
- modem.open(10)
- if modem.isOpen(10) then
- print("modem is open in channel 10")
- end
- if (findPeripheral("BigReactors-Reactor")==0) then
- local energyPylon = peripheral.wrap(findPeripheral("draconic_rf_storage"))
- print("energyPylon is wrapped")
- else
- local energyPylon = peripheral.wrap(findPeripheral("BigReactors-Reactor"))
- print("Reactor is wrapped")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement