# saunabed
$metka = $ARGS[0]
$loc = $CURLOC
gs 'stat'
'<center><b>bed</b></center>'
'<center><img src="images\pics\son.jpg"></center>'
if son < 10:
	if budon = 1:
		act 'Sleep before the alarm in <<alarm1>> hours <<alarm2>> minutes':
		cls
		inSleep = 1
		:markson
		needminut = 60 - minut
		sec += needminut * 60
		son += 3
		gs 'stat'
		if son >= 23 or alarm1 = hour and alarm2 = minut:
		inSleep = 2
		gt $locBroom, $metkaBroom
		else
		jump 'markson'
		end
		end
	end

	act 'Sleep as you want':
	cls
	inSleep = 1
	:markson
	needminut = 60 - minut
	sec += needminut * 60
	son += 3
	gs 'stat'
	if son < 23: jump 'markson'
	inSleep = 2
	gt $locBroom, $metkaBroom
	end
end

if budon = 1:
'Clock wound <<alarm1>> hours <<alarm2>> minutes'
	act 'Disable the alarm': budon = 0 & gt $curloc
else
	act 'Enable Service': budon = 1 & gt $curloc
end

act 'Set the alarm time': gt 'saunabud'

act 'Get out of bed': sec += 5 & gt $locBroom, $metkaBroom
--- saunabed ---------------------------------

