1
0
anjuna krokus преди 7 месеца
родител
ревизия
b68380c253
променени са 2 файла, в които са добавени 1309 реда и са изтрити 1281 реда
  1. 4 0
      locations/saveupdater.qsrc
  2. 1305 1281
      locations/telefon.qsrc

+ 4 - 0
locations/saveupdater.qsrc

@@ -2817,6 +2817,7 @@ if temp_current_save_version < 00090300:
 		killvar 'vladimirday'
 		killvar 'temp_var1'
 	end
+
 	!! Telephone call migration to their correct event locations
 	if arrpos('$contact', 'A108') > -1:
 		temp_pos = arrpos('$contact', 'A108')
@@ -2828,6 +2829,7 @@ if temp_current_save_version < 00090300:
 		end
 		killvar 'temp_pos'
 	end
+
 	if arrpos('$contact', 'A192') > -1:
 		temp_pos = arrpos('$contact', 'A192')
 		if strpos($contactICode[temp_pos], 'telefon') > -1:
@@ -2836,6 +2838,8 @@ if temp_current_save_version < 00090300:
 		killvar 'temp_pos'
 	end
 end
+
+
 killvar 'temp_current_save_version'
 gs 'saveg'
 

+ 1305 - 1281
locations/telefon.qsrc

@@ -306,1475 +306,1499 @@ if $ARGS[0] = 'IncomingCall':
 end
 
 
-
-
-!--------------------------------------------------------------------------------------------------
-! Old telephone system.  Some of this should be removed.
-if $ARGS[0] = 'phone_ring':
-	$telefon['body'] = '
-	<font size=6><<$caller>> calling</font><br>
-	<img src="<<$callerid>>"><br>
-	<br>
-	<br>
-	<br>
-	<br>'
-	dynamic $telefon['print']
-end &! --- phone_ring ---
-
-if $ARGS[0] = 'phone_call_receive':
+if $ARGS[0] = 'Phone_notebook':
+	gs 'housing', 'rent'
 	$telefon['body'] = '
-	<font size=6>Talking to <<$caller>></font><br>
-	<img src="<<$callerid>>"><br>'
-	dynamic $telefon['print']
-end &! --- phone_call_receive ---
+	<font size=6>Planner</font><br>
+	<img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_notebook.png" height="80" width="80"><br>
+	<<year>>-<<$month>>-<<day>>, <<$week[week]>><br><br>'
+	rent1 = -1
+	rent4 = -1
+	!! TODO: Will have to change this too, to handle more than 2 rentals.
+	if func('homes_properties', 'is_property_of_status', 'rented', 'city_apartment') : rent1 = func('homes_properties', 'get_rent_days', 'city_apartment')
+	if func('homes_properties', 'is_property_of_status', 'rented', 'old_town_apartment') : rent4 = func('homes_properties', 'get_rent_days', 'old_town_apartment')
+	d1 = day
+	w1 = week
+	m1 = month
+	y1 = year
+	i = 0
+	$list = '<br>&emsp;<b>•</b> '
+	:pnotebook
+		daynum = daystart+i
+		$calendarday = ''
 
-if $ARGS[0] = 'phone_balance':
-	if subscription['monthly_calls'] = 0 and subscription['metered_calls'] < 4:
-		if subscription['monthly_calls'] = 0 and subscription['monthly_calls-date'] > 0: 
-			$contractmessage = '<font size=6>Your mobile contract has expired, you have renew it or buy some minutes.</font><br>'
-		elseif subscription['metered_calls'] < 4 and subscription['metered_calls-date'] > 0:
-			$contractmessage = '<font size=6>Not enough minutes left on your contract to make a call</font><br>'
-		else
-			$contractmessage = '<font size=6>You don''t have a valid contract, you should buy one at MegFon.</font><br>'
+		if m1 = 1 and d1 >= 1 and d1 <= 8:
+			$calendarday += $list + 'New Year holidays'
+			if d1 = 1:$calendarday += ', New Year'
+			if d1 = 7:$calendarday += ', Christmas'
 		end
-		$telefon['body'] = '
-		<<$contractmessage>>
-		<img src="<<$callerid>>"><br><br>
-		<a href="exec:gs ''telefon'', ''Phone_menu'' "><img src="images/system/phone/decline.png"></a><br>'
-		dynamic $telefon['print']
-		wait 3500
-		cla
-		gt $loc, $loc_arg
-		killvar 'contractmessage'
-	elseif subscription['metered_calls'] > 4:
-		subscription['metered_calls'] -= 4
-	end
-end &! --- phone_balance ---
-
-if $ARGS[0] = 'Phone_call':
-	$telefon['body'] = '
-	<font size=6>Calling <<$npc_nickname[''A29'']>></font><br>
-	<img src="images/system/phone/icons/icon_npc1.png"><br><br>
-	<a href="exec:gs ''telefon'', ''Phone_contactlist'' "><img src="images/system/phone/decline.png"></a><br>'
-	dynamic $telefon['print']
-	wait 1500
-	minut += 1
-	$callerid = 'images/system/phone/icons/icon_npc1.png'
-	gs 'telefon', 'phone_balance'
-	$callerid = 'images/system/phone/icons/icon_npc1.png'
-	gs 'telefon', 'phone_call_reject'
-end &! --- Phone_call ---
-
-if $ARGS[0] = 'phone_call_reject':
-	$telefon['body'] = '
-	<font size=6>Calling...</font><br>
-	<img src="<<$callerid>>"><br><br>
-	<a href="exec:gs ''telefon'', ''Phone_contactlist'' "><img src="images/system/phone/decline.png"></a><br>'
-	dynamic $telefon['print']
-end &! --- phone_call_reject ---
-
-if $ARGS[0] = 'Phone_megafon':
-	if subscription['monthly_calls'] = 1: 
-		$contractmessage = 'You have a valid monthly contract that will renew on <<subscription[''monthly_calls-date'']>>/<<month+1>>' 
-	elseif subscription['metered_calls'] = 1:
-		$contractmessage = 'You have a valid minutes based contract that still has <<subscription[''metered_calls'']>> minuets left' 
-	elseif subscription['monthly_calls'] = 0 and subscription['monthly_calls-date'] > 0: 
-		$contractmessage = '<font size=6>Your mobile contract has expired, you have renew it or buy some minutes.</font><br>'
-	elseif subscription['metered_calls'] < 4 and subscription['metered_calls-date'] > 0:
-		$contractmessage = '<font size=6>You have a minute based plan, but it doesn''t have enough minutes left to make a call</font><br>'
-	else
-		$contractmessage = '<font size=6>You don''t have any valid contracts, you should buy one at MegaFon.</font><br>'
-	end
-
-	$telefon['body'] = '
-	<font size=6>MegaFon</font><br>
-	<img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_megafon.png" height="80" width="80"><br><br>
-	<b><<$contractmessage>></b>'
-	dynamic $telefon['print']
-	killvar '$contractmessage'
-end &! --- Phone_megafon ---
-
-
-if $ARGS[0] = 'Edit_Custom_list':
-	clr
-	dummyas = arrsize('$contact')
-:din_bad_as1
-	dummyas -= 1
-	if dummyas >= 0:
-		$dummyedit = $contact[dummyas]
-		$dummyedit1 = dyneval('$result = ''</a><a href="exec:killvar ''''$contact'''',<<dummyas>> & gs ''''telefon'''', ''''Edit_Custom_list'''' "><b>Remove</b>'' ')
-		$dummyedit2 = $replace($dummyedit,'<b>Call</b>',$dummyedit1)
-		pl $dummyedit2
-		jump 'din_bad_as1'
-	end
-	killvar 'dummyas'
-	killvar 'dummyedit'
-	killvar 'dummyedit1'
-	killvar 'dummyedit2'
-
-	pl'<center><a href="exec:gs ''telefon'', ''Phone_menu'' "><img src="images/system/icons/back.png"></a></center>'
-	!dynamic $telefon['print']
-end &! --- Edit_Custom_list ---
-
-if $ARGS[0] = 'mobilaraz':
-	cls
-	cla
-	gs'din_bad'
-	$caller = '<<$telsob>>'
-	gs 'telefon','phone_balance'
-	gs 'telefon','phone_call_receive'
-	willAgree = (rand(0, 10) > 3)
-	'"Yes, I''m listening," says a voice from the speaker.'
+		if m1 = 2 and d1 = 23:$calendarday += $list + 'Defender of Fatherland Day'
+		if m1 = 3 and d1 = 8:$calendarday += $list + 'Women''s Day'
+		if m1 = 5 and d1 = 1:$calendarday += $list + 'Spring and Labor Day'
+		if m1 = 5 and d1 = 2:$calendarday += $list + 'National holiday'
+		if m1 = 5 and d1 = 9:$calendarday += $list + 'Victory Day'
+		if m1 = 6 and d1 = 12:$calendarday += $list + 'Russia Day'
+		if m1 = 6 and d1 = 13:$calendarday += $list + 'National holiday'
+		if m1 = 11 and d1 = 4:$calendarday += $list + 'Unity Day'
 
-	if month > 5 and temper > 20 and sunWeather = 1:
-		act 'Invite to the park':
-			cla
-			'"Let''s go for a walk in the park."'
+		if mid($start_type,1,2) = 'sg' and SchoolAtestat = 0:
+			if m1 = 1 and d1 = 1:$calendarday += $list + 'First day of Winter break.'
+			if m1 = 1 and d1 = 15:$calendarday += $list + 'Last day of Winter break.'
+			if m1 = 3 and d1 = 20:$calendarday += $list + 'First day of Spring break.'
+			if m1 = 3 and d1 = 26:$calendarday += $list + 'Last day of Spring break.'
+			if y1 = 2017 and m1 = 5 and d1 = 25:$calendarday += $list + 'Graduation Day!'
+			if m1 = 6 and d1 = 1:$calendarday += $list + 'First day of Summer break.'
+			if m1 = 8 and d1 = 31:$calendarday += $list + 'Last day of Summer break.'
+			if m1 = 11 and d1 = 4:$calendarday += $list + 'First day of Autumn break.'
+			if m1 = 11 and d1 = 11:$calendarday += $list + 'Last day of Autumn break.'
+		end
 
-			if willAgree:
-				'<<$telsob>>, "See you in the park in an hour."'
+		if daynum >= daylastperiod+28 and daynum < daylastperiod+31:$calendarday += $list + '<font color=''red''><b>Menstruation!</b></font>'
+		if daynum >= daylastperiod+12 and daynum < daylastperiod+14:$calendarday += $list + '<font color=#336600><b>Ovulation!</b></font>'
+		if pregchem >= 6720:$calendarday += $list + '<font color=''red''><b>Birthing day!</b></font>'
 
-				act 'Go':
-					if $clothingworntype = 'nude':
-						gs 'clothing','wear_last_worn'
-						gs 'underwear','wear'
-					end
-					gt 'parksvid'
-				end
+		if w1 < 5 and (workSec >= 1 or BurgerQW['Secretary'] = 1):$calendarday += $list + 'Working as a secretary. <i>(9:00 - 17:00)</i>'
+		if w1 < 5 and workFabrika = 1:
+			$calendarday += $list + 'Working as a seamstress. '
+			if age < 18:$calendarday += '<i>(16:00 - 20:00)</i>' else $calendarday += '<i>(8:00 - 16:00)</i>'
+		end
+		if w1 > 1 and w1 <= 5 and workhosp = 1:$calendarday += $list + 'Working as a nurse. <i>(8:00 - 16:00)</i>'
+		if worksalon = 1 and (w1 = 1 or w1 = 3 or w1 = 5):$calendarday += $list + 'Working as a masseuse. <i>(9:00 - 17:00)</i>'
+!!		if maidqw > 0:$calendarday += '<br>&emsp;<b>•</b> Working as maid. <i>(16:00 - 19:00)</i>'
+		if pfilmday[i] > 0:$calendarday += $list + 'Porn shoot: <i><<$porndesc[pfilmday[i]]>></i>'
+		if d1 = 25 and (BurgerQW['Secretary'] = 1 or workKafe['job'] = 1 or workhosp = 1 or worksalon = 1 or tanwork = 1 or workSec = 1 or workFabrika = 1):$calendarday += $list + '<i>Pay day!</i>'
+		if d1 = nyp_day and m1 = 12 and SchoolAtestat = 0 and mid($start_type,1,2) = 'sg':$calendarday += $list + 'New Year''s party at 14:00!'
+		if (npc_QW['A33']-2) mod 2 = 1 and sisboyday+1 = daynum:
+			if sisboytrioQW = 1:
+				$calendarday += $list + '<font color="orange">Threesome with Anya and Roma at 18:00</font>'
 			else
-				gs 'telefon','telotkaz',$telsob
+				$calendarday += $list + '<font color="orange">Anya having sex with Roma at 18:00</font>'
 			end
 		end
-	end
-
-	act 'Invite to a movie':
-		cla
-		'"Want to go see a movie?"'
-
-		if willAgree:
-			'<<$telsob>>, "See you at the movie theater in an hour."'
-			act 'Go':gt 'kinosvid'
-		else
-			gs 'telefon','telotkaz',$telsob
+		if sisboyparty = 2 and sisboyparty_day+1 = daynum:$calendarday += $list + '<font color="orange">Party at Rex''s, gathering before 18:00 at Community Center</font>'
+		if rent1 = 0:$calendarday += $list + 'Rent on city apartment expires!'
+		if rent4 = 0:$calendarday += $list + 'Rent on Pushkin apartment expires!'
+		if birthday = d1 and birthmonth = m1:$calendarday += $list + 'My birthday!'
+		if kid > 0:
+			k1 = kid
+			:kiddieloop
+				if daykid[k1] = d1 and monthkid[k1] = m1:$calendarday += $list + 'Birthday of my <<$polreb[k1]>> <<$kidname[k1]>>, my <<kid>>. baby!'
+			if k1 > 1:k1 -= 1 & jump 'kiddieloop'
 		end
-	end
-
-	act 'Invite to the pool hall':
-		cla
-		'"Let''s play pool."'
-
-		if willAgree:
-			'<<$telsob>>, "See you at the pool hall in an hour."'
 
-			act 'Go':
-				if $clothingworntype = 'nude':
-					gs 'clothing','wear_last_worn'
-					gs 'underwear','wear'
-				end
-				gt 'billsvid'
-			end
-		else
-			gs 'telefon','telotkaz',$telsob
+		if $calendarday ! '':
+			$telefon['body'] += '<b><<$monthName[m1]>> <<d1>>, <<$week[w1]>>:</b>'
+			$telefon['body'] += $calendarday +'<br>'
+		end
+	if i < 14:
+		rent1 -= 1
+		rent4 -= 1
+		i += 1
+		w1 += 1
+		if w1 > 7:w1 = 1
+		d1 += 1
+		if monthsend[m1] < d1:
+			m1 += 1 & d1 = 1
+			if m1 = 13: m1 = 1 & y1 += 1
 		end
+		jump 'pnotebook'
 	end
+	killvar 'calendarday'
+	killvar 'rent1'
+	killvar 'rent4'
+	killvar 'd1'
+	killvar 'w1'
+	killvar 'm1'
+	killvar 'y1'
+	killvar 'daynum'
+	dynamic $telefon['print']
+end &! --- Phone_notebook ---
 
-	act 'Invite to the cafe':
-		cla
-		'"Let''s go to the cafe."'
+!!----------------------------------------Camera-------------------------------------------------
 
-		if willAgree:
-			'<<$telsob>>, "See you at the cafe in an hour."'
+!!for viewing photos on your phone
+if $ARGS[0] = 'Phone_pictures':
+	gt 'phone_selfies', 'selfies'
+end
 
-			act 'Go':
-				if $clothingworntype = 'nude':
-					gs 'clothing','wear_last_worn'
-					gs 'underwear','wear'
-				end
-				gt 'kafesvid'
-			end
+!!picking the selfie image when taking photos, this sets the location variable
+!{
+	$ARGS[1] is phone location if left blank it is a generic selfie	(one of the locations in $selfieLoc[])
+	$ARGS[2] is for flashing when clothed if left blank then it is not flashing
+}
+if $ARGS[0] = 'Phone_camera_selfie':
+	minut += rand(5,7)
+	if $ARGS[1] ! '':
+		gs 'telefon', 'Phone_selfie_image', $ARGS[1], $ARGS[2]
+	else
+		phone_rand = RAND(1,selfieClotot[0])
+		dynamic '<<$selfieLoc[0]>>_closelfie[<<phone_rand>>] = 1'
+		gs 'stat'
+		if usePopUps = 1:
+			msg '<img src="images/pc/activities/phone/selfies/<<$selfieLoc[0]>>/clothed/<<$selfieFilePrefix[0]>><<phone_rand>>.jpg">'
 		else
-			gs 'telefon','telotkaz',$telsob
+			view 'images/pc/activities/phone/selfies/<<$selfieLoc[0]>>/clothed/<<$selfieFilePrefix[0]>><<phone_rand>>.jpg'
 		end
 	end
+	!if cumsumbod-cumsumvag-cumsumass > 0: phone_rand = RAND (m,n) - for SELF in the semen
+	!if photo_event_pic = x: phone_rand = RAND (x,y) - for photos during the events (by heart)
+	!msg '<img src="images/system/phone/phone_selfie<<phone_rand>>.jpg">'
+end
 
-	act 'Invite to the casino':
-		cla
-		'"Let''s go to the casino."'
-
-		if willAgree:
-			'<<$telsob>>, "See you in the casino in an hour."'
-
-			act 'Go':
-				if $clothingworntype = 'nude':
-					gs 'clothing','wear_last_worn'
-					gs 'underwear','wear'
+!!taking selfies, this chooses a random image for the location for clothed, underwear and nude
+!{
+	$ARGS[1] is phone location (one of the locations in $selfieLoc[])
+	$ARGS[2] is for flashing when clothed if left blank then it is not flashing
+}
+if $ARGS[0] = 'Phone_selfie_image':
+	if $ARGS[2] = '':
+		if PCloswimwear = 1:
+			!!changing to and unmixed variable so the rng will work
+			if Enable_Android = 1:
+				dynamic 'temp_swim = <<selfieSwimtot[arrpos(''$selfieLoc'', $ARGS[1],1)]>>'
+			else
+				dynamic 'temp_swim = <<selfieSwimtot[arrpos(1, ''$selfieLoc'', $ARGS[1])]>>'
+			end
+			if temp_swim > 0:
+				phone_rand = rand(1,temp_swim)
+				!!Setting the image owned flag to 1
+				dynamic '<<$ARGS[1]>>_swim[<<phone_rand>>] = 1'
+				gs 'stat'
+				if usePopUps = 1:
+					msg '<img src="images/pc/activities/phone/selfies/<<$ARGS[1]>>/bikini/<<phone_rand>>.jpg">'
+				else
+					view 'images/pc/activities/phone/selfies/<<$ARGS[1]>>/bikini/<<phone_rand>>.jpg'
 				end
-				gt 'kazinosvid'
 			end
-		else
-			gs 'telefon','telotkaz',$telsob
-		end
-	end
-
-	act 'Hangup':gt 'telefon', 'fin'
-end
-!----------------End Old Telephone----------------------------
-
-
-!-----------------------------------------------------------------------------
-! Support for Hardcoded Lovers (BF/GF)
-
-if $ARGS[0] = 'callingTheLover' and loverGender[ARGS[1]] = 1:
-	cls
-	cla
-	gs'din_bad'
-	lover_number = ARGS[1]
-	$caller = '<<$loverdesc[lover_number]>>'
-	$telsob = $caller
-	$callerid = 'images/characters/shared/headshots_generic/'+lover_picture[lover_number]+'.jpg'
-	gs 'telefon','phone_balance'
-	gs 'telefon','phone_call_receive'
-	willAgree = (rand(0, 10) > 3)
-	'"Yes, I''m listening," says a voice from the speaker.'
-
-	if month > 5 and temper > 20 and sunWeather = 1:
-		act 'Invite to the park':
-			cla
-			'"Let''s go for a walk in the park."'
-
-			if willAgree:
-				'<<$telsob>>, "See you in the park in an hour."'
-
-				act 'Go':
-					if $clothingworntype = 'nude':
-						gs 'clothing','wear_last_worn'
-						gs 'underwear','wear'
-					end
-					gt 'parksvid'
+		elseif $clothingworntype ! 'nude':
+			!!changing to and unmixed variable so the rng will work
+			if Enable_Android = 1:
+				dynamic 'temp_clotot = <<selfieClotot[arrpos(''$selfieLoc'', $ARGS[1],1)]>>'
+			else
+				dynamic 'temp_clotot = <<selfieClotot[arrpos(1, ''$selfieLoc'', $ARGS[1])]>>'
+			end
+			if temp_clotot > 0:
+				phone_rand = rand(1,temp_clotot)
+				!!Setting the image owned flag to 1
+				dynamic '<<$ARGS[1]>>_closelfie[<<phone_rand>>] = 1'
+				gs 'stat'
+				if usePopUps = 1:
+					msg '<img src="images/pc/activities/phone/selfies/<<$ARGS[1]>>/clothed/<<phone_rand>>.jpg">'
+				else
+					view 'images/pc/activities/phone/selfies/<<$ARGS[1]>>/clothed/<<phone_rand>>.jpg'
 				end
+			end
+		elseif $pantyworntype ! 'none':
+			if Enable_Android = 1:
+				dynamic 'temp_undtot = <<selfieUndtot[arrpos(''$selfieLoc'', $ARGS[1],1)]>>'
 			else
-				gs 'telefon','telotkaz',$telsob
+				dynamic 'temp_undtot = <<selfieUndtot[arrpos(1, ''$selfieLoc'', $ARGS[1])]>>'
 			end
-		end
-	end
-
-	act 'Invite to a movie':
-		cla
-		'"Want to go see a movie?"'
-
-		if willAgree:
-			'<<$telsob>>, "See you at the movie theater in an hour."'
-			act 'Go':
-				if $clothingworntype = 'nude':
-					gs 'clothing','wear_last_worn'
-					gs 'underwear','wear'
+			if temp_undtot > 0:
+				phone_rand = rand(1,temp_undtot)
+				dynamic '<<$ARGS[1]>>_undselfie[<<phone_rand>>] = 1'
+				gs 'stat'
+				if usePopUps = 1:
+					msg '<img src="images/pc/activities/phone/selfies/<<$ARGS[1]>>/underwear/<<phone_rand>>.jpg">'
+				else
+					view 'images/pc/activities/phone/selfies/<<$ARGS[1]>>/underwear/<<phone_rand>>.jpg'
 				end
-				gt 'kinosvid'
 			end
 		else
-			gs 'telefon','telotkaz',$telsob
+			if Enable_Android = 1:
+				dynamic 'temp_nudtot = <<selfieNudtot[arrpos(''$selfieLoc'', $ARGS[1],1)]>>'
+			else
+				dynamic 'temp_nudtot = <<selfieNudtot[arrpos(1, ''$selfieLoc'', $ARGS[1])]>>'
+			end
+			if temp_nudtot > 0:
+				phone_rand = rand(1,temp_nudtot)
+				dynamic '<<$ARGS[1]>>_nudselfie[<<phone_rand>>] = 1'
+				gs 'stat'
+				if usePopUps = 1:
+					msg '<img src="images/pc/activities/phone/selfies/<<$ARGS[1]>>/nude/<<phone_rand>>.jpg">'
+				else
+					view 'images/pc/activities/phone/selfies/<<$ARGS[1]>>/nude/<<phone_rand>>.jpg'
+				end
+			end
 		end
-	end
-
-	if $home['town'] = 'city':
-		act 'Invite to the pool hall':
-			cla
-			'"Let''s play pool."'
-
-			if willAgree:
-				'<<$telsob>>, "See you at the pool hall in an hour."'
-
-				act 'Go':
-					if $clothingworntype = 'nude':
-						gs 'clothing','wear_last_worn'
-						gs 'underwear','wear'
-					end
-					gt 'billsvid'
+	else
+		if $ARGS[2] = 'tits':
+			if Enable_Android = 1:
+				dynamic 'temp_titflash = <<selfieTitflash[arrpos(''$selfieLoc'', $ARGS[1],1)]>>'
+			else
+				dynamic 'temp_titflash = <<selfieTitflash[arrpos(1, ''$selfieLoc'', $ARGS[1])]>>'
+			end
+			if temp_titflash > 0:
+				phone_rand = rand(1,temp_titflash)
+				dynamic '<<$ARGS[1]>>_titflash[<<phone_rand>>] = 1'
+				gs 'stat'
+				if usePopUps = 1:
+					msg '<img src="images/pc/activities/phone/selfies/<<$ARGS[1]>>/titflash/<<phone_rand>>.jpg">'
+				else
+					view 'images/pc/activities/phone/selfies/<<$ARGS[1]>>/titflash/<<phone_rand>>.jpg'
 				end
+			end
+		elseif $ARGS[2] = 'ass':
+			if Enable_Android = 1:
+				dynamic 'temp_assflash = <<selfieAssflash[arrpos(''$selfieLoc'', $ARGS[1],1)]>>'
 			else
-				gs 'telefon','telotkaz',$telsob
+				dynamic 'temp_assflash = <<selfieAssflash[arrpos(1, ''$selfieLoc'', $ARGS[1])]>>'
 			end
-		end
-	end
-
-	act 'Invite to the cafe':
-		cla
-		'"Let''s go to the cafe."'
-
-		if willAgree:
-			'<<$telsob>>, "See you at the cafe in an hour."'
-
-			act 'Go':
-				if $clothingworntype = 'nude':
-					gs 'clothing','wear_last_worn'
-					gs 'underwear','wear'
+			if temp_assflash > 0:
+				phone_rand = rand(1,temp_assflash)
+				dynamic '<<$ARGS[1]>>_assflash[<<phone_rand>>] = 1'
+				gs 'stat'
+				if usePopUps = 1:
+					msg '<img src="images/pc/activities/phone/selfies/<<$ARGS[1]>>/assflash/<<phone_rand>>.jpg">'
+				else
+					view 'images/pc/activities/phone/selfies/<<$ARGS[1]>>/assflash/<<phone_rand>>.jpg'
+				end
+			end
+		elseif $ARGS[2] = 'pussy':
+			if Enable_Android = 1:
+				dynamic 'temp_pussyflash = <<selfiePussyflash[arrpos(''$selfieLoc'', $ARGS[1],1)]>>'
+			else
+				dynamic 'temp_pussyflash = <<selfiePussyflash[arrpos(1, ''$selfieLoc'', $ARGS[1])]>>'
+			end
+			if temp_pussyflash > 0:
+				phone_rand = rand(1,temp_pussyflash)
+				dynamic '<<$ARGS[1]>>_pussyflash[<<phone_rand>>] = 1'
+				gs 'stat'
+				if usePopUps = 1:
+					msg '<img src="images/pc/activities/phone/selfies/<<$ARGS[1]>>/pussyflash/<<phone_rand>>.jpg">'
+				else
+					view 'images/pc/activities/phone/selfies/<<$ARGS[1]>>/pussyflash/<<phone_rand>>.jpg'
 				end
-				gt 'kafesvid'
 			end
-		else
-			gs 'telefon','telotkaz',$telsob
 		end
 	end
+end
 
-	act 'Invite to the casino':
-		cla
-		'"Let''s go to the casino."'
-
-		if willAgree:
-			'<<$telsob>>, "See you in the casino in an hour."'
-
-			act 'Go':
-				if $clothingworntype = 'nude':
-					gs 'clothing','wear_last_worn'
-					gs 'underwear','wear'
-				end
-				gt 'kazinosvid'
-			end
+!!taking selfies in the shower or bath
+if $ARGS[0] = 'Phone_selfie_image_bathing':
+	minut += rand(5,7)
+	if $ARGS[1] = 'shower':
+		!!changing to and unmixed variable so the rng will work
+		if Enable_Android = 1:
+			dynamic 'temp_showertot = <<selfieShowertot[arrpos(''$selfieLoc'', ''bathroom'',1)]>>'
 		else
-			gs 'telefon','telotkaz',$telsob
+			dynamic 'temp_showertot = <<selfieShowertot[arrpos(1, ''$selfieLoc'', ''bathroom'')]>>'
 		end
-	end
-
-	act 'I think we should break up...':
-		cla
-		'She sounds hurt, but you insist it is for the best. You both say goodbye and part ways.'
-		gs 'lover', 'remove', lover_number
-
-		act 'Hangup':gt 'telefon', 'fin'
-	end
-
-	act 'Hangup':gt 'telefon', 'fin'
-end
-
-if $ARGS[0] = 'callingTheLover' and loverGender[ARGS[1]] = 0:
-	cls
-	cla
-	gs'din_bad'
-	lover_number = ARGS[1]
-	$caller = '<<$loverdesc[lover_number]>>'
-	$callerid = 'images/characters/shared/headshots_generic/'+lover_picture[lover_number]+'.jpg'
-	gs 'telefon','phone_balance'
-	gs 'telefon','phone_call_receive'
-	willAgree = (rand(0, 10) > 3)
-	'"Yes, I''m listening," says a voice from the speaker.'
-
-	if month > 5 and temper > 20 and sunWeather = 1:
-		act 'Invite to the park':
-			cla
-			'"Let''s go for a walk in the park."'
-
-			if willAgree:
-				'<<$loverdesc[lover_number]>>, "See you in the park in an hour."'
-
-				act 'Go':
-					if $clothingworntype = 'nude':
-						gs 'clothing','wear_last_worn'
-						gs 'underwear','wear'
-					end
-					gt 'svidboy', 'parksvid'
-				end
-			else
-				gs 'telefon','telotkaz',$loverdesc[lover_number]
-			end
+		phone_rand = rand(1,temp_showertot)
+		!!Setting the image owned flag to 1
+		dynamic 'bathroom_showerselfie[<<phone_rand>>] = 1'
+		gs 'stat'
+		if usePopUps = 1:
+			msg '<img src="images/pc/activities/phone/selfies/bathroom/shower/<<phone_rand>>.jpg">'
+		else
+			view 'images/pc/activities/phone/selfies/bathroom/shower/<<phone_rand>>.jpg'
 		end
-	end
-
-	act 'Invite to a movie':
-		cla
-		'"Want to go see a movie?"'
-
-		if willAgree:
-			'<<$loverdesc[lover_number]>>, "See you at the movie theater in an hour."'
-
-			act 'Go':
-				if $clothingworntype = 'nude':
-					gs 'clothing','wear_last_worn'
-					gs 'underwear','wear'
-				end
-				gt 'svidboy', 'kinosvid'
-			end
+	elseif $ARGS[1] = 'bath':
+		if Enable_Android = 1:
+			dynamic 'temp_bathtot = <<selfieBathtot[arrpos(''$selfieLoc'', ''bathroom'',1)]>>'
 		else
-			gs 'telefon','telotkaz',$loverdesc[lover_number]
+			dynamic 'temp_bathtot = <<selfieBathtot[arrpos(1, ''$selfieLoc'', ''bathroom'')]>>'
 		end
-	end
-
-	if $home['town'] = 'city':
-		act 'Invite to the pool hall':
-			cla
-			'"Let''s play pool."'
-
-			if willAgree:
-				'<<$loverdesc[lover_number]>>, "See you at the pool hall in an hour."'
-
-				act 'Go':gt 'svidboy', 'billsvid'
-			else
-				gs 'telefon','telotkaz',$loverdesc[lover_number]
-			end
+		phone_rand = rand(1,temp_bathtot)
+		dynamic 'bathroom_bathselfie[<<phone_rand>>] = 1'
+		gs 'stat'
+		if usePopUps = 1:
+			msg '<img src="images/pc/activities/phone/selfies/bathroom/bath/<<phone_rand>>.jpg">'
+		else
+			view 'images/pc/activities/phone/selfies/bathroom/bath/<<phone_rand>>.jpg'
 		end
 	end
+end
 
-	act 'Invite to the cafe':
-		cla
-		'"Let''s go to the cafe."'
-
-		if willAgree:
-			'<<$loverdesc[lover_number]>>, "See you at the cafe in an hour."'
-
-			act 'Go':
-				if $clothingworntype = 'nude':
-					gs 'clothing','wear_last_worn'
-					gs 'underwear','wear'
-				end
-				gt 'svidboy', 'kafesvid'
-			end
+!!for taking photos - only selfies for now
+if $ARGS[0] = 'Phone_camera':
+	gs 'phone_selfies', 'Phone_selfie_totals'
+	if $locclass = 'bedr':
+		$phone_loc = 'bedroom'
+	elseif $locclass = 'kitr':
+		$phone_loc = 'kitchen'
+	elseif $locclass = 'livingr':
+		$phone_loc = 'livingroom'
+	elseif $locclass = 'changingroom':
+		$phone_loc = 'changingroom'
+	elseif $locclass = 'city_park':
+		$phone_loc = 'park'
+	elseif $locclass = 'locker':
+		$phone_loc = 'locker'
+	elseif $locclass = 'beach':
+		$phone_loc = 'beach'
+	elseif $locclass = 'classroom':
+		$phone_loc = 'classroom'
+	elseif $locclass = 'school_bathroom':
+		$phone_loc = 'school_bathroom'
+	elseif $locclass = 'restroom':
+		$phone_loc = 'restroom'
+	elseif $location_type = 'bathroom':
+		$phone_loc = 'bathroom'
+	else
+		$phone_loc = ''
+	end
+	$telefon['body'] = '<font size=6>Camera</font><br>
+	<img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_camera.png" height="80" width="80"><br><br>'
+	!! Take a selfie depending on which clothes you are wearing
+	$telefon['body'] += '<a href="exec:gs ''exp_gain'', ''photoskl'', 1 & gs ''telefon'', ''Phone_camera_selfie'', ''<<$phone_loc>>'' "><b>Take a selfie</b></a><br>'
+	!! Flashing selfie
+	if $clothingworntype ! 'nude' and $phone_loc <> '':
+		if Enable_Android = 1:
+			locIndex = arrpos('$selfieLoc', $phone_loc,1)
 		else
-			gs 'telefon','telotkaz',$loverdesc[lover_number]
+			locIndex = arrpos(1, '$selfieLoc', $phone_loc)
+		end
+		if (pcs_inhib >= 35 or exhibitionist_lvl > 0 or $phone_loc = 'bedroom') and dyneval("result = <<selfieTitflash[locIndex]>>") > 0:
+			$telefon['body'] += '<a href="exec:gs ''exp_gain'', ''photoskl'', 1 & gs ''telefon'', ''Phone_camera_selfie'', ''<<$phone_loc>>'', ''tits'' "><b>Flash your tits for a selfie</b></a><br>'
+		end
+		if (exhibitionist_lvl > 0 or $phone_loc = 'bedroom') and dyneval("result = <<selfieAssflash[locIndex]>>") > 0:
+			$telefon['body'] += '<a href="exec:gs ''exp_gain'', ''photoskl'', 1 & gs ''telefon'', ''Phone_camera_selfie'', ''<<$phone_loc>>'', ''ass'' "><b>Flash your ass for a selfie</b></a><br>'
+		end
+		if (exhibitionist_lvl > 1 or $phone_loc = 'bedroom') and dyneval("result = <<selfiePussyflash[locIndex]>>") > 0:
+			$telefon['body'] += '<a href="exec:gs ''exp_gain'', ''photoskl'', 1 & gs ''telefon'', ''Phone_camera_selfie'', ''<<$phone_loc>>'', ''pussy'' "><b>Flash your pussy for a selfie</b></a><br>'
 		end
 	end
-
-	act 'I think we should break up...':
-		cla
-		'He sounds hurt, but you insist it is for the best. You both say goodbye and part ways.'
-		gs 'lover', 'remove', lover_number
-
-		act 'Hangup':gt 'telefon', 'fin'
-	end
-
-	act 'Hangup':gt 'telefon', 'fin'
+	dynamic $telefon['print']
 end
 
-if $ARGS[0] = 'lover' and loverGender[ARGS[1]] = 0:
-	cla
-	clr
-	lover_number = ARGS[1]
-	ring = 0
-	lover_days = daystart - loverday[lover_number]
-	!gs 'stat'
-	!gs 'telefon','phone_call_receive'
-	svetrand = rand(0, 5)
-
-	if svetrand = 0:$sveta = 'cutie'
-	if svetrand = 1:$sveta = 'honey'
-	if svetrand = 2:$sveta = 'sweetie'
-	if svetrand = 3:$sveta = 'baby'
-	if svetrand = 4:$sveta = 'hot stuff'
-	if svetrand = 5:$sveta = '<<$pcs_nickname>>'
+!!-----------------------------------end of Camera------------------------------------------
 
-	'Hey <<$sveta>>, it''s me, <<$loverdesc[lover_number]>>. How''s it going?'
+!!-----------------------------------start of sms------------------------------------------
+!{
+	Send SMS lists the current contacts, then clicking on a contact gives a list of messages that can be sent.
+	Receive messages lists the sms messages sent to the player, these can be deleted, they will be in bold until read.
+	
+	To add an incoming message 
+	gs 'telefon', 'add_sms', 'A1', 'Test message the text goes here', 'images/pc/activities/phone/selfies/bathroom/underwear/1.jpg', 'images/pc/activities/phone/selfies/school_bathroom/pussyflash/1.jpg'
+	A1 is the NPC code (A1 is Dmitriy Nosov "Dimka")
+	You can have up to 4 pictures attached to the message
 
-	act 'Reply':
-		cla
-		'"Pretty good, you?"'
-		'<<$loverdesc[lover_number]>>, "Great, but I kind of miss you, can we meet today?"'
+	To add an out going message that can be sent
+	gs 'telefon', 'add_sms_to_send', 'A1', 'Test message the text goes here'
 
-		if (pregchem / 24) <= lover_days and knowpreg = 1 and pregtalk = 0:
-			act 'Tell him he''s going to be a dad':
-				cla
-				pregtalk = 1
-				'"Honey, I''m pregnant with your child."'
+	To add a contact if it doesn't exist
+	if arrpos('$contact', 'A1') = -1: gs 'telefon', 'AddContact', 'A1', 'images/characters/shared/headshots_main/big1.jpg', "", "1 = 0", "", "", 0
 
-				if haraklover[lover_number] = 0:
+	SMS Arrays storing received messages and messages that can be sent
 
-					if loverrelation[lover_number] >= 90:
-						loverlove[lover_number] = 1
+	Received Messages
+	telefon['UnreadSMS'] = number of unread SMS messages
+	$SMSContact[] = NPC code for contact. ('A129', 'A29', 'B13', 'C14') that sent the sms
+	$SMSMessage[] = text for the sms message
+	$SMSReplies[] = text for the replies
+	$SMSTime[] = date time the message was received
+	$SMSPicture1[] = url for first picture sent as part of the message
+	$SMSPicture2[] = url for second picture sent as part of the message
+	$SMSPicture3[] = url for third picture sent as part of the message
+	$SMSPicture4[] = url for fourth picture sent as part of the message
+	SMSMessageRead[] = 0 unread, 1 read
 
-						'<<$loverdesc[lover_number]>>, "This is wonderful! We have to celebrate!"'
-						'You start talking about living together. <<$loverdesc[lover_number]>> tells you that he is not against it on principle, but first he wants you to meet his parents.'
-						'He warns you that his mother is very demanding and rigorous. <<$loverdesc[lover_number]>> says that he loves his mother and does not want to upset her. Therefore, you must look gorgeous, wear a dress from a boutique, and have well-groomed and curled hair and makeup in moderation.'
-						'When you are totally ready <<$loverdesc[lover_number]>> will take you to his parents.'
+	Send Messages 
+	$SMSSendContact[] = NPC code for contact. ('A129', 'A29', 'B13', 'C14') that sent the sms
+	$SMSSendMessage[] = text for the sms message
+	$SMSSendCode[] = Code to execute for Incoming call
+	SMSSendRepeatable[] = 0 delete option after send, 1 don't delete option
+	$SMSSendDeleteId[] = id passed by the caller 
+}
 
-						act 'Hang up':gt 'telefon', 'fin'
+if $ARGS[0] = 'Phone_sms':
+	$telefon['body'] = '
+	<font size=6>SMS</font><br>
+	<img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/<<iif(telefon[''UnreadSMS'']=0,''icon_sms.png'',''icon_sms_new.gif'')>>" height="80" width="80"><br>'
+	
+	$telefon['body'] += '<b><a href="exec:gs ''telefon'', ''send_sms''">Send new SMS</a></b><br>'
+	$telefon['body'] += '<TABLE cellspacing="0" width="80%"><TR><TH>Icon</TH><TH>Name</TH><TH align="right">Received</TH><TH></TH></TR>'
 
-						act 'Meet tonight':
-							cla
-							svidanie[lover_number] = 1
-							'"How about this evening?"'
-							'<<$loverdesc[lover_number]>>, "Sounds great! When can I come to pick you up?"'
-
-							act 'Pick a time':
-								cla
-								meetday[lover_number] = daystart
-								meethour[lover_number] = input ("When do you want to be picked up? It is now <<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>>. [Enter the hour only 0 - 20]")
-								if meethour[lover_number] <= hour or meethour[lover_number] > 23:meethour[lover_number] = 20
-								'"How about <<meethour[lover_number]>>:00?"'
-								'<<$loverdesc[lover_number]>>, "Okay <<$sveta>>, see you at <<meethour[lover_number]>>:00."'
+	!!iterating all Messages
+	!!reset and recalculate unread messages count, in case they get out of sync
+	telefon['UnreadSMS'] = 0
+	i=0
+	:smsloop
+	if i < arrsize('$SMSContact'):
+		!! if the person sending is in the contact list display the names and icon
+		telefon['contactid'] = arrpos('$contact',$SMSContact[i])
+		if telefon['contactid'] = -1:
+			$telefonCon['NPCName'] = ''
+			$telefonCon['Icon'] = 'icon_na.png'
+		else
+			$telefonCon['NPCName'] = $npc_nickname[$contact[telefon['contactid']]]
+			$telefonCon['Icon'] = $contactIcon[telefon['contactid']]
+		end 
 
-								act 'Hang up':gt 'telefon', 'fin'
-							end
-						end
-					elseif loverrelation[lover_number] < 90:
-						money += 20000
-						'<<$loverdesc[lover_number]>> "I''m not yet ready to become a dad. I''ll give you the money for an abortion. Get rid of the child.'
+		if SMSMessageRead[i] = 0: telefon['UnreadSMS'] += 1
+		$telefon['body'] += dyneval($telefon['SMS'],i,$telefonCon['Icon'],$telefonCon['NPCName'],$SMSTime[i],SMSMessageRead[i])
+		i += 1
+		jump 'smsloop'
+	end
+	$telefon['body'] += '<b><a href="exec:gs ''telefon'', ''delete_sms'',''0'',''all''">Delete All</a></b><br>'
+	$telefon['body'] += '</TABLE><br>'
 
-						act 'Hang up':gt 'telefon', 'fin'
-					end
-				elseif haraklover[lover_number] = 1:
+	dynamic $telefon['print']
+	killvar 'i'
+end &! --- Phone_sms ---
 
-					money += 20000
-					'<<$loverdesc[lover_number]>> "I''m not yet ready to become a dad. I''ll give you the money get an abortion.'
+!{ 
+	New SMS Message
+	If NPC is not in the contacts list of the phone it will be displayed as unknown until the contact has been added
+	$ARGS[1] = NPC code for contact. ('A129', 'A29', 'B13', 'C14')
+	$ARGS[2] = Message text to be displayed
+	$ARGS[3] = Replies to the message (optional)
+	$ARGS[4] = path to a picture to be displayed (optional)
+	$ARGS[5] = path to a picture to be displayed (optional)
+	$ARGS[6] = path to a picture to be displayed (optional)
+	$ARGS[7] = path to a picture to be displayed (optional)
+}
+if $ARGS[0] = 'add_sms':
+	$SMSContact[telefon['SMSCount']] = $ARGS[1]
+	$SMSMessage[telefon['SMSCount']] = $ARGS[2]
+	$SMSReplies[telefon['SMSCount']] = $ARGS[3]
+	$SMSTime[telefon['SMSCount']] = '<<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>> <<$week[week]>> <<day>> <<$month>> <<year>>'
+	$SMSPicture1[telefon['SMSCount']] = $ARGS[4]
+	$SMSPicture2[telefon['SMSCount']] = $ARGS[5]
+	$SMSPicture3[telefon['SMSCount']] = $ARGS[6]
+	$SMSPicture4[telefon['SMSCount']] = $ARGS[7]
+	SMSMessageRead[telefon['SMSCount']] = 0
+	telefon['SMSCount'] += 1
+	telefon['UnreadSMS'] += 1
+end
 
-					act 'Hang up':gt 'telefon', 'fin'
-				elseif haraklover[lover_number] = 2:
+if $ARGS[0] = 'delete_sms':
+	telefon['SMSid'] = ARGS[1]
+	killvar '$SMSContact', telefon['SMSid']
+	killvar '$SMSMessage', telefon['SMSid']
+	killvar '$SMSReplies', telefon['SMSid']
+	killvar '$SMSTime', telefon['SMSid']
+	killvar '$SMSPicture1', telefon['SMSid']
+	killvar '$SMSPicture2', telefon['SMSid']
+	killvar '$SMSPicture3', telefon['SMSid']
+	killvar '$SMSPicture4', telefon['SMSid']
+	killvar 'SMSMessageRead', telefon['SMSid']
+	telefon['SMSCount'] -= 1
+	if $ARGS[2] = 'all' and telefon['SMSCount'] > 0 :
+		gs 'telefon','delete_sms','0','all'
+	end	
+	gs 'telefon', 'Phone_sms'
+end
 
-					pregtalk = 0
-					'<<$loverdesc[lover_number]>>, "What? You whore! Someone fucked your pussy, and now you drop it on me. You''re dumped.'
-					gs 'lover', 'remove', lover_number
+if $ARGS[0] = 'show_sms':
+	telefon['SMSid'] = ARGS[1]
+	!!set to read and update the number of unread messages
+	if SMSMessageRead[telefon['SMSid']] = 0:
+		telefon['UnreadSMS'] -= 1
+		SMSMessageRead[telefon['SMSid']] = 1
+	end
 
-					act 'Hang up':gt 'telefon', 'fin'
-				end
-			end
-		elseif (pregchem / 24) > lover_days and knowpreg = 1 and pregtalk = 0:
-			act 'Honey, you will soon become a dad':
-				cla
-				loverrelation[lover_number] = 0
-				'"Honey, I''m pregnant with your child."'
-				'<<$loverdesc[lover_number]>>, "How the fuck did I manage that? Unless I own a time-machine and went back to before we met and fucked you, it''s someone else''s, go and tell him. I don''t want to see you again, goodbye."'
+	!! Get image and name if in phone contacts otherwise show unknown
+	telefon['contactid'] = arrpos('$contact',$SMSContact[telefon['SMSid']])
+	if telefon['contactid'] = -1:
+		$telefonCon['NPCName'] = ''
+		$telefonCon['Icon'] = 'icon_na.png'
+	else
+		$telefonCon['NPCName'] = $npc_nickname[$contact[telefon['contactid']]]
+		$telefonCon['Icon'] = $contactIcon[telefon['contactid']]
+	end 
 
-				act 'Hang up.':gt 'telefon', 'fin'
-			end
-		elseif week > 1 and week < 5 and workKafe['job'] = 1:
-			act 'Sorry, I''m working today':
-				cla
-				'"Sorry, I''m working today."'
-				'<<$loverdesc[lover_number]>>, "Okay, I''ll call tomorrow."'
+	!!If file extension is not given, .png is assumed
+	if instr($telefonCon['Icon'],'.') = 0:
+		$telefonCon['Icon'] += '.png'
+	end
+	!!If path is not given, default phone icon path is assumed
+	if instr($telefonCon['Icon'],'/') = 0:
+		$telefonCon['Icon'] = 'images/system/phone/icons/' + $telefonCon['Icon']
+	end
 
-				act 'Hang up':gt 'telefon', 'fin'
-			end
-		end
+	$telefon['body'] = '
+	<font size=6>SMS</font><br>
+	<img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/<<iif(telefon[''UnreadSMS'']=0,''icon_sms.png'',''icon_sms_new.gif'')>>" height="80" width="80"><br>'
 
-		act 'Tonight':
-			cla
-			loverrelation[lover_number] += 1
-			svidanie[lover_number] = 1
-			meetday[lover_number] = daystart
-			'"How about this evening?"'
-			'<<$loverdesc[lover_number]>>, "Sounds great! When can I come to pick you up?"'
+	$telefon['body'] += '<table cellspacing="0" width="80%">'
+	$telefon['body'] += '<tr><tr><img height=100 src="<<$telefonCon[''Icon'']>>"></td><td><<$telefonCon[''NPCName'']>></td></tr>'
+	$telefon['body'] += '<tr><td colspan="2"><<$SMSMessage[telefon[''SMSid'']]>></td></tr>'
+	if $SMSReplies[telefon['SMSid']] <> '':
+		!$telefon['body'] += '<tr><th colspan="2" style="font-size:120%">Reply</th></tr>'
+		$telefon['body'] += '<tr><th> </th></tr>'
+		$telefon['body'] += '<tr><td colspan="2"><<$SMSReplies[telefon[''SMSid'']]>></td></tr>'
+	end
+	if $SMSPicture1[telefon['SMSid']] <> '':
+		$telefon['body'] += '<tr><td colspan="2"><img src="<<$SMSPicture1[telefon[''SMSid'']]>>"></td></tr>'
+	end
+	if $SMSPicture2[telefon['SMSid']] <> '':
+		$telefon['body'] += '<tr><td colspan="2"><img src="<<$SMSPicture2[telefon[''SMSid'']]>>"></td></tr>'
+	end
+	if $SMSPicture3[telefon['SMSid']] <> '':
+		$telefon['body'] += '<tr><td colspan="2"><img src="<<$SMSPicture3[telefon[''SMSid'']]>>"></td></tr>'
+	end
+	if $SMSPicture4[telefon['SMSid']] <> '':
+		$telefon['body'] += '<tr><td colspan="2"><img src="<<$SMSPicture4[telefon[''SMSid'']]>>"></td></tr>'
+	end
+	$telefon['body'] += '</table><br>'
+	$telefon['backButton'] = 'gs ''telefon'', ''Phone_sms'' '
+	dynamic $telefon['print']
+end
 
-			act 'Pick a time':
-				cla
-				meethour[lover_number] = input ("When do you want to be picked up. It is now <<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>>. [Enter the hour only 0 - 20]")
-				if meethour[lover_number] <= hour or meethour[lover_number] > 23:meethour[lover_number] = 20
+!! This is the formatting function for a row in the SMS message table. SHould be run as a DYNEVAL()
+!{	
+	SMS Row in messages table
+	ARGS[0] = message id 
+	$ARGS[1] = NPC icon
+	$ARGS[2] = NPC Nickname
+	$ARGS[3] = Time received
+	ARGS[4] = 0 unread, 1 read
+}
+$telefon['SMS'] = {
+	telefon['SMSid'] = ARGS[0]
+	$telefon['ContactIcon'] = $ARGS[1]
+	$telefon['ContactNickName'] = $ARGS[2]
+	$telefon['SMSTime'] = $ARGS[3]
+	telefon['SMSStatus'] = ARGS[4]
+	!!If file extension is not given, .png is assumed
+	if instr($telefon['ContactIcon'],'.') = 0:
+		$telefon['ContactIcon'] += '.png'
+	end
+	!!If path is not given, default phone icon path is assumed
+	if instr($telefon['ContactIcon'],'/') = 0:
+		$telefon['ContactIcon'] = 'images/system/phone/icons/' + $telefon['ContactIcon']
+	end
+	!! unread will be bold
+	if telefon['SMSStatus'] = 0:
+		$telefon['SMSstyle1'] = '<b>'
+		$telefon['SMSstyle2'] = '</b>'
+	else
+		$telefon['SMSstyle1'] = ''
+		$telefon['SMSstyle2'] = ''
+	end
 
-				'"How about <<meethour[lover_number]>>:00?."'
-				'<<$loverdesc[lover_number]>>, "Okay <<$sveta>>, see you at <<meethour[lover_number]>>:00."'
+	$result = '<TR>
+		<TD><img height=100 src="<<$telefon[''ContactIcon'']>>"></TD>
+		<TD><<$telefon[''SMSstyle1'']>><<$telefon[''ContactNickName'']>><<$telefon[''SMSstyle2'']>></TD>
+		<TD align="right"><<$telefon[''SMSstyle1'']>><a href="exec:gs ''telefon'', ''show_sms'', <<telefon[''SMSid'']>>"><<$telefon[''SMSTime'']>></a><<$telefon[''SMSstyle2'']>></TD>
+		<TD><<$telefon[''SMSstyle1'']>><a href="exec:gs ''telefon'', ''delete_sms'', <<telefon[''SMSid'']>>">Delete</a><<$telefon[''SMSstyle2'']>></TD>
+	</TR>'
+}
 
-				act 'Hang up':gt 'telefon', 'fin'
-			end
+!! List of Contacts that you can send sms messages to
+if $ARGS[0] = 'send_sms':
+	$telefon['backButton'] = 'gs ''telefon'', ''Phone_sms'''
+	$telefon['body'] = '
+	<font size=6>Send SMS</font><br>
+	<img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/<<iif(telefon[''UnreadSMS'']=0,''icon_sms.png'',''icon_sms_new.gif'')>>" height="80" width="80"><br>'
+	if $subscription['metered_calls'] = 1 and $subscription['sms_limit'] > 0: 
+		$telefon['body'] += '<br/>'
+		$telefon['body'] += '<b>You still can send <<$subscription[''sms_limit'']>> text messages on your contract</b>'
+	end
+!! Colour correction for editor ''''
+	
+	$telefon['body'] += '<TABLE cellspacing="0" width="80%">'
+	!!iterating all Contacts
+	i=0
+	:smscontactloop
+	if i < arrsize('$contact'):
+		if contactAnon[i] = 0:
+			$telefon['body'] += dyneval($telefon['contactsms'],i)
 		end
+		i += 1
+		jump 'smscontactloop'
+	end
+	$telefon['body'] += '</TABLE><br>'
 
-		act 'Maybe tomorrow':
-			cla
-			loverrelation[lover_number] -= 1
-			'"I''m busy today. Call tomorrow."'
-
-			if loverrelation[lover_number] <= 0:'<<$loverdesc[lover_number]>>, Are you fucking me, you know what. Suck my dick.' & gs 'lover', 'remove', lover_number
-			if loverrelation[lover_number] > 0:'(<<$loverdesc[lover_number]>>) -  Okay, I''ll call tomorrow.'
-
-			act 'Hang up': gt 'telefon', 'fin'
-		end
+	dynamic $telefon['print']
+	killvar 'i'
+end
 
-		act 'I think we should break up...':
-			cla
-			'He sounds hurt, but you insist it is for the best. You both say goodbye and part ways.'
-			gs 'lover', 'remove', lover_number
+!! This is the formatting function for a row in the Contact List. SHould be run as a DYNEVAL()
+!! $ARGS[0] = index of contact in the conntact arrays
+$telefon['contactsms'] = {
+	!! Contact Row in phone contact list
+	$telefon['ContactIcon'] = $contactIcon[ARGS[0]]
+	$telefon['ContactNPCcode'] = $contact[ARGS[0]]
+	!!If file extension is not given, .png is assumed
+	if instr($telefon['ContactIcon'],'.') = 0:
+		$telefon['ContactIcon'] += '.png'
+	end
+	!!If path is not given, default phone icon path is assumed
+	if instr($telefon['ContactIcon'],'/') = 0:
+		$telefon['ContactIcon'] = 'images/system/phone/icons/' + $telefon['ContactIcon']
+	end
 
-			act 'Hang up': gt 'telefon', 'fin'
+	$result = '
+	<TR>
+		<TD><img src="<<$telefon[''ContactIcon'']>>" width="75"></TD>
+		<TD><<$npc_nickname[$telefon[''ContactNPCcode'']]>></TD>
+		<TD><a href="exec:gs ''telefon'', ''npcSendListSms'', ''<<$telefon[''ContactNPCcode'']>>''">New Message</a></TD>
+	</TR>'
+}
+
+!! List of SMS messages available to be sent to an NPC
+!! $ARGS[1] = NPC code for the contact we want to display messages for
+if $ARGS[0] = 'npcSendListSms':
+	$telefon['backButton'] = 'gs ''telefon'', ''send_sms'' '
+	$telefon['body'] = '
+	<font size=6>Send SMS</font><br>
+	<img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/<<iif(telefon[''UnreadSMS'']=0,''icon_sms.png'',''icon_sms_new.gif'')>>" height="80" width="80"><br>'
+
+	$telefon['body'] += '<TABLE cellspacing="0" width="80%">'
+	!!iterating all send sms messages
+	i=0
+	:npcSendListSmsLoop
+	if i < arrsize('$SMSSendContact'):
+		if $SMSSendContact[i] = $ARGS[1]:
+			$telefon['body'] += dyneval($telefon['smsMessageToSend'],i)
 		end
+		i += 1
+		jump 'npcSendListSmsLoop'
 	end
+	$telefon['body'] += '</TABLE><br>'
 
-	act 'Hang up (end relationship)':
-		cla
-		gs 'lover', 'remove', lover_number
-		gt 'telefon', 'fin'
-	end
+	dynamic $telefon['print']
+	killvar 'i'
 end
 
-if $ARGS[0] = 'lover' and loverGender[ARGS[1]] = 1:
-	cla
-	clr
-	lover_number = ARGS[1]
-	ring = 0
-	lover_days = daystart - loverday[lover_number]
-	!gs 'stat'
-	!gs 'telefon','phone_call_receive'
-	svetrand = rand(0, 5)
-
-	if svetrand = 0:$sveta = 'cutie'
-	if svetrand = 1:$sveta = 'honey'
-	if svetrand = 2:$sveta = 'sweetie'
-	if svetrand = 3:$sveta = 'baby'
-	if svetrand = 4:$sveta = 'hot stuff'
-	if svetrand = 5:$sveta = '<<$pcs_nickname>>'
-
-	'Hey <<$sveta>>, it''s me, <<$loverdesc[lover_number]>>. How''s it going?'
+!! This is the formatting function for a row in the messages to send List. SHould be run as a DYNEVAL()
+!! ARGS[0] = index of the message
+$telefon['smsMessageToSend'] = {
+	$telefon['ContactNPCcode'] = $SMSSendContact[ARGS[0]]
+	$result = '
+	<TR>
+		<TD><<$npc_nickname[$telefon[''ContactNPCcode'']]>></TD>
+		<TD><a href="exec: gs ''telefon'', ''smsSendMessage'', ''<<ARGS[0]>>''"><<$SMSSendMessage[ARGS[0]]>></a></TD>
+	</TR>'
+}
 
-	act 'Reply':
-		cla
-		'"Pretty good, you?"'
-		'<<$loverdesc[lover_number]>>, "Great, but I kind of miss you, can we meet today?"'
+if $ARGS[0] = 'smsSendMessage':
+	dynamic '<<$SMSSendCode[ARGS[1]]>>'
+	gs 'internet_mobile', 'send_sms'
+	if SMSSendRepeatable[ARGS[1]] = 0:
+		gs 'telefon', 'delete_sms_send_index', ARGS[1]
+	end
+	gs 'telefon', 'Phone_sms'
+end
 
 
-		act 'Tonight':
-			cla
-			loverrelation[lover_number] += 1
-			svidanie[lover_number] = 1
-			meetday[lover_number] = daystart
-			'"How about this evening?"'
-			'<<$loverdesc[lover_number]>>, "Sounds great! When can I come to pick you up?"'
 
-			act 'Pick a time':
-				cla
-				meethour[lover_number] = input ("When do you want to be picked up. It is now <<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>>. [Enter the hour only 0 - 20]")
-				if meethour[lover_number] <= hour or meethour[lover_number] > 23:meethour[lover_number] = 20
+!{
+	Add a new message that can be sent by the player
+	$ARGS[1] NPC code for contact. ('A129', 'A29', 'B13', 'C14') that sent the sms
+	$ARGS[2] text for the sms message
+	$ARGS[3] Code to execute when the sms is sent
+	 ARGS[4] 0 delete option after send, 1 dont delete option
+	$ARGS[5] id passed by the caller to identify the option to be deleted if it needs to be removed from the options
+}
+if $ARGS[0] = 'add_sms_to_send':
+	i = arrsize('$SMSSendContact')
+	$SMSSendContact[i] = $ARGS[1]
+	$SMSSendMessage[i] = $ARGS[2]
+	$SMSSendCode[i] = $ARGS[3]
+	SMSSendRepeatable[i] = ARGS[4]
+	$SMSSendDeleteId[i] = $ARGS[5]
+end
 
-				'"How about <<meethour[lover_number]>>:00?."'
-				'<<$loverdesc[lover_number]>>, "Okay <<$sveta>>, see you at <<meethour[lover_number]>>:00."'
+if $ARGS[0] = 'delete_sms_send_index':
+	killvar '$SMSSendContact', ARGS[1]
+	killvar '$SMSSendMessage', ARGS[1]
+	killvar '$SMSSendCode', ARGS[1]
+	killvar 'SMSSendRepeatable', ARGS[1]
+	killvar '$SMSSendDeleteId', ARGS[1]
+end
 
-				act 'Hang up':gt 'telefon', 'fin'
-			end
+!{
+	$ARGS[1] = NPC code for contact. ('A129', 'A29', 'B13', 'C14')
+	$ARGS[2] = Delete id of the message ($SMSSendDeleteId)
+}
+if $ARGS[0] = 'delete_sms_send_id':
+	$telefon['SMStoDeleteFound'] = 'No'
+	i = 0
+	:findSmsToDeleteLoop
+	if (i < arrsize('$SMSSendContact')) and $telefon['SMStoDeleteFound'] = 'No':
+		if $SMSSendContact[i] = $ARGS[1] and $SMSSendDeleteId[i] = $ARGS[2]:
+			gs 'telefon', 'delete_sms_send_index', i
+			$telefon['SMStoDeleteFound'] = 'Yes'
 		end
+		i += 1
+		jump 'findSmsToDeleteLoop'
+	end
+end
 
-		act 'Maybe tomorrow':
-			cla
-			loverrelation[lover_number] -= 1
-			'"I''m busy today. Call tomorrow."'
+!!-----------------------------------end of sms------------------------------------------
 
-			if loverrelation[lover_number] <= 0:'<<$loverdesc[lover_number]>>, Are you fucking me, you know what. Fuck off.' & gs 'lover', 'remove', lover_number
-			if loverrelation[lover_number] > 0:'(<<$loverdesc[lover_number]>>) -  Okay, I''ll call tomorrow.'
-			act 'Hang up': gt 'telefon', 'fin'
-		end
+if $ARGS[0] = 'Phone_wheather':
+	$telefon['body'] = '
+	<font size=6>Weather</font><br>
+	<img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_weather.png" height="80" width="80"><br><br>
+	<b>Temperature:</b><br>
+	<<$temperature>>. <<$osadki>><br>
+	P.O.P. today is <<weatherFall>>%<br>'
+	dynamic $telefon['print']
+end &! --- Phone_wheather ---
 
-		act 'I think we should break up...':
-			cla
-			'She sounds hurt, but you insist it is for the best. You both say goodbye and part ways.'
-			gs 'lover', 'remove', lover_number
+if $ARGS[0] = 'Phone_calendar':
+	$telefon['body'] = '
+	<font size=6>Calendar</font><br>
+	<img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_calendar.png" height="80" width="80"><br><br>
+	<B>Today:</B><br>
+	<<$week[week]>>, <<day>> <<$month>> <<year>><br>'
+	dynamic $telefon['print']
+end &! --- Phone_calendar ---
 
-			act 'Hang up': gt 'telefon', 'fin'
+if $ARGS[0] = 'Phone_media':
+	$telefon['body'] = '
+	<font size=6>Media</font><br>
+	<img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_music.png" height="80" width="80"><br>
+	<b>This option is not active</b><br>'
+	dynamic $telefon['print']
+end &! --- Phone_media ---
+
+if $ARGS[0] = 'Phone_menu':
+	if phone_off = 0:
+		$telefon['body'] = '
+		<a href="exec:gs ''telefon'', ''Phone_camera'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_camera.png" height="80" width="80"></a>
+		<a href="exec:gs ''telefon'', ''Phone_calendar'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_calendar.png" height="80" width="80"></a>
+		<a href="exec:gs ''telefon'', ''Phone_pictures'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_pictures.png" height="80" width="80"></a>
+		<br>
+		<a href="exec:gs ''telefon'', ''Phone_media'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_music.png" height="80" width="80"></a>
+		<a href="exec:gs ''telefon'', ''Phone_notebook'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_notebook.png" height="80" width="80"></a>
+		<a href="exec:gs ''telefon'', ''Phone_wheather'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_weather.png" height="80" width="80"></a>
+		<br>
+		<a href="exec:gs ''telefon'', ''ContactList'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_call.png" height="80" width="80"></a>
+		<a href="exec:gs ''telefon'', ''Phone_sms'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/<<iif(telefon[''UnreadSMS'']=0,''icon_sms.png'',''icon_sms_new.gif'')>>" height="80" width="80"></a>
+		<a href="exec:gs ''telefon'', ''Phone_megafon'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_megafon.png" height="80" width="80"></a>
+		<br>'
+		if menu_off = 1:
+			$telefon['body'] += '<a href="exec:gs ''obj_din'', ''menu_disabled''"><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_settings.png" height="80" width="80"></a><br>'
+		else
+			$telefon['body'] += '<a href="exec:killvar ''menu_page'' & gs ''Cheatmenu_din'' & dynamic $cheatmenu[''setting'']"><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_settings.png" height="80" width="80"></a><br>'
 		end
+		dynamic $telefon['print']
+	else
+		'<font color="red"><b>Your phone is disabled for this event</b></font>'
 	end
+end &! --- Phone_menu ---
 
-	act 'Hang up (end relationship)':
-		cla
-		gs 'lover', 'remove', lover_number
-		gt 'telefon', 'fin'
-	end
-end
-!---------------------- End of Lover support
+if $ARGS[0] = 'Add_contact':
+	$dummy = INPUT('Enter a note:')
+	$contact[arrsize('$contact')] = dyneval($telefon['contact'],$ARGS[1],$dummy,$ARGS[2])
+	killvar '$dummy'
+end &! --- Add_contact ---
 
+if $ARGS[0] = 'telotkaz':
+	cla
+	minut += 10
+	'<<$ARGS[1]>>, "Sorry, I''m busy right now, maybe next time."'
 
-if $ARGS[0] = 'Phone_notebook':
-	gs 'housing', 'rent'
-	$telefon['body'] = '
-	<font size=6>Planner</font><br>
-	<img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_notebook.png" height="80" width="80"><br>
-	<<year>>-<<$month>>-<<day>>, <<$week[week]>><br><br>'
-	rent1 = -1
-	rent4 = -1
-	!! TODO: Will have to change this too, to handle more than 2 rentals.
-	if func('homes_properties', 'is_property_of_status', 'rented', 'city_apartment') : rent1 = func('homes_properties', 'get_rent_days', 'city_apartment')
-	if func('homes_properties', 'is_property_of_status', 'rented', 'old_town_apartment') : rent4 = func('homes_properties', 'get_rent_days', 'old_town_apartment')
-	d1 = day
-	w1 = week
-	m1 = month
-	y1 = year
-	i = 0
-	$list = '<br>&emsp;<b>•</b> '
-	:pnotebook
-		daynum = daystart+i
-		$calendarday = ''
+	act 'Hangup':gt 'telefon', 'fin'
+end &! --- telotkaz ---
 
-		if m1 = 1 and d1 >= 1 and d1 <= 8:
-			$calendarday += $list + 'New Year holidays'
-			if d1 = 1:$calendarday += ', New Year'
-			if d1 = 7:$calendarday += ', Christmas'
-		end
-		if m1 = 2 and d1 = 23:$calendarday += $list + 'Defender of Fatherland Day'
-		if m1 = 3 and d1 = 8:$calendarday += $list + 'Women''s Day'
-		if m1 = 5 and d1 = 1:$calendarday += $list + 'Spring and Labor Day'
-		if m1 = 5 and d1 = 2:$calendarday += $list + 'National holiday'
-		if m1 = 5 and d1 = 9:$calendarday += $list + 'Victory Day'
-		if m1 = 6 and d1 = 12:$calendarday += $list + 'Russia Day'
-		if m1 = 6 and d1 = 13:$calendarday += $list + 'National holiday'
-		if m1 = 11 and d1 = 4:$calendarday += $list + 'Unity Day'
 
-		if mid($start_type,1,2) = 'sg' and SchoolAtestat = 0:
-			if m1 = 1 and d1 = 1:$calendarday += $list + 'First day of Winter break.'
-			if m1 = 1 and d1 = 15:$calendarday += $list + 'Last day of Winter break.'
-			if m1 = 3 and d1 = 20:$calendarday += $list + 'First day of Spring break.'
-			if m1 = 3 and d1 = 26:$calendarday += $list + 'Last day of Spring break.'
-			if y1 = 2017 and m1 = 5 and d1 = 25:$calendarday += $list + 'Graduation Day!'
-			if m1 = 6 and d1 = 1:$calendarday += $list + 'First day of Summer break.'
-			if m1 = 8 and d1 = 31:$calendarday += $list + 'Last day of Summer break.'
-			if m1 = 11 and d1 = 4:$calendarday += $list + 'First day of Autumn break.'
-			if m1 = 11 and d1 = 11:$calendarday += $list + 'Last day of Autumn break.'
-		end
+if $ARGS[0] = 'fin':
+	killvar 'lover_number'
+	cla
+	gt $loc, $loc_arg
+end
 
-		if daynum >= daylastperiod+28 and daynum < daylastperiod+31:$calendarday += $list + '<font color=''red''><b>Menstruation!</b></font>'
-		if daynum >= daylastperiod+12 and daynum < daylastperiod+14:$calendarday += $list + '<font color=#336600><b>Ovulation!</b></font>'
-		if pregchem >= 6720:$calendarday += $list + '<font color=''red''><b>Birthing day!</b></font>'
+if $ARGS[0] = 'setup':
+	!! array $$phonetheme_name is built.
+	!! might need a tweak to have it rebuilt when new themes are available.
 
-		if w1 < 5 and (workSec >= 1 or BurgerQW['Secretary'] = 1):$calendarday += $list + 'Working as a secretary. <i>(9:00 - 17:00)</i>'
-		if w1 < 5 and workFabrika = 1:
-			$calendarday += $list + 'Working as a seamstress. '
-			if age < 18:$calendarday += '<i>(16:00 - 20:00)</i>' else $calendarday += '<i>(8:00 - 16:00)</i>'
-		end
-		if w1 > 1 and w1 <= 5 and workhosp = 1:$calendarday += $list + 'Working as a nurse. <i>(8:00 - 16:00)</i>'
-		if worksalon = 1 and (w1 = 1 or w1 = 3 or w1 = 5):$calendarday += $list + 'Working as a masseuse. <i>(9:00 - 17:00)</i>'
-!!		if maidqw > 0:$calendarday += '<br>&emsp;<b>•</b> Working as maid. <i>(16:00 - 19:00)</i>'
-		if pfilmday[i] > 0:$calendarday += $list + 'Porn shoot: <i><<$porndesc[pfilmday[i]]>></i>'
-		if d1 = 25 and (BurgerQW['Secretary'] = 1 or workKafe['job'] = 1 or workhosp = 1 or worksalon = 1 or tanwork = 1 or workSec = 1 or workFabrika = 1):$calendarday += $list + '<i>Pay day!</i>'
-		if d1 = nyp_day and m1 = 12 and SchoolAtestat = 0 and mid($start_type,1,2) = 'sg':$calendarday += $list + 'New Year''s party at 14:00!'
-		if (npc_QW['A33']-2) mod 2 = 1 and sisboyday+1 = daynum:
-			if sisboytrioQW = 1:
-				$calendarday += $list + '<font color="orange">Threesome with Anya and Roma at 18:00</font>'
-			else
-				$calendarday += $list + '<font color="orange">Anya having sex with Roma at 18:00</font>'
-			end
-		end
-		if sisboyparty = 2 and sisboyparty_day+1 = daynum:$calendarday += $list + '<font color="orange">Party at Rex''s, gathering before 18:00 at Community Center</font>'
-		if rent1 = 0:$calendarday += $list + 'Rent on city apartment expires!'
-		if rent4 = 0:$calendarday += $list + 'Rent on Pushkin apartment expires!'
-		if birthday = d1 and birthmonth = m1:$calendarday += $list + 'My birthday!'
-		if kid > 0:
-			k1 = kid
-			:kiddieloop
-				if daykid[k1] = d1 and monthkid[k1] = m1:$calendarday += $list + 'Birthday of my <<$polreb[k1]>> <<$kidname[k1]>>, my <<kid>>. baby!'
-			if k1 > 1:k1 -= 1 & jump 'kiddieloop'
-		end
+	$phonetheme_name[0] = 'Custom_Standard'
+	$phonetheme_name[1] = 'Bimbo'
+	$phonetheme_name[2] = 'Custom_Aluminus'
+	$phonetheme_name[3] = 'Custom_Bottlecapped'
+	$phonetheme_name[4] = 'Custom_Galactic'
+	$phonetheme_name[5] = 'Custom_Vectored'
+	$phonetheme_name[6] = 'Custom_Veneer'
+	$phonetheme_name[7] = 'Custom_Voidwalker'
+	$phonetheme_name[8] = 'Custom_Voidwalker Red'
+	$phonetheme_name[9] = 'Custom_Voidwalker Toxic'
+	$phonetheme_name[10] = 'Gopnik'
+	$phonetheme_name[11] = 'Sports'
+	$phonetheme_name[12] = 'Succubus'
+	$phonetheme_name[13] = 'Woodshop'
 
-		if $calendarday ! '':
-			$telefon['body'] += '<b><<$monthName[m1]>> <<d1>>, <<$week[w1]>>:</b>'
-			$telefon['body'] += $calendarday +'<br>'
-		end
-	if i < 14:
-		rent1 -= 1
-		rent4 -= 1
-		i += 1
-		w1 += 1
-		if w1 > 7:w1 = 1
-		d1 += 1
-		if monthsend[m1] < d1:
-			m1 += 1 & d1 = 1
-			if m1 = 13: m1 = 1 & y1 += 1
-		end
-		jump 'pnotebook'
-	end
-	killvar 'calendarday'
-	killvar 'rent1'
-	killvar 'rent4'
-	killvar 'd1'
-	killvar 'w1'
-	killvar 'm1'
-	killvar 'y1'
-	killvar 'daynum'
-	dynamic $telefon['print']
-end &! --- Phone_notebook ---
+	phonetheme[0] = 1
+	gs 'phone_selfies', 'Phone_selfie_totals'
+end
 
-!!----------------------------------------Camera-------------------------------------------------
 
-!!for viewing photos on your phone
-if $ARGS[0] = 'Phone_pictures':
-	gt 'phone_selfies', 'selfies'
-end
 
-!!picking the selfie image when taking photos, this sets the location variable
-!{
-	$ARGS[1] is phone location if left blank it is a generic selfie	(one of the locations in $selfieLoc[])
-	$ARGS[2] is for flashing when clothed if left blank then it is not flashing
-}
-if $ARGS[0] = 'Phone_camera_selfie':
-	minut += rand(5,7)
-	if $ARGS[1] ! '':
-		gs 'telefon', 'Phone_selfie_image', $ARGS[1], $ARGS[2]
-	else
-		phone_rand = RAND(1,selfieClotot[0])
-		dynamic '<<$selfieLoc[0]>>_closelfie[<<phone_rand>>] = 1'
-		gs 'stat'
-		if usePopUps = 1:
-			msg '<img src="images/pc/activities/phone/selfies/<<$selfieLoc[0]>>/clothed/<<$selfieFilePrefix[0]>><<phone_rand>>.jpg">'
+
+	!!=================================================================!!
+	!!                                                                 !!
+	!!                           SCHEDULING                            !!
+	!!                                                                 !!
+	!!=================================================================!!
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+	!!=================================================================!!
+	!!                                                                 !!
+	!!                      OLD STUFF and EVENTS                       !!
+	!!                                                                 !!
+	!!=================================================================!!
+
+
+!--------------------------------------------------------------------------------------------------
+! Old telephone system.  Some of this should be removed.
+if $ARGS[0] = 'phone_ring':
+	$telefon['body'] = '
+	<font size=6><<$caller>> calling</font><br>
+	<img src="<<$callerid>>"><br>
+	<br>
+	<br>
+	<br>
+	<br>'
+	dynamic $telefon['print']
+end &! --- phone_ring ---
+
+if $ARGS[0] = 'phone_call_receive':
+	$telefon['body'] = '
+	<font size=6>Talking to <<$caller>></font><br>
+	<img src="<<$callerid>>"><br>'
+	dynamic $telefon['print']
+end &! --- phone_call_receive ---
+
+if $ARGS[0] = 'phone_balance':
+	if subscription['monthly_calls'] = 0 and subscription['metered_calls'] < 4:
+		if subscription['monthly_calls'] = 0 and subscription['monthly_calls-date'] > 0: 
+			$contractmessage = '<font size=6>Your mobile contract has expired, you have renew it or buy some minutes.</font><br>'
+		elseif subscription['metered_calls'] < 4 and subscription['metered_calls-date'] > 0:
+			$contractmessage = '<font size=6>Not enough minutes left on your contract to make a call</font><br>'
 		else
-			view 'images/pc/activities/phone/selfies/<<$selfieLoc[0]>>/clothed/<<$selfieFilePrefix[0]>><<phone_rand>>.jpg'
+			$contractmessage = '<font size=6>You don''t have a valid contract, you should buy one at MegFon.</font><br>'
 		end
+		$telefon['body'] = '
+		<<$contractmessage>>
+		<img src="<<$callerid>>"><br><br>
+		<a href="exec:gs ''telefon'', ''Phone_menu'' "><img src="images/system/phone/decline.png"></a><br>'
+		dynamic $telefon['print']
+		wait 3500
+		cla
+		gt $loc, $loc_arg
+		killvar 'contractmessage'
+	elseif subscription['metered_calls'] > 4:
+		subscription['metered_calls'] -= 4
 	end
-	!if cumsumbod-cumsumvag-cumsumass > 0: phone_rand = RAND (m,n) - for SELF in the semen
-	!if photo_event_pic = x: phone_rand = RAND (x,y) - for photos during the events (by heart)
-	!msg '<img src="images/system/phone/phone_selfie<<phone_rand>>.jpg">'
-end
+end &! --- phone_balance ---
 
-!!taking selfies, this chooses a random image for the location for clothed, underwear and nude
-!{
-	$ARGS[1] is phone location (one of the locations in $selfieLoc[])
-	$ARGS[2] is for flashing when clothed if left blank then it is not flashing
-}
-if $ARGS[0] = 'Phone_selfie_image':
-	if $ARGS[2] = '':
-		if PCloswimwear = 1:
-			!!changing to and unmixed variable so the rng will work
-			if Enable_Android = 1:
-				dynamic 'temp_swim = <<selfieSwimtot[arrpos(''$selfieLoc'', $ARGS[1],1)]>>'
-			else
-				dynamic 'temp_swim = <<selfieSwimtot[arrpos(1, ''$selfieLoc'', $ARGS[1])]>>'
-			end
-			if temp_swim > 0:
-				phone_rand = rand(1,temp_swim)
-				!!Setting the image owned flag to 1
-				dynamic '<<$ARGS[1]>>_swim[<<phone_rand>>] = 1'
-				gs 'stat'
-				if usePopUps = 1:
-					msg '<img src="images/pc/activities/phone/selfies/<<$ARGS[1]>>/bikini/<<phone_rand>>.jpg">'
-				else
-					view 'images/pc/activities/phone/selfies/<<$ARGS[1]>>/bikini/<<phone_rand>>.jpg'
-				end
-			end
-		elseif $clothingworntype ! 'nude':
-			!!changing to and unmixed variable so the rng will work
-			if Enable_Android = 1:
-				dynamic 'temp_clotot = <<selfieClotot[arrpos(''$selfieLoc'', $ARGS[1],1)]>>'
-			else
-				dynamic 'temp_clotot = <<selfieClotot[arrpos(1, ''$selfieLoc'', $ARGS[1])]>>'
-			end
-			if temp_clotot > 0:
-				phone_rand = rand(1,temp_clotot)
-				!!Setting the image owned flag to 1
-				dynamic '<<$ARGS[1]>>_closelfie[<<phone_rand>>] = 1'
-				gs 'stat'
-				if usePopUps = 1:
-					msg '<img src="images/pc/activities/phone/selfies/<<$ARGS[1]>>/clothed/<<phone_rand>>.jpg">'
-				else
-					view 'images/pc/activities/phone/selfies/<<$ARGS[1]>>/clothed/<<phone_rand>>.jpg'
-				end
-			end
-		elseif $pantyworntype ! 'none':
-			if Enable_Android = 1:
-				dynamic 'temp_undtot = <<selfieUndtot[arrpos(''$selfieLoc'', $ARGS[1],1)]>>'
-			else
-				dynamic 'temp_undtot = <<selfieUndtot[arrpos(1, ''$selfieLoc'', $ARGS[1])]>>'
-			end
-			if temp_undtot > 0:
-				phone_rand = rand(1,temp_undtot)
-				dynamic '<<$ARGS[1]>>_undselfie[<<phone_rand>>] = 1'
-				gs 'stat'
-				if usePopUps = 1:
-					msg '<img src="images/pc/activities/phone/selfies/<<$ARGS[1]>>/underwear/<<phone_rand>>.jpg">'
-				else
-					view 'images/pc/activities/phone/selfies/<<$ARGS[1]>>/underwear/<<phone_rand>>.jpg'
-				end
-			end
-		else
-			if Enable_Android = 1:
-				dynamic 'temp_nudtot = <<selfieNudtot[arrpos(''$selfieLoc'', $ARGS[1],1)]>>'
-			else
-				dynamic 'temp_nudtot = <<selfieNudtot[arrpos(1, ''$selfieLoc'', $ARGS[1])]>>'
-			end
-			if temp_nudtot > 0:
-				phone_rand = rand(1,temp_nudtot)
-				dynamic '<<$ARGS[1]>>_nudselfie[<<phone_rand>>] = 1'
-				gs 'stat'
-				if usePopUps = 1:
-					msg '<img src="images/pc/activities/phone/selfies/<<$ARGS[1]>>/nude/<<phone_rand>>.jpg">'
-				else
-					view 'images/pc/activities/phone/selfies/<<$ARGS[1]>>/nude/<<phone_rand>>.jpg'
-				end
-			end
-		end
+if $ARGS[0] = 'Phone_call':
+	$telefon['body'] = '
+	<font size=6>Calling <<$npc_nickname[''A29'']>></font><br>
+	<img src="images/system/phone/icons/icon_npc1.png"><br><br>
+	<a href="exec:gs ''telefon'', ''Phone_contactlist'' "><img src="images/system/phone/decline.png"></a><br>'
+	dynamic $telefon['print']
+	wait 1500
+	minut += 1
+	$callerid = 'images/system/phone/icons/icon_npc1.png'
+	gs 'telefon', 'phone_balance'
+	$callerid = 'images/system/phone/icons/icon_npc1.png'
+	gs 'telefon', 'phone_call_reject'
+end &! --- Phone_call ---
+
+if $ARGS[0] = 'phone_call_reject':
+	$telefon['body'] = '
+	<font size=6>Calling...</font><br>
+	<img src="<<$callerid>>"><br><br>
+	<a href="exec:gs ''telefon'', ''Phone_contactlist'' "><img src="images/system/phone/decline.png"></a><br>'
+	dynamic $telefon['print']
+end &! --- phone_call_reject ---
+
+if $ARGS[0] = 'Phone_megafon':
+	if subscription['monthly_calls'] = 1: 
+		$contractmessage = 'You have a valid monthly contract that will renew on <<subscription[''monthly_calls-date'']>>/<<month+1>>' 
+	elseif subscription['metered_calls'] = 1:
+		$contractmessage = 'You have a valid minutes based contract that still has <<subscription[''metered_calls'']>> minuets left' 
+	elseif subscription['monthly_calls'] = 0 and subscription['monthly_calls-date'] > 0: 
+		$contractmessage = '<font size=6>Your mobile contract has expired, you have renew it or buy some minutes.</font><br>'
+	elseif subscription['metered_calls'] < 4 and subscription['metered_calls-date'] > 0:
+		$contractmessage = '<font size=6>You have a minute based plan, but it doesn''t have enough minutes left to make a call</font><br>'
 	else
-		if $ARGS[2] = 'tits':
-			if Enable_Android = 1:
-				dynamic 'temp_titflash = <<selfieTitflash[arrpos(''$selfieLoc'', $ARGS[1],1)]>>'
-			else
-				dynamic 'temp_titflash = <<selfieTitflash[arrpos(1, ''$selfieLoc'', $ARGS[1])]>>'
-			end
-			if temp_titflash > 0:
-				phone_rand = rand(1,temp_titflash)
-				dynamic '<<$ARGS[1]>>_titflash[<<phone_rand>>] = 1'
-				gs 'stat'
-				if usePopUps = 1:
-					msg '<img src="images/pc/activities/phone/selfies/<<$ARGS[1]>>/titflash/<<phone_rand>>.jpg">'
-				else
-					view 'images/pc/activities/phone/selfies/<<$ARGS[1]>>/titflash/<<phone_rand>>.jpg'
-				end
-			end
-		elseif $ARGS[2] = 'ass':
-			if Enable_Android = 1:
-				dynamic 'temp_assflash = <<selfieAssflash[arrpos(''$selfieLoc'', $ARGS[1],1)]>>'
-			else
-				dynamic 'temp_assflash = <<selfieAssflash[arrpos(1, ''$selfieLoc'', $ARGS[1])]>>'
-			end
-			if temp_assflash > 0:
-				phone_rand = rand(1,temp_assflash)
-				dynamic '<<$ARGS[1]>>_assflash[<<phone_rand>>] = 1'
-				gs 'stat'
-				if usePopUps = 1:
-					msg '<img src="images/pc/activities/phone/selfies/<<$ARGS[1]>>/assflash/<<phone_rand>>.jpg">'
-				else
-					view 'images/pc/activities/phone/selfies/<<$ARGS[1]>>/assflash/<<phone_rand>>.jpg'
+		$contractmessage = '<font size=6>You don''t have any valid contracts, you should buy one at MegaFon.</font><br>'
+	end
+
+	$telefon['body'] = '
+	<font size=6>MegaFon</font><br>
+	<img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_megafon.png" height="80" width="80"><br><br>
+	<b><<$contractmessage>></b>'
+	dynamic $telefon['print']
+	killvar '$contractmessage'
+end &! --- Phone_megafon ---
+
+
+if $ARGS[0] = 'Edit_Custom_list':
+	clr
+	dummyas = arrsize('$contact')
+:din_bad_as1
+	dummyas -= 1
+	if dummyas >= 0:
+		$dummyedit = $contact[dummyas]
+		$dummyedit1 = dyneval('$result = ''</a><a href="exec:killvar ''''$contact'''',<<dummyas>> & gs ''''telefon'''', ''''Edit_Custom_list'''' "><b>Remove</b>'' ')
+		$dummyedit2 = $replace($dummyedit,'<b>Call</b>',$dummyedit1)
+		pl $dummyedit2
+		jump 'din_bad_as1'
+	end
+	killvar 'dummyas'
+	killvar 'dummyedit'
+	killvar 'dummyedit1'
+	killvar 'dummyedit2'
+
+	pl'<center><a href="exec:gs ''telefon'', ''Phone_menu'' "><img src="images/system/icons/back.png"></a></center>'
+	!dynamic $telefon['print']
+end &! --- Edit_Custom_list ---
+
+if $ARGS[0] = 'mobilaraz':
+	cls
+	cla
+	gs'din_bad'
+	$caller = '<<$telsob>>'
+	gs 'telefon','phone_balance'
+	gs 'telefon','phone_call_receive'
+	willAgree = (rand(0, 10) > 3)
+	'"Yes, I''m listening," says a voice from the speaker.'
+
+	if month > 5 and temper > 20 and sunWeather = 1:
+		act 'Invite to the park':
+			cla
+			'"Let''s go for a walk in the park."'
+
+			if willAgree:
+				'<<$telsob>>, "See you in the park in an hour."'
+
+				act 'Go':
+					if $clothingworntype = 'nude':
+						gs 'clothing','wear_last_worn'
+						gs 'underwear','wear'
+					end
+					gt 'parksvid'
 				end
-			end
-		elseif $ARGS[2] = 'pussy':
-			if Enable_Android = 1:
-				dynamic 'temp_pussyflash = <<selfiePussyflash[arrpos(''$selfieLoc'', $ARGS[1],1)]>>'
 			else
-				dynamic 'temp_pussyflash = <<selfiePussyflash[arrpos(1, ''$selfieLoc'', $ARGS[1])]>>'
-			end
-			if temp_pussyflash > 0:
-				phone_rand = rand(1,temp_pussyflash)
-				dynamic '<<$ARGS[1]>>_pussyflash[<<phone_rand>>] = 1'
-				gs 'stat'
-				if usePopUps = 1:
-					msg '<img src="images/pc/activities/phone/selfies/<<$ARGS[1]>>/pussyflash/<<phone_rand>>.jpg">'
-				else
-					view 'images/pc/activities/phone/selfies/<<$ARGS[1]>>/pussyflash/<<phone_rand>>.jpg'
-				end
+				gs 'telefon','telotkaz',$telsob
 			end
 		end
 	end
-end
 
-!!taking selfies in the shower or bath
-if $ARGS[0] = 'Phone_selfie_image_bathing':
-	minut += rand(5,7)
-	if $ARGS[1] = 'shower':
-		!!changing to and unmixed variable so the rng will work
-		if Enable_Android = 1:
-			dynamic 'temp_showertot = <<selfieShowertot[arrpos(''$selfieLoc'', ''bathroom'',1)]>>'
+	act 'Invite to a movie':
+		cla
+		'"Want to go see a movie?"'
+
+		if willAgree:
+			'<<$telsob>>, "See you at the movie theater in an hour."'
+			act 'Go':gt 'kinosvid'
 		else
-			dynamic 'temp_showertot = <<selfieShowertot[arrpos(1, ''$selfieLoc'', ''bathroom'')]>>'
+			gs 'telefon','telotkaz',$telsob
 		end
-		phone_rand = rand(1,temp_showertot)
-		!!Setting the image owned flag to 1
-		dynamic 'bathroom_showerselfie[<<phone_rand>>] = 1'
-		gs 'stat'
-		if usePopUps = 1:
-			msg '<img src="images/pc/activities/phone/selfies/bathroom/shower/<<phone_rand>>.jpg">'
+	end
+
+	act 'Invite to the pool hall':
+		cla
+		'"Let''s play pool."'
+
+		if willAgree:
+			'<<$telsob>>, "See you at the pool hall in an hour."'
+
+			act 'Go':
+				if $clothingworntype = 'nude':
+					gs 'clothing','wear_last_worn'
+					gs 'underwear','wear'
+				end
+				gt 'billsvid'
+			end
 		else
-			view 'images/pc/activities/phone/selfies/bathroom/shower/<<phone_rand>>.jpg'
+			gs 'telefon','telotkaz',$telsob
 		end
-	elseif $ARGS[1] = 'bath':
-		if Enable_Android = 1:
-			dynamic 'temp_bathtot = <<selfieBathtot[arrpos(''$selfieLoc'', ''bathroom'',1)]>>'
+	end
+
+	act 'Invite to the cafe':
+		cla
+		'"Let''s go to the cafe."'
+
+		if willAgree:
+			'<<$telsob>>, "See you at the cafe in an hour."'
+
+			act 'Go':
+				if $clothingworntype = 'nude':
+					gs 'clothing','wear_last_worn'
+					gs 'underwear','wear'
+				end
+				gt 'kafesvid'
+			end
 		else
-			dynamic 'temp_bathtot = <<selfieBathtot[arrpos(1, ''$selfieLoc'', ''bathroom'')]>>'
+			gs 'telefon','telotkaz',$telsob
 		end
-		phone_rand = rand(1,temp_bathtot)
-		dynamic 'bathroom_bathselfie[<<phone_rand>>] = 1'
-		gs 'stat'
-		if usePopUps = 1:
-			msg '<img src="images/pc/activities/phone/selfies/bathroom/bath/<<phone_rand>>.jpg">'
+	end
+
+	act 'Invite to the casino':
+		cla
+		'"Let''s go to the casino."'
+
+		if willAgree:
+			'<<$telsob>>, "See you in the casino in an hour."'
+
+			act 'Go':
+				if $clothingworntype = 'nude':
+					gs 'clothing','wear_last_worn'
+					gs 'underwear','wear'
+				end
+				gt 'kazinosvid'
+			end
 		else
-			view 'images/pc/activities/phone/selfies/bathroom/bath/<<phone_rand>>.jpg'
+			gs 'telefon','telotkaz',$telsob
 		end
 	end
+
+	act 'Hangup':gt 'telefon', 'fin'
 end
+!----------------End Old Telephone----------------------------
 
-!!for taking photos - only selfies for now
-if $ARGS[0] = 'Phone_camera':
-	gs 'phone_selfies', 'Phone_selfie_totals'
-	if $locclass = 'bedr':
-		$phone_loc = 'bedroom'
-	elseif $locclass = 'kitr':
-		$phone_loc = 'kitchen'
-	elseif $locclass = 'livingr':
-		$phone_loc = 'livingroom'
-	elseif $locclass = 'changingroom':
-		$phone_loc = 'changingroom'
-	elseif $locclass = 'city_park':
-		$phone_loc = 'park'
-	elseif $locclass = 'locker':
-		$phone_loc = 'locker'
-	elseif $locclass = 'beach':
-		$phone_loc = 'beach'
-	elseif $locclass = 'classroom':
-		$phone_loc = 'classroom'
-	elseif $locclass = 'school_bathroom':
-		$phone_loc = 'school_bathroom'
-	elseif $locclass = 'restroom':
-		$phone_loc = 'restroom'
-	elseif $location_type = 'bathroom':
-		$phone_loc = 'bathroom'
-	else
-		$phone_loc = ''
+
+!-----------------------------------------------------------------------------
+! Support for Hardcoded Lovers (BF/GF)
+
+if $ARGS[0] = 'callingTheLover' and loverGender[ARGS[1]] = 1:
+	cls
+	cla
+	gs'din_bad'
+	lover_number = ARGS[1]
+	$caller = '<<$loverdesc[lover_number]>>'
+	$telsob = $caller
+	$callerid = 'images/characters/shared/headshots_generic/'+lover_picture[lover_number]+'.jpg'
+	gs 'telefon','phone_balance'
+	gs 'telefon','phone_call_receive'
+	willAgree = (rand(0, 10) > 3)
+	'"Yes, I''m listening," says a voice from the speaker.'
+
+	if month > 5 and temper > 20 and sunWeather = 1:
+		act 'Invite to the park':
+			cla
+			'"Let''s go for a walk in the park."'
+
+			if willAgree:
+				'<<$telsob>>, "See you in the park in an hour."'
+
+				act 'Go':
+					if $clothingworntype = 'nude':
+						gs 'clothing','wear_last_worn'
+						gs 'underwear','wear'
+					end
+					gt 'parksvid'
+				end
+			else
+				gs 'telefon','telotkaz',$telsob
+			end
+		end
 	end
-	$telefon['body'] = '<font size=6>Camera</font><br>
-	<img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_camera.png" height="80" width="80"><br><br>'
-	!! Take a selfie depending on which clothes you are wearing
-	$telefon['body'] += '<a href="exec:gs ''exp_gain'', ''photoskl'', 1 & gs ''telefon'', ''Phone_camera_selfie'', ''<<$phone_loc>>'' "><b>Take a selfie</b></a><br>'
-	!! Flashing selfie
-	if $clothingworntype ! 'nude' and $phone_loc <> '':
-		if Enable_Android = 1:
-			locIndex = arrpos('$selfieLoc', $phone_loc,1)
+
+	act 'Invite to a movie':
+		cla
+		'"Want to go see a movie?"'
+
+		if willAgree:
+			'<<$telsob>>, "See you at the movie theater in an hour."'
+			act 'Go':
+				if $clothingworntype = 'nude':
+					gs 'clothing','wear_last_worn'
+					gs 'underwear','wear'
+				end
+				gt 'kinosvid'
+			end
 		else
-			locIndex = arrpos(1, '$selfieLoc', $phone_loc)
-		end
-		if (pcs_inhib >= 35 or exhibitionist_lvl > 0 or $phone_loc = 'bedroom') and dyneval("result = <<selfieTitflash[locIndex]>>") > 0:
-			$telefon['body'] += '<a href="exec:gs ''exp_gain'', ''photoskl'', 1 & gs ''telefon'', ''Phone_camera_selfie'', ''<<$phone_loc>>'', ''tits'' "><b>Flash your tits for a selfie</b></a><br>'
-		end
-		if (exhibitionist_lvl > 0 or $phone_loc = 'bedroom') and dyneval("result = <<selfieAssflash[locIndex]>>") > 0:
-			$telefon['body'] += '<a href="exec:gs ''exp_gain'', ''photoskl'', 1 & gs ''telefon'', ''Phone_camera_selfie'', ''<<$phone_loc>>'', ''ass'' "><b>Flash your ass for a selfie</b></a><br>'
-		end
-		if (exhibitionist_lvl > 1 or $phone_loc = 'bedroom') and dyneval("result = <<selfiePussyflash[locIndex]>>") > 0:
-			$telefon['body'] += '<a href="exec:gs ''exp_gain'', ''photoskl'', 1 & gs ''telefon'', ''Phone_camera_selfie'', ''<<$phone_loc>>'', ''pussy'' "><b>Flash your pussy for a selfie</b></a><br>'
+			gs 'telefon','telotkaz',$telsob
 		end
 	end
-	dynamic $telefon['print']
-end
 
-!!-----------------------------------end of Camera------------------------------------------
+	if $home['town'] = 'city':
+		act 'Invite to the pool hall':
+			cla
+			'"Let''s play pool."'
 
-!!-----------------------------------start of sms------------------------------------------
-!{
-	Send SMS lists the current contacts, then clicking on a contact gives a list of messages that can be sent.
-	Receive messages lists the sms messages sent to the player, these can be deleted, they will be in bold until read.
-	
-	To add an incoming message 
-	gs 'telefon', 'add_sms', 'A1', 'Test message the text goes here', 'images/pc/activities/phone/selfies/bathroom/underwear/1.jpg', 'images/pc/activities/phone/selfies/school_bathroom/pussyflash/1.jpg'
-	A1 is the NPC code (A1 is Dmitriy Nosov "Dimka")
-	You can have up to 4 pictures attached to the message
+			if willAgree:
+				'<<$telsob>>, "See you at the pool hall in an hour."'
 
-	To add an out going message that can be sent
-	gs 'telefon', 'add_sms_to_send', 'A1', 'Test message the text goes here'
+				act 'Go':
+					if $clothingworntype = 'nude':
+						gs 'clothing','wear_last_worn'
+						gs 'underwear','wear'
+					end
+					gt 'billsvid'
+				end
+			else
+				gs 'telefon','telotkaz',$telsob
+			end
+		end
+	end
 
-	To add a contact if it doesn't exist
-	if arrpos('$contact', 'A1') = -1: gs 'telefon', 'AddContact', 'A1', 'images/characters/shared/headshots_main/big1.jpg', "", "1 = 0", "", "", 0
+	act 'Invite to the cafe':
+		cla
+		'"Let''s go to the cafe."'
 
-	SMS Arrays storing received messages and messages that can be sent
+		if willAgree:
+			'<<$telsob>>, "See you at the cafe in an hour."'
 
-	Received Messages
-	telefon['UnreadSMS'] = number of unread SMS messages
-	$SMSContact[] = NPC code for contact. ('A129', 'A29', 'B13', 'C14') that sent the sms
-	$SMSMessage[] = text for the sms message
-	$SMSReplies[] = text for the replies
-	$SMSTime[] = date time the message was received
-	$SMSPicture1[] = url for first picture sent as part of the message
-	$SMSPicture2[] = url for second picture sent as part of the message
-	$SMSPicture3[] = url for third picture sent as part of the message
-	$SMSPicture4[] = url for fourth picture sent as part of the message
-	SMSMessageRead[] = 0 unread, 1 read
+			act 'Go':
+				if $clothingworntype = 'nude':
+					gs 'clothing','wear_last_worn'
+					gs 'underwear','wear'
+				end
+				gt 'kafesvid'
+			end
+		else
+			gs 'telefon','telotkaz',$telsob
+		end
+	end
 
-	Send Messages 
-	$SMSSendContact[] = NPC code for contact. ('A129', 'A29', 'B13', 'C14') that sent the sms
-	$SMSSendMessage[] = text for the sms message
-	$SMSSendCode[] = Code to execute for Incoming call
-	SMSSendRepeatable[] = 0 delete option after send, 1 don't delete option
-	$SMSSendDeleteId[] = id passed by the caller 
-}
+	act 'Invite to the casino':
+		cla
+		'"Let''s go to the casino."'
 
-if $ARGS[0] = 'Phone_sms':
-	$telefon['body'] = '
-	<font size=6>SMS</font><br>
-	<img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/<<iif(telefon[''UnreadSMS'']=0,''icon_sms.png'',''icon_sms_new.gif'')>>" height="80" width="80"><br>'
-	
-	$telefon['body'] += '<b><a href="exec:gs ''telefon'', ''send_sms''">Send new SMS</a></b><br>'
-	$telefon['body'] += '<TABLE cellspacing="0" width="80%"><TR><TH>Icon</TH><TH>Name</TH><TH align="right">Received</TH><TH></TH></TR>'
+		if willAgree:
+			'<<$telsob>>, "See you in the casino in an hour."'
 
-	!!iterating all Messages
-	!!reset and recalculate unread messages count, in case they get out of sync
-	telefon['UnreadSMS'] = 0
-	i=0
-	:smsloop
-	if i < arrsize('$SMSContact'):
-		!! if the person sending is in the contact list display the names and icon
-		telefon['contactid'] = arrpos('$contact',$SMSContact[i])
-		if telefon['contactid'] = -1:
-			$telefonCon['NPCName'] = ''
-			$telefonCon['Icon'] = 'icon_na.png'
+			act 'Go':
+				if $clothingworntype = 'nude':
+					gs 'clothing','wear_last_worn'
+					gs 'underwear','wear'
+				end
+				gt 'kazinosvid'
+			end
 		else
-			$telefonCon['NPCName'] = $npc_nickname[$contact[telefon['contactid']]]
-			$telefonCon['Icon'] = $contactIcon[telefon['contactid']]
-		end 
-
-		if SMSMessageRead[i] = 0: telefon['UnreadSMS'] += 1
-		$telefon['body'] += dyneval($telefon['SMS'],i,$telefonCon['Icon'],$telefonCon['NPCName'],$SMSTime[i],SMSMessageRead[i])
-		i += 1
-		jump 'smsloop'
+			gs 'telefon','telotkaz',$telsob
+		end
 	end
-	$telefon['body'] += '<b><a href="exec:gs ''telefon'', ''delete_sms'',''0'',''all''">Delete All</a></b><br>'
-	$telefon['body'] += '</TABLE><br>'
 
-	dynamic $telefon['print']
-	killvar 'i'
-end &! --- Phone_sms ---
+	act 'I think we should break up...':
+		cla
+		'She sounds hurt, but you insist it is for the best. You both say goodbye and part ways.'
+		gs 'lover', 'remove', lover_number
 
-!{ 
-	New SMS Message
-	If NPC is not in the contacts list of the phone it will be displayed as unknown until the contact has been added
-	$ARGS[1] = NPC code for contact. ('A129', 'A29', 'B13', 'C14')
-	$ARGS[2] = Message text to be displayed
-	$ARGS[3] = Replies to the message (optional)
-	$ARGS[4] = path to a picture to be displayed (optional)
-	$ARGS[5] = path to a picture to be displayed (optional)
-	$ARGS[6] = path to a picture to be displayed (optional)
-	$ARGS[7] = path to a picture to be displayed (optional)
-}
-if $ARGS[0] = 'add_sms':
-	$SMSContact[telefon['SMSCount']] = $ARGS[1]
-	$SMSMessage[telefon['SMSCount']] = $ARGS[2]
-	$SMSReplies[telefon['SMSCount']] = $ARGS[3]
-	$SMSTime[telefon['SMSCount']] = '<<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>> <<$week[week]>> <<day>> <<$month>> <<year>>'
-	$SMSPicture1[telefon['SMSCount']] = $ARGS[4]
-	$SMSPicture2[telefon['SMSCount']] = $ARGS[5]
-	$SMSPicture3[telefon['SMSCount']] = $ARGS[6]
-	$SMSPicture4[telefon['SMSCount']] = $ARGS[7]
-	SMSMessageRead[telefon['SMSCount']] = 0
-	telefon['SMSCount'] += 1
-	telefon['UnreadSMS'] += 1
-end
+		act 'Hangup':gt 'telefon', 'fin'
+	end
 
-if $ARGS[0] = 'delete_sms':
-	telefon['SMSid'] = ARGS[1]
-	killvar '$SMSContact', telefon['SMSid']
-	killvar '$SMSMessage', telefon['SMSid']
-	killvar '$SMSReplies', telefon['SMSid']
-	killvar '$SMSTime', telefon['SMSid']
-	killvar '$SMSPicture1', telefon['SMSid']
-	killvar '$SMSPicture2', telefon['SMSid']
-	killvar '$SMSPicture3', telefon['SMSid']
-	killvar '$SMSPicture4', telefon['SMSid']
-	killvar 'SMSMessageRead', telefon['SMSid']
-	telefon['SMSCount'] -= 1
-	if $ARGS[2] = 'all' and telefon['SMSCount'] > 0 :
-		gs 'telefon','delete_sms','0','all'
-	end	
-	gs 'telefon', 'Phone_sms'
+	act 'Hangup':gt 'telefon', 'fin'
 end
 
-if $ARGS[0] = 'show_sms':
-	telefon['SMSid'] = ARGS[1]
-	!!set to read and update the number of unread messages
-	if SMSMessageRead[telefon['SMSid']] = 0:
-		telefon['UnreadSMS'] -= 1
-		SMSMessageRead[telefon['SMSid']] = 1
+if $ARGS[0] = 'callingTheLover' and loverGender[ARGS[1]] = 0:
+	cls
+	cla
+	gs'din_bad'
+	lover_number = ARGS[1]
+	$caller = '<<$loverdesc[lover_number]>>'
+	$callerid = 'images/characters/shared/headshots_generic/'+lover_picture[lover_number]+'.jpg'
+	gs 'telefon','phone_balance'
+	gs 'telefon','phone_call_receive'
+	willAgree = (rand(0, 10) > 3)
+	'"Yes, I''m listening," says a voice from the speaker.'
+
+	if month > 5 and temper > 20 and sunWeather = 1:
+		act 'Invite to the park':
+			cla
+			'"Let''s go for a walk in the park."'
+
+			if willAgree:
+				'<<$loverdesc[lover_number]>>, "See you in the park in an hour."'
+
+				act 'Go':
+					if $clothingworntype = 'nude':
+						gs 'clothing','wear_last_worn'
+						gs 'underwear','wear'
+					end
+					gt 'svidboy', 'parksvid'
+				end
+			else
+				gs 'telefon','telotkaz',$loverdesc[lover_number]
+			end
+		end
+	end
+
+	act 'Invite to a movie':
+		cla
+		'"Want to go see a movie?"'
+
+		if willAgree:
+			'<<$loverdesc[lover_number]>>, "See you at the movie theater in an hour."'
+
+			act 'Go':
+				if $clothingworntype = 'nude':
+					gs 'clothing','wear_last_worn'
+					gs 'underwear','wear'
+				end
+				gt 'svidboy', 'kinosvid'
+			end
+		else
+			gs 'telefon','telotkaz',$loverdesc[lover_number]
+		end
 	end
 
-	!! Get image and name if in phone contacts otherwise show unknown
-	telefon['contactid'] = arrpos('$contact',$SMSContact[telefon['SMSid']])
-	if telefon['contactid'] = -1:
-		$telefonCon['NPCName'] = ''
-		$telefonCon['Icon'] = 'icon_na.png'
-	else
-		$telefonCon['NPCName'] = $npc_nickname[$contact[telefon['contactid']]]
-		$telefonCon['Icon'] = $contactIcon[telefon['contactid']]
-	end 
+	if $home['town'] = 'city':
+		act 'Invite to the pool hall':
+			cla
+			'"Let''s play pool."'
 
-	!!If file extension is not given, .png is assumed
-	if instr($telefonCon['Icon'],'.') = 0:
-		$telefonCon['Icon'] += '.png'
-	end
-	!!If path is not given, default phone icon path is assumed
-	if instr($telefonCon['Icon'],'/') = 0:
-		$telefonCon['Icon'] = 'images/system/phone/icons/' + $telefonCon['Icon']
+			if willAgree:
+				'<<$loverdesc[lover_number]>>, "See you at the pool hall in an hour."'
+
+				act 'Go':gt 'svidboy', 'billsvid'
+			else
+				gs 'telefon','telotkaz',$loverdesc[lover_number]
+			end
+		end
 	end
 
-	$telefon['body'] = '
-	<font size=6>SMS</font><br>
-	<img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/<<iif(telefon[''UnreadSMS'']=0,''icon_sms.png'',''icon_sms_new.gif'')>>" height="80" width="80"><br>'
+	act 'Invite to the cafe':
+		cla
+		'"Let''s go to the cafe."'
 
-	$telefon['body'] += '<table cellspacing="0" width="80%">'
-	$telefon['body'] += '<tr><tr><img height=100 src="<<$telefonCon[''Icon'']>>"></td><td><<$telefonCon[''NPCName'']>></td></tr>'
-	$telefon['body'] += '<tr><td colspan="2"><<$SMSMessage[telefon[''SMSid'']]>></td></tr>'
-	if $SMSReplies[telefon['SMSid']] <> '':
-		!$telefon['body'] += '<tr><th colspan="2" style="font-size:120%">Reply</th></tr>'
-		$telefon['body'] += '<tr><th> </th></tr>'
-		$telefon['body'] += '<tr><td colspan="2"><<$SMSReplies[telefon[''SMSid'']]>></td></tr>'
-	end
-	if $SMSPicture1[telefon['SMSid']] <> '':
-		$telefon['body'] += '<tr><td colspan="2"><img src="<<$SMSPicture1[telefon[''SMSid'']]>>"></td></tr>'
-	end
-	if $SMSPicture2[telefon['SMSid']] <> '':
-		$telefon['body'] += '<tr><td colspan="2"><img src="<<$SMSPicture2[telefon[''SMSid'']]>>"></td></tr>'
-	end
-	if $SMSPicture3[telefon['SMSid']] <> '':
-		$telefon['body'] += '<tr><td colspan="2"><img src="<<$SMSPicture3[telefon[''SMSid'']]>>"></td></tr>'
-	end
-	if $SMSPicture4[telefon['SMSid']] <> '':
-		$telefon['body'] += '<tr><td colspan="2"><img src="<<$SMSPicture4[telefon[''SMSid'']]>>"></td></tr>'
-	end
-	$telefon['body'] += '</table><br>'
-	$telefon['backButton'] = 'gs ''telefon'', ''Phone_sms'' '
-	dynamic $telefon['print']
-end
+		if willAgree:
+			'<<$loverdesc[lover_number]>>, "See you at the cafe in an hour."'
 
-!! This is the formatting function for a row in the SMS message table. SHould be run as a DYNEVAL()
-!{	
-	SMS Row in messages table
-	ARGS[0] = message id 
-	$ARGS[1] = NPC icon
-	$ARGS[2] = NPC Nickname
-	$ARGS[3] = Time received
-	ARGS[4] = 0 unread, 1 read
-}
-$telefon['SMS'] = {
-	telefon['SMSid'] = ARGS[0]
-	$telefon['ContactIcon'] = $ARGS[1]
-	$telefon['ContactNickName'] = $ARGS[2]
-	$telefon['SMSTime'] = $ARGS[3]
-	telefon['SMSStatus'] = ARGS[4]
-	!!If file extension is not given, .png is assumed
-	if instr($telefon['ContactIcon'],'.') = 0:
-		$telefon['ContactIcon'] += '.png'
-	end
-	!!If path is not given, default phone icon path is assumed
-	if instr($telefon['ContactIcon'],'/') = 0:
-		$telefon['ContactIcon'] = 'images/system/phone/icons/' + $telefon['ContactIcon']
-	end
-	!! unread will be bold
-	if telefon['SMSStatus'] = 0:
-		$telefon['SMSstyle1'] = '<b>'
-		$telefon['SMSstyle2'] = '</b>'
-	else
-		$telefon['SMSstyle1'] = ''
-		$telefon['SMSstyle2'] = ''
+			act 'Go':
+				if $clothingworntype = 'nude':
+					gs 'clothing','wear_last_worn'
+					gs 'underwear','wear'
+				end
+				gt 'svidboy', 'kafesvid'
+			end
+		else
+			gs 'telefon','telotkaz',$loverdesc[lover_number]
+		end
 	end
 
-	$result = '<TR>
-		<TD><img height=100 src="<<$telefon[''ContactIcon'']>>"></TD>
-		<TD><<$telefon[''SMSstyle1'']>><<$telefon[''ContactNickName'']>><<$telefon[''SMSstyle2'']>></TD>
-		<TD align="right"><<$telefon[''SMSstyle1'']>><a href="exec:gs ''telefon'', ''show_sms'', <<telefon[''SMSid'']>>"><<$telefon[''SMSTime'']>></a><<$telefon[''SMSstyle2'']>></TD>
-		<TD><<$telefon[''SMSstyle1'']>><a href="exec:gs ''telefon'', ''delete_sms'', <<telefon[''SMSid'']>>">Delete</a><<$telefon[''SMSstyle2'']>></TD>
-	</TR>'
-}
+	act 'I think we should break up...':
+		cla
+		'He sounds hurt, but you insist it is for the best. You both say goodbye and part ways.'
+		gs 'lover', 'remove', lover_number
 
-!! List of Contacts that you can send sms messages to
-if $ARGS[0] = 'send_sms':
-	$telefon['backButton'] = 'gs ''telefon'', ''Phone_sms'''
-	$telefon['body'] = '
-	<font size=6>Send SMS</font><br>
-	<img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/<<iif(telefon[''UnreadSMS'']=0,''icon_sms.png'',''icon_sms_new.gif'')>>" height="80" width="80"><br>'
-	if $subscription['metered_calls'] = 1 and $subscription['sms_limit'] > 0: 
-		$telefon['body'] += '<br/>'
-		$telefon['body'] += '<b>You still can send <<$subscription[''sms_limit'']>> text messages on your contract</b>'
-	end
-!! Colour correction for editor ''''
-	
-	$telefon['body'] += '<TABLE cellspacing="0" width="80%">'
-	!!iterating all Contacts
-	i=0
-	:smscontactloop
-	if i < arrsize('$contact'):
-		if contactAnon[i] = 0:
-			$telefon['body'] += dyneval($telefon['contactsms'],i)
-		end
-		i += 1
-		jump 'smscontactloop'
+		act 'Hangup':gt 'telefon', 'fin'
 	end
-	$telefon['body'] += '</TABLE><br>'
 
-	dynamic $telefon['print']
-	killvar 'i'
+	act 'Hangup':gt 'telefon', 'fin'
 end
 
-!! This is the formatting function for a row in the Contact List. SHould be run as a DYNEVAL()
-!! $ARGS[0] = index of contact in the conntact arrays
-$telefon['contactsms'] = {
-	!! Contact Row in phone contact list
-	$telefon['ContactIcon'] = $contactIcon[ARGS[0]]
-	$telefon['ContactNPCcode'] = $contact[ARGS[0]]
-	!!If file extension is not given, .png is assumed
-	if instr($telefon['ContactIcon'],'.') = 0:
-		$telefon['ContactIcon'] += '.png'
-	end
-	!!If path is not given, default phone icon path is assumed
-	if instr($telefon['ContactIcon'],'/') = 0:
-		$telefon['ContactIcon'] = 'images/system/phone/icons/' + $telefon['ContactIcon']
-	end
+if $ARGS[0] = 'lover' and loverGender[ARGS[1]] = 0:
+	cla
+	clr
+	lover_number = ARGS[1]
+	ring = 0
+	lover_days = daystart - loverday[lover_number]
+	!gs 'stat'
+	!gs 'telefon','phone_call_receive'
+	svetrand = rand(0, 5)
 
-	$result = '
-	<TR>
-		<TD><img src="<<$telefon[''ContactIcon'']>>" width="75"></TD>
-		<TD><<$npc_nickname[$telefon[''ContactNPCcode'']]>></TD>
-		<TD><a href="exec:gs ''telefon'', ''npcSendListSms'', ''<<$telefon[''ContactNPCcode'']>>''">New Message</a></TD>
-	</TR>'
-}
+	if svetrand = 0:$sveta = 'cutie'
+	if svetrand = 1:$sveta = 'honey'
+	if svetrand = 2:$sveta = 'sweetie'
+	if svetrand = 3:$sveta = 'baby'
+	if svetrand = 4:$sveta = 'hot stuff'
+	if svetrand = 5:$sveta = '<<$pcs_nickname>>'
 
-!! List of SMS messages available to be sent to an NPC
-!! $ARGS[1] = NPC code for the contact we want to display messages for
-if $ARGS[0] = 'npcSendListSms':
-	$telefon['backButton'] = 'gs ''telefon'', ''send_sms'' '
-	$telefon['body'] = '
-	<font size=6>Send SMS</font><br>
-	<img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/<<iif(telefon[''UnreadSMS'']=0,''icon_sms.png'',''icon_sms_new.gif'')>>" height="80" width="80"><br>'
+	'Hey <<$sveta>>, it''s me, <<$loverdesc[lover_number]>>. How''s it going?'
+
+	act 'Reply':
+		cla
+		'"Pretty good, you?"'
+		'<<$loverdesc[lover_number]>>, "Great, but I kind of miss you, can we meet today?"'
+
+		if (pregchem / 24) <= lover_days and knowpreg = 1 and pregtalk = 0:
+			act 'Tell him he''s going to be a dad':
+				cla
+				pregtalk = 1
+				'"Honey, I''m pregnant with your child."'
+
+				if haraklover[lover_number] = 0:
+
+					if loverrelation[lover_number] >= 90:
+						loverlove[lover_number] = 1
+
+						'<<$loverdesc[lover_number]>>, "This is wonderful! We have to celebrate!"'
+						'You start talking about living together. <<$loverdesc[lover_number]>> tells you that he is not against it on principle, but first he wants you to meet his parents.'
+						'He warns you that his mother is very demanding and rigorous. <<$loverdesc[lover_number]>> says that he loves his mother and does not want to upset her. Therefore, you must look gorgeous, wear a dress from a boutique, and have well-groomed and curled hair and makeup in moderation.'
+						'When you are totally ready <<$loverdesc[lover_number]>> will take you to his parents.'
+
+						act 'Hang up':gt 'telefon', 'fin'
+
+						act 'Meet tonight':
+							cla
+							svidanie[lover_number] = 1
+							'"How about this evening?"'
+							'<<$loverdesc[lover_number]>>, "Sounds great! When can I come to pick you up?"'
+
+							act 'Pick a time':
+								cla
+								meetday[lover_number] = daystart
+								meethour[lover_number] = input ("When do you want to be picked up? It is now <<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>>. [Enter the hour only 0 - 20]")
+								if meethour[lover_number] <= hour or meethour[lover_number] > 23:meethour[lover_number] = 20
+								'"How about <<meethour[lover_number]>>:00?"'
+								'<<$loverdesc[lover_number]>>, "Okay <<$sveta>>, see you at <<meethour[lover_number]>>:00."'
+
+								act 'Hang up':gt 'telefon', 'fin'
+							end
+						end
+					elseif loverrelation[lover_number] < 90:
+						money += 20000
+						'<<$loverdesc[lover_number]>> "I''m not yet ready to become a dad. I''ll give you the money for an abortion. Get rid of the child.'
+
+						act 'Hang up':gt 'telefon', 'fin'
+					end
+				elseif haraklover[lover_number] = 1:
+
+					money += 20000
+					'<<$loverdesc[lover_number]>> "I''m not yet ready to become a dad. I''ll give you the money get an abortion.'
+
+					act 'Hang up':gt 'telefon', 'fin'
+				elseif haraklover[lover_number] = 2:
+
+					pregtalk = 0
+					'<<$loverdesc[lover_number]>>, "What? You whore! Someone fucked your pussy, and now you drop it on me. You''re dumped.'
+					gs 'lover', 'remove', lover_number
+
+					act 'Hang up':gt 'telefon', 'fin'
+				end
+			end
+		elseif (pregchem / 24) > lover_days and knowpreg = 1 and pregtalk = 0:
+			act 'Honey, you will soon become a dad':
+				cla
+				loverrelation[lover_number] = 0
+				'"Honey, I''m pregnant with your child."'
+				'<<$loverdesc[lover_number]>>, "How the fuck did I manage that? Unless I own a time-machine and went back to before we met and fucked you, it''s someone else''s, go and tell him. I don''t want to see you again, goodbye."'
+
+				act 'Hang up.':gt 'telefon', 'fin'
+			end
+		elseif week > 1 and week < 5 and workKafe['job'] = 1:
+			act 'Sorry, I''m working today':
+				cla
+				'"Sorry, I''m working today."'
+				'<<$loverdesc[lover_number]>>, "Okay, I''ll call tomorrow."'
 
-	$telefon['body'] += '<TABLE cellspacing="0" width="80%">'
-	!!iterating all send sms messages
-	i=0
-	:npcSendListSmsLoop
-	if i < arrsize('$SMSSendContact'):
-		if $SMSSendContact[i] = $ARGS[1]:
-			$telefon['body'] += dyneval($telefon['smsMessageToSend'],i)
+				act 'Hang up':gt 'telefon', 'fin'
+			end
 		end
-		i += 1
-		jump 'npcSendListSmsLoop'
-	end
-	$telefon['body'] += '</TABLE><br>'
 
-	dynamic $telefon['print']
-	killvar 'i'
-end
+		act 'Tonight':
+			cla
+			loverrelation[lover_number] += 1
+			svidanie[lover_number] = 1
+			meetday[lover_number] = daystart
+			'"How about this evening?"'
+			'<<$loverdesc[lover_number]>>, "Sounds great! When can I come to pick you up?"'
 
-!! This is the formatting function for a row in the messages to send List. SHould be run as a DYNEVAL()
-!! ARGS[0] = index of the message
-$telefon['smsMessageToSend'] = {
-	$telefon['ContactNPCcode'] = $SMSSendContact[ARGS[0]]
-	$result = '
-	<TR>
-		<TD><<$npc_nickname[$telefon[''ContactNPCcode'']]>></TD>
-		<TD><a href="exec: gs ''telefon'', ''smsSendMessage'', ''<<ARGS[0]>>''"><<$SMSSendMessage[ARGS[0]]>></a></TD>
-	</TR>'
-}
+			act 'Pick a time':
+				cla
+				meethour[lover_number] = input ("When do you want to be picked up. It is now <<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>>. [Enter the hour only 0 - 20]")
+				if meethour[lover_number] <= hour or meethour[lover_number] > 23:meethour[lover_number] = 20
 
-if $ARGS[0] = 'smsSendMessage':
-	dynamic '<<$SMSSendCode[ARGS[1]]>>'
-	gs 'internet_mobile', 'send_sms'
-	if SMSSendRepeatable[ARGS[1]] = 0:
-		gs 'telefon', 'delete_sms_send_index', ARGS[1]
-	end
-	gs 'telefon', 'Phone_sms'
-end
+				'"How about <<meethour[lover_number]>>:00?."'
+				'<<$loverdesc[lover_number]>>, "Okay <<$sveta>>, see you at <<meethour[lover_number]>>:00."'
 
+				act 'Hang up':gt 'telefon', 'fin'
+			end
+		end
 
+		act 'Maybe tomorrow':
+			cla
+			loverrelation[lover_number] -= 1
+			'"I''m busy today. Call tomorrow."'
 
-!{
-	Add a new message that can be sent by the player
-	$ARGS[1] NPC code for contact. ('A129', 'A29', 'B13', 'C14') that sent the sms
-	$ARGS[2] text for the sms message
-	$ARGS[3] Code to execute when the sms is sent
-	 ARGS[4] 0 delete option after send, 1 dont delete option
-	$ARGS[5] id passed by the caller to identify the option to be deleted if it needs to be removed from the options
-}
-if $ARGS[0] = 'add_sms_to_send':
-	i = arrsize('$SMSSendContact')
-	$SMSSendContact[i] = $ARGS[1]
-	$SMSSendMessage[i] = $ARGS[2]
-	$SMSSendCode[i] = $ARGS[3]
-	SMSSendRepeatable[i] = ARGS[4]
-	$SMSSendDeleteId[i] = $ARGS[5]
-end
+			if loverrelation[lover_number] <= 0:'<<$loverdesc[lover_number]>>, Are you fucking me, you know what. Suck my dick.' & gs 'lover', 'remove', lover_number
+			if loverrelation[lover_number] > 0:'(<<$loverdesc[lover_number]>>) -  Okay, I''ll call tomorrow.'
 
-if $ARGS[0] = 'delete_sms_send_index':
-	killvar '$SMSSendContact', ARGS[1]
-	killvar '$SMSSendMessage', ARGS[1]
-	killvar '$SMSSendCode', ARGS[1]
-	killvar 'SMSSendRepeatable', ARGS[1]
-	killvar '$SMSSendDeleteId', ARGS[1]
-end
+			act 'Hang up': gt 'telefon', 'fin'
+		end
 
-!{
-	$ARGS[1] = NPC code for contact. ('A129', 'A29', 'B13', 'C14')
-	$ARGS[2] = Delete id of the message ($SMSSendDeleteId)
-}
-if $ARGS[0] = 'delete_sms_send_id':
-	$telefon['SMStoDeleteFound'] = 'No'
-	i = 0
-	:findSmsToDeleteLoop
-	if (i < arrsize('$SMSSendContact')) and $telefon['SMStoDeleteFound'] = 'No':
-		if $SMSSendContact[i] = $ARGS[1] and $SMSSendDeleteId[i] = $ARGS[2]:
-			gs 'telefon', 'delete_sms_send_index', i
-			$telefon['SMStoDeleteFound'] = 'Yes'
+		act 'I think we should break up...':
+			cla
+			'He sounds hurt, but you insist it is for the best. You both say goodbye and part ways.'
+			gs 'lover', 'remove', lover_number
+
+			act 'Hang up': gt 'telefon', 'fin'
 		end
-		i += 1
-		jump 'findSmsToDeleteLoop'
 	end
-end
 
-!!-----------------------------------end of sms------------------------------------------
+	act 'Hang up (end relationship)':
+		cla
+		gs 'lover', 'remove', lover_number
+		gt 'telefon', 'fin'
+	end
+end
 
-if $ARGS[0] = 'Phone_wheather':
-	$telefon['body'] = '
-	<font size=6>Weather</font><br>
-	<img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_weather.png" height="80" width="80"><br><br>
-	<b>Temperature:</b><br>
-	<<$temperature>>. <<$osadki>><br>
-	P.O.P. today is <<weatherFall>>%<br>'
-	dynamic $telefon['print']
-end &! --- Phone_wheather ---
+if $ARGS[0] = 'lover' and loverGender[ARGS[1]] = 1:
+	cla
+	clr
+	lover_number = ARGS[1]
+	ring = 0
+	lover_days = daystart - loverday[lover_number]
+	!gs 'stat'
+	!gs 'telefon','phone_call_receive'
+	svetrand = rand(0, 5)
 
-if $ARGS[0] = 'Phone_calendar':
-	$telefon['body'] = '
-	<font size=6>Calendar</font><br>
-	<img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_calendar.png" height="80" width="80"><br><br>
-	<B>Today:</B><br>
-	<<$week[week]>>, <<day>> <<$month>> <<year>><br>'
-	dynamic $telefon['print']
-end &! --- Phone_calendar ---
+	if svetrand = 0:$sveta = 'cutie'
+	if svetrand = 1:$sveta = 'honey'
+	if svetrand = 2:$sveta = 'sweetie'
+	if svetrand = 3:$sveta = 'baby'
+	if svetrand = 4:$sveta = 'hot stuff'
+	if svetrand = 5:$sveta = '<<$pcs_nickname>>'
 
-if $ARGS[0] = 'Phone_media':
-	$telefon['body'] = '
-	<font size=6>Media</font><br>
-	<img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_music.png" height="80" width="80"><br>
-	<b>This option is not active</b><br>'
-	dynamic $telefon['print']
-end &! --- Phone_media ---
+	'Hey <<$sveta>>, it''s me, <<$loverdesc[lover_number]>>. How''s it going?'
 
-if $ARGS[0] = 'Phone_menu':
-	if phone_off = 0:
-		$telefon['body'] = '
-		<a href="exec:gs ''telefon'', ''Phone_camera'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_camera.png" height="80" width="80"></a>
-		<a href="exec:gs ''telefon'', ''Phone_calendar'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_calendar.png" height="80" width="80"></a>
-		<a href="exec:gs ''telefon'', ''Phone_pictures'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_pictures.png" height="80" width="80"></a>
-		<br>
-		<a href="exec:gs ''telefon'', ''Phone_media'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_music.png" height="80" width="80"></a>
-		<a href="exec:gs ''telefon'', ''Phone_notebook'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_notebook.png" height="80" width="80"></a>
-		<a href="exec:gs ''telefon'', ''Phone_wheather'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_weather.png" height="80" width="80"></a>
-		<br>
-		<a href="exec:gs ''telefon'', ''ContactList'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_call.png" height="80" width="80"></a>
-		<a href="exec:gs ''telefon'', ''Phone_sms'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/<<iif(telefon[''UnreadSMS'']=0,''icon_sms.png'',''icon_sms_new.gif'')>>" height="80" width="80"></a>
-		<a href="exec:gs ''telefon'', ''Phone_megafon'' "><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_megafon.png" height="80" width="80"></a>
-		<br>'
-		if menu_off = 1:
-			$telefon['body'] += '<a href="exec:gs ''obj_din'', ''menu_disabled''"><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_settings.png" height="80" width="80"></a><br>'
-		else
-			$telefon['body'] += '<a href="exec:killvar ''menu_page'' & gs ''Cheatmenu_din'' & dynamic $cheatmenu[''setting'']"><img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/icon_settings.png" height="80" width="80"></a><br>'
-		end
-		dynamic $telefon['print']
-	else
-		'<font color="red"><b>Your phone is disabled for this event</b></font>'
-	end
-end &! --- Phone_menu ---
+	act 'Reply':
+		cla
+		'"Pretty good, you?"'
+		'<<$loverdesc[lover_number]>>, "Great, but I kind of miss you, can we meet today?"'
 
-if $ARGS[0] = 'Add_contact':
-	$dummy = INPUT('Enter a note:')
-	$contact[arrsize('$contact')] = dyneval($telefon['contact'],$ARGS[1],$dummy,$ARGS[2])
-	killvar '$dummy'
-end &! --- Add_contact ---
 
-if $ARGS[0] = 'telotkaz':
-	cla
-	minut += 10
-	'<<$ARGS[1]>>, "Sorry, I''m busy right now, maybe next time."'
+		act 'Tonight':
+			cla
+			loverrelation[lover_number] += 1
+			svidanie[lover_number] = 1
+			meetday[lover_number] = daystart
+			'"How about this evening?"'
+			'<<$loverdesc[lover_number]>>, "Sounds great! When can I come to pick you up?"'
 
-	act 'Hangup':gt 'telefon', 'fin'
-end &! --- telotkaz ---
+			act 'Pick a time':
+				cla
+				meethour[lover_number] = input ("When do you want to be picked up. It is now <<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>>. [Enter the hour only 0 - 20]")
+				if meethour[lover_number] <= hour or meethour[lover_number] > 23:meethour[lover_number] = 20
 
+				'"How about <<meethour[lover_number]>>:00?."'
+				'<<$loverdesc[lover_number]>>, "Okay <<$sveta>>, see you at <<meethour[lover_number]>>:00."'
 
-if $ARGS[0] = 'fin':
-	killvar 'lover_number'
-	cla
-	gt $loc, $loc_arg
-end
+				act 'Hang up':gt 'telefon', 'fin'
+			end
+		end
 
-if $ARGS[0] = 'setup':
-	!! array $$phonetheme_name is built.
-	!! might need a tweak to have it rebuilt when new themes are available.
+		act 'Maybe tomorrow':
+			cla
+			loverrelation[lover_number] -= 1
+			'"I''m busy today. Call tomorrow."'
 
-	$phonetheme_name[0] = 'Custom_Standard'
-	$phonetheme_name[1] = 'Bimbo'
-	$phonetheme_name[2] = 'Custom_Aluminus'
-	$phonetheme_name[3] = 'Custom_Bottlecapped'
-	$phonetheme_name[4] = 'Custom_Galactic'
-	$phonetheme_name[5] = 'Custom_Vectored'
-	$phonetheme_name[6] = 'Custom_Veneer'
-	$phonetheme_name[7] = 'Custom_Voidwalker'
-	$phonetheme_name[8] = 'Custom_Voidwalker Red'
-	$phonetheme_name[9] = 'Custom_Voidwalker Toxic'
-	$phonetheme_name[10] = 'Gopnik'
-	$phonetheme_name[11] = 'Sports'
-	$phonetheme_name[12] = 'Succubus'
-	$phonetheme_name[13] = 'Woodshop'
+			if loverrelation[lover_number] <= 0:'<<$loverdesc[lover_number]>>, Are you fucking me, you know what. Fuck off.' & gs 'lover', 'remove', lover_number
+			if loverrelation[lover_number] > 0:'(<<$loverdesc[lover_number]>>) -  Okay, I''ll call tomorrow.'
+			act 'Hang up': gt 'telefon', 'fin'
+		end
 
-	phonetheme[0] = 1
-	gs 'phone_selfies', 'Phone_selfie_totals'
-end
+		act 'I think we should break up...':
+			cla
+			'She sounds hurt, but you insist it is for the best. You both say goodbye and part ways.'
+			gs 'lover', 'remove', lover_number
 
+			act 'Hang up': gt 'telefon', 'fin'
+		end
+	end
 
+	act 'Hang up (end relationship)':
+		cla
+		gs 'lover', 'remove', lover_number
+		gt 'telefon', 'fin'
+	end
+end
+!---------------------- End of Lover support
 
 
 !!-----------------------------------EVENTS------------------------------------------