# telefon
$objmobilaraz = {
	cla
	set telotvet = rand(0, 10)
	'"Yes, I''m listening, " said a voice from the speaker.'

	act 'Invite to movie':
		cla
		'YOU:Come with me to the movies?'

		if telotvet > 3:
			'<<$telsob>>:Well let an hour in the theater.'
			act 'Go':gt 'kinosvid'
		end

		if telotvet <= 3:dynamic $telotkaz
	end

	if month > 5 and temper > 20 and osadki < painweather:
		act 'Invite a walk in the park':
			cla
			'YOU:Let''s go take a walk in the park.'

			if telotvet > 3:
				'<<$telsob>>:Well let an hour in the park.'

				act 'Go':gt 'parksvid'
			end

			if telotvet <= 3:dynamic $telotkaz
		end
	end

	act 'Invite billiards':
		cla
		'YOU:Let''s go to the pool.'

		if telotvet > 3:
			'<<$telsob>>:Well let an hour of billiards.'

			act 'Go':gt 'billsvid'
		end

		if telotvet <= 3:dynamic $telotkaz
	end

	act 'Invite a cafe':
		cla
		'YOU:Let´s go to the cafe.'

		if telotvet > 3:
			'<<$telsob>>:Well let an hour in the cafe.'

			act 'Go':gt 'kafesvid'
		end

		if telotvet <= 3:dynamic $telotkaz
	end

	act 'Invite casino':
		cla
		'YOU:Let''s go to the casino go.'

		if telotvet > 3:
			'<<$telsob>>:Well let an hour at the casino.'

			act 'Go':gt 'kazinosvid'
		end

		if telotvet <= 3:dynamic $telotkaz
	end

	act 'Hangup':gt 'telefon', 'fin'
}

$objmobilarazboy = {
	cla
	set telotvet = rand(0, 10)
	'"Yes, I´m listening, " said a voice from the speaker.'

	act 'Invite to movie':
		cla
		'YOU:Come with me to the movies?'

		if telotvet > 3:
			'<<$telsob>>:Well let an hour in the theater.'

			act 'Go':gt 'svidboy', 'kinosvid'
		end

		if telotvet <= 3:dynamic $telotkaz
	end

	if month > 5 and temper > 20 and osadki < painweather:
		act 'Invite a walk in the park':
			cla
			'YOU:Let´s go take a walk in the park.'

			if telotvet > 3:
				'<<$telsob>>:Well let an hour in the park.'

				act 'Go':gt 'svidboy', 'parksvid'
			end

			if telotvet <= 3:dynamic $telotkazboy
		end
	end

	act 'Invite billiards':
		cla
		'YOU:Let´s go to the pool.'

		if telotvet > 3:
			'<<$telsob>>:Well let an hour of billiards.'

			act 'Go':gt 'svidboy', 'billsvid'
		end

		if telotvet <= 3:dynamic $telotkazboy
	end

	act 'Invite a cafe':
		cla
		'YOU:Let´s go to the cafe.'

		if telotvet > 3:
			'<<$telsob>>:Well let an hour in the cafe.'

			act 'Go':gt 'svidboy', 'kafesvid'
		end

		if telotvet <= 3:dynamic $telotkazboy
	end

	act 'Hangup':gt 'telefon', 'fin'
}

$telotkaz = {
	cla
	set minut += 10
	'<<$telsob>>:Sorry I''m busy, come next time.'

	act 'Hangup':gt 'telefon', 'fin'
}

$telotkazboy = {
	cla
	set minut += 10
	'<<$boyA>>:Sorry, I''m busy right now, come next time.'

	act 'Hangup':gt 'telefon', 'fin'
}

if $ARGS[0] = 'start':
	cla
	clr
	gs 'stat'

	if vladimirday ! day and vladimirQW = 20 and hour = 16:gt 'qwloc2'
	if vladimirday ! day and vladimirQW = 25 and hour = 16 and week = 6:gt 'qwloc3'
	if vladimirday ! day and vladimirQW = 35 and hour = 16 and week = 6:gt 'qwloc4'
	if QWdogreiqTimer = 0 and QWdogReiq = 2 and week = 7 and qwdogiventday ! day and hour >= 12:gt 'qwlocdog'

	if ring = 0:
		if number = 6:'<center><b><<num6>><<num5>>-<<num4>><<num3>>-<<num2>><<num1>></b></center>'
		if number = 5:'<center><b><<num6>><<num5>>-<<num4>><<num3>>-<<num2>></b><<num1>></center>'
		if number = 4:'<center><b><<num6>><<num5>>-<<num4>><<num3>></b>-<<num2>><<num1>></center>'
		if number = 3:'<center><b><<num6>><<num5>>-<<num4>></b><<num3>>-<<num2>><<num1>></center>'
		if number = 2:'<center><b><<num6>><<num5>></b>-<<num4>><<num3>>-<<num2>><<num1>></center>'
		if number = 1:'<center><b><<num6>></b><<num5>>-<<num4>><<num3>>-<<num2>><<num1>></center>'
		if number = 0:'<center><<num6>><<num5>>-<<num4>><<num3>>-<<num2>><<num1>></center>'

		*nl
		'<center><b><a href="exec:gt ''telefon'', ''1''">1</a> <a href="exec:gt ''telefon'', ''2''">2</a> <a href="exec:gt ''telefon'', ''3''">3</a></b></center>'
		'<center><b><a href="exec:gt ''telefon'', ''4''">4</a> <a href="exec:gt ''telefon'', ''5''">5</a> <a href="exec:gt ''telefon'', ''6''">6</a></b></center>'
		'<center><b><a href="exec:gt ''telefon'', ''7''">7</a> <a href="exec:gt ''telefon'', ''8''">8</a> <a href="exec:gt ''telefon'', ''9''">9</a></b></center>'
		'<center><b><a href="exec:gt ''telefon'', ''Reset''">Clear</a> <a href="exec:gt ''telefon'', ''0''">0</a> <a href="exec:gt ''telefon'', ''Call''">Call</a></b></center>'

		!!etogame
		if hour >= 8 and hour <= 19:
			if telalla > 0:
				act 'Call Alla':
					$telsob = 'Alla'
					dynamic $objmobilaraz
				end
			end

			if telmasha > 0:
				act 'Call Masha':
					$telsob = 'Masha'
					dynamic $objmobilaraz
				end
			end

			if telkat > 0:
				act 'Call Kate':
					$telsob = 'Katia'
					dynamic $objmobilaraz
				end
			end

			if bfA > 0 and svidanieA = 0:
				act 'Call <<$boyA>>':dynamic $objmobilarazboy
			end
		end

		if nastjaqw = 1 and week = 6 and vnesh > 20:act 'Call Nastya':gt 'nastja', 'pos4'
		if nastjaqw = 2 and week ! 6 and zenit = 0 and nastjaday ! day:act 'Chat with Nastya':gt 'nastja', 'pos13'
		if hour >= 8 and hour <= 20 and nastjaqw = 2 and week = 6 and vnesh > 20 and nastjaday ! day:act 'On the beach with Nastya':gt 'nastja', 'pos12'
		if nastjaqw = 5 and week = 6 and nastjaday ! day:act 'Invite Nastya': gt 'nastja', 'pos22'
		if nastjaqw = 6 and nastjaday ! day:act 'Call Nastya': gt 'nastja', 'pos31'

		act 'Hangup':
			cla
			gt 'telefon', 'fin'
		end
	end

	if ring = 1:
		if ringA = 1:
			gt 'telefon', 'boyA'

			exit
		end

		if ringB = 1:
			gt 'telefon', 'boyB'

			exit
		end

		if ringC = 1:
			gt 'telefon', 'boyC'

			exit
		end
	end
end

if $ARGS[0] = 'boyA':
	cla
	clr
	gs 'stat'
	set ring = 0
	set ringA = 0
	set boydayA = day
	set svetrand = rand(0, 5)

	if svetrand = 0:set $sveta = 'cutie'
	if svetrand = 1:set $sveta = 'honey'
	if svetrand = 2:set $sveta = 'sweetie'
	if svetrand = 3:set $sveta = 'baby'
	if svetrand = 4:set $sveta = 'hot stuff'
	if svetrand = 5:set $sveta = '<<$name>>'

	'Hey <<$sveta>>, it''s me, <<$boyA>>. How''s it going?'

	act 'Normally':
		cla
		'(You) - Pretty good, you?'
		'(<<$boyA>>) - just great, but I kind of miss you, can we meet today?'

		if pregtime <= dayA and pregtime >= 7 and pregtalk = 0:
			act 'Honey, you will soon become a dad.':
				cla
				pregtalk = 1
				'(You) - Honey, I''m pregnant with your child.'

				if harakBoyA = 0:
					if bfA >= 90:
						'(<<$boyA>>) - This is wonderful! We have to celebrate!'
						set love = 1
						'You started talking about living together. <<$boyA>> told you that he is not against it in principle, but first he wants you to meet his parents.'
						'He warns you that his mother is very demanding and rigorous. <<$boyA>> says that he loves his mother and does not want to upset her. Therefore, you must look gorgeous, wear a dress from a boutique, have well-groomed and curled hair and makeup in moderation.'
						'When you are totally ready <<$boyA>> will take you to their parents.'

						act 'Hang up.':gt 'telefon', 'fin'

						act 'Meet tonight':
							cla
							set svidanieA = 1
							'(You) - How about this evening?'
							'(<<$boyA>>) - Sounds great! When can I come to pick you up?'

							act 'Set up a time.':
								cla
								meetday = daystart
								meethour = input ("Set up a time to get picked up. It is now <<hour>> o''clock.")

								if meethour <= hour or meethour > 23:meethour = 20

								'(You) -How about <<meethour>> o''clock?'
								'(<<$boyA>>) - Okay <<$sveta>>, see you at <<meethour>> o''clock.'

								act 'Hang up.':gt 'telefon', 'fin'
							end
						end
					end

					if bfA < 90:
						'(<<$boyA>>) - I''m not yet ready to become a dad. I''ll give you the money for an abortion. Go out and get rid of the child.'
						money += 20000

						act 'Hang up.':gt 'telefon', 'fin'
					end
				end

				if harakBoyA = 1:
					'(<<$boyA>>) - I''m not yet ready to become a dad. I''ll give you the money for an abortion. Go out and get rid of the child.'
					money += 20000

					act 'Hang up.':gt 'telefon', 'fin'
				end

				if harakBoyA = 2:
					'(<<$boyA>>) - What? Yes you ohuel! Somewhere tucked pussy and now dumped on me. Come on you dick.'
					set bfA = 0
					pregtalk = 0

					act 'Hang up.':gt 'telefon', 'fin'
				end
			end
		end

		if pregtime > dayA and pregtime >= 7 and pregtalk = 0:
			act 'Honey, you will soon become a dad.':
				cla
				'(You) - Honey, I''m pregnant with your child.'
				'(<<$boyA>>) - How the fuck dad? We meet with you less than you''re pregnant. Sprained whore who is here, and go to him. Everything. I can not call. Goodbye.'
				set bfA = 0

				act 'Hang up.':gt 'telefon', 'fin'
			end
		end

		if week > 1 and week < 5 and workKafe = 1:
			act 'Sorry, I''m working today.':
				cla
				'(You) - Oh, sorry, I''m working today.'
				'(<<$boyA>>) - Okay, I''ll call tomorrow.'

				act 'Hang up.':gt 'telefon', 'fin'
			end
		end

		act 'Tonight':
			cla
			set bfA += 1
			set svidanieA = 1
			meetday = daystart
			'(You) - How about this evening?'
			'(<<$boyA>>) - Sounds great! When can I come to pick you up?'

			act 'Call time.':
				cla
				meethour = input ("Set up a time to get picked up. It is now <<hour>> o''clock.")

				if meethour <= hour or meethour > 23:meethour = 20

				'(You) - How about <<meethour>> o''clock?.'
				'(<<$boyA>>) - Okay <<$sveta>>, see you at <<meethour>> o''clock.'

				act 'Hang up.':gt 'telefon', 'fin'
			end
		end

		act 'I''m busy today. Call tomorrow.':
			cla
			set bfA -= 1
			'(You) - I''m busy today. Call tomorrow.'

			if bfa <= 0:set bfa = 0 & '(<<$boyA>>) - damn, you''ve fucked me, come on dick.'
			if bfa > 0:'(<<$boyA>>) -  Okay, I''ll call tomorrow.'

			act 'Hang up.':gt 'telefon', 'fin'
		end
	end

	act 'Leave':
		cla
		set bfA = 0
		gt 'telefon', 'fin'
	end
end

if $ARGS[0] = 'boyB':
	cla
	clr
	gs 'stat'
	set ring = 0
	set ringB = 0
	set boydayB = day
	'<<$boyB>> offers a walk.'

	act 'Leave':
		cla
		set bfB = 0
		gt 'telefon', 'fin'
	end

	act 'Call tomorrow':
		cla
		set bfB -= 1

		if bfB <= 0:set bfB = 0 & '<<$boyB>> said he throws you.'
		if bfB > 0:'<<$boyB>> angry and hung up.'

		gt 'telefon', 'fin'
	end

	act 'Tonight':
		cla
		set bfB += 1
		set svidanieB = 1
		'<<$boyB>> asked how much he come to your house.'

		act 'Let 20 hours.':
			cla
			'You are warmly said goodbye and ended the conversation on this.'

			act 'Hang up.':gt 'telefon', 'fin'
		end
	end
end

if $ARGS[0] = 'boyC':
	cla
	clr
	gs 'stat'
	set ring = 0
	set ringC = 0
	set boydayC = day
	'<<$boyC>> offers a walk.'

	act 'Leave':
		cla
		set bfC = 0
		gt 'telefon', 'fin'
	end

	act 'Call tomorrow':
		cla
		set bfC -= 1

		if bfC <= 0:set bfC = 0 & '<<$boyC>> said he throws you.'
		if bfC > 0:'<<$boyC>> angry and hung up.'

		gt 'telefon', 'fin'
	end

	act 'Tonight':
		cla
		set bfC += 1
		set svidanieC = 1
		'<<$boyC>> asked how much he come to your house.'

		act 'Let 20 hours.':
			cla
			'You are warmly said goodbye and ended the conversation on this.'

			act 'Hang up.':gt 'telefon', 'fin'
		end
	end
end

if $ARGS[0] = 'Call':
	cla

	if num6 = 0 and num5 = 0 and num4 = 0 and num3 = 0 and num2 = 0 and num1 = 1:
		'Allo. This firehouse. Speak.'
	elseif num6 = 0 and num5 = 0 and num4 = 0 and num3 = 0 and num2 = 0 and num1 = 2:
		'Allo. This is the police. Speak.'
	elseif num6 = 0 and num5 = 0 and num4 = 0 and num3 = 0 and num2 = 0 and num1 = 3:
		'Allo. This ambulance. Speak.'
	else
		'Dialtone'
	end

	act 'Hangup':
		cla
		gt 'telefon', 'fin'
	end
end

if $ARGS[0] = '1':
	cla

	!!if number = 6:end
	if number = 5:set num1 = 1 & set number = 6
	if number = 4:set num2 = 1 & set number = 5
	if number = 3:set num3 = 1 & set number = 4
	if number = 2:set num4 = 1 & set number = 3
	if number = 1:set num5 = 1 & set number = 2
	if number = 0:set num6 = 1 & set number = 1

	gt 'telefon', 'start'
end

if $ARGS[0] = '2':
	cla

	!!if number = 6:end
	if number = 5:set num1 = 2 & set number = 6
	if number = 4:set num2 = 2 & set number = 5
	if number = 3:set num3 = 2 & set number = 4
	if number = 2:set num4 = 2 & set number = 3
	if number = 1:set num5 = 2 & set number = 2
	if number = 0:set num6 = 2 & set number = 1

	gt 'telefon', 'start'
end

if $ARGS[0] = '3':
	cla

	!!if number = 6:end
	if number = 5:set num1 = 3 & set number = 6
	if number = 4:set num2 = 3 & set number = 5
	if number = 3:set num3 = 3 & set number = 4
	if number = 2:set num4 = 3 & set number = 3
	if number = 1:set num5 = 3 & set number = 2
	if number = 0:set num6 = 3 & set number = 1

	gt 'telefon', 'start'
end

if $ARGS[0] = '4':
	cla

	!!if number = 6:end
	if number = 5:set num1 = 4 & set number = 6
	if number = 4:set num2 = 4 & set number = 5
	if number = 3:set num3 = 4 & set number = 4
	if number = 2:set num4 = 4 & set number = 3
	if number = 1:set num5 = 4 & set number = 2
	if number = 0:set num6 = 4 & set number = 1

	gt 'telefon', 'start'
end

if $ARGS[0] = '5':
	cla

	!!if number = 6:end
	if number = 5:set num1 = 5 & set number = 6
	if number = 4:set num2 = 5 & set number = 5
	if number = 3:set num3 = 5 & set number = 4
	if number = 2:set num4 = 5 & set number = 3
	if number = 1:set num5 = 5 & set number = 2
	if number = 0:set num6 = 5 & set number = 1

	gt 'telefon', 'start'
end

if $ARGS[0] = '6':
	cla

	!!if number = 6:end
	if number = 5:set num1 = 6 & set number = 6
	if number = 4:set num2 = 6 & set number = 5
	if number = 3:set num3 = 6 & set number = 4
	if number = 2:set num4 = 6 & set number = 3
	if number = 1:set num5 = 6 & set number = 2
	if number = 0:set num6 = 6 & set number = 1

	gt 'telefon', 'start'
end

if $ARGS[0] = '7':
	cla

	!!if number = 6:end
	if number = 5:set num1 = 7 & set number = 6
	if number = 4:set num2 = 7 & set number = 5
	if number = 3:set num3 = 7 & set number = 4
	if number = 2:set num4 = 7 & set number = 3
	if number = 1:set num5 = 7 & set number = 2
	if number = 0:set num6 = 7 & set number = 1

	gt 'telefon', 'start'
end

if $ARGS[0] = '8':
	cla

	!!if number = 6:end
	if number = 5:set num1 = 8 & set number = 6
	if number = 4:set num2 = 8 & set number = 5
	if number = 3:set num3 = 8 & set number = 4
	if number = 2:set num4 = 8 & set number = 3
	if number = 1:set num5 = 8 & set number = 2
	if number = 0:set num6 = 8 & set number = 1

	gt 'telefon', 'start'
end

if $ARGS[0] = '9':
	cla

	!!if number = 6:end
	if number = 5:set num1 = 9 & set number = 6
	if number = 4:set num2 = 9 & set number = 5
	if number = 3:set num3 = 9 & set number = 4
	if number = 2:set num4 = 9 & set number = 3
	if number = 1:set num5 = 9 & set number = 2
	if number = 0:set num6 = 9 & set number = 1

	gt 'telefon', 'start'
end

if $ARGS[0] = '0':
	cla

	!!if number = 6:end
	if number = 5:set num1 = 0 & set number = 6
	if number = 4:set num2 = 0 & set number = 5
	if number = 3:set num3 = 0 & set number = 4
	if number = 2:set num4 = 0 & set number = 3
	if number = 1:set num5 = 0 & set number = 2
	if number = 0:set num6 = 0 & set number = 1

	gt 'telefon', 'start'
end

if $ARGS[0] = 'Reset':
	cla
	set num1 = 0
	set num2 = 0
	set num3 = 0
	set num4 = 0
	set num5 = 0
	set num6 = 0
	set number = 0
	gt 'telefon', 'start'
end

if $ARGS[0] = 'fin':
	cla
	set num1 = 0
	set num2 = 0
	set num3 = 0
	set num4 = 0
	set num5 = 0
	set num6 = 0
	set number = 0
	gt $locM, $metkaM

	!'if housr = 1 and housrA = 1:
		set housrA = 0
		gt 'korr'
	end'!
end

--- telefon ---------------------------------
