SHOW:
|
|
- or go back to the newest paste.
1 | - | output = "front" -- Bundles Output Side |
1 | + | -- Manuell "log1" bis "log5" erstellen und |
2 | - | side = "back" -- Monitor Side |
2 | + | -- "aus" reinschreiben. |
3 | - | |
3 | + | -- "edit log1" -> "aus" -> Speichern |
4 | ||
5 | output = "front" -- Bundled Output Side | |
6 | side = "back" -- Monitor Side | |
7 | ||
8 | redstone.setBundledOutput(output, 0) | |
9 | - | |
9 | + | |
10 | mon.setTextScale(1.5) | |
11 | mon.setBackgroundColor(colors.black) | |
12 | mon.clear() | |
13 | ||
14 | function msg(gap, line, color, groundb, text) | |
15 | if color == 1 then | |
16 | color = 1 | |
17 | elseif color == 02 then | |
18 | color = 2 | |
19 | elseif color == 03 then | |
20 | color = 4 | |
21 | elseif color == 04 then | |
22 | color = 8 | |
23 | elseif color == 05 then | |
24 | color = 16 | |
25 | elseif color == 06 then | |
26 | color = 32 | |
27 | elseif color == 07 then | |
28 | color = 64 | |
29 | elseif color == 08 then | |
30 | color = 128 | |
31 | elseif color == 09 then | |
32 | color = 256 | |
33 | elseif color == 10 then | |
34 | color = 512 | |
35 | elseif color == 11 then | |
36 | color = 1024 | |
37 | elseif color == 12 then | |
38 | color = 2048 | |
39 | elseif color == 13 then | |
40 | color = 4096 | |
41 | elseif color == 14 then | |
42 | color = 8192 | |
43 | elseif color == 15 then | |
44 | color = 16384 | |
45 | elseif color == 16 then | |
46 | color = 32768 | |
47 | end | |
48 | if groundb == 1 then | |
49 | groundb = 1 | |
50 | elseif groundb == 02 then | |
51 | groundb = 2 | |
52 | elseif groundb == 03 then | |
53 | groundb = 4 | |
54 | elseif groundb == 04 then | |
55 | groundb = 8 | |
56 | elseif groundb == 05 then | |
57 | groundb = 16 | |
58 | elseif groundb == 06 then | |
59 | groundb = 32 | |
60 | elseif groundb == 07 then | |
61 | groundb = 64 | |
62 | elseif groundb == 08 then | |
63 | groundb = 128 | |
64 | elseif groundb == 09 then | |
65 | groundb = 256 | |
66 | elseif groundb == 10 then | |
67 | groundb = 512 | |
68 | elseif groundb == 11 then | |
69 | groundb = 1024 | |
70 | elseif groundb == 12 then | |
71 | groundb = 2048 | |
72 | elseif groundb == 13 then | |
73 | groundb = 4096 | |
74 | elseif groundb == 14 then | |
75 | groundb = 8192 | |
76 | elseif groundb == 15 then | |
77 | groundb = 16384 | |
78 | elseif groundb == 16 then | |
79 | groundb = 32768 | |
80 | end | |
81 | ||
82 | mon.setBackgroundColor(groundb) | |
83 | - | |
83 | + | |
84 | mon.setTextColor(color) | |
85 | text = mon.write(text) | |
86 | - | msg(2,02,1,15," ") |
86 | + | |
87 | - | msg(2,03,1,15," Bsp. 1 ") -- |
87 | + | |
88 | - | msg(2,04,1,15," ") |
88 | + | |
89 | -- Diesen Abstand immer einhalten !!! | |
90 | - | |
90 | + | -- " " |
91 | ||
92 | - | msg(2,06,1,15," ") |
92 | + | |
93 | - | msg(2,07,1,15," Bsp. 2 ") -- |
93 | + | msg(2,02,1,15," ") |
94 | - | msg(2,08,1,15," ") |
94 | + | msg(2,03,1,15," Bsp. 1 ") |
95 | msg(2,04,1,15," ") | |
96 | - | |
96 | + | |
97 | ||
98 | - | msg(2,10,1,15," ") |
98 | + | |
99 | - | msg(2,11,1,15," Bsp. 3 ") -- |
99 | + | msg(2,06,1,15," ") |
100 | - | msg(2,12,1,15," ") |
100 | + | msg(2,07,1,15," Bsp. 2 ") |
101 | msg(2,08,1,15," ") | |
102 | - | |
102 | + | |
103 | ||
104 | - | msg(2,14,1,15," ") |
104 | + | |
105 | - | msg(2,15,1,15," Bsp. 4 ") -- |
105 | + | msg(2,10,1,15," ") |
106 | - | msg(2,16,1,15," ") |
106 | + | msg(2,11,1,15," Bsp. 3 ") |
107 | msg(2,12,1,15," ") | |
108 | - | |
108 | + | |
109 | ||
110 | - | msg(2,18,1,15," ") |
110 | + | |
111 | - | msg(2,19,1,15," Bsp. 5 ") -- |
111 | + | msg(2,14,1,15," ") |
112 | - | msg(2,20,1,15," ") |
112 | + | msg(2,15,1,15," Bsp. 4 ") |
113 | msg(2,16,1,15," ") | |
114 | end | |
115 | ||
116 | - | msg(2,02,1,06," ") |
116 | + | |
117 | - | msg(2,03,1,06," Bsp. 1 ") -- |
117 | + | msg(2,18,1,15," ") |
118 | - | msg(2,04,1,06," ") |
118 | + | msg(2,19,1,15," Bsp. 5 ") |
119 | msg(2,20,1,15," ") | |
120 | - | |
120 | + | |
121 | ||
122 | - | msg(2,06,1,06," ") |
122 | + | |
123 | - | msg(2,07,1,06," Bsp. 2 ") -- |
123 | + | -- Diesen Abstand immer einhalten !!! |
124 | - | msg(2,08,1,06," ") |
124 | + | -- " " |
125 | ||
126 | - | |
126 | + | |
127 | msg(2,02,1,06," ") | |
128 | - | msg(2,10,1,06," ") |
128 | + | msg(2,03,1,06," Bsp. 1 ") |
129 | - | msg(2,11,1,06," Bsp. 3 ") -- |
129 | + | msg(2,04,1,06," ") |
130 | - | msg(2,12,1,06," ") |
130 | + | |
131 | ||
132 | - | |
132 | + | |
133 | msg(2,06,1,06," ") | |
134 | - | msg(2,14,1,06," ") |
134 | + | msg(2,07,1,06," Bsp. 2 ") |
135 | - | msg(2,15,1,06," Bsp. 4 ") -- |
135 | + | msg(2,08,1,06," ") |
136 | - | msg(2,16,1,06," ") |
136 | + | |
137 | ||
138 | - | |
138 | + | |
139 | msg(2,10,1,06," ") | |
140 | - | msg(2,18,1,06," ") |
140 | + | msg(2,11,1,06," Bsp. 3 ") |
141 | - | msg(2,19,1,06," Bsp. 5 ") -- |
141 | + | msg(2,12,1,06," ") |
142 | - | msg(2,20,1,06," ") |
142 | + | |
143 | ||
144 | function IVan() | |
145 | msg(2,14,1,06," ") | |
146 | - | file = fs.open("log1", "r") |
146 | + | msg(2,15,1,06," Bsp. 4 ") |
147 | - | local inhalt = file.readLine() |
147 | + | msg(2,16,1,06," ") |
148 | - | file.close() |
148 | + | |
149 | - | print(inhalt) |
149 | + | |
150 | - | if inhalt == "an" then |
150 | + | |
151 | - | Ian() |
151 | + | msg(2,18,1,06," ") |
152 | msg(2,19,1,06," Bsp. 5 ") | |
153 | - | redstone.setBundledOutput(output,colors.combine(redstone.getBundledOutput(output), colors.yellow)) |
153 | + | msg(2,20,1,06," ") |
154 | - | sleep(0.5) |
154 | + | |
155 | - | elseif inhalt == "aus" then |
155 | + | |
156 | - | Iaus() |
156 | + | |
157 | file = fs.open("log1", "r") | |
158 | - | redstone.setBundledOutput(output,colors.subtract(redstone.getBundledOutput(output), colors.yellow)) |
158 | + | local inhalt = file.readLine() |
159 | - | sleep(0.5) |
159 | + | file.close() |
160 | - | end |
160 | + | print(inhalt) |
161 | if inhalt == "an" then | |
162 | - | file = fs.open("log2", "r") |
162 | + | Ian() |
163 | - | local inhalt = file.readLine() |
163 | + | |
164 | - | file.close() |
164 | + | redstone.setBundledOutput(output,colors.combine(redstone.getBundledOutput(output), colors.yellow)) |
165 | - | print(inhalt) |
165 | + | sleep(0.5) |
166 | - | if inhalt == "an" then |
166 | + | elseif inhalt == "aus" then |
167 | - | IIan() |
167 | + | Iaus() |
168 | - | redstone.setBundledOutput(output,colors.combine(redstone.getBundledOutput(output), colors.blue)) |
168 | + | |
169 | - | sleep(0.5) |
169 | + | redstone.setBundledOutput(output,colors.subtract(redstone.getBundledOutput(output), colors.yellow)) |
170 | - | elseif inhalt == "aus" then |
170 | + | sleep(0.5) |
171 | - | IIaus() |
171 | + | |
172 | - | redstone.setBundledOutput(output,colors.subtract(redstone.getBundledOutput(output), colors.blue)) |
172 | + | |
173 | - | sleep(0.5) |
173 | + | file = fs.open("log2", "r") |
174 | - | end |
174 | + | local inhalt = file.readLine() |
175 | - | |
175 | + | file.close() |
176 | - | file = fs.open("log3", "r") |
176 | + | print(inhalt) |
177 | - | local inhalt = file.readLine() |
177 | + | if inhalt == "an" then |
178 | - | file.close() |
178 | + | IIan() |
179 | - | print(inhalt) |
179 | + | redstone.setBundledOutput(output,colors.combine(redstone.getBundledOutput(output), colors.blue)) |
180 | - | if inhalt == "an" then |
180 | + | sleep(0.5) |
181 | - | IIIan() |
181 | + | elseif inhalt == "aus" then |
182 | - | redstone.setBundledOutput(output,colors.combine(redstone.getBundledOutput(output), colors.white)) |
182 | + | IIaus() |
183 | - | sleep(0.5) |
183 | + | redstone.setBundledOutput(output,colors.subtract(redstone.getBundledOutput(output), colors.blue)) |
184 | - | elseif inhalt == "aus" then |
184 | + | sleep(0.5) |
185 | - | IIIaus() |
185 | + | |
186 | - | redstone.setBundledOutput(output,colors.subtract(redstone.getBundledOutput(output), colors.white)) |
186 | + | |
187 | - | sleep(0.5) |
187 | + | file = fs.open("log3", "r") |
188 | - | end |
188 | + | local inhalt = file.readLine() |
189 | - | |
189 | + | file.close() |
190 | - | file = fs.open("log4", "r") |
190 | + | print(inhalt) |
191 | - | local inhalt = file.readLine() |
191 | + | if inhalt == "an" then |
192 | - | file.close() |
192 | + | IIIan() |
193 | - | print(inhalt) |
193 | + | redstone.setBundledOutput(output,colors.combine(redstone.getBundledOutput(output), colors.white)) |
194 | - | if inhalt == "an" then |
194 | + | sleep(0.5) |
195 | - | IVan() |
195 | + | elseif inhalt == "aus" then |
196 | - | redstone.setBundledOutput(output,colors.combine(redstone.getBundledOutput(output), colors.red)) |
196 | + | IIIaus() |
197 | - | sleep(0.5) |
197 | + | redstone.setBundledOutput(output,colors.subtract(redstone.getBundledOutput(output), colors.white)) |
198 | - | elseif inhalt == "aus" then |
198 | + | sleep(0.5) |
199 | - | IVaus() |
199 | + | |
200 | - | redstone.setBundledOutput(output,colors.subtract(redstone.getBundledOutput(output), colors.red)) |
200 | + | |
201 | - | sleep(0.5) |
201 | + | file = fs.open("log4", "r") |
202 | - | end |
202 | + | local inhalt = file.readLine() |
203 | - | |
203 | + | file.close() |
204 | - | file = fs.open("log5", "r") |
204 | + | print(inhalt) |
205 | - | local inhalt = file.readLine() |
205 | + | if inhalt == "an" then |
206 | - | file.close() |
206 | + | IVan() |
207 | - | print(inhalt) |
207 | + | redstone.setBundledOutput(output,colors.combine(redstone.getBundledOutput(output), colors.red)) |
208 | - | if inhalt == "an" then |
208 | + | sleep(0.5) |
209 | - | Van() |
209 | + | elseif inhalt == "aus" then |
210 | - | redstone.setBundledOutput(output,colors.combine(redstone.getBundledOutput(output), colors.green)) |
210 | + | IVaus() |
211 | - | sleep(0.5) |
211 | + | redstone.setBundledOutput(output,colors.subtract(redstone.getBundledOutput(output), colors.red)) |
212 | - | elseif inhalt == "aus" then |
212 | + | sleep(0.5) |
213 | - | Vaus() |
213 | + | |
214 | - | redstone.setBundledOutput(output,colors.subtract(redstone.getBundledOutput(output), colors.green)) |
214 | + | |
215 | - | sleep(0.5) |
215 | + | file = fs.open("log5", "r") |
216 | - | end |
216 | + | local inhalt = file.readLine() |
217 | - | |
217 | + | file.close() |
218 | - | |
218 | + | print(inhalt) |
219 | - | |
219 | + | if inhalt == "an" then |
220 | Van() | |
221 | - | local event, side, X, Y = os.pullEvent("monitor_touch") |
221 | + | redstone.setBundledOutput(output,colors.combine(redstone.getBundledOutput(output), colors.green)) |
222 | - | if X >= 1 and X <= 17 and Y >= 2 and Y <= 4 and side == side then |
222 | + | sleep(0.5) |
223 | - | file = fs.open("log1", "r") |
223 | + | elseif inhalt == "aus" then |
224 | - | local inhalt = file.readLine() |
224 | + | Vaus() |
225 | - | file.close() |
225 | + | redstone.setBundledOutput(output,colors.subtract(redstone.getBundledOutput(output), colors.green)) |
226 | - | print(inhalt) |
226 | + | sleep(0.5) |
227 | - | if inhalt == "an" then |
227 | + | |
228 | - | Iaus() |
228 | + | |
229 | - | file = fs.open("log1", "w") |
229 | + | |
230 | - | file.write("aus") |
230 | + | |
231 | - | file.close() |
231 | + | |
232 | - | redstone.setBundledOutput(output,colors.subtract(redstone.getBundledOutput(output), colors.yellow)) |
232 | + | local event, side, X, Y = os.pullEvent("monitor_touch") |
233 | - | sleep(0.5) |
233 | + | if X >= 1 and X <= 17 and Y >= 2 and Y <= 4 and side == side then |
234 | - | elseif inhalt == "aus" then |
234 | + | file = fs.open("log1", "r") |
235 | - | Ian() |
235 | + | local inhalt = file.readLine() |
236 | - | file = fs.open("log1", "w") |
236 | + | file.close() |
237 | - | file.write("an") |
237 | + | print(inhalt) |
238 | - | file.close() |
238 | + | if inhalt == "an" then |
239 | - | redstone.setBundledOutput(output,colors.combine(redstone.getBundledOutput(output), colors.yellow)) |
239 | + | Iaus() |
240 | - | sleep(0.5) |
240 | + | file = fs.open("log1", "w") |
241 | - | end |
241 | + | file.write("aus") |
242 | - | elseif X >= 1 and X <= 17 and Y >= 6 and Y <= 8 and side == side then |
242 | + | file.close() |
243 | - | file = fs.open("log2", "r") |
243 | + | redstone.setBundledOutput(output,colors.subtract(redstone.getBundledOutput(output), colors.yellow)) |
244 | - | local inhalt = file.readLine() |
244 | + | sleep(0.5) |
245 | - | file.close() |
245 | + | elseif inhalt == "aus" then |
246 | - | print(inhalt) |
246 | + | Ian() |
247 | - | if inhalt == "an" then |
247 | + | file = fs.open("log1", "w") |
248 | - | IIaus() |
248 | + | file.write("an") |
249 | - | file = fs.open("log2", "w") |
249 | + | file.close() |
250 | - | file.write("aus") |
250 | + | redstone.setBundledOutput(output,colors.combine(redstone.getBundledOutput(output), colors.yellow)) |
251 | - | file.close() |
251 | + | sleep(0.5) |
252 | - | redstone.setBundledOutput(output,colors.subtract(redstone.getBundledOutput(output), colors.blue)) |
252 | + | end |
253 | - | sleep(0.5) |
253 | + | elseif X >= 1 and X <= 17 and Y >= 6 and Y <= 8 and side == side then |
254 | - | elseif inhalt == "aus" then |
254 | + | file = fs.open("log2", "r") |
255 | - | IIan() |
255 | + | local inhalt = file.readLine() |
256 | - | file = fs.open("log2", "w") |
256 | + | file.close() |
257 | - | file.write("an") |
257 | + | print(inhalt) |
258 | - | file.close() |
258 | + | if inhalt == "an" then |
259 | - | redstone.setBundledOutput(output,colors.combine(redstone.getBundledOutput(output), colors.blue)) |
259 | + | IIaus() |
260 | - | sleep(0.5) |
260 | + | file = fs.open("log2", "w") |
261 | - | end |
261 | + | file.write("aus") |
262 | - | elseif X >= 1 and X <= 17 and Y >= 10 and Y <= 12 and side == side then |
262 | + | file.close() |
263 | - | file = fs.open("log3", "r") |
263 | + | redstone.setBundledOutput(output,colors.subtract(redstone.getBundledOutput(output), colors.blue)) |
264 | - | local inhalt = file.readLine() |
264 | + | sleep(0.5) |
265 | - | file.close() |
265 | + | elseif inhalt == "aus" then |
266 | - | print(inhalt) |
266 | + | IIan() |
267 | - | if inhalt == "an" then |
267 | + | file = fs.open("log2", "w") |
268 | - | IIIaus() |
268 | + | file.write("an") |
269 | - | file = fs.open("log3", "w") |
269 | + | file.close() |
270 | - | file.write("aus") |
270 | + | redstone.setBundledOutput(output,colors.combine(redstone.getBundledOutput(output), colors.blue)) |
271 | - | file.close() |
271 | + | sleep(0.5) |
272 | - | redstone.setBundledOutput(output,colors.subtract(redstone.getBundledOutput(output), colors.white)) |
272 | + | end |
273 | - | sleep(0.5) |
273 | + | elseif X >= 1 and X <= 17 and Y >= 10 and Y <= 12 and side == side then |
274 | - | elseif inhalt == "aus" then |
274 | + | file = fs.open("log3", "r") |
275 | - | IIIan() |
275 | + | local inhalt = file.readLine() |
276 | - | file = fs.open("log3", "w") |
276 | + | file.close() |
277 | - | file.write("an") |
277 | + | print(inhalt) |
278 | - | file.close() |
278 | + | if inhalt == "an" then |
279 | - | redstone.setBundledOutput(output,colors.combine(redstone.getBundledOutput(output), colors.white)) |
279 | + | IIIaus() |
280 | - | sleep(0.5) |
280 | + | file = fs.open("log3", "w") |
281 | - | end |
281 | + | file.write("aus") |
282 | - | elseif X >= 1 and X <= 17 and Y >= 14 and Y <= 16 and side == side then |
282 | + | file.close() |
283 | - | file = fs.open("log4", "r") |
283 | + | redstone.setBundledOutput(output,colors.subtract(redstone.getBundledOutput(output), colors.white)) |
284 | - | local inhalt = file.readLine() |
284 | + | sleep(0.5) |
285 | - | file.close() |
285 | + | elseif inhalt == "aus" then |
286 | - | print(inhalt) |
286 | + | IIIan() |
287 | - | if inhalt == "an" then |
287 | + | file = fs.open("log3", "w") |
288 | - | IVaus() |
288 | + | file.write("an") |
289 | - | file = fs.open("log4", "w") |
289 | + | file.close() |
290 | - | file.write("aus") |
290 | + | redstone.setBundledOutput(output,colors.combine(redstone.getBundledOutput(output), colors.white)) |
291 | - | file.close() |
291 | + | sleep(0.5) |
292 | - | redstone.setBundledOutput(output,colors.subtract(redstone.getBundledOutput(output), colors.red)) |
292 | + | end |
293 | - | sleep(0.5) |
293 | + | elseif X >= 1 and X <= 17 and Y >= 14 and Y <= 16 and side == side then |
294 | - | elseif inhalt == "aus" then |
294 | + | file = fs.open("log4", "r") |
295 | - | IVan() |
295 | + | local inhalt = file.readLine() |
296 | - | file = fs.open("log4", "w") |
296 | + | file.close() |
297 | - | file.write("an") |
297 | + | print(inhalt) |
298 | - | file.close() |
298 | + | if inhalt == "an" then |
299 | - | redstone.setBundledOutput(output,colors.combine(redstone.getBundledOutput(output), colors.red)) |
299 | + | IVaus() |
300 | - | sleep(0.5) |
300 | + | file = fs.open("log4", "w") |
301 | - | end |
301 | + | file.write("aus") |
302 | - | elseif X >= 1 and X <= 17 and Y >= 18 and Y <= 20 and side == side then |
302 | + | file.close() |
303 | - | file = fs.open("log5", "r") |
303 | + | redstone.setBundledOutput(output,colors.subtract(redstone.getBundledOutput(output), colors.red)) |
304 | - | local inhalt = file.readLine() |
304 | + | sleep(0.5) |
305 | - | file.close() |
305 | + | elseif inhalt == "aus" then |
306 | - | print(inhalt) |
306 | + | IVan() |
307 | - | if inhalt == "an" then |
307 | + | file = fs.open("log4", "w") |
308 | - | Vaus() |
308 | + | file.write("an") |
309 | - | file = fs.open("log5", "w") |
309 | + | file.close() |
310 | - | file.write("aus") |
310 | + | redstone.setBundledOutput(output,colors.combine(redstone.getBundledOutput(output), colors.red)) |
311 | - | file.close() |
311 | + | sleep(0.5) |
312 | - | redstone.setBundledOutput(output,colors.subtract(redstone.getBundledOutput(output), colors.green)) |
312 | + | end |
313 | - | sleep(0.5) |
313 | + | elseif X >= 1 and X <= 17 and Y >= 18 and Y <= 20 and side == side then |
314 | - | elseif inhalt == "aus" then |
314 | + | file = fs.open("log5", "r") |
315 | - | Van() |
315 | + | local inhalt = file.readLine() |
316 | - | file = fs.open("log5", "w") |
316 | + | file.close() |
317 | - | file.write("an") |
317 | + | print(inhalt) |
318 | - | file.close() |
318 | + | if inhalt == "an" then |
319 | - | redstone.setBundledOutput(output,colors.combine(redstone.getBundledOutput(output), colors.green)) |
319 | + | Vaus() |
320 | - | sleep(0.5) |
320 | + | file = fs.open("log5", "w") |
321 | - | end |
321 | + | file.write("aus") |
322 | - | end |
322 | + | file.close() |
323 | redstone.setBundledOutput(output,colors.subtract(redstone.getBundledOutput(output), colors.green)) | |
324 | sleep(0.5) | |
325 | elseif inhalt == "aus" then | |
326 | Van() | |
327 | file = fs.open("log5", "w") | |
328 | file.write("an") | |
329 | file.close() | |
330 | redstone.setBundledOutput(output,colors.combine(redstone.getBundledOutput(output), colors.green)) | |
331 | sleep(0.5) | |
332 | end | |
333 | end | |
334 | sleep(0.5) | |
335 | end |