Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --//Setup the mothem, placed at the bottom
- channel = 2209
- modem = peripheral.wrap("bottom")
- modem.open(channel)
- --//Tests modem/channel connection
- if modem.isOpen(channel) then
- print("Modem was succesfully open in the selected channel.")
- end
- --//Awaits for an instruction an then excecutes with what is in "message"
- while true do
- event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
- shell.run(message)
- print(message)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement