Guest User

Untitled

a guest
Jun 23rd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. function AskQuestion(question)
  2.  
  3. print(question)
  4. rawre = io.read()
  5. return rawre
  6.  
  7. end
  8.  
  9. while true do
  10. print("Welcome to InterChat v1!")
  11. print("Please specify the side to which")
  12. print("you hooked up your bundled cable.")
  13. print("Possible front, left, right, top")
  14. print(", bottom, and back.")
  15. print("What would you like to do? Listen or broadcast?")
  16. print("-OPTIONS-")
  17. print("listen")
  18. print("Quit")
  19. print("Broadcast")
  20.  
  21. choice = AskQuestion("Which option?")
  22. if choice =="listen" then rednet.receive(5)
  23. elseif choice == "broadcast" then rednet.broadcast(AskQuestion("What too broadcast?"))
  24. elseif choice == "quit" then break
  25. else print("Invalid option")
  26. end
  27. term.clear()
  28. term.setCursorPos(1,1)
  29. end
Add Comment
Please, Sign In to add comment