SHOW:
|
|
- or go back to the newest paste.
1 | --made by TEC_NO | |
2 | --Make sure to add fuel to turtle | |
3 | --TEC_NO's Remote Control Script! | |
4 | --Version 0.4 release, build/test 14 | |
5 | ||
6 | shell.run('clear') | |
7 | - | rednet.open('right') -- open wifi port |
7 | + | os.setComputerLabel("TEC_NO's Remote Control Script! | Computer ID:" .. os.getComputerID() .. "!") |
8 | print("Starting program...") | |
9 | sleep(1) | |
10 | print("--------------------------") | |
11 | print("Version 0.4 release, build/test 14") | |
12 | print("--------------------------") | |
13 | print("Welcome To TEC_NO's Turtle Remote Control Script | Computer ID:" .. os.getComputerID() .. "!") | |
14 | print("--------------------------") | |
15 | write('Press Any Key To Continue!') | |
16 | local anykey = read() | |
17 | print("Help & Info Menu:") | |
18 | print(" ") | |
19 | print("Refueling:") | |
20 | print("R = Refuel") | |
21 | print(" ") | |
22 | write('Press Any Key To Continue!') | |
23 | local anykey = read() | |
24 | print(" ") | |
25 | print("Movement:") | |
26 | print("W = Forwards") | |
27 | - | if key == 200 then |
27 | + | print("S = Backwards") |
28 | print("A = Left") | |
29 | print("D = Right") | |
30 | print("Q = Down") | |
31 | - | if key == 208 then |
31 | + | print("E = Up") |
32 | print(" ") | |
33 | write('Press Any Key To Continue!') | |
34 | local anykey = read() | |
35 | print(" ") | |
36 | print("Blocks:") | |
37 | print("F = Check Mode") | |
38 | print("Spacebar = Dig/Place, Depends On Mode") | |
39 | print("X = Place Mode") | |
40 | print("Z = Dig Mode") | |
41 | print(" ") | |
42 | write('Press Any Key To Continue!') | |
43 | local anykey = read() | |
44 | print(" ") | |
45 | - | if key == 203 then --if the key is left |
45 | + | print("Extra:") |
46 | print("H = Help Menu") | |
47 | print("Y = Chat/Talk Menu") | |
48 | print("T = Last Movement/Objective") | |
49 | - | if key == 205 then -- if right |
49 | + | print("C = Redstone Activated") |
50 | print(" ") | |
51 | write('Press Any Key To Continue!') | |
52 | local anykey = read() | |
53 | - | if key == 29 then --if the left ctrl is pressed |
53 | + | print(" ") |
54 | print("Thats All!") | |
55 | print("--------------------------") | |
56 | write('Please enter the bot\'s id: ') | |
57 | - | end |
57 | + | |
58 | print("--------------------------") | |
59 | print("Note:") | |
60 | print("If the script does not work please check the script.") | |
61 | print("--------------------------") | |
62 | print("Loading, Please Wait!") | |
63 | sleep(4) | |
64 | print("Starting...") | |
65 | os.setComputerLabel("Turtle Controler, ID: ".. bot .."!") | |
66 | sleep(4) | |
67 | print("Done!") | |
68 | sleep(1) | |
69 | ||
70 | shell.run('clear') --clear the screen | |
71 | ||
72 | obj = 14 | |
73 | mode = 0 -- set the mode to dig | |
74 | rednet.open('back') -- open wifi port | |
75 | while true do -- start infinite loop | |
76 | event, key = os.pullEvent() -- wait for input | |
77 | shell.run('clear') -- clear the screen again :P | |
78 | if key == 's' then --if the s button is pressed | |
79 | rednet.send(bot, 'backward')-- send message for down button | |
80 | print('Backward') -- write on the screen | |
81 | obj = 1 | |
82 | end | |
83 | if key == 'r' then --up | |
84 | rednet.send(bot, 'refuel') | |
85 | print('ReFueling') | |
86 | obj = 6 | |
87 | end | |
88 | if key == 'a' then -- left | |
89 | rednet.send(bot, 'left') | |
90 | print('Left') | |
91 | obj = 2 | |
92 | end | |
93 | if key == 'w' then --up | |
94 | rednet.send(bot, 'forward') | |
95 | print('Forward') | |
96 | obj = 0 | |
97 | end | |
98 | if key == 'd' then -- right | |
99 | rednet.send(bot, 'right') | |
100 | print('Right') | |
101 | obj = 3 | |
102 | end | |
103 | if key == 'e' then | |
104 | rednet.send(bot, 'up') | |
105 | print('Up') | |
106 | obj = 4 | |
107 | end | |
108 | if key == 'q' then | |
109 | rednet.send(bot, 'down') | |
110 | print('Down') | |
111 | obj = 5 | |
112 | end | |
113 | ||
114 | local localchatnumbertosay = 012345678910 | |
115 | if key == 'y' then --up | |
116 | obj = 10 | |
117 | shell.run('clear') | |
118 | print("--------------------------") | |
119 | print("TEC_NO's") | |
120 | print("Turtle Chat Menu") | |
121 | print("--------------------------") | |
122 | print("Type the word that you wane say:") | |
123 | localchatnumbertosay = read() | |
124 | rednet.send(bot, localchatnumbertosay) | |
125 | rednet.send(bot, 'chat') | |
126 | rednet.send(bot, localchatnumbertosay) | |
127 | print("--------------------------") | |
128 | end | |
129 | ||
130 | if key == 'h' then | |
131 | print("--------------------------") | |
132 | print("TEC_NO's") | |
133 | print("Help & Info Menu:") | |
134 | print("--------------------------") | |
135 | print(" ") | |
136 | print("Refueling:") | |
137 | print("R = Refuel") | |
138 | print(" ") | |
139 | write('Press Any Key To Continue!') | |
140 | local anykey = read() | |
141 | print(" ") | |
142 | print("Movement:") | |
143 | print("W = Forwards") | |
144 | print("S = Backwards") | |
145 | print("A = Left") | |
146 | print("D = Right") | |
147 | print("Q = Down") | |
148 | print("E = Up") | |
149 | print(" ") | |
150 | write('Press Any Key To Continue!') | |
151 | local anykey = read() | |
152 | print(" ") | |
153 | print("Blocks:") | |
154 | print("F = Check Mode") | |
155 | print("Spacebar = Dig/Place, Depends On Mode") | |
156 | print("X = Place Mode") | |
157 | print("Z = Dig Mode") | |
158 | print(" ") | |
159 | write('Press Any Key To Continue!') | |
160 | local anykey = read() | |
161 | print(" ") | |
162 | print("Extra:") | |
163 | print("Y = Chat/Talk Menu") | |
164 | print("T = Last Movement/Objective") | |
165 | print("C = Redstone Activated") | |
166 | print(" ") | |
167 | write('Press Any Key To Continue!') | |
168 | local anykey = read() | |
169 | print(" ") | |
170 | print("Thats All!") | |
171 | print("--------------------------") | |
172 | end | |
173 | ||
174 | if key == 'f' then | |
175 | if mode == 0 then | |
176 | print("Mode = Dig") | |
177 | elseif mode == 1 then | |
178 | print("Mode = Place") | |
179 | else | |
180 | print("Mode = ERROR, Oops It Seems Ther Was An Error Please Check The Script!") | |
181 | end | |
182 | end | |
183 | if key == ' ' then --if the key is the spacebar | |
184 | if mode == 0 then -- if on digmode | |
185 | rednet.send(bot, 'dig') -- send message to dig | |
186 | print('Dig') -- write it | |
187 | obj = 9 | |
188 | elseif mode == 1 then -- if on placemode | |
189 | rednet.send(bot, 'place') -- send message to place block | |
190 | print('Place') --write | |
191 | obj = 8 | |
192 | end | |
193 | end | |
194 | if key == 'z' then --if the key is left | |
195 | mode = 0 -- set to digmode | |
196 | print('Dig mode selected.') --write it | |
197 | obj = 7 | |
198 | end | |
199 | if key == 'x' then -- if right | |
200 | mode = 1 -- set to placemode | |
201 | print('Place mode selected.') --write | |
202 | obj = 7 | |
203 | end | |
204 | if key == 'c' then --if the c is pressed | |
205 | rednet.send(bot, 'rs') -- send message to enable redstone | |
206 | print('Redstone activated.')-- write | |
207 | obj = 10 | |
208 | end | |
209 | if key == 't' then | |
210 | if obj == 0 then | |
211 | print("Last Movement/Objective = Forwards") | |
212 | elseif obj == 1 then | |
213 | print("Last Movement/Objective = Backwards") | |
214 | elseif obj == 2 then | |
215 | print("Last Movement/Objective = Left") | |
216 | elseif obj == 3 then | |
217 | print("Last Movement/Objective = Right") | |
218 | elseif obj == 4 then | |
219 | print("Last Movement/Objective = Up") | |
220 | elseif obj == 5 then | |
221 | print("Last Movement/Objective = Down") | |
222 | elseif obj == 6 then | |
223 | print("Last Movement/Objective = Refuel") | |
224 | elseif obj == 7 then | |
225 | print("Last Movement/Objective = Dig/Place Mode Changed") | |
226 | elseif obj == 8 then | |
227 | print("Last Movement/Objective = Block Placed") | |
228 | elseif obj == 9 then | |
229 | print("Last Movement/Objective = Block Removed") | |
230 | elseif obj == 10 then | |
231 | print("Last Movement/Objective = Ohter") | |
232 | elseif obj == 14 then | |
233 | print("Last Movement/Objective = None") | |
234 | else | |
235 | print("Last Movement/Objective = ERROR, Oops It Seems Ther Was An Error Please Check The Script!") | |
236 | end | |
237 | end | |
238 | end | |
239 | ||
240 | while true do | |
241 | if not localchatnumbertosay == 012345678910 then | |
242 | sleep(4) | |
243 | rednet.send(bot, chatclear) | |
244 | end | |
245 | end | |
246 | ||
247 | -- Thanks for using my script! | |
248 | --made by TEC_NO | |
249 | --TEC_NO's Remote Control Script! | |
250 | --Version 0.4 release, build/test 14 |