saunabed 1016 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # saunabed
  2. $metka = $ARGS[0]
  3. $loc = $CURLOC
  4. gs 'stat'
  5. '<center><b>bed</b></center>'
  6. '<center><img src="images/pics/son.jpg"></center>'
  7. if son < 10:
  8. if budon = 1:
  9. act 'Sleep until the alarm at <<alarm1>> hours <<alarm2>> minutes':
  10. cls
  11. inSleep = 1
  12. :markson
  13. needminut = 60 - minut
  14. sec += needminut * 60
  15. son += 3
  16. gs 'stat'
  17. if son >= 23 or alarm1 = hour and alarm2 = minut:
  18. inSleep = 2
  19. gt $locBroom, $metkaBroom
  20. else
  21. jump 'markson'
  22. end
  23. end
  24. end
  25. act 'Sleep as you want':
  26. cls
  27. inSleep = 1
  28. :markson
  29. needminut = 60 - minut
  30. sec += needminut * 60
  31. son += 3
  32. gs 'stat'
  33. if son < 23:jump 'markson'
  34. inSleep = 2
  35. gt $locBroom, $metkaBroom
  36. end
  37. end
  38. if budon = 1:
  39. 'Clock wound <<alarm1>> hours <<alarm2>> minutes'
  40. act 'Disable the alarm':budon = 0 & gt $curloc
  41. else
  42. act 'Enable Service':budon = 1 & gt $curloc
  43. end
  44. act 'Set the alarm time':gt 'saunabud'
  45. act 'Get out of bed':sec += 5 & gt $locBroom, $metkaBroom
  46. --- saunabed ---------------------------------