kid 986 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # kid
  2. if $ARGS[0] = 'start':
  3. clr
  4. gs 'stat'
  5. if kid > 0:
  6. i = 0
  7. !kidLoops = 0
  8. :loop
  9. if polkid[i] = 0:
  10. $kidPosPro[i] = 'her'
  11. else
  12. $kidPosPro[i] = 'his'
  13. end
  14. "Your child, a <<$polreb[i]>> named <<$kidname[i]>>. The child''s date of birth is <<daykid[i]>>-<<monthkid[i]>>-<<yearkid[i]>>. The child''s age is <<yearkid[i]>>"
  15. if yearkid[i] < 1: '<<$kidname[i]>> is a baby lying in <<$kidPosPro[i]>> crib.'
  16. if yearkid[i] >= 1 and yearkid[i] < 7:
  17. if hour >= 9 and hour <= 21:
  18. '<<$kidname[i]>> is playing with toys.'
  19. else
  20. '<<$kidname[i]>> is asleep in <<$kidPosPro[i]>> crib.'
  21. end
  22. end
  23. if yearkid[i] >= 7 and yearkid[i] < 18:
  24. if hour >= 21 or hour <= 8:
  25. '<<$kidname[i]>> is asleep in <<$kidPosPro[i]>> bed.'
  26. else
  27. '<<$kidname[i]>> watching TV.'
  28. end
  29. end
  30. ''
  31. i += 1
  32. !!kidLoops += 1
  33. if i <= ARRPOS('yearkid',0):
  34. jump 'loop'
  35. end
  36. end
  37. act 'Leave.':
  38. cla
  39. gt 'sitr'
  40. end
  41. end
  42. --- kid ---------------------------------