Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print('Do you want execute receiving message or print message ?\n{1} Execute\n{2} Print')
- local choice=read()
- if choice=="2" then
- while true do
- local id, command, pos=rednet.receive()
- print('Receiving true !\nThe message is from the computer:')
- print(id)
- print('Optional message:')
- print(pos)
- print('Message: ')
- print(command)
- end
- elseif choice=='1' then
- while tonumber(label) > 0 do
- local label=label-1
- local id, command, pos=rednet.receive()
- shell.run(command)
- print('Command executed:')
- print(command)
- print('Optional message:')
- print(pos)
- print('From:')
- print(id)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement