Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local protocol = "bip"
- peripheral.find("modem", rednet.open)
- for _, val in ipairs(arg) do
- term.setTextColor(colors.white)
- print("\nRequesting "..val.."!")
- rednet.broadcast(val, protocol)
- local id, pas, pro = rednet.receive(protocol, 5)
- local fname = val..".lua"
- if fs.exists(fname) then
- fs.delete(fname)
- end
- if pas ~= "unknown package" then
- term.setTextColor(colors.green)
- shell.run("pastebin get "..pas, fname)
- else
- term.setTextColor(colors.red)
- print("Unkown package \""..val.."\"!")
- end
- end
- peripheral.find("modem", rednet.close)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement