Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modemSide = "top"
- local protocol = "neural_net"
- local timeout = 30
- local scriptPath = "tmp/"
- local ni = peripheral.wrap("back")
- rednet.open(modemSide)
- rednet.host(protocol, ni.getName())
- while true do
- local senderId, msg, _ = rednet.receive(protocol, timeout)
- local path = scriptPath .. msg.name
- local file = fs.open(path, 'w')
- file.write(msg.content)
- file.close()
- rednet.send(senderId, "Received", protocol)
- shell.run(path)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement