# subkid
gs 'stat'
rkidloc = rand(0,10)
if kid > 0:
kidI = 0
:loop
kidSelected[kidLoops] = kidI
if kidage[kidI] < 1 and ($locclass = 'bedr' or $locclass = 'singleroom') and ( hour < 12 or hour > 18 ):
'In the crib lies <<$kidname[kidI]>>.'
elseif kidage[kidI] < 1 and ($locclass = 'sitroom' or $locclass = 'singleroom') and ( hour >= 12 and hour <= 18 ):
'On a blanket lies <<$kidname[kidI]>>.'
elseif kidage[kidI] >= 1 and kidage[kidI] < 7 and ($locclass = 'bedr' or $locclass = 'singleroom') and ( hour < 7 or hour > 21):
'Asleep in bed lies <<$kidname[kidI]>>.'
elseif kidage[kidI] >= 1 and kidage[kidI] < 7 and ($locclass = 'sitroom' or $locclass = 'singleroom') and ( hour >= 7 and hour <= 21) and rkidloc < 8:
'<<$kidname[kidI]>> is playing with toys on the floor.'
elseif kidage[kidI] >= 1 and kidage[kidI] < 7 and ($locclass = 'sitroom' or $locclass = 'singleroom') and ( hour >= 7 and hour <= 21) and rkidloc >= 8:
'<<$kidname[kidI]>> is watching TV.'
elseif kidage[kidI] >= 7 and kidage[kidI] < 18 and ($locclass = 'sitroom' or $locclass = 'singleroom') and ( hour >= 7 and hour <= 9):
'<<$kidname[kidI]>> is getting ready for school.'
elseif kidage[kidI] >= 7 and kidage[kidI] < 18 and ($locclass = 'sitroom' or $locclass = 'singleroom' or $locclass = 'bedr') and ( hour >= 9 and hour <= 16):
'<<$kidname[kidI]>> is at school'
elseif kidage[kidI] >= 7 and kidage[kidI] < 18 and ($locclass = 'sitroom' or $locclass = 'singleroom') and ( hour >= 16 and hour <= 18):
'<<$kidname[kidi]>> is working on homework.'
elseif kidage[kidI] >= 7 and kidage[kidI] < 18 and ($locclass = 'sitroom' or $locclass = 'singleroom') and ( hour >= 18 and hour <= 21):
'<<$kidname[kidi]>> is watching TV.'
elseif kidage[kidI] >= 7 and kidage[kidI] < 18 and ($locclass = 'bedr' or $locclass = 'singleroom') and ( hour < 7 or hour > 21):
'Asleep in bed lies <<$kidname[kidI]>>.'
end
kidI += 1
if kidI < kid:jump 'loop'
end
--- subkid ---------------------------------