Browse Source

Merge remote-tracking branch 'KeyMasterOfGozer/master'

KevinSmarts 5 years ago
parent
commit
1dbe7dd8e4
2 changed files with 473 additions and 533 deletions
  1. 1 1
      locations/spellList.qsrc
  2. 472 532
      locations/telefon.qsrc

+ 1 - 1
locations/spellList.qsrc

@@ -20,7 +20,7 @@
 !	$basicSpells = basic spells that are taught by Tatiana
 !	$healSpells = Healing Spells
 !	$beautySpells = Beauty Spells
-!	$librarySpells = Spelsl Researchable in the Library
+!	$librarySpells = Spells Researchable in the Library
 !	$fireSpells = Fire-based spells
 !	$electSpells = Electricity based spells
 !	$earthSpells = Earth magic spells

+ 472 - 532
locations/telefon.qsrc

@@ -81,25 +81,89 @@ $telefon['contact'] = {
 }
 
 
-if $ARGS[0] = 'start':
-	gs 'stat'
-	gs 'telefon','phone_call_receive'
+if $ARGS[0] = 'AddContact':
+	! $ARGS[1] = NPC Array identifier
+	! $ARGS[2] = Icon
+	! $ARGS[3] = Code to execute for Call out
+	! $ARGS[4] = If statement code to determine schedule for outbound calls
+	! $ARGS[5] = Code to execute for Incoming call
+	! $ARGS[6] = if statement code for schedule of incoming calls
+	!  ARGS[7] = Anonymous? 0 if not, 1 if yes
+	$telefonCon['NPC'] = $ARGS[1]
+	$telefonCon['Icon'] = $ARGS[2]
+	$telefonCon['OutCode'] = $ARGS[3]
+	$telefonCon['OutSched'] = $ARGS[4]
+	$telefonCon['InCode'] = $ARGS[5]
+	$telefonCon['InSched'] = $ARGS[6]
+	telefonCon['Anonymous'] = ARGS[7]
+	telefonCon['ContactListID'] = arrpos('$contact',$telefonCon['NPC'])
+	if telefonCon['ContactListID'] = -1:
+		telefonCon['ContactListID'] = arrsize('$contact')
+		$contact[telefonCon['ContactListID']] = $telefonCon['NPC']
+	end
+	$contactIcon[telefonCon['ContactListID']] = $telefonCon['Icon']
+	$contactOCode[telefonCon['ContactListID']] = $telefonCon['OutCode']
+	$contactOSche[telefonCon['ContactListID']] = $telefonCon['OutSched']
+	$contactICode[telefonCon['ContactListID']] = $telefonCon['InCode']
+	$contactISche[telefonCon['ContactListID']] = $telefonCon['InSched']
+	contactAnon[telefonCon['ContactListID']] = telefonCon['Anonymous']
 
-	if npc_QW['A192'] = 1 and week = 6 and pcs_apprnc > 80:
-		gt 'nastja', 'pos4'
-	elseif npc_QW['A192'] = 2 and week ! 6 and zenit ! 0 and nastjaday ! daystart:
-		gt 'nastja', 'pos13'
-	elseif hour >= 8 and hour <= 20 and npc_QW['A192'] = 2 and week = 6 and pcs_apprnc > 80 and nastjaday ! daystart:
-		gt 'nastja', 'pos12'
-	elseif npc_QW['A192'] = 5 and week = 6 and nastjaday ! daystart:
-		gt 'nastja', 'pos22'
-	elseif npc_QW['A192'] = 6 and nastjaday ! daystart:
-		gt 'nastja', 'pos31'
-	else
-		$callerid = 'images/system/phone/icons/icon_nastja.png'
-		gs 'telefon','phone_call_reject'
+	killvar 'telefonCon'
+	killvar '$telefonCon'
+end &! --- AddContact ---
+
+if $ARGS[0] = 'DeleteContact':
+	! $ARGS[1] = NPC Array identifier
+	$telefonCon['NPC'] = $ARGS[1]
+	telefonCon['ContactListID'] = arrpos('$contact',$telefonCon['NPC'])
+	if telefonCon['ContactListID'] > -1:
+		killvar '$contact', telefonCon['ContactListID']
+		killvar '$contactIcon', telefonCon['ContactListID']
+		killvar '$contactCode', telefonCon['ContactListID']
 	end
-end
+
+	killvar 'telefonCon'
+	killvar '$telefonCon'
+end &! --- AddContact ---
+
+if $ARGS[0] = 'ContactList':
+	$telefon['body'] = '
+	<font size=6>Contacts</font><br>
+	<img src="<<FUNC(''$phone_theme'')>>icon_call.png" height="80" width="80"><br><br>'
+
+	!!iterating all Contacts
+	i=0
+	:contactloop2
+	if i < arrsize('$contact'):
+		if contactAnon[i] = 0:
+			$telefon['body'] += dyneval($telefon['contact'],$contactIcon[i],$npc_nickname[$contact[i]],$contactOCode[i],$contactOSche[i])
+		end
+		i += 1
+		jump 'contactloop2'
+	end
+
+	! Oddball Contacts
+	if telalla > 0:
+		$telefon['body'] += dyneval($telefon['contact'],'icon_ira1','Alla',"$telsob = 'Alla' & gt 'telefon', 'mobilaraz'","hour >= 8 and hour <= 20")
+	end
+	if telmasha > 0:
+		$telefon['body'] += dyneval($telefon['contact'],'icon_masha','Masha',"$telsob = 'Masha' & gt 'telefon', 'mobilaraz'","hour >= 8 and hour <= 20")
+	end
+
+	!! iterating all lovers
+	lover_number = 0
+	:loverloop2
+	if pcs_lovers[lover_number] = 1 and svidanie[lover_number] = 0:
+		$telefon['body'] += dyneval($telefon['contact'],'icon_bf'+lover_picture[lover_number],$loverdesc[lover_number],"lover_number = <<lover_number>> & gt 'telefon', 'callingTheLover', <<lover_number>>","hour > 6 and hour < 20")
+	end
+	lover_number += 1
+	if lover_number < arrsize('pcs_lovers'): jump 'loverloop2'
+
+	dynamic $telefon['print']
+	killvar 'i'
+	killvar 'lover_number'
+end &! --- ContactList ---
+
 
 ! Reset Contact Call Stats Daily and Weekly
 !
@@ -224,6 +288,361 @@ if $ARGS[0] = 'IncomingCall':
 	killvar '$telefonIncC'
 end
 
