View difference between Paste ID: YbBfnA5b and EhTQMcyC
SHOW: | | - or go back to the newest paste.
1-
--[[   ### Hier bitte nix mehr machen außer du weißt was du machst! ###
1+
### Hier bitte nix mehr machen außer du weißt was du machst! ###
2
function clear()
3
        term.clear()
4
        term.setCursorPos(1,1)
5
end
6
print( "Copyright by Birog" )
7
write( "Es wird nach Updates gesucht... " )
8-
local response = http.get("http://pastebin.com/raw.php?i=EhTQMcyC")    
8+
local response = http.get("http://pastebin.com/raw.php?i=YbBfnA5b")    
9
if response then
10
   print("Update-suche erfolgreich!")
11
   local sSource = response.readAll()
12
   response.close()
13
   local file = fs.open( "startup", "r" )
14
   local sTarget = ""    
15
   if file then
16
          sTarget = file.readAll()
17
          file.close()
18
   end  
19
   if sSource ~= sTarget then
20
          term.write("Updates gefunden!")
21
          file = fs.open( "startup", "w" )
22
          file.write( sSource )
23
          file.close()
24
          print( "Wurde herruntergeladen als - startup - -Datei")
25
          print("Programm wird Neugestartet!")
26
          shell.run("startup")
27
          return  
28
   else
29
          print("Es sind keine Updates vorhanden!")
30
          print("Programm wird gestartet!")
31
          sleep(3)
32
          clear()
33
   end
34
else
35
   clear()
36
   print("ERROR! Informiere bitte Birog!!")
37
   clear()
38-
end]]
38+
39
-------------------------------------------------------------------------------------------------------------------
40-
moniside = "right"
40+
rednet.open("bottom")
41
moniside = "top"
42-
redout = "left"
42+
43
redout = "bottom"
44-
Info = "Schild"
44+
45
--
46
adminpass = "5555"
47
48
term = peripheral.wrap(moniside)
49-
local pullEvent = os.pullEvent
49+
--local pullEvent = os.pullEvent
50-
os.pullEvent = os.pullEventRaw
50+
--os.pullEvent = os.pullEventRaw
51
52-
function AnzeigeAus()
52+
53
	term.clear()
54-
	term.setBackgroundColor(colors.red)
54+
	term.setTextColor(colors.white)
55
	-- Information
56
	-- Anzeige oben
57
	term.setCursorPos(1,1)
58-
	term.setBackgroundColor(colors.red)
58+
	term.setBackgroundColor(colors.lightBlue)
59-
	term.write("O")
59+
60
	term.setCursorPos(2,1)
61
	term.setBackgroundColor(colors.lightBlue)
62-
	term.setBackgroundColor(colors.red)
62+
63-
	term.write("F")
63+
64
	term.setCursorPos(3,1)
65
	term.setBackgroundColor(colors.lightBlue)
66-
	term.setBackgroundColor(colors.red)
66+
67-
	term.write("F")
67+
68
	term.setCursorPos(4,1)
69
	term.setBackgroundColor(colors.lightBlue)
70-
	term.setBackgroundColor(colors.red)
70+
71
	term.setBackgroundColor(colors.black)
72
	term.setCursorPos(5,1)
73
	term.setBackgroundColor(colors.lightBlue)
74
	term.write(" ")
75-
function AnzeigeEin()
75+
76
	term.setCursorPos(6,1)
77-
	term.setBackgroundColor(colors.green)
77+
	term.setBackgroundColor(colors.lightBlue)
78
	term.write(" ")
79
	term.setBackgroundColor(colors.black)
80
	term.setCursorPos(7,1)
81-
	term.setBackgroundColor(colors.green)
81+
	term.setBackgroundColor(colors.lightBlue)
82-
	term.write("O")
82+
83
	term.setBackgroundColor(colors.black)
84
	-- Anzeige unten
85-
	term.setBackgroundColor(colors.green)
85+
	term.setCursorPos(1,5)
86-
	term.write("N")
86+
	term.setBackgroundColor(colors.lightBlue)
87
	term.write(" ")
88
	term.setBackgroundColor(colors.black)
89-
	term.setBackgroundColor(colors.green)
89+
	term.setCursorPos(2,5)
90
	term.setBackgroundColor(colors.lightBlue)
91
	term.write(" ")
92
	term.setBackgroundColor(colors.black)
93-
	term.setBackgroundColor(colors.green)
93+
	term.setCursorPos(3,5)
94
	term.setBackgroundColor(colors.lightBlue)
95
	term.write(" ")
96
	term.setBackgroundColor(colors.black)
97
	term.setCursorPos(4,5)
98
	term.setBackgroundColor(colors.lightBlue)
99-
term.clear()
99+
100-
term.setTextColor(colors.white)
100+
101-
-- Information
101+
	term.setCursorPos(5,5)
102-
term.setCursorPos(2,2)
102+
	term.setBackgroundColor(colors.lightBlue)
103-
term.setBackgroundColor(colors.blue)
103+
104-
term.write("Hello")
104+
105-
term.setBackgroundColor(colors.black)
105+
	term.setCursorPos(6,5)
106-
-- Anzeige
106+
	term.setBackgroundColor(colors.lightBlue)
107-
term.setCursorPos(2,1)
107+
108-
term.setBackgroundColor(colors.orange)
108+
109-
term.write(" ")
109+
	term.setCursorPos(7,5)
110-
term.setBackgroundColor(colors.black)
110+
	term.setBackgroundColor(colors.lightBlue)
111-
term.setCursorPos(3,1)
111+
112-
term.setBackgroundColor(colors.orange)
112+
113-
term.write(" ")
113+
	-- Anzeige links
114-
term.setBackgroundColor(colors.black)
114+
	term.setCursorPos(1,2)
115-
term.setCursorPos(4,1)
115+
	term.setBackgroundColor(colors.lightBlue)
116-
term.setBackgroundColor(colors.orange)
116+
117-
term.write(" ")
117+
118-
term.setBackgroundColor(colors.black)
118+
	term.setCursorPos(1,3)
119-
term.setCursorPos(5,1)
119+
	term.setBackgroundColor(colors.lightBlue)
120-
term.setBackgroundColor(colors.orange)
120+
121-
term.write(" ")
121+
122-
term.setBackgroundColor(colors.black)
122+
	term.setCursorPos(1,4)
123-
term.setCursorPos(6,1)
123+
	term.setBackgroundColor(colors.lightBlue)
124-
term.setBackgroundColor(colors.orange)
124+
125-
term.write(" ")
125+
126-
term.setBackgroundColor(colors.black)
126+
	--Anzeige rechts
127
	term.setCursorPos(7,2)
128-
-- Einschalten
128+
	term.setBackgroundColor(colors.lightBlue)
129-
term.setCursorPos(2,3)
129+
130-
term.setBackgroundColor(colors.green)
130+
131-
term.write(" ")
131+
	term.setCursorPos(7,3)
132-
term.setBackgroundColor(colors.black)
132+
	term.setBackgroundColor(colors.lightBlue)
133-
term.setCursorPos(2,4)
133+
134-
term.setBackgroundColor(colors.green)
134+
135-
term.write(" ")
135+
	term.setCursorPos(7,4)
136-
term.setBackgroundColor(colors.black)
136+
	term.setBackgroundColor(colors.lightBlue)
137-
term.setCursorPos(2,5)
137+
138-
term.setBackgroundColor(colors.green)
138+
139-
term.write(" ")
139+
140-
term.setBackgroundColor(colors.black)
140+
141-
term.setCursorPos(3,3)
141+
function Knoepf()
142-
term.setBackgroundColor(colors.green)
142+
	-- Reihe 1
143-
term.write(" ")
143+
	term.setCursorPos(2,2)
144-
term.setBackgroundColor(colors.black)
144+
	term.setBackgroundColor(colors.brown)
145-
term.setCursorPos(3,4)
145+
146-
term.setBackgroundColor(colors.green)
146+
147-
term.write(" ")
147+
	term.setCursorPos(3,2)
148-
term.setBackgroundColor(colors.black)
148+
	term.setBackgroundColor(colors.brown)
149-
term.setCursorPos(3,5)
149+
150-
term.setBackgroundColor(colors.green)
150+
151-
term.write(" ")
151+
	term.setCursorPos(4,2)
152-
term.setBackgroundColor(colors.black)
152+
	term.setBackgroundColor(colors.brown)
153-
-- Ausschalten
153+
154-
term.setCursorPos(5,3)
154+
155-
term.setBackgroundColor(colors.red)
155+
	term.setCursorPos(5,2)
156-
term.write(" ")
156+
	term.setBackgroundColor(colors.brown)
157-
term.setBackgroundColor(colors.black)
157+
158-
term.setCursorPos(5,4)
158+
159-
term.setBackgroundColor(colors.red)
159+
	term.setCursorPos(6,2)
160-
term.write(" ")
160+
	term.setBackgroundColor(colors.brown)
161-
term.setBackgroundColor(colors.black)
161+
162-
term.setCursorPos(5,5)
162+
163-
term.setBackgroundColor(colors.red)
163+
	-- Reihe 2
164-
term.write(" ")
164+
	term.setCursorPos(2,3)
165-
term.setBackgroundColor(colors.black)
165+
	term.setBackgroundColor(colors.brown)
166-
term.setCursorPos(6,3)
166+
167-
term.setBackgroundColor(colors.red)
167+
168-
term.write(" ")
168+
	term.setCursorPos(3,3)
169-
term.setBackgroundColor(colors.black)
169+
	term.setBackgroundColor(colors.brown)
170-
term.setCursorPos(6,4)
170+
171-
term.setBackgroundColor(colors.red)
171+
172-
term.write(" ")
172+
	term.setCursorPos(4,3)
173-
term.setBackgroundColor(colors.black)
173+
	term.setBackgroundColor(colors.brown)
174-
term.setCursorPos(6,5)
174+
175-
term.setBackgroundColor(colors.red)
175+
176-
term.write(" ")
176+
	term.setCursorPos(5,3)
177-
term.setBackgroundColor(colors.black)
177+
	term.setBackgroundColor(colors.brown)
178
	term.write(" ")
179
	term.setBackgroundColor(colors.black)
180
	term.setCursorPos(6,3)
181
	term.setBackgroundColor(colors.brown)
182
	term.write(" ")
183
	term.setBackgroundColor(colors.black)
184
	-- Reihe 3
185
	term.setCursorPos(2,4)
186
	term.setBackgroundColor(colors.brown)
187
	term.write(" ")
188
	term.setBackgroundColor(colors.black)
189
	term.setCursorPos(3,4)
190
	term.setBackgroundColor(colors.brown)
191
	term.write(" ")
192
	term.setBackgroundColor(colors.black)
193
	term.setCursorPos(4,4)
194
	term.setBackgroundColor(colors.brown)
195
	term.write(" ")
196
	term.setBackgroundColor(colors.black)
197
	term.setCursorPos(5,4)
198
	term.setBackgroundColor(colors.brown)
199-
		   x == 3 and y == 4 then
199+
200-
		   redstone.setOutput(redout, true)
200+
201-
--		   redstone.setOutput(redout2, false)
201+
	term.setCursorPos(6,4)
202-
		   AnzeigeEin()
202+
	term.setBackgroundColor(colors.brown)
203
	term.write(" ")
204
	term.setBackgroundColor(colors.black)
205-
		if x == 5 and y == 2 or 
205+
206
207
function Knoepfon()
208
	-- Reihe 1
209
	term.setCursorPos(2,2)
210
	term.setBackgroundColor(colors.lightGray)
211-
		   redstone.setOutput(redout, false)
211+
212-
--		   redstone.setOutput(redout2, true)
212+
213-
		   AnzeigeAus()
213+
	term.setCursorPos(3,2)
214
	term.setBackgroundColor(colors.lightGray)
215
	term.write(" ")
216
	term.setBackgroundColor(colors.black)
217
	term.setCursorPos(4,2)
218-
redstone.setOutput(redout, false)
218+
	term.setBackgroundColor(colors.lightGray)
219
	term.write(" ")
220
	term.setBackgroundColor(colors.black)
221
	term.setCursorPos(5,2)
222
	term.setBackgroundColor(colors.lightGray)
223
	term.write(" ")
224
	term.setBackgroundColor(colors.black)
225
	term.setCursorPos(6,2)
226
	term.setBackgroundColor(colors.lightGray)
227
	term.write(" ")
228
	term.setBackgroundColor(colors.black)
229
	-- Reihe 2
230
	term.setCursorPos(2,3)
231
	term.setBackgroundColor(colors.lightGray)
232
	term.write(" ")
233
	term.setBackgroundColor(colors.black)
234
	term.setCursorPos(3,3)
235
	term.setBackgroundColor(colors.lightGray)
236
	term.write(" ")
237
	term.setBackgroundColor(colors.black)
238
	term.setCursorPos(4,3)
239
	term.setBackgroundColor(colors.lightGray)
240
	term.write(" ")
241
	term.setBackgroundColor(colors.black)
242
	term.setCursorPos(5,3)
243
	term.setBackgroundColor(colors.lightGray)
244
	term.write(" ")
245
	term.setBackgroundColor(colors.black)
246
	term.setCursorPos(6,3)
247
	term.setBackgroundColor(colors.lightGray)
248
	term.write(" ")
249
	term.setBackgroundColor(colors.black)
250
	-- Reihe 3
251
	term.setCursorPos(2,4)
252
	term.setBackgroundColor(colors.lightGray)
253
	term.write(" ")
254
	term.setBackgroundColor(colors.black)
255
	term.setCursorPos(3,4)
256
	term.setBackgroundColor(colors.lightGray)
257
	term.write(" ")
258
	term.setBackgroundColor(colors.black)
259
	term.setCursorPos(4,4)
260
	term.setBackgroundColor(colors.lightGray)
261
	term.write(" ")
262
	term.setBackgroundColor(colors.black)
263
	term.setCursorPos(5,4)
264
	term.setBackgroundColor(colors.lightGray)
265
	term.write(" ")
266
	term.setBackgroundColor(colors.black)
267
	term.setCursorPos(6,4)
268
	term.setBackgroundColor(colors.lightGray)
269
	term.write(" ")
270
	term.setBackgroundColor(colors.black)
271
end
272
273
function Eingabe()
274
	event,side,x,y = os.pullEvent()
275
	if event == "terminate" then
276
		write("Admin Passwort:")
277
		admin = read("*")
278
		if admin == adminpass then
279
			os.pullEvent = pullEvent
280
			write("Richtig! Mache jetzt nochmal STRG + T für 4 sec")
281
			sleep(5)
282
		end
283
	end
284
285
	if event == "monitor_touch" then
286
287
		if x == 2 and y == 2 or 
288
		   x == 3 and y == 2 or
289
		   x == 4 and y == 2 or
290
		   x == 5 and y == 2 or
291
		   x == 6 and y == 2 or
292
		   x == 2 and y == 3 or
293
		   x == 3 and y == 3 or
294
		   x == 4 and y == 3 or
295
		   x == 5 and y == 3 or
296
		   x == 6 and y == 3 or
297
		   x == 2 and y == 4 or
298
		   x == 3 and y == 4 or
299
		   x == 4 and y == 4 or
300
		   x == 5 and y == 4 or
301
		   x == 6 and y == 4 then
302
		   Knoepfon()
303
		   rednet.send(6,"Up",true)
304
		   sleep(5)
305
		   Knoepf()
306
		end
307
	
308
		
309
	end
310
end
311
312
Rahmen()
313
Knoepf()
314
while true do
315
Eingabe()
316
end