RobotBubble

RemoteOff

Oct 30th, 2017
63
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function RCmaster()
  2. while true do
  3. local sEvent, param = os.pullEvent("key")
  4. if(sEvent == "key" ) then
  5. if(param == 17) then
  6. rednet.broadcast("TS Forward")
  7. elseif (param == 31) then
  8. rednet.broadcast("TS Backward")
  9. elseif (param == 30) then
  10. rednet.broadcast("TS TurnLeft")
  11. elseif (param == 32) then
  12. rednet.broadcast("TS TurnRight")
  13. elseif (param == 18) then
  14. rednet.broadcast("TS PlaceBlock")
  15. elseif (param == 200) then
  16. rednet.broadcast("TS Up")
  17. elseif (param == 208) then
  18. rednet.broadcast("TS Down")
  19. elseif (param == 13) then
  20. rednet.broadcast("TS Redstone FWD: On")
  21. elseif (param == 12) then
  22. rednet.broadcast("TS Redstone FWD: Off")
  23. elseif (param == 11) then
  24. term.clear()
  25. term.setCursorPos(1, 1)
  26. rednet.broadcast("TS ID")
  27. local scrap, message = rednet.receive()
  28. print(message)
  29. sleep(1)
  30. elseif (param == 57) then
  31. shell.run("remote2")
  32. elseif (param == 35) then
  33. term.clear()
  34. term.setCursorPos(1, 1)
  35. term.setTextColor(colors.white)
  36. print("Dig:")
  37. term.setCursorPos(5, 1)
  38. term.setTextColor(colors.green)
  39. print("on")
  40. term.setCursorPos(1, 2)
  41. term.setTextColor(colors.white)
  42. print("TAB to exit")
  43. print("G for Controls2")
  44. print("WASD to move")
  45. print("Arrow keys up/down")
  46. print("E to place")
  47. print("V to place down")
  48. print("B to place up")
  49. print("+ to + Redstone FWD")
  50. print("- to - Redstone FWD")
  51. print("F to fuel")
  52. print("Q to dig forward")
  53. print("Y to dig up")
  54. print("U to dig down")
  55. print("X to attack")
  56. print("1-9 to select slot")
  57. print("M to return to menu")
  58. print("SPACE to turn dig on/off")
  59. elseif (param == 34) then
  60. term.clear()
  61. term.setCursorPos(1, 1)
  62. term.setTextColor(colors.lightGray)
  63. print("Dig:")
  64. term.setTextColor(colors.green)
  65. term.setCursorPos(5, 1)
  66. print("on")
  67. term.setCursorPos(1, 2)
  68. term.setTextColor(colors.lightGray)
  69. print("TAB to exit")
  70. print("H for Controls1")
  71. print("0 for ID program")
  72. print("J for dstairsUp program")
  73. print("K for dstairsDown program")
  74. print("L for bstairsUp program")
  75. print("N for bridge program")
  76. print("Z for vbridge program")
  77. print("C for cover program")
  78. print("P to salvage mine")
  79. print("O to detonate mine")
  80. print("RShift for self destruct")
  81. print("M to return to menu")
  82. elseif (param == 25) then
  83. shell.run("mineprogram")
  84. elseif (param == 44) then
  85. rednet.broadcast("TS VBridge")
  86. elseif (param == 47) then
  87. rednet.broadcast("TS PlaceDown")
  88. elseif (param == 48) then
  89. rednet.broadcast("TS PlaceUp")
  90. elseif (param == 45) then
  91. rednet.broadcast("TS Attack")
  92. elseif (param == 25) then
  93. rednet.broadcast("TS Salvage")
  94. elseif (param == 24) then
  95. rednet.broadcast("TS Detonate")
  96. elseif (param == 2) then
  97. term.setCursorPos(17, 1)
  98. print("Slot: 1")
  99. rednet.broadcast("1")
  100. elseif (param == 3) then
  101. term.setCursorPos(17, 1)
  102. print("Slot: 2")
  103. rednet.broadcast("2")
  104. elseif (param == 4) then
  105. term.setCursorPos(17, 1)
  106. print("Slot: 3")
  107. rednet.broadcast("3")
  108. elseif (param == 5) then
  109. term.setCursorPos(17, 1)
  110. print("Slot: 4")
  111. rednet.broadcast("4")
  112. elseif (param == 6) then
  113. term.setCursorPos(17, 1)
  114. print("Slot: 5")
  115. rednet.broadcast("5")
  116. elseif (param == 7) then
  117. term.setCursorPos(17, 1)
  118. print("Slot: 6")
  119. rednet.broadcast("6")
  120. elseif (param == 8) then
  121. term.setCursorPos(17, 1)
  122. print("Slot: 7")
  123. rednet.broadcast("7")
  124. elseif (param == 9) then
  125. term.setCursorPos(17, 1)
  126. print("Slot: 8")
  127. rednet.broadcast("8")
  128. elseif (param == 10) then
  129. term.setCursorPos(17, 1)
  130. print("Slot: 9")
  131. rednet.broadcast("9")
  132. elseif (param == 36) then
  133. rednet.broadcast("TS Stairs")
  134. elseif (param == 37) then
  135. rednet.broadcast("TS StairsD")
  136. elseif (param == 38) then
  137. rednet.broadcast("TS StairsB")
  138. elseif (param == 15) then
  139. rednet.broadcast("TS Leave")
  140. os.reboot()
  141. elseif (param == 49) then
  142. rednet.broadcast("TS Bridge")
  143. elseif (param == 50) then
  144. term.clear()
  145. term.setCursorPos(1, 1)
  146. term.setTextColor(colors.white)
  147. rednet.broadcast("TS Menu")
  148. shell.run("menu")
  149. elseif (param == 16) then
  150. rednet.broadcast("TS Dig FWD")
  151. elseif (param == 21) then
  152. rednet.broadcast("TS Dig Up")
  153. elseif (param == 22) then
  154. rednet.broadcast("TS Dig Down")
  155. elseif (param == 54) then
  156. shell.run("selfdestruct")
  157. elseif (param == 46) then
  158. rednet.broadcast("TS Cover")
  159. elseif (param == 33) then
  160. rednet.broadcast("TS Refuel")
  161. local scrap, message = rednet.receive()
  162. term.setCursorPos(1, 19)
  163. term.setTextColor(colors.white)
  164. textutils.slowPrint(message)
  165. term.setTextColor(colors.white)
  166. end
  167. else
  168. shell.run("remote")
  169. end
  170. end
  171. end
  172. rednet.open("back")
  173. term.clear()
  174. term.setCursorPos(1, 1)
  175. rednet.broadcast("1")
  176. term.setTextColor(colors.white)
  177. print("Dig:")
  178. term.setCursorPos(5, 1)
  179. term.setTextColor(colors.green)
  180. print("on")
  181. term.setCursorPos(1, 2)
  182. term.setTextColor(colors.white)
  183. print("TAB to exit")
  184. print("G for Controls2")
  185. print("WASD to move")
  186. print("Arrow keys up/down")
  187. print("E to place")
  188. print("V to place down")
  189. print("B to place up")
  190. print("+ to + Redstone FWD")
  191. print("- to - Redstone FWD")
  192. print("F to fuel")
  193. print("Q to dig forward")
  194. print("Y to dig up")
  195. print("U to dig down")
  196. print("X to attack")
  197. print("1-9 to select slot")
  198. print("M to return to menu")
  199. print("SPACE to turn dig on/off")
  200. term.setCursorPos(17, 1)
  201. print("Slot: 1")
  202. RCmaster()
RAW Paste Data Copied