-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathThe server
More file actions
120 lines (120 loc) · 2.81 KB
/
Copy pathThe server
File metadata and controls
120 lines (120 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
term.setBackgroundColor(colors.cyan)
print(" ")
term.clear()
term.setCursorPos(1,1)
print("Please Enter Side Modem Is On")
input = read()
rednet.open(input)
term.setBackgroundColor(colors.lime)
print(" ")
term.clear()
term.setCursorPos(18, 10)
print("Rednet Is Open")
sleep(2)
term.setBackgroundColor(colors.cyan)
print(" ")
term.clear()
term.setCursorPos(1, 1)
print("Please Enter Turtle ID")
input = tonumber(read())
term.setBackgroundColor(colors.lime)
print(" ")
term.clear()
term.setCursorPos(20, 10)
print("ID Accepted")
sleep(2)
term.setBackgroundColor(colors.cyan)
print(" ")
term.clear()
term.setCursorPos(1, 1)
term.setTextColor(colors.white)
print("Controls:")
print("Arrowkey Up = Forward")
print("Arrowkey Down = Back")
print("Arrowkey Left = Left")
print("Arrowkey Right = Right")
print("Numpad 0 = Place")
print("Numpad 2 = Up")
print("Numpad 4 = Redstone Activation")
print("Enter = Refuel")
print("Numpad 1 = Dig")
print("Numpad 5 = Dig Up")
print("Numpad 6 = Dig Down")
print("Numpad 7 = Place Up")
print("Numpad 8 = Place Down")
print("R Shift = Restart")
print("+ = Quit")
print(". Decimal = Show Controls")
print("Reminder If You Haven't Put Coal In The Turtle It Won't Move So Please Do.")
while true do
event, e = os.pullEvent("key")
if e == 200 then
rednet.send(input,"forward")
print("Moving Forward")
elseif e == 208 then
rednet.send(input,"back")
print("Moving Backwards")
elseif e == 203 then
rednet.send(input,"left")
print("Turning Left")
elseif e == 205 then
rednet.send(input,"right")
print("Turning Right")
elseif e == 82 then
rednet.send(input,"place")
print("Placing")
elseif e == 79 then
rednet.send(input,"dig")
print("Digging")
elseif e == 80 then
rednet.send(input,"up")
print("Going Up")
elseif e == 81 then
rednet.send(input,"down")
print("Going Down")
elseif e == 75 then
rednet.send(input,"redstone")
print("Redstone Switching On")
sleep(1.5)
print("Redstone Switching Off")
elseif e == 28 then
rednet.send(input,"refuel")
print("Refueling")
elseif e == 54 then
shell.run("turtlespy")
elseif e == 83 then
term.clear()
term.setCursorPos(1, 1)
print("Controls:")
print("Arrowkey Up = Forward")
print("Arrowkey Down = Back")
print("Arrowkey Left = Left")
print("Arrowkey Right = Right")
print("Numpad 0 = Place")
print("Numpad 2 = Up")
print("Numpad 4 = Redstone Activation")
print("Enter = Refuel")
print("Numpad 1 = Dig")
print("Numpad 5 = Dig Up")
print("Numpad 6 = Dig Down")
print("Numpad 7 = Place Up")
print("Numpad 8 = Place Down")
print("R Shift = Restart")
print("+ = Quit")
print(". Decimal = Show Controls")
elseif e == 78 then
break
elseif e == 76 then
rednet.send(input,"digup")
print("Digging Up")
elseif e == 77 then
rednet.send(input,"digdown")
print("Digging Down")
elseif e == 71 then
rednet.send(input,"placeup")
print("Placing Up")
elseif e == 72 then
rednet.send(input,"placedown")
print("Placing Down")
end
end