Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sides = {"top","bottom","left","right"
- ,"front","back"}
- local perfs = {"none","none","none","none","none","none"}
- local channel = 0
- for i = 1, #sides do
- if peripheral.isPresent(sides[i]) then
- print(peripheral.getType(sides[i]).." found on side"..sides[i])
- perfs = peripheral.getType(sides[i])
- end
- if peripheral.getType(sides[i]) == "modem" then
- local modem = peripheral.wrap(sides[i])
- print("Type port number you wish to connect to for modem on side"..sides[i])
- channel = read()
- print("Establishing connection on port"..channel)
- perfs[i] = pheripheral.wrap(sides[i])
- modem.open(channel)
- print("Connection with Port"..channel.."successfull!")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement