Advertisement
RobotBubble

Remote2

Oct 25th, 2017
139
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 ForwardN")
  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 UpN")
  17. elseif (param == 208) then
  18. rednet.broadcast("TS DownN")
  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("remote")
  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.red)
  39. print("off")
  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. term.setCursorPos(17, 1)
  60. print("Slot:")
  61. term.setCursorPos(23, 1)
  62. term.setTextColor(colors.yellow)
  63. print("?")
  64. term.setTextColor(colors.white)
  65. elseif (param == 34) then
  66. term.clear()
  67. term.setCursorPos(1, 1)
  68. term.setTextColor(colors.lightGray)
  69. print("Dig:")
  70. term.setTextColor(colors.red)
  71. term.setCursorPos(5, 1)
  72. print("off")
  73. term.setTextColor(colors.lightGray)
  74. term.setCursorPos(1, 2)
  75. print("TAB to exit")
  76. print("H for Controls1")
  77. print("0 for ID program")
  78. print("J for stairsUp program")
  79. print("K for dstairsDown program")
  80. print("L for bstairsUp program")
  81. print("N for bridge program")
  82. print("Z for vbridge program")
  83. print("C for cover program")
  84. print("P to salvage mine")
  85. print("O to detonate mine")
  86. print("RShift for self destruct")
  87. print("M to return to menu")
  88. term.setCursorPos(17, 1)
  89. print("Slot:")
  90. term.setCursorPos(23, 1)
  91. term.setTextColor(colors.yellow)
  92. print("?")
  93. term.setTextColor(colors.white)
  94. elseif (param == 44) then
  95. rednet.broadcast("TS VBridge")
  96. elseif (param == 47) then
  97. rednet.broadcast("TS PlaceDown")
  98. elseif (param == 48) then
  99. rednet.broadcast("TS PlaceUp")
  100. elseif (param == 45) then
  101. rednet.broadcast("TS Attack")
  102. elseif (param == 25) then
  103. rednet.broadcast("TS Tunnel")
  104. elseif (param == 2) then
  105. term.setCursorPos(17, 1)
  106. print("Slot:")
  107. term.setCursorPos(23, 1)
  108. term.setTextColor(colors.blue)
  109. print("1")
  110. term.setTextColor(colors.white)
  111. rednet.broadcast("1")
  112. elseif (param == 3) then
  113. term.setCursorPos(17, 1)
  114. print("Slot:")
  115. term.setCursorPos(23, 1)
  116. term.setTextColor(colors.blue)
  117. print("2")
  118. term.setTextColor(colors.white)
  119. rednet.broadcast("2")
  120. elseif (param == 4) then
  121. term.setCursorPos(17, 1)
  122. print("Slot:")
  123. term.setCursorPos(23, 1)
  124. term.setTextColor(colors.blue)
  125. print("3")
  126. term.setTextColor(colors.white)
  127. rednet.broadcast("3")
  128. elseif (param == 5) then
  129. term.setCursorPos(17, 1)
  130. print("Slot:")
  131. term.setCursorPos(23, 1)
  132. term.setTextColor(colors.blue)
  133. print("4")
  134. term.setTextColor(colors.white)
  135. rednet.broadcast("4")
  136. elseif (param == 6) then
  137. term.setCursorPos(17, 1)
  138. print("Slot:")
  139. term.setCursorPos(23, 1)
  140. term.setTextColor(colors.blue)
  141. print("5")
  142. term.setTextColor(colors.white)
  143. rednet.broadcast("5")
  144. elseif (param == 7) then
  145. term.setCursorPos(17, 1)
  146. print("Slot:")
  147. term.setCursorPos(23, 1)
  148. term.setTextColor(colors.blue)
  149. print("6")
  150. term.setTextColor(colors.white)
  151. rednet.broadcast("6")
  152. elseif (param == 8) then
  153. term.setCursorPos(17, 1)
  154. print("Slot:")
  155. term.setCursorPos(23, 1)
  156. term.setTextColor(colors.blue)
  157. print("7")
  158. term.setTextColor(colors.white)
  159. rednet.broadcast("7")
  160. elseif (param == 9) then
  161. term.setCursorPos(17, 1)
  162. print("Slot:")
  163. term.setCursorPos(23, 1)
  164. term.setTextColor(colors.blue)
  165. print("8")
  166. term.setTextColor(colors.white)
  167. rednet.broadcast("8")
  168. elseif (param == 10) then
  169. term.setCursorPos(17, 1)
  170. print("Slot:")
  171. term.setCursorPos(23, 1)
  172. term.setTextColor(colors.blue)
  173. print("9")
  174. term.setTextColor(colors.white)
  175. rednet.broadcast("9")
  176. elseif (param == 36) then
  177. rednet.broadcast("TS Stairs")
  178. elseif (param == 37) then
  179. rednet.broadcast("TS StairsD")
  180. elseif (param == 38) then
  181. rednet.broadcast("TS StairsB")
  182. elseif (param == 15) then
  183. rednet.broadcast("TS Leave")
  184. os.reboot()
  185. elseif (param == 49) then
  186. rednet.broadcast("TS Bridge")
  187. elseif (param == 50) then
  188. term.clear()
  189. term.setCursorPos(1, 1)
  190. term.setTextColor(colors.white)
  191. rednet.broadcast("TS Menu")
  192. shell.run("menu")
  193. elseif (param == 16) then
  194. rednet.broadcast("TS Dig FWD")
  195. elseif (param == 21) then
  196. rednet.broadcast("TS Dig Up")
  197. elseif (param == 22) then
  198. rednet.broadcast("TS Dig Down")
  199. elseif (param == 54) then
  200. shell.run("selfdestruct")
  201. elseif (param == 46) then
  202. rednet.broadcast("TS Cover")
  203. elseif (param == 33) then
  204. rednet.broadcast("TS Refuel")
  205. local scrap, message = rednet.receive()
  206. term.setCursorPos(1, 19)
  207. term.setTextColor(colors.white)
  208. textutils.slowPrint(message)
  209. term.setTextColor(colors.white)
  210. end
  211. else
  212. shell.run("remote2")
  213. end
  214. end
  215. end
  216. rednet.open("back")
  217. term.clear()
  218. term.setCursorPos(1, 1)
  219. rednet.broadcast("1")
  220. term.setTextColor(colors.white)
  221. print("Dig:")
  222. term.setCursorPos(5, 1)
  223. term.setTextColor(colors.red)
  224. print("off")
  225. term.setCursorPos(1, 2)
  226. term.setTextColor(colors.white)
  227. print("TAB to exit")
  228. print("G for Controls2")
  229. print("WASD to move")
  230. print("Arrow keys up/down")
  231. print("E to place")
  232. print("V to place down")
  233. print("B to place up")
  234. print("+ to + Redstone FWD")
  235. print("- to - Redstone FWD")
  236. print("F to fuel")
  237. print("Q to dig forward")
  238. print("Y to dig up")
  239. print("U to dig down")
  240. print("X to attack")
  241. print("1-9 to select slot")
  242. print("M to return to menu")
  243. print("SPACE to turn dig on/off")
  244. term.setCursorPos(17, 1)
  245. print("Slot: 1")
  246. sleep(.1)
  247. term.setCursorPos(1, 19)
  248. term.setCursorPos(17, 1)
  249. print("Slot:")
  250. term.setTextColor(colors.blue)
  251. term.setCursorPos(23, 1)
  252. print("1")
  253. term.setTextColor(colors.white)
  254. RCmaster()
Advertisement
RAW Paste Data Copied
Advertisement