+
+!---------------------------------------------------------------------------------------
+! Generic Calls for dates
+
+!! NPC Date
+!!	ARGS[1] = contactlist index
+!!	$ARGS[2] = Date Location
+if $ARGS[0] = 'NPCDate':
+
+	Call4Date["ContactIndex"] = ARGS[1]
+	$Call4Date["Location"] = $ARGS[2]
+
+	$Call4Date["NPC"] = $contact[Call4Date['ContactIndex']]
+	$Call4Date["CallerName"] = $npc_nickname[$Call4Date["NPC"]]
+
+	!! These variables are setup for certain downstream functions
+	$caller = $Call4Date["CallerName"]
+	$callerid = $contactIcon[Call4Date["ContactIndex"]]
+	$boydesc = $Call4Date["CallerName"]
+
+	pcs_mood += 10
+	npc_rel[$Call4Date["NPC"]] += 3
+
+	if $Call4Date["Location"] = 'park':
+		if npc_gender[$Call4Date["NPC"]] = 0:
+			gt 'dateM','datepark'
+		else
+			gt 'dateF','datepark'
+		end
+	elseif $Call4Date["Location"] = 'movie':
+		if npc_gender[$Call4Date["NPC"]] = 0:
+			gt 'dateM','datecinema'
+		else
+			!Not implemented yet
+			!gt 'dateF','datecinema'
+		end
+	elseif $Call4Date["Location"] = 'bar':
+		if npc_gender[$Call4Date["NPC"]] = 0:
+			gt 'dateM','datebar'
+		else
+			gt 'dateF','datebar'
+		end
+	elseif $Call4Date["Location"] = 'cafe':
+		if npc_gender[$Call4Date["NPC"]] = 0:
+			gt 'dateM','datecafe'
+		else
+			!Not implemented yet
+			!gt 'dateF','datecafe'
+		end
+	end
+
+	killvar 'Call4Date'
+	killvar '$Call4Date'
+end
+
+!! Sveta Calls the NPC
+!!	ARGS[1] = contactlist index
+if $ARGS[0] = 'SvetaCallsNPC':
+	cls
+	cla
+	Call4Date["ContactIndex"] = ARGS[1]
+	$Call4Date["NPC"] = $contact[Call4Date['ContactIndex']]
+	$Call4Date["CallerName"] = $npc_nickname[$Call4Date["NPC"]]
+	if npc_gender[$Call4Date["NPC"]] = 0:
+		$Call4Date["NPC-he"] = 'he'
+		$Call4Date["NPC-He"] = 'He'
+		$Call4Date["NPC-his"] = 'his'
+		$Call4Date["NPC-His"] = 'His'
+	else
+		$Call4Date["NPC-he"] = 'her'
+		$Call4Date["NPC-He"] = 'Her'
+		$Call4Date["NPC-his"] = 'hers'
+		$Call4Date["NPC-His"] = 'Hers'
+	end
+
+	!! These variables are setup for certain downstream functions
+	$caller = $Call4Date["CallerName"]
+	$callerid = $contactIcon[Call4Date["ContactIndex"]]
+
+	gs 'telefon','phone_balance'
+	gs 'telefon','phone_call_receive'
+
+	Call4Date["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 Call4Date["willAgree"]:
+				'<<$Call4Date["CallerName"]>>, "See you in the park in an hour."'
+
+				act 'Go':gt 'telefon', 'NPCDate', Call4Date["ContactIndex"], 'park'
+			else
+				gs 'telefon','telotkaz',$Call4Date["CallerName"]
+			end
+		end
+	end
+
+	act 'Invite to a movie':
+		cla
+		'"Want to go see a movie?"'
+
+		if Call4Date["willAgree"]:
+			'<<$Call4Date["CallerName"]>>, "See you at the movie theater in an hour."'
+
+			act 'Go':gt gt 'telefon', 'NPCDate', Call4Date["ContactIndex"], 'movie'
+		else
+			gs 'telefon','telotkaz',$Call4Date["CallerName"]
+		end
+	end
+
+	if  $home_town = 'city':
+		act 'Invite to the bar':
+			cla
+			'"Let''s go to the bar."'
+
+			if Call4Date["willAgree"]:
+				'<<$Call4Date["CallerName"]>>, "See you at the bar in an hour."'
+
+				act 'Go':gt 'telefon', 'NPCDate', Call4Date["ContactIndex"], 'bar'
+			else
+				gs 'telefon','telotkaz',$Call4Date["CallerName"]
+			end
+		end
+	end
+
+	act 'Invite to the cafe':
+		cla
+		'"Let''s go to the cafe."'
+
+		if Call4Date["willAgree"]:
+			'<<$Call4Date["CallerName"]>>, "See you at the cafe in an hour."'
+
+			act 'Go':gt gt 'telefon', 'NPCDate', Call4Date["ContactIndex"], 'cafe'
+		else
+			gs 'telefon','telotkaz',$Call4Date["CallerName"]
+		end
+	end
+
+	act 'I think we should break up...':
+		cla
+		'<<$Call4Date["NPC-He"]>> sounds hurt, but you insist it is for the best. You both say goodbye and part ways.'
+		gs 'telefon', 'DeleteContact', $Call4Date["NPC"]
+
+		act 'Hangup':gt 'telefon', 'fin'
+	end
+
+	act 'Hangup':gt 'telefon', 'fin'
+
+	killvar 'Call4Date'
+	killvar '$Call4Date'
+	killvar '$DateNickName'
+end
+
+! NPC Calls Sveta for a Date
+!	ARGS[1] = $contact index number
+if $ARGS[0] = 'NPCCallsForDate':
+	cla
+	clr
+	Call4Date["ContactIndex"] = ARGS[1]
+	$Call4Date["NPC"] = $contact[Call4Date['ContactIndex']]
+
+	!!Pick a nickname that caller will use for Sveta
+	$DateNickName[0] = 'cutie'
+	$DateNickName[1] = 'honey'
+	$DateNickName[2] = 'sweetie'
+	$DateNickName[3] = 'baby'
+	$DateNickName[4] = 'hot stuff'
+	$DateNickName[5] = '<<$pcs_nickname>>'
+	$Call4Date['SvetaName'] = $DateNickName[rand(0, arrsize('$DateNickName'))]
+
+	$Call4Date['CallerName'] = $npc_nickname[$Call4Date["NPC"]]
+
+	!! These variables are setup for certain downstream functions
+	$caller = $Call4Date["CallerName"]
+	$callerid = $contactIcon[Call4Date["ContactIndex"]]
+
+	'Hey <<$Call4Date["SvetaName"]>>, it''s me, <<$Call4Date["CallerName"]>>. How''s it going?'
+
+	act 'Answer':
+		cla
+		'"Pretty good, you?"'
+		'<<$Call4Date["CallerName"]>>, "Great, but I kind of miss you, can we meet today?"'
+		if week > 1 and week < 5 and workKafe = 1:
+			act 'Sorry, I''m working today':
+				cla
+				'"Sorry, I''m working today."'
+				'<<$Call4Date["CallerName"]>>, "Okay, I''ll call tomorrow."'
+
+				act 'Hang up':gt 'telefon', 'fin'
+			end
+		end
+
+		act 'Tonight':
+			cla
+			npc_rel[$Call4Date["NPC"]] += 1
+			contMeetDay[Call4Date["ContactIndex"]] = daystart
+			'"How about this evening?"'
+			'<<$Call4Date["CallerName"]>>, "Sounds great! When can I come to pick you up?"'
+
+			act 'Pick a time':
+				cla
+				contMeetHour[Call4Date["ContactIndex"]] = 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 contMeetHour[Call4Date["ContactIndex"]] <= hour or contMeetHour[Call4Date["ContactIndex"]] > 23:contMeetHour[Call4Date["ContactIndex"]] = 20
+
+				'"How about <<contMeetHour[Call4Date["ContactIndex"]]>>:00?."'
+				'<<$Call4Date["CallerName"]>>, "Okay <<$Call4Date["SvetaName"]>>, see you at <<contMeetHour[Call4Date["ContactIndex"]]>>:00."'
+
+				act 'Hang up':gt 'telefon', 'fin'
+			end
+		end
+
+		act 'Maybe tomorrow':
+			cla
+			npc_rel[$Call4Date["NPC"]] -= 1
+			'"I''m busy today. Call tomorrow."'
+
+			if npc_rel[$Call4Date["NPC"]] <= 0:'<<$Call4Date["CallerName"]>>, Are you fucking me, you know what. Suck my dick.' & gs 'telefon', 'DeleteContact', $Call4Date["NPC"]
+			if npc_rel[$Call4Date["NPC"]] > 0:'(<<$Call4Date["CallerName"]>>) -  Okay, I''ll call tomorrow.'
+
+			act 'Hang up': gt 'telefon', 'fin'
+		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 'telefon', 'DeleteContact', $Call4Date["NPC"]
+
+			act 'Hang up': gt 'telefon', 'fin'
+		end
+	end
+
+	act 'Hang up (end relationship)':
+		cla
+		gs 'telefon', 'DeleteContact', $Call4Date["NPC"]
+		gt 'telefon', 'fin'
+	end
+
+	killvar 'Call4Date'
+	killvar '$Call4Date'
+	killvar '$DateNickName'
+end
+
+if $ARGS[0] = 'start':
+	gs 'stat'
+	gs 'telefon','phone_call_receive'
+
+	if npc_QW['A192'] = 1 and week = 6 and pcs_apprnc > 80:
+		gt 'nastja', 'pos4'
+	elseif npc_QW['A192'] = 2 and week ! 6 and zenit ! 0 and nastjaday ! daystart:
+		gt 'nastja', 'pos13'
+	elseif hour >= 8 and hour <= 20 and npc_QW['A192'] = 2 and week = 6 and pcs_apprnc > 80 and nastjaday ! daystart:
+		gt 'nastja', 'pos12'
+	elseif npc_QW['A192'] = 5 and week = 6 and nastjaday ! daystart:
+		gt 'nastja', 'pos22'
+	elseif npc_QW['A192'] = 6 and nastjaday ! daystart:
+		gt 'nastja', 'pos31'
+	else
+		$callerid = 'images/system/phone/icons/icon_nastja.png'
+		gs 'telefon','phone_call_reject'
+	end
+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':
+	$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 balans < 4:
+		$telefon['body'] = '
+		<font size=6>Not enough credit on your account</font><br>
+		<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, $metka
+	elseif balans >= 4:
+		balans -= 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':
+	$telefon['body'] = '
+	<font size=6>MegaFon</font><br>
+	<img src="<<FUNC(''$phone_theme'')>>icon_megafon.png" height="80" width="80"><br><br>
+	<b>The balance in the account:</b>
+	<font size=5><<balans>> ₽.</font><br>'
+	dynamic $telefon['print']
+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/icon/back.png"></a></center>'
+	!dynamic $telefon['print']
+end &! --- Edit_Custom_list ---
+
 if $ARGS[0] = 'mobilaraz':
 	cls
 	cla
@@ -302,7 +721,11 @@ if $ARGS[0] = 'mobilaraz':
 
 	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
@@ -427,294 +850,52 @@ if $ARGS[0] = 'callingTheLover' and loverGender[ARGS[1]] = 0:
 		cla
 		'"Want to go see a movie?"'
 
-		if willAgree:
-			'<<$loverdesc[lover_number]>>, "See you at the movie theater in an hour."'
-
-			act 'Go':gt 'svidboy', 'kinosvid'
-		else
-			gs 'telefon','telotkaz',$loverdesc[lover_number]
-		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
-		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':gt 'svidboy', 'kafesvid'
-		else
-			gs 'telefon','telotkaz',$loverdesc[lover_number]
-		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'
-end
-
-!! NPC Date
-!!	ARGS[1] = contactlist index
-!!	$ARGS[2] = Date Location
-if $ARGS[0] = 'NPCDate':
-
-	Call4Date["ContactIndex"] = ARGS[1]
-	$Call4Date["Location"] = $ARGS[2]
-
-	$Call4Date["NPC"] = $contact[Call4Date['ContactIndex']]
-	$Call4Date["CallerName"] = $npc_nickname[$Call4Date["NPC"]]
-
-	!! These variables are setup for certain downstream functions
-	$caller = $Call4Date["CallerName"]
-	$callerid = $contactIcon[Call4Date["ContactIndex"]]
-	$boydesc = $Call4Date["CallerName"]
-
-	pcs_mood += 10
-	npc_rel[$Call4Date["NPC"]] += 3
-
-	if $Call4Date["Location"] = 'park':
-		if npc_gender[$Call4Date["NPC"]] = 0:
-			gt 'dateM','datepark'
-		else
-			gt 'dateF','datepark'
-		end
-	elseif $Call4Date["Location"] = 'movie':
-		if npc_gender[$Call4Date["NPC"]] = 0:
-			gt 'dateM','datecinema'
-		else
-			!Not implemented yet
-			!gt 'dateF','datecinema'
-		end
-	elseif $Call4Date["Location"] = 'bar':
-		if npc_gender[$Call4Date["NPC"]] = 0:
-			gt 'dateM','datebar'
-		else
-			gt 'dateF','datebar'
-		end
-	elseif $Call4Date["Location"] = 'cafe':
-		if npc_gender[$Call4Date["NPC"]] = 0:
-			gt 'dateM','datecafe'
-		else
-			!Not implemented yet
-			!gt 'dateF','datecafe'
-		end
-	end
-
-	killvar 'Call4Date'
-	killvar '$Call4Date'
-end
-
-!! Sveta Calls the NPC
-!!	ARGS[1] = contactlist index
-if $ARGS[0] = 'SvetaCallsNPC':
-	cls
-	cla
-	Call4Date["ContactIndex"] = ARGS[1]
-	$Call4Date["NPC"] = $contact[Call4Date['ContactIndex']]
-	$Call4Date["CallerName"] = $npc_nickname[$Call4Date["NPC"]]
-	if npc_gender[$Call4Date["NPC"]] = 0:
-		$Call4Date["NPC-he"] = 'he'
-		$Call4Date["NPC-He"] = 'He'
-		$Call4Date["NPC-his"] = 'his'
-		$Call4Date["NPC-His"] = 'His'
-	else
-		$Call4Date["NPC-he"] = 'her'
-		$Call4Date["NPC-He"] = 'Her'
-		$Call4Date["NPC-his"] = 'hers'
-		$Call4Date["NPC-His"] = 'Hers'
-	end
-
-	!! These variables are setup for certain downstream functions
-	$caller = $Call4Date["CallerName"]
-	$callerid = $contactIcon[Call4Date["ContactIndex"]]
-
-	gs 'telefon','phone_balance'
-	gs 'telefon','phone_call_receive'
-
-	Call4Date["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 Call4Date["willAgree"]:
-				'<<$Call4Date["CallerName"]>>, "See you in the park in an hour."'
-
-				act 'Go':gt 'telefon', 'NPCDate', Call4Date["ContactIndex"], 'park'
-			else
-				gs 'telefon','telotkaz',$Call4Date["CallerName"]
-			end
-		end
-	end
-
-	act 'Invite to a movie':
-		cla
-		'"Want to go see a movie?"'
-
-		if Call4Date["willAgree"]:
-			'<<$Call4Date["CallerName"]>>, "See you at the movie theater in an hour."'
-
-			act 'Go':gt gt 'telefon', 'NPCDate', Call4Date["ContactIndex"], 'movie'
-		else
-			gs 'telefon','telotkaz',$Call4Date["CallerName"]
-		end
-	end
-
-	if  $home_town = 'city':
-		act 'Invite to the bar':
-			cla
-			'"Let''s go to the bar."'
-
-			if Call4Date["willAgree"]:
-				'<<$Call4Date["CallerName"]>>, "See you at the bar in an hour."'
-
-				act 'Go':gt 'telefon', 'NPCDate', Call4Date["ContactIndex"], 'bar'
-			else
-				gs 'telefon','telotkaz',$Call4Date["CallerName"]
-			end
-		end
-	end
-
-	act 'Invite to the cafe':
-		cla
-		'"Let''s go to the cafe."'
-
-		if Call4Date["willAgree"]:
-			'<<$Call4Date["CallerName"]>>, "See you at the cafe in an hour."'
-
-			act 'Go':gt gt 'telefon', 'NPCDate', Call4Date["ContactIndex"], 'cafe'
-		else
-			gs 'telefon','telotkaz',$Call4Date["CallerName"]
-		end
-	end
-
-	act 'I think we should break up...':
-		cla
-		'<<$Call4Date["NPC-He"]>> sounds hurt, but you insist it is for the best. You both say goodbye and part ways.'
-		gs 'telefon', 'DeleteContact', $Call4Date["NPC"]
-
-		act 'Hangup':gt 'telefon', 'fin'
-	end
-
-	act 'Hangup':gt 'telefon', 'fin'
-
-	killvar 'Call4Date'
-	killvar '$Call4Date'
-	killvar '$DateNickName'
-end
-
-! NPC Calls Sveta for a Date
-!	ARGS[1] = $contact index number
-if $ARGS[0] = 'NPCCallsForDate':
-	cla
-	clr
-	Call4Date["ContactIndex"] = ARGS[1]
-	$Call4Date["NPC"] = $contact[Call4Date['ContactIndex']]
-
-	!!Pick a nickname that caller will use for Sveta
-	$DateNickName[0] = 'cutie'
-	$DateNickName[1] = 'honey'
-	$DateNickName[2] = 'sweetie'
-	$DateNickName[3] = 'baby'
-	$DateNickName[4] = 'hot stuff'
-	$DateNickName[5] = '<<$pcs_nickname>>'
-	$Call4Date['SvetaName'] = $DateNickName[rand(0, arrsize('$DateNickName'))]
-
-	$Call4Date['CallerName'] = $npc_nickname[$Call4Date["NPC"]]
-
-	!! These variables are setup for certain downstream functions
-	$caller = $Call4Date["CallerName"]
-	$callerid = $contactIcon[Call4Date["ContactIndex"]]
-
-	'Hey <<$Call4Date["SvetaName"]>>, it''s me, <<$Call4Date["CallerName"]>>. How''s it going?'
-
-	act 'Answer':
-		cla
-		'"Pretty good, you?"'
-		'<<$Call4Date["CallerName"]>>, "Great, but I kind of miss you, can we meet today?"'
-		if week > 1 and week < 5 and workKafe = 1:
-			act 'Sorry, I''m working today':
-				cla
-				'"Sorry, I''m working today."'
-				'<<$Call4Date["CallerName"]>>, "Okay, I''ll call tomorrow."'
-
-				act 'Hang up':gt 'telefon', 'fin'
-			end
-		end
-
-		act 'Tonight':
-			cla
-			npc_rel[$Call4Date["NPC"]] += 1
-			contMeetDay[Call4Date["ContactIndex"]] = daystart
-			'"How about this evening?"'
-			'<<$Call4Date["CallerName"]>>, "Sounds great! When can I come to pick you up?"'
-
-			act 'Pick a time':
-				cla
-				contMeetHour[Call4Date["ContactIndex"]] = 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 contMeetHour[Call4Date["ContactIndex"]] <= hour or contMeetHour[Call4Date["ContactIndex"]] > 23:contMeetHour[Call4Date["ContactIndex"]] = 20
-
-				'"How about <<contMeetHour[Call4Date["ContactIndex"]]>>:00?."'
-				'<<$Call4Date["CallerName"]>>, "Okay <<$Call4Date["SvetaName"]>>, see you at <<contMeetHour[Call4Date["ContactIndex"]]>>:00."'
+		if willAgree:
+			'<<$loverdesc[lover_number]>>, "See you at the movie theater in an hour."'
 
-				act 'Hang up':gt 'telefon', 'fin'
-			end
+			act 'Go':gt 'svidboy', 'kinosvid'
+		else
+			gs 'telefon','telotkaz',$loverdesc[lover_number]
 		end
+	end
 
-		act 'Maybe tomorrow':
+	if  $home_town = 'city':
+		act 'Invite to the pool hall':
 			cla
-			npc_rel[$Call4Date["NPC"]] -= 1
-			'"I''m busy today. Call tomorrow."'
+			'"Let''s play pool."'
 
-			if npc_rel[$Call4Date["NPC"]] <= 0:'<<$Call4Date["CallerName"]>>, Are you fucking me, you know what. Suck my dick.' & gs 'telefon', 'DeleteContact', $Call4Date["NPC"]
-			if npc_rel[$Call4Date["NPC"]] > 0:'(<<$Call4Date["CallerName"]>>) -  Okay, I''ll call tomorrow.'
+			if willAgree:
+				'<<$loverdesc[lover_number]>>, "See you at the pool hall in an hour."'
 
-			act 'Hang up': gt 'telefon', 'fin'
+				act 'Go':gt 'svidboy', 'billsvid'
+			else
+				gs 'telefon','telotkaz',$loverdesc[lover_number]
+			end
 		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 'telefon', 'DeleteContact', $Call4Date["NPC"]
+	act 'Invite to the cafe':
+		cla
+		'"Let''s go to the cafe."'
 
-			act 'Hang up': gt 'telefon', 'fin'
+		if willAgree:
+			'<<$loverdesc[lover_number]>>, "See you at the cafe in an hour."'
+
+			act 'Go':gt 'svidboy', 'kafesvid'
+		else
+			gs 'telefon','telotkaz',$loverdesc[lover_number]
 		end
 	end
 
-	act 'Hang up (end relationship)':
+	act 'I think we should break up...':
 		cla
-		gs 'telefon', 'DeleteContact', $Call4Date["NPC"]
-		gt 'telefon', 'fin'
+		'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
 
-	killvar 'Call4Date'
-	killvar '$Call4Date'
-	killvar '$DateNickName'
+	act 'Hangup':gt 'telefon', 'fin'
 end
 
 if $ARGS[0] = 'lover' and loverGender[ARGS[1]] = 0:
@@ -933,248 +1114,7 @@ if $ARGS[0] = 'lover' and loverGender[ARGS[1]] = 1:
 		gt 'telefon', 'fin'
 	end
 end
-
-
-
-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 balans < 4:
-		$telefon['body'] = '
-		<font size=6>Not enough credit on your account</font><br>
-		<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, $metka
-	elseif balans >= 4:
-		balans -= 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':
-	$telefon['body'] = '
-	<font size=6>MegaFon</font><br>
-	<img src="<<FUNC(''$phone_theme'')>>icon_megafon.png" height="80" width="80"><br><br>
-	<b>The balance in the account:</b>
-	<font size=5><<balans>> ₽.</font><br>'
-	dynamic $telefon['print']
-end &! --- Phone_megafon ---
-
-
-if $ARGS[0] = 'AddContact':
-	! $ARGS[1] = NPC Array identifier
-	! $ARGS[2] = Icon
-	! $ARGS[3] = Code to execute for Call out
-	! $ARGS[4] = If statement code to determine schedule for outbound calls
-	! $ARGS[5] = Code to execute for Incoming call
-	! $ARGS[6] = if statement code for schedule of incoming calls
-	!  ARGS[7] = Anonymous? 0 if not, 1 if yes
-	$telefonCon['NPC'] = $ARGS[1]
-	$telefonCon['Icon'] = $ARGS[2]
-	$telefonCon['OutCode'] = $ARGS[3]
-	$telefonCon['OutSched'] = $ARGS[4]
-	$telefonCon['InCode'] = $ARGS[5]
-	$telefonCon['InSched'] = $ARGS[6]
-	telefonCon['Anonymous'] = ARGS[7]
-	telefonCon['ContactListID'] = arrpos('$contact',$telefonCon['NPC'])
-	if telefonCon['ContactListID'] = -1:
-		telefonCon['ContactListID'] = arrsize('$contact')
-		$contact[telefonCon['ContactListID']] = $telefonCon['NPC']
-	end
-	$contactIcon[telefonCon['ContactListID']] = $telefonCon['Icon']
-	$contactOCode[telefonCon['ContactListID']] = $telefonCon['OutCode']
-	$contactOSche[telefonCon['ContactListID']] = $telefonCon['OutSched']
-	$contactICode[telefonCon['ContactListID']] = $telefonCon['InCode']
-	$contactISche[telefonCon['ContactListID']] = $telefonCon['InSched']
-	contactAnon[telefonCon['ContactListID']] = telefonCon['Anonymous']
-
-	killvar 'telefonCon'
-	killvar '$telefonCon'
-end &! --- AddContact ---
-
-if $ARGS[0] = 'DeleteContact':
-	! $ARGS[1] = NPC Array identifier
-	$telefonCon['NPC'] = $ARGS[1]
-	telefonCon['ContactListID'] = arrpos('$contact',$telefonCon['NPC'])
-	if telefonCon['ContactListID'] > -1:
-		killvar '$contact', telefonCon['ContactListID']
-		killvar '$contactIcon', telefonCon['ContactListID']
-		killvar '$contactCode', telefonCon['ContactListID']
-	end
-
-	killvar 'telefonCon'
-	killvar '$telefonCon'
-end &! --- AddContact ---
-
-if $ARGS[0] = 'ContactList':
-	$telefon['body'] = '
-	<font size=6>Contacts</font><br>
-	<img src="<<FUNC(''$phone_theme'')>>icon_call.png" height="80" width="80"><br><br>'
-
-	!!iterating all Contacts
-	i=0
-	:contactloop2
-	if i < arrsize('$contact'):
-		if contactAnon[i] = 0:
-			$telefon['body'] += dyneval($telefon['contact'],$contactIcon[i],$npc_nickname[$contact[i]],$contactOCode[i],$contactOSche[i])
-		end
-		i += 1
-		jump 'contactloop2'
-	end
-
-	! Oddball Contacts
-	if telalla > 0:
-		$telefon['body'] += dyneval($telefon['contact'],'icon_ira1','Alla',"$telsob = 'Alla' & gt 'telefon', 'mobilaraz'","hour >= 8 and hour <= 20")
-	end
-	if telmasha > 0:
-		$telefon['body'] += dyneval($telefon['contact'],'icon_masha','Masha',"$telsob = 'Masha' & gt 'telefon', 'mobilaraz'","hour >= 8 and hour <= 20")
-	end
-
-	!! iterating all lovers
-	lover_number = 0
-	:loverloop2
-	if pcs_lovers[lover_number] = 1 and svidanie[lover_number] = 0:
-		$telefon['body'] += dyneval($telefon['contact'],'icon_bf'+lover_picture[lover_number],$loverdesc[lover_number],"lover_number = <<lover_number>> & gt 'telefon', 'callingTheLover', <<lover_number>>","hour > 6 and hour < 20")
-	end
-	lover_number += 1
-	if lover_number < arrsize('pcs_lovers'): jump 'loverloop2'
-
-	dynamic $telefon['print']
-	killvar 'i'
-	killvar 'lover_number'
-end &! --- ContactList ---
-
-if $ARGS[0] = 'Phone_contactlist':
-	$telefon['body'] = '
-	<font size=6>Contacts</font><br>
-	<img src="<<FUNC(''$phone_theme'')>>icon_call.png" height="80" width="80"><br><br>'
-	if StoryLine = 1:$telefon['body'] += dyneval($telefon['contact'],'icon_npc1',$npc_nickname['A29'],"gs 'telefon', 'Phone_call'")
-	if hour >= 8 and hour <= 19:
-		if telalla > 0:
-			$telefon['body'] += dyneval($telefon['contact'],'icon_ira1','Alla',"$telsob = 'Alla' & gt 'telefon', 'mobilaraz'")
-		end
-
-		if telmasha > 0:
-			$telefon['body'] += dyneval($telefon['contact'],'icon_masha','Masha',"$telsob = 'Masha' & gt 'telefon', 'mobilaraz'")
-		end
-
-		if telkat > 0:
-			$telefon['body'] += dyneval($telefon['contact'],'icon_kat','Kate',"$telsob = 'Kate' & gt 'telefon', 'mobilaraz'")
-		end
-
-		!! iterating all lovers
-		lover_number = 0
-		:loverloop
-		if pcs_lovers[lover_number] = 1 and svidanie[lover_number] = 0:
-			$telefon['body'] += dyneval($telefon['contact'],'icon_bf'+lover_picture[lover_number],$loverdesc[lover_number],"lover_number = <<lover_number>> & gt 'telefon', 'callingTheLover', <<lover_number>>")
-		end
-		lover_number += 1
-		if lover_number < arrsize('pcs_lovers'): jump 'loverloop'
-
-		killvar 'lover_number'
-
-	else
-		if telalla > 0:
-			$telefon['body'] += dyneval($telefon['contact'],'icon_ira1','Alla',"gs 'telefon', 'phone_call_reject'")
-		end
-
-		if telmasha > 0:
-			$telefon['body'] += dyneval($telefon['contact'],'icon_masha','Masha',"gs 'telefon', 'phone_call_reject'")
-		end
-
-		if telkat > 0:
-			$telefon['body'] += dyneval($telefon['contact'],'icon_kat','Kate',"gs 'telefon', 'phone_call_reject'")
-		end
-
-		!! iterating all lovers
-		lover_number = 0
-		:loverunavailableloop
-		if pcs_lovers[lover_number] = 1 and svidanie[lover_number] = 0:
-			$telefon['body'] += dyneval($telefon['contact'],'icon_bf'+lover_picture[lover_number],$loverdesc[lover_number],"lover_number = <<lover_number>> & gt 'telefon', 'phone_call_reject'")
-		end
-		lover_number += 1
-		if lover_number < arrsize('pcs_lovers'): jump 'loverunavailableloop'
-
-		killvar 'lover_number'
-	end
-	if npc_QW['A192'] > 0:
-		$telefon['body'] += dyneval($telefon['contact'],'icon_nastja',$npc_nickname['A192'],"gs 'telefon', 'start'")
-	end
-	dummyas = arrsize('$contact')
-:din_bad_as
-	dummyas -= 1
-	if dummyas >= 0:
-		pl '<<$contact[dummyas]>>'
-		jump 'din_bad_as'
-	end
-	killvar 'dummyas'
-
-	if arrsize('$contact')>0:$telefon['body'] += '<a href="exec:gs ''telefon'', ''Edit_Custom_list'' "><b>Edit Contacts</b></a><br>'
-
-	dynamic $telefon['print']
-end &! --- Phone_contactlist ---
-
-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/icon/back.png"></a></center>'
-	!dynamic $telefon['print']
-end &! --- Edit_Custom_list ---
-
+!---------------------- End of Lover support
 
 
 if $ARGS[0] = 'Phone_notebook':