Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if pocket then
- rednet.open('back')
- while true do
- term.clear()
- term.setCursorPos(1, 1)
- write('enter command: ')
- local cmd = read()
- rednet.broadcast(cmd)
- end
- else
- if peripheral.getType('left') == 'modem' then
- rednet.open('left')
- elseif peripheral.getType('right') == 'modem' then
- rednet.open('right')
- else print('modem not found')
- end
- while true do
- id, msg = rednet.receive()
- shell.run(msg)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement