View difference between Paste ID: Yq1kaRza and YN08T8VR
SHOW: | | - or go back to the newest paste.
1
rednet.open("top")
2
sleep(1)
3
while true do
4
term.clear()
5
local w, h = term.getSize()
6
h1=h/2
7
w1=w-14
8
w2=w1/2
9
w3=(w-26)/2
10
w4=(w-22)/2
11-
print("Notstrom Client")
11+
12
print("Engine Client")
13-
write("Zum einschalten 1 Druecken ")
13+
14
print("Zum Einschalten 1 Druecken ")
15
print("Zum Ausschalten 2 Druecken ")
16-
 rednet.send(151,"on")
16+
17-
 term.clear()
17+
18-
 term.setCursorPos(w4,h1)
18+
 rednet.send(1738,"on")
19-
 print("Notstrom Eingeschaltet")
19+
	 y,x,z = rednet.receive()
20-
 y,x,z = rednet.receive()
20+
	 if x == "ok" then
21-
 if x == "end" then
21+
		 term.clear()
22-
  os.reboot()
22+
		 term.setCursorPos(w4,h1)
23-
 end
23+
		 print("Engine Eingeschaltet")
24
	 end
25-
 rednet.send(151,"reboot")
25+
elseif auswahl =="2" then
26
 rednet.send(1738,"off")
27
	 y,x,z = rednet.receive()
28
	 if x == "ok" then
29
		 term.clear()
30
		 term.setCursorPos(w4,h1)
31
		 print("Engine Ausgeschaltet")
32
	 end
33
elseif auswahl =="reboot" then
34
 rednet.send(1738,"reboot")
35
 return
36
else
37
 return
38
end
39
end