creeloper27

computer client

Jul 31st, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.84 KB | None | 0 0
  1. rednet.open("front")
  2. --non vengono pi usati gli id ma il broadcast
  3. --id_server = 16
  4. --questo il secondo campo in rednet(indica a chi altro deve essere inviato il segnale) per sicurezza controllare i campi di rednet sul sito
  5. --id_server2 = 16
  6.  
  7. print()
  8. print("--SHIP MANAGER v1.0 by creeloper27--")
  9. print()
  10. print("(you can say help to get the command list)")
  11. print()
  12. print("what do you want to do?")
  13. risposta = read()
  14.  
  15. if risposta == "help" then
  16. print("COMMANDS LIST:")
  17. print()
  18. print("-LC [top/flor/wall OR all] [on/off] (this stay for Lights Control)")
  19. print()
  20. print("-DC [exlas/exforc OR all] [on/off] (this stay for Defence Control)")
  21. print()
  22. print("press enter to continue...")
  23. read()
  24. elseif risposta == "LC top on" then
  25. print("Turning 'top' section lamps 'on'")
  26. --rednet.send( id_server, id_server2, "Ltopon")
  27. rednet.broadcast("Ltopon")
  28. print("Done!")
  29. sleep(1)
  30. elseif risposta == "LC top off" then
  31. print("Turning 'top' section lamps 'off'")
  32. --rednet.send( id_server, id_server2, "Ltopoff")
  33. rednet.broadcast("Ltopoff")
  34. print("Done!")
  35. sleep(1)
  36. elseif risposta == "LC floor on" then
  37. print("Turning 'floor' section lamps 'on'")
  38. --rednet.send( id_server, id_server2, "Ltopoff")
  39. rednet.broadcast("Lflooron")
  40. print("Done!")
  41. sleep(1)
  42.  
  43. elseif risposta == "LC floor off" then
  44. print("Turning 'floor' section lamps 'off'")
  45. --rednet.send( id_server, id_server2, "Ltopoff")
  46. rednet.broadcast("Lflooroff")
  47. print("Done!")
  48. sleep(1)
  49.  
  50. elseif risposta == "LC wall on" then
  51. print("Turning 'wall' section lamps 'on'")
  52. --rednet.send( id_server, id_server2, "Ltopon")
  53. rednet.broadcast("Lwallon")
  54. print("Done!")
  55. sleep(1)
  56.  
  57. elseif risposta == "LC wall off" then
  58. print("Turning 'wall' section lamps 'off'")
  59. --rednet.send( id_server, id_server2, "Ltopoff")
  60. rednet.broadcast("Lwalloff")
  61. print("Done!")
  62. sleep(1)
  63.  
  64. elseif risposta == "LC all on" then
  65. print("Turning all section lamps 'on'")
  66. rednet.broadcast("Lwallon")
  67. rednet.broadcast("Ltopon")
  68. rednet.broadcast("Lflooron")
  69. print("Done!")
  70. sleep(1)
  71.  
  72. elseif risposta == "LC all off" then
  73. print("Turning all section lamps 'off'")
  74. rednet.broadcast("Lwalloff")
  75. rednet.broadcast("Ltopoff")
  76. rednet.broadcast("Lflooroff")
  77. print("Done!")
  78. sleep(1)
  79.  
  80. elseif risposta == "DC exlas on" then
  81. print("Turning esternal lasers 'on'")
  82. rednet.broadcast("Dexlason")
  83. print("Done!")
  84. sleep(1)
  85.  
  86. elseif risposta == "DC exlas off" then
  87. print("Turning external lasers 'off'")
  88. rednet.broadcast("Dexlasoff")
  89. print("Done!")
  90. sleep(1)
  91.  
  92. elseif risposta == "DC exforc on" then
  93. print("Turning esternal force field 'off'")
  94. rednet.broadcast("Dexforcon")
  95. print("Done!")
  96. sleep(1)
  97.  
  98. elseif risposta == "DC exforc off" then
  99. print("Turning external force field 'off'")
  100. rednet.broadcast("Dexforcoff")
  101. print("Done!")
  102. sleep(1)
  103.  
  104.  
  105.  
  106.  
  107. else
  108. print("Unknow command")
  109. print("press enter to continue...")
  110. read()
  111. end
  112. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment