Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[===================
- Made by: Nemo Eriksson
- Pastebin: UxdzXDmM
- ====================]]--
- function main()
- -- Opens wireless modem om right side of computer
- rednet.open('right')
- -- Wait for message
- while true do
- senderId, message, protocol = rednet.receive()
- currentTime = os.date()
- -- Print message for user to read
- print('=========================')
- print('Got message from #'..senderId)
- print('Content:', message)
- print('Time:', currentTime)
- print('=========================\n')
- os.sleep(5)
- end
- end
- -- Prints when the computer program started
- local startTime = os.date()
- print('Stared at: '..startTime)
- -- Print the current computer ID
- local serverId = os.getComputerID()
- os.setComputerLabel('Server #'..serverId)
- print('Current server id: #'..serverId)
- -- Actually do the stuff
- main()
Advertisement
Add Comment
Please, Sign In to add comment