123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393 |
- # budilnik
- <<<<<<< 316_budilnik
- if $ARGS[0] = 'start':
- =======
- if $ARGS[0]='start':
- >>>>>>> 316_budilnik
- cla
- clr
- <<<<<<< 316_budilnik
- gs 'stat'
- '<center><img src="images\etogame\bed2.jpg"></center>'
- =======
- gs'stat'
- '<center><img src="pic/bed2.jpg" ></center>'
- >>>>>>> 316_budilnik
- *nl
- *nl
- <<<<<<< 316_budilnik
- if numbud = 4: '<center><B><<bud1>><<bud2>>: <<bud3>><<bud4>></B></center>'
- if numbud = 3: '<center><B><<bud1>><<bud2>>: <<bud3>></B><<bud4>></center>'
- if numbud = 2: '<center><B><<bud1>><<bud2>></B>: <<bud3>><<bud4>></center>'
- if numbud = 1: '<center><B><<bud1>></B><<bud2>>: <<bud3>><<bud4>></center>'
- if numbud = 0: '<center><<bud1>><<bud2>> <<bud3>><<bud4>></center>'
- *nl
- '<center><B><a href="exec:GT ''budilnik'',''1''">1</a> <a href="exec:GT ''budilnik'',''2''">2</a> <a href="exec:GT ''budilnik'',''3''">3</a></B></center>'
- '<center><B><a href="exec:GT ''budilnik'',''4''">4</a> <a href="exec:GT ''budilnik'',''5''">5</a> <a href="exec:GT ''budilnik'',''6''">6</a></B></center>'
- '<center><B><a href="exec:GT ''budilnik'',''7''">7</a> <a href="exec:GT ''budilnik'',''8''">8</a> <a href="exec:GT ''budilnik'',''9''">9</a></B></center>'
- '<center><B><a href="exec:GT ''budilnik'',''0''">0</a></B></center>'
- '<center><B><a href="exec:GT ''budilnik'',''Reset''">Reset</a> <a href="exec:GT ''budilnik'',''Time''">Set the time</a></B></center>'
- act 'Put Service':
- cla
- set bud1 = 0
- set bud2 = 0
- set bud3 = 0
- set bud4 = 0
- set numbud = 0
- gt 'budilnik','fin'
- end
- =======
- if numbud = 4:'<center><B><<bud1>><<bud2>> : <<bud3>><<bud4>></B></center>'
- if numbud = 3:'<center><B><<bud1>><<bud2>> : <<bud3>></B><<bud4>></center>'
- if numbud = 2:'<center><B><<bud1>><<bud2>></B> : <<bud3>><<bud4>></center>'
- if numbud = 1:'<center><B><<bud1>></B><<bud2>> : <<bud3>><<bud4>></center>'
- if numbud = 0:'<center><<bud1>><<bud2>> : <<bud3>><<bud4>></center>'
- *nl
- '<center><B><a href="exec:GT ''budilnik'',''1''">1</a> <a href="exec:GT ''budilnik'',''2''">2</a> <a href="exec:GT ''budilnik'',''3''">3</a></B></center>'
- '<center><B><a href="exec:GT ''budilnik'',''4''">4</a> <a href="exec:GT ''budilnik'',''5''">5</a> <a href="exec:GT ''budilnik'',''6''">6</a></B></center>'
- '<center><B><a href="exec:GT ''budilnik'',''7''">7</a> <a href="exec:GT ''budilnik'',''8''">8</a> <a href="exec:GT ''budilnik'',''9''">9</a></B></center>'
- '<center><B><a href="exec:GT ''budilnik'',''0''">0</a></B></center>'
- '<center><B><a href="exec:GT ''budilnik'',''reset''">reset</a> <a href="exec:GT ''budilnik'',''time''">Set time</a></B></center>'
- act 'put Service':
- cla
- set bud1 = 0
- set bud2 = 0
- set bud3 = 0
- set bud4 = 0
- set numbud = 0
- gt'budilnik','fin'
- end
- >>>>>>> 316_budilnik
- end
- <<<<<<< 316_budilnik
- if $ARGS[0] = 'Time':
- =======
- if $ARGS[0]='time':
- >>>>>>> 316_budilnik
- cla
- if bud1 > 0:
- <<<<<<< 316_budilnik
- set timer = bud1 * 10
- set timer += bud2
- =======
- set timer = bud1*10
- set timer = timer + bud2
- >>>>>>> 316_budilnik
- end
- if bud2 > 0 and bud1 = 0:
- set timer = bud2
- end
- <<<<<<< 316_budilnik
- if bud1 = 0 and bud2 = 0:
- set timer = 0
- end
- if bud3 > 0:
- set timerM = bud3 * 10
- set timerM += bud4
- =======
- if bud3 > 0:
- set timerM = bud3*10
- set timerM = timerM + bud4
- >>>>>>> 316_budilnik
- end
- if bud4 > 0 and bud3 = 0:
- set timerM = bud4
- end
- <<<<<<< 316_budilnik
- if bud3 = 0 and bud4 = 0:
- set timerM = 0
- end
- if timer > 23: set timer = 0
- if timerM > 60: set timerM = 0
- 'Clock wound <<timer>> hours <<timerM>> minutes.'
- act 'Service put in place':
- cla
- gt 'budilnik','fin'
- end
- =======
- if timer > 23:set timer = 0
- if timerM > 60:set timerM = 0
- 'Service on the wound <<timer>> hours, <<timerM>> minutes.'
- act 'Service put in place':
- cla
- gt'budilnik','fin'
- end
- >>>>>>> 316_budilnik
- end
- <<<<<<< 316_budilnik
- if $ARGS[0] = '1':
- cla
- if numbud = 4:
- end
- if numbud = 3: set bud4 = 1 & set numbud = 4
- if numbud = 2: set bud3 = 1 & set numbud = 3
- if numbud = 1: set bud2 = 1 & set numbud = 2
- if numbud = 0: set bud1 = 1 & set numbud = 1
- gt 'budilnik','start'
- =======
- if $ARGS[0]='1':
- cla
- if numbud = 4:
- end
- if numbud = 3:set bud4 = 1&set numbud = 4
- if numbud = 2:set bud3 = 1&set numbud = 3
- if numbud = 1:set bud2 = 1&set numbud = 2
- if numbud = 0:set bud1 = 1&set numbud = 1
- gt'budilnik','start'
- >>>>>>> 316_budilnik
- end
- <<<<<<< 316_budilnik
- if $ARGS[0] = '2':
- cla
- if numbud = 4:
- end
- if numbud = 3: set bud4 = 2 & set numbud = 4
- if numbud = 2: set bud3 = 2 & set numbud = 3
- if numbud = 1: set bud2 = 2 & set numbud = 2
- if numbud = 0: set bud1 = 2 & set numbud = 1
- gt 'budilnik','start'
- =======
- if $ARGS[0]='2':
- cla
- if numbud = 4:
- end
- if numbud = 3:set bud4 = 2&set numbud = 4
- if numbud = 2:set bud3 = 2&set numbud = 3
- if numbud = 1:set bud2 = 2&set numbud = 2
- if numbud = 0:set bud1 = 2&set numbud = 1
- gt'budilnik','start'
- >>>>>>> 316_budilnik
- end
- <<<<<<< 316_budilnik
- if $ARGS[0] = '3':
- cla
- if numbud = 4:
- end
- if numbud = 3: set bud4 = 3 & set numbud = 4
- if numbud = 2: set bud3 = 3 & set numbud = 3
- if numbud = 1: set bud2 = 3 & set numbud = 2
- if numbud = 0: set bud1 = 3 & set numbud = 1
- gt 'budilnik','start'
- =======
- if $ARGS[0]='3':
- cla
- if numbud = 4:
- end
- if numbud = 3:set bud4 = 3&set numbud = 4
- if numbud = 2:set bud3 = 3&set numbud = 3
- if numbud = 1:set bud2 = 3&set numbud = 2
- if numbud = 0:set bud1 = 3&set numbud = 1
- gt'budilnik','start'
- >>>>>>> 316_budilnik
- end
- <<<<<<< 316_budilnik
- if $ARGS[0] = '4':
- cla
- if numbud = 4:
- end
- if numbud = 3: set bud4 = 4 & set numbud = 4
- if numbud = 2: set bud3 = 4 & set numbud = 3
- if numbud = 1: set bud2 = 4 & set numbud = 2
- if numbud = 0: set bud1 = 4 & set numbud = 1
- gt 'budilnik','start'
- =======
- if $ARGS[0]='4':
- cla
- if numbud = 4:
- end
- if numbud = 3:set bud4 = 4&set numbud = 4
- if numbud = 2:set bud3 = 4&set numbud = 3
- if numbud = 1:set bud2 = 4&set numbud = 2
- if numbud = 0:set bud1 = 4&set numbud = 1
- gt'budilnik','start'
- >>>>>>> 316_budilnik
- end
- <<<<<<< 316_budilnik
- if $ARGS[0] = '5':
- cla
- if numbud = 4:
- end
- if numbud = 3: set bud4 = 5 & set numbud = 4
- if numbud = 2: set bud3 = 5 & set numbud = 3
- if numbud = 1: set bud2 = 5 & set numbud = 2
- if numbud = 0: set bud1 = 5 & set numbud = 1
- gt 'budilnik','start'
- =======
- if $ARGS[0]='5':
- cla
- if numbud = 4:
- end
- if numbud = 3:set bud4 = 5&set numbud = 4
- if numbud = 2:set bud3 = 5&set numbud = 3
- if numbud = 1:set bud2 = 5&set numbud = 2
- if numbud = 0:set bud1 = 5&set numbud = 1
- gt'budilnik','start'
- >>>>>>> 316_budilnik
- end
- <<<<<<< 316_budilnik
- if $ARGS[0] = '6':
- cla
- if numbud = 4:
- end
- if numbud = 3: set bud4 = 6 & set numbud = 4
- if numbud = 2: set bud3 = 6 & set numbud = 3
- if numbud = 1: set bud2 = 6 & set numbud = 2
- if numbud = 0: set bud1 = 6 & set numbud = 1
- gt 'budilnik','start'
- =======
- if $ARGS[0]='6':
- cla
- if numbud = 4:
- end
- if numbud = 3:set bud4 = 6&set numbud = 4
- if numbud = 2:set bud3 = 6&set numbud = 3
- if numbud = 1:set bud2 = 6&set numbud = 2
- if numbud = 0:set bud1 = 6&set numbud = 1
- gt'budilnik','start'
- >>>>>>> 316_budilnik
- end
- <<<<<<< 316_budilnik
- if $ARGS[0] = '7':
- cla
- if numbud = 4:
- end
- if numbud = 3: set bud4 = 7 & set numbud = 4
- if numbud = 2: set bud3 = 7 & set numbud = 3
- if numbud = 1: set bud2 = 7 & set numbud = 2
- if numbud = 0: set bud1 = 7 & set numbud = 1
- gt 'budilnik','start'
- =======
- if $ARGS[0]='7':
- cla
- if numbud = 4:
- end
- if numbud = 3:set bud4 = 7&set numbud = 4
- if numbud = 2:set bud3 = 7&set numbud = 3
- if numbud = 1:set bud2 = 7&set numbud = 2
- if numbud = 0:set bud1 = 7&set numbud = 1
- gt'budilnik','start'
- >>>>>>> 316_budilnik
- end
- <<<<<<< 316_budilnik
- if $ARGS[0] = '8':
- cla
- if numbud = 4:
- end
- if numbud = 3: set bud4 = 8 & set numbud = 4
- if numbud = 2: set bud3 = 8 & set numbud = 3
- if numbud = 1: set bud2 = 8 & set numbud = 2
- if numbud = 0: set bud1 = 8 & set numbud = 1
- gt 'budilnik','start'
- =======
- if $ARGS[0]='8':
- cla
- if numbud = 4:
- end
- if numbud = 3:set bud4 = 8&set numbud = 4
- if numbud = 2:set bud3 = 8&set numbud = 3
- if numbud = 1:set bud2 = 8&set numbud = 2
- if numbud = 0:set bud1 = 8&set numbud = 1
- gt'budilnik','start'
- >>>>>>> 316_budilnik
- end
- <<<<<<< 316_budilnik
- if $ARGS[0] = '9':
- cla
- if numbud = 4:
- end
- if numbud = 3: set bud4 = 9 & set numbud = 4
- if numbud = 2: set bud3 = 9 & set numbud = 3
- if numbud = 1: set bud2 = 9 & set numbud = 2
- if numbud = 0: set bud1 = 9 & set numbud = 1
- gt 'budilnik','start'
- =======
- if $ARGS[0]='9':
- cla
- if numbud = 4:
- end
- if numbud = 3:set bud4 = 9&set numbud = 4
- if numbud = 2:set bud3 = 9&set numbud = 3
- if numbud = 1:set bud2 = 9&set numbud = 2
- if numbud = 0:set bud1 = 9&set numbud = 1
- gt'budilnik','start'
- >>>>>>> 316_budilnik
- end
- <<<<<<< 316_budilnik
- if $ARGS[0] = '0':
- cla
- if numbud = 4:
- end
- if numbud = 3: set bud4 = 0 & set numbud = 4
- if numbud = 2: set bud3 = 0 & set numbud = 3
- if numbud = 1: set bud2 = 0 & set numbud = 2
- if numbud = 0: set bud1 = 0 & set numbud = 1
- gt 'budilnik','start'
- =======
- if $ARGS[0]='0':
- cla
- if numbud = 4:
- end
- if numbud = 3:set bud4 = 0&set numbud = 4
- if numbud = 2:set bud3 = 0&set numbud = 3
- if numbud = 1:set bud2 = 0&set numbud = 2
- if numbud = 0:set bud1 = 0&set numbud = 1
- gt'budilnik','start'
- >>>>>>> 316_budilnik
- end
- <<<<<<< 316_budilnik
- if $ARGS[0] = 'Reset':
- =======
- if $ARGS[0]='reset':
- >>>>>>> 316_budilnik
- cla
- set bud1 = 0
- set bud2 = 0
- set bud3 = 0
- set bud4 = 0
- set numbud = 0
- <<<<<<< 316_budilnik
- gt 'budilnik','start'
- =======
- gt'budilnik','start'
- >>>>>>> 316_budilnik
- end
- <<<<<<< 316_budilnik
- if $ARGS[0] = 'fin':
- =======
- if $ARGS[0]='fin':
- >>>>>>> 316_budilnik
- cla
- gt $locM, $metkaM
- <<<<<<< 316_budilnik
- !'if housr = 1 and housrA = 1:
- set housrA = 0
- gt 'bedr'
- end'
- =======
- !'if housr = 1 and housrA = 1:
- set housrA = 0
- gt'bedr'
- end'
- >>>>>>> 316_budilnik
- end
- --- budilnik ---------------------------------
|