123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- # budilnik
- if $ARGS[0] = 'start':
- cla
- clr
- gs 'stat'
- '<center><img src="images/etogame/bed2.jpg"></center>'
- *nl
- *nl
- 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
- end
- if $ARGS[0] = 'Time':
- cla
- if bud1 > 0:
- set timer = bud1 * 10
- set timer += bud2
- end
- if bud2 > 0 and bud1 = 0:set timer = bud2
- if bud3 > 0:
- set timerM = bud3 * 10
- set timerM += bud4
- end
- if bud4 > 0 and bud3 = 0:set timerM = bud4
- 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
- end
- 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'
- end
- 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'
- end
- 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'
- end
- 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'
- end
- 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'
- end
- 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'
- end
- 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'
- end
- 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'
- end
- 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'
- end
- 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'
- end
- if $ARGS[0] = 'Reset':
- cla
- set bud1 = 0
- set bud2 = 0
- set bud3 = 0
- set bud4 = 0
- set numbud = 0
- gt 'budilnik', 'start'
- end
- if $ARGS[0] = 'fin':
- cla
- gt $locM, $metkaM
- !'if housr = 1 and housrA = 1:
- set housrA = 0
- gt 'bedr'
- end'!
- end
- --- budilnik ---------------------------------
|