Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function AskQuestion(question)
- print(question)
- rawre = io.read()
- return rawre
- end
- while true do
- print("Welcome to InterChat v1!")
- print("Please specify the side to which")
- print("you hooked up your bundled cable.")
- print("Possible front, left, right, top")
- print(", bottom, and back.")
- print("What would you like to do? Listen or broadcast?")
- print("-OPTIONS-")
- print("listen")
- print("Quit")
- print("Broadcast")
- choice = AskQuestion("Which option?")
- if choice =="listen" then rednet.receive(5)
- elseif choice == "broadcast" then rednet.broadcast(AskQuestion("What too broadcast?"))
- elseif choice == "quit" then break
- else print("Invalid option")
- end
- term.clear()
- term.setCursorPos(1,1)
- end
Add Comment
Please, Sign In to add comment