Advertisement
Guest User

Untitled

a guest
Aug 31st, 2016
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. function buildSend()
  2. modem.transmit(888, 887, input)
  3. print("Building...")
  4. side, channel, rreturn, junk, message = os.pullEvent("modem_message")
  5. if message == "done" then
  6. print("Finished building")
  7. print("Type "continue" in order to begin cleanup")
  8. input2 = read()
  9. if input2 == "continue" then
  10. cleanup(input)
  11. end
  12. end
  13. end
  14.  
  15. function cleanup(buildType)
  16. modem.transmit(888, 887, buildType)
  17. print("Cleaning up...")
  18. side, channel, rreturn, junk, message = os.pullEvent("modem_message")
  19. if message == "done" then
  20. print("Finished cleaning up")
  21. end
  22. end
  23.  
  24. modem = peripheral.wrap("top")
  25. modem.open(887)
  26.  
  27. buildList = {"house", "platform", "pillar", "work"}
  28.  
  29. while true do
  30.  
  31. print("Please select build.")
  32. for i=1, #buildList do
  33. print(buildList[i])
  34. end
  35. input = read()
  36. if input == "work" then
  37. buildSend()
  38. else
  39. print("Please enter something from the build list.")
  40. end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement