316_budilnik 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. # budilnik
  2. <<<<<<< 316_budilnik
  3. if $ARGS[0] = 'start':
  4. =======
  5. if $ARGS[0]='start':
  6. >>>>>>> 316_budilnik
  7. cla
  8. clr
  9. <<<<<<< 316_budilnik
  10. gs 'stat'
  11. '<center><img src="images\etogame\bed2.jpg"></center>'
  12. =======
  13. gs'stat'
  14. '<center><img src="pic/bed2.jpg" ></center>'
  15. >>>>>>> 316_budilnik
  16. *nl
  17. *nl
  18. <<<<<<< 316_budilnik
  19. if numbud = 4: '<center><B><<bud1>><<bud2>>: <<bud3>><<bud4>></B></center>'
  20. if numbud = 3: '<center><B><<bud1>><<bud2>>: <<bud3>></B><<bud4>></center>'
  21. if numbud = 2: '<center><B><<bud1>><<bud2>></B>: <<bud3>><<bud4>></center>'
  22. if numbud = 1: '<center><B><<bud1>></B><<bud2>>: <<bud3>><<bud4>></center>'
  23. if numbud = 0: '<center><<bud1>><<bud2>> <<bud3>><<bud4>></center>'
  24. *nl
  25. '<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>'
  26. '<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>'
  27. '<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>'
  28. '<center><B><a href="exec:GT ''budilnik'',''0''">0</a></B></center>'
  29. '<center><B><a href="exec:GT ''budilnik'',''Reset''">Reset</a> <a href="exec:GT ''budilnik'',''Time''">Set the time</a></B></center>'
  30. act 'Put Service':
  31. cla
  32. set bud1 = 0
  33. set bud2 = 0
  34. set bud3 = 0
  35. set bud4 = 0
  36. set numbud = 0
  37. gt 'budilnik','fin'
  38. end
  39. =======
  40. if numbud = 4:'<center><B><<bud1>><<bud2>> : <<bud3>><<bud4>></B></center>'
  41. if numbud = 3:'<center><B><<bud1>><<bud2>> : <<bud3>></B><<bud4>></center>'
  42. if numbud = 2:'<center><B><<bud1>><<bud2>></B> : <<bud3>><<bud4>></center>'
  43. if numbud = 1:'<center><B><<bud1>></B><<bud2>> : <<bud3>><<bud4>></center>'
  44. if numbud = 0:'<center><<bud1>><<bud2>> : <<bud3>><<bud4>></center>'
  45. *nl
  46. '<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>'
  47. '<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>'
  48. '<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>'
  49. '<center><B><a href="exec:GT ''budilnik'',''0''">0</a></B></center>'
  50. '<center><B><a href="exec:GT ''budilnik'',''reset''">reset</a> <a href="exec:GT ''budilnik'',''time''">Set time</a></B></center>'
  51. act 'put Service':
  52. cla
  53. set bud1 = 0
  54. set bud2 = 0
  55. set bud3 = 0
  56. set bud4 = 0
  57. set numbud = 0
  58. gt'budilnik','fin'
  59. end
  60. >>>>>>> 316_budilnik
  61. end
  62. <<<<<<< 316_budilnik
  63. if $ARGS[0] = 'Time':
  64. =======
  65. if $ARGS[0]='time':
  66. >>>>>>> 316_budilnik
  67. cla
  68. if bud1 > 0:
  69. <<<<<<< 316_budilnik
  70. set timer = bud1 * 10
  71. set timer += bud2
  72. =======
  73. set timer = bud1*10
  74. set timer = timer + bud2
  75. >>>>>>> 316_budilnik
  76. end
  77. if bud2 > 0 and bud1 = 0:
  78. set timer = bud2
  79. end
  80. <<<<<<< 316_budilnik
  81. if bud1 = 0 and bud2 = 0:
  82. set timer = 0
  83. end
  84. if bud3 > 0:
  85. set timerM = bud3 * 10
  86. set timerM += bud4
  87. =======
  88. if bud3 > 0:
  89. set timerM = bud3*10
  90. set timerM = timerM + bud4
  91. >>>>>>> 316_budilnik
  92. end
  93. if bud4 > 0 and bud3 = 0:
  94. set timerM = bud4
  95. end
  96. <<<<<<< 316_budilnik
  97. if bud3 = 0 and bud4 = 0:
  98. set timerM = 0
  99. end
  100. if timer > 23: set timer = 0
  101. if timerM > 60: set timerM = 0
  102. 'Clock wound <<timer>> hours <<timerM>> minutes.'
  103. act 'Service put in place':
  104. cla
  105. gt 'budilnik','fin'
  106. end
  107. =======
  108. if timer > 23:set timer = 0
  109. if timerM > 60:set timerM = 0
  110. 'Service on the wound <<timer>> hours, <<timerM>> minutes.'
  111. act 'Service put in place':
  112. cla
  113. gt'budilnik','fin'
  114. end
  115. >>>>>>> 316_budilnik
  116. end
  117. <<<<<<< 316_budilnik
  118. if $ARGS[0] = '1':
  119. cla
  120. if numbud = 4:
  121. end
  122. if numbud = 3: set bud4 = 1 & set numbud = 4
  123. if numbud = 2: set bud3 = 1 & set numbud = 3
  124. if numbud = 1: set bud2 = 1 & set numbud = 2
  125. if numbud = 0: set bud1 = 1 & set numbud = 1
  126. gt 'budilnik','start'
  127. =======
  128. if $ARGS[0]='1':
  129. cla
  130. if numbud = 4:
  131. end
  132. if numbud = 3:set bud4 = 1&set numbud = 4
  133. if numbud = 2:set bud3 = 1&set numbud = 3
  134. if numbud = 1:set bud2 = 1&set numbud = 2
  135. if numbud = 0:set bud1 = 1&set numbud = 1
  136. gt'budilnik','start'
  137. >>>>>>> 316_budilnik
  138. end
  139. <<<<<<< 316_budilnik
  140. if $ARGS[0] = '2':
  141. cla
  142. if numbud = 4:
  143. end
  144. if numbud = 3: set bud4 = 2 & set numbud = 4
  145. if numbud = 2: set bud3 = 2 & set numbud = 3
  146. if numbud = 1: set bud2 = 2 & set numbud = 2
  147. if numbud = 0: set bud1 = 2 & set numbud = 1
  148. gt 'budilnik','start'
  149. =======
  150. if $ARGS[0]='2':
  151. cla
  152. if numbud = 4:
  153. end
  154. if numbud = 3:set bud4 = 2&set numbud = 4
  155. if numbud = 2:set bud3 = 2&set numbud = 3
  156. if numbud = 1:set bud2 = 2&set numbud = 2
  157. if numbud = 0:set bud1 = 2&set numbud = 1
  158. gt'budilnik','start'
  159. >>>>>>> 316_budilnik
  160. end
  161. <<<<<<< 316_budilnik
  162. if $ARGS[0] = '3':
  163. cla
  164. if numbud = 4:
  165. end
  166. if numbud = 3: set bud4 = 3 & set numbud = 4
  167. if numbud = 2: set bud3 = 3 & set numbud = 3
  168. if numbud = 1: set bud2 = 3 & set numbud = 2
  169. if numbud = 0: set bud1 = 3 & set numbud = 1
  170. gt 'budilnik','start'
  171. =======
  172. if $ARGS[0]='3':
  173. cla
  174. if numbud = 4:
  175. end
  176. if numbud = 3:set bud4 = 3&set numbud = 4
  177. if numbud = 2:set bud3 = 3&set numbud = 3
  178. if numbud = 1:set bud2 = 3&set numbud = 2
  179. if numbud = 0:set bud1 = 3&set numbud = 1
  180. gt'budilnik','start'
  181. >>>>>>> 316_budilnik
  182. end
  183. <<<<<<< 316_budilnik
  184. if $ARGS[0] = '4':
  185. cla
  186. if numbud = 4:
  187. end
  188. if numbud = 3: set bud4 = 4 & set numbud = 4
  189. if numbud = 2: set bud3 = 4 & set numbud = 3
  190. if numbud = 1: set bud2 = 4 & set numbud = 2
  191. if numbud = 0: set bud1 = 4 & set numbud = 1
  192. gt 'budilnik','start'
  193. =======
  194. if $ARGS[0]='4':
  195. cla
  196. if numbud = 4:
  197. end
  198. if numbud = 3:set bud4 = 4&set numbud = 4
  199. if numbud = 2:set bud3 = 4&set numbud = 3
  200. if numbud = 1:set bud2 = 4&set numbud = 2
  201. if numbud = 0:set bud1 = 4&set numbud = 1
  202. gt'budilnik','start'
  203. >>>>>>> 316_budilnik
  204. end
  205. <<<<<<< 316_budilnik
  206. if $ARGS[0] = '5':
  207. cla
  208. if numbud = 4:
  209. end
  210. if numbud = 3: set bud4 = 5 & set numbud = 4
  211. if numbud = 2: set bud3 = 5 & set numbud = 3
  212. if numbud = 1: set bud2 = 5 & set numbud = 2
  213. if numbud = 0: set bud1 = 5 & set numbud = 1
  214. gt 'budilnik','start'
  215. =======
  216. if $ARGS[0]='5':
  217. cla
  218. if numbud = 4:
  219. end
  220. if numbud = 3:set bud4 = 5&set numbud = 4
  221. if numbud = 2:set bud3 = 5&set numbud = 3
  222. if numbud = 1:set bud2 = 5&set numbud = 2
  223. if numbud = 0:set bud1 = 5&set numbud = 1
  224. gt'budilnik','start'
  225. >>>>>>> 316_budilnik
  226. end
  227. <<<<<<< 316_budilnik
  228. if $ARGS[0] = '6':
  229. cla
  230. if numbud = 4:
  231. end
  232. if numbud = 3: set bud4 = 6 & set numbud = 4
  233. if numbud = 2: set bud3 = 6 & set numbud = 3
  234. if numbud = 1: set bud2 = 6 & set numbud = 2
  235. if numbud = 0: set bud1 = 6 & set numbud = 1
  236. gt 'budilnik','start'
  237. =======
  238. if $ARGS[0]='6':
  239. cla
  240. if numbud = 4:
  241. end
  242. if numbud = 3:set bud4 = 6&set numbud = 4
  243. if numbud = 2:set bud3 = 6&set numbud = 3
  244. if numbud = 1:set bud2 = 6&set numbud = 2
  245. if numbud = 0:set bud1 = 6&set numbud = 1
  246. gt'budilnik','start'
  247. >>>>>>> 316_budilnik
  248. end
  249. <<<<<<< 316_budilnik
  250. if $ARGS[0] = '7':
  251. cla
  252. if numbud = 4:
  253. end
  254. if numbud = 3: set bud4 = 7 & set numbud = 4
  255. if numbud = 2: set bud3 = 7 & set numbud = 3
  256. if numbud = 1: set bud2 = 7 & set numbud = 2
  257. if numbud = 0: set bud1 = 7 & set numbud = 1
  258. gt 'budilnik','start'
  259. =======
  260. if $ARGS[0]='7':
  261. cla
  262. if numbud = 4:
  263. end
  264. if numbud = 3:set bud4 = 7&set numbud = 4
  265. if numbud = 2:set bud3 = 7&set numbud = 3
  266. if numbud = 1:set bud2 = 7&set numbud = 2
  267. if numbud = 0:set bud1 = 7&set numbud = 1
  268. gt'budilnik','start'
  269. >>>>>>> 316_budilnik
  270. end
  271. <<<<<<< 316_budilnik
  272. if $ARGS[0] = '8':
  273. cla
  274. if numbud = 4:
  275. end
  276. if numbud = 3: set bud4 = 8 & set numbud = 4
  277. if numbud = 2: set bud3 = 8 & set numbud = 3
  278. if numbud = 1: set bud2 = 8 & set numbud = 2
  279. if numbud = 0: set bud1 = 8 & set numbud = 1
  280. gt 'budilnik','start'
  281. =======
  282. if $ARGS[0]='8':
  283. cla
  284. if numbud = 4:
  285. end
  286. if numbud = 3:set bud4 = 8&set numbud = 4
  287. if numbud = 2:set bud3 = 8&set numbud = 3
  288. if numbud = 1:set bud2 = 8&set numbud = 2
  289. if numbud = 0:set bud1 = 8&set numbud = 1
  290. gt'budilnik','start'
  291. >>>>>>> 316_budilnik
  292. end
  293. <<<<<<< 316_budilnik
  294. if $ARGS[0] = '9':
  295. cla
  296. if numbud = 4:
  297. end
  298. if numbud = 3: set bud4 = 9 & set numbud = 4
  299. if numbud = 2: set bud3 = 9 & set numbud = 3
  300. if numbud = 1: set bud2 = 9 & set numbud = 2
  301. if numbud = 0: set bud1 = 9 & set numbud = 1
  302. gt 'budilnik','start'
  303. =======
  304. if $ARGS[0]='9':
  305. cla
  306. if numbud = 4:
  307. end
  308. if numbud = 3:set bud4 = 9&set numbud = 4
  309. if numbud = 2:set bud3 = 9&set numbud = 3
  310. if numbud = 1:set bud2 = 9&set numbud = 2
  311. if numbud = 0:set bud1 = 9&set numbud = 1
  312. gt'budilnik','start'
  313. >>>>>>> 316_budilnik
  314. end
  315. <<<<<<< 316_budilnik
  316. if $ARGS[0] = '0':
  317. cla
  318. if numbud = 4:
  319. end
  320. if numbud = 3: set bud4 = 0 & set numbud = 4
  321. if numbud = 2: set bud3 = 0 & set numbud = 3
  322. if numbud = 1: set bud2 = 0 & set numbud = 2
  323. if numbud = 0: set bud1 = 0 & set numbud = 1
  324. gt 'budilnik','start'
  325. =======
  326. if $ARGS[0]='0':
  327. cla
  328. if numbud = 4:
  329. end
  330. if numbud = 3:set bud4 = 0&set numbud = 4
  331. if numbud = 2:set bud3 = 0&set numbud = 3
  332. if numbud = 1:set bud2 = 0&set numbud = 2
  333. if numbud = 0:set bud1 = 0&set numbud = 1
  334. gt'budilnik','start'
  335. >>>>>>> 316_budilnik
  336. end
  337. <<<<<<< 316_budilnik
  338. if $ARGS[0] = 'Reset':
  339. =======
  340. if $ARGS[0]='reset':
  341. >>>>>>> 316_budilnik
  342. cla
  343. set bud1 = 0
  344. set bud2 = 0
  345. set bud3 = 0
  346. set bud4 = 0
  347. set numbud = 0
  348. <<<<<<< 316_budilnik
  349. gt 'budilnik','start'
  350. =======
  351. gt'budilnik','start'
  352. >>>>>>> 316_budilnik
  353. end
  354. <<<<<<< 316_budilnik
  355. if $ARGS[0] = 'fin':
  356. =======
  357. if $ARGS[0]='fin':
  358. >>>>>>> 316_budilnik
  359. cla
  360. gt $locM, $metkaM
  361. <<<<<<< 316_budilnik
  362. !'if housr = 1 and housrA = 1:
  363. set housrA = 0
  364. gt 'bedr'
  365. end'
  366. =======
  367. !'if housr = 1 and housrA = 1:
  368. set housrA = 0
  369. gt'bedr'
  370. end'
  371. >>>>>>> 316_budilnik
  372. end
  373. --- budilnik ---------------------------------