Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This is my ComputerCraft eMail client code.
- -- if you want the server, goto http://pastebin.com/FC1Lp6qH
- local tArgs = { ... }
- rednet.open("right")
- if tArgs[1] == "read" then
- rednet.broadcast(tArgs[2])
- a, messagep = rednet.receive(1)
- if messagep == null then
- else
- print("You've Got Mail!")
- print("------------------")
- print(messagep)
- end
- else if tArgs[1] == "send" then
- rednet.broadcast("sendmail")
- write("To: (in ID) ")
- input = read()
- rednet.broadcast(input)
- print("Message body:")
- input = read()
- rednet.broadcast(input)
- else
- print("Usage:")
- print("mail read (mailid)")
- print("mail send")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement