Advertisement
goldfiction

RoxRCC

Jan 26th, 2024
729
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local function RoxMaster()
  2.   local run = 1
  3.   while run == 1 do
  4.     local sEvent, param = os.pullEvent("key")
  5.     if sEvent == "key" then
  6.       if param == 87 then
  7.         rednet.broadcast("MoveForward")
  8.       elseif param == 65 then
  9.         rednet.broadcast("MoveLeft")
  10.       elseif param == 83 then
  11.         rednet.broadcast("MoveBack")
  12.       elseif param == 68 then
  13.         rednet.broadcast("MoveRight")
  14.       elseif param == 69 then
  15.         rednet.broadcast("MoveUp")
  16.       elseif param == 81 then
  17.         rednet.broadcast("MoveDown")
  18.       elseif param == 70 then
  19.         rednet.broadcast("DigForward")
  20.       elseif param == 82 then
  21.         rednet.broadcast("DigUp")
  22.       elseif param == 67 then
  23.         rednet.broadcast("DigDown")
  24.       elseif param == 88 then
  25.         rednet.broadcast("EndTurtle")
  26.         textutils.slowPrint("Ended program on the")
  27.         textutils.slowPrint("current Turtle and closed")
  28.         textutils.slowPrint("it\'s Rednet connection.")
  29.         print("--------------------------")
  30.       elseif param == 90 then
  31.         rednet.broadcast("EndBoth")
  32.         run = 0
  33.         rednet.close("back")
  34.         textutils.slowPrint("Ended program on both")
  35.         textutils.slowPrint("machines.")
  36.         sleep(0.75)
  37.         textutils.slowPrint("Closed rednet connection.")
  38.       end
  39.     end
  40.   end
  41. end
  42. rednet.open("back")
  43. term.clear()
  44. print("Rox Remote Control Console \(RoxRCC\) sending signal.")
  45. print("--------------------------")
  46. print("WASD to move.")
  47. print("E to rise.")
  48. print("Q to fall.")
  49. print("F to dig forward.")
  50. print("R to dig up.")
  51. print("C to dig down.")
  52. print("X to stop current Turtle.")
  53. print("Z to exit.")
  54. print("--------------------------")
  55. RoxMaster()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement