View difference between Paste ID: heLjhD4y and kDiVVeRd
SHOW: | | - or go back to the newest paste.
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 == 17 then
6+
      if param == 87 then
7
        rednet.broadcast("MoveForward")
8-
      elseif param == 30 then
8+
      elseif param == 65 then
9
        rednet.broadcast("MoveLeft")
10-
      elseif param == 31 then
10+
      elseif param == 83 then
11
        rednet.broadcast("MoveBack")
12-
      elseif param == 32 then
12+
      elseif param == 68 then
13
        rednet.broadcast("MoveRight")
14-
      elseif param == 18 then
14+
      elseif param == 69 then
15
        rednet.broadcast("MoveUp")
16-
      elseif param == 16 then
16+
      elseif param == 81 then
17
        rednet.broadcast("MoveDown")
18-
      elseif param == 33 then
18+
      elseif param == 70 then
19
        rednet.broadcast("DigForward")
20-
      elseif param == 19 then
20+
      elseif param == 82 then
21
        rednet.broadcast("DigUp")
22-
      elseif param == 46 then
22+
      elseif param == 67 then
23
        rednet.broadcast("DigDown")
24-
      elseif param == 45 then
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 == 44 then
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-
textutils.slowPrint("Rox Remote Control Console \(RoxRCC\) sending signal.")
44+
print("Rox Remote Control Console \(RoxRCC\) sending signal.")
45
print("--------------------------")
46-
textutils.slowPrint("WASD to move.")
46+
print("WASD to move.")
47-
textutils.slowPrint("E to rise.")
47+
print("E to rise.")
48-
textutils.slowPrint("Q to fall.")
48+
print("Q to fall.")
49-
textutils.slowPrint("F to dig forward.")
49+
print("F to dig forward.")
50-
textutils.slowPrint("R to dig up.")
50+
print("R to dig up.")
51-
textutils.slowPrint("C to dig down.")
51+
print("C to dig down.")
52-
textutils.slowPrint("X to stop current Turtle.")
52+
print("X to stop current Turtle.")
53-
textutils.slowPrint("Z to exit.")
53+
print("Z to exit.")
54
print("--------------------------")
55
RoxMaster()