SHOW:
|
|
- or go back to the newest paste.
1 | print ("Dobro pozhalovat") | |
2 | print (" 1 - slit' vodu ") | |
3 | print ("2 - napolnit' vodoy ") | |
4 | ||
5 | text = read() | |
6 | if text == '1' then | |
7 | rs .setOutput("back",true) | |
8 | sleep(1) | |
9 | rs .setOutput("back",false) | |
10 | end | |
11 | text = read() | |
12 | if text == '2' then | |
13 | rs .setOutput("back",true) | |
14 | sleep(1) | |
15 | rs .setOutput("back",false) | |
16 | end | |
17 | function NAME() | |
18 | rednet.open('bottom') | |
19 | rednet.broadcast('check_water') | |
20 | id, result = rednet.receive() | |
21 | rednet.close() | |
22 | return result | |
23 | end | |
24 | if checkWater() then | |
25 | print('Water is running') | |
26 | else | |
27 | print('No water') | |
28 | end | |
29 |