Browse Source

[added] SMStext_builder. A much simpler to use method of building an SMS. No more screwing around with tons of variables and confusing names. Now packaged together for ease of use!

anjuna krokus 4 months ago
parent
commit
8266a3753d

+ 1 - 0
glife.qproj

@@ -239,6 +239,7 @@
 		<Location name="telefon"/>
 		<Location name="phone_selfies"/>
 		<Location name="phone_selfies_popup"/>
+		<Location name="SMStext_builder"/>
 	</Folder>
 	<Folder name="Prostitution">
 		<Location name="street_walker"/>

+ 111 - 0
locations/SMStext_builder.qsrc

@@ -0,0 +1,111 @@
+# SMStext_builder
+
+!	How to use SMStext_builder:
+!	
+!	Start with:
+!		gs 'SMStext_builder', 'start'
+!	Then add your content through "send" and "receive":
+!		gs 'SMStext_builder', 'send', [$text]
+!		gs 'SMStext_builder', 'receive', [$text]
+!		...
+!		...
+!	
+!	If you want Sveta to reply to this (and thus the player potentially having a choice):
+!		gs 'SMStext_builder', 'add_reply', [$text], [$file_name], [$file_args0], [$file_args1], ...
+!		gs 'SMStext_builder', 'add_reply', [$text], [$file_name], [$file_args0], [$file_args1], ...
+!	
+!	Finally, if this is a new sms-chain, use:
+!		gs 'SMStext_builder', 'add_sms', [$npc_code]
+!	
+!	If you are updating an ongoing sms-chain (usually in reponse to a choice made in the replies), use:
+!		gs 'SMStext_builder', 'show_sms', ARGS[{n}]
+!				where {n} is one more than the number of args you passed to the choice.
+!				So if you are used:
+!					gs 'SMStext_builder', 'add_reply', [$text], [$file_name], [$file_args0], [$file_args1].
+!				Then you would pass ARGS[2] (since you used $ARGS[0] and $ARGS[1]):
+!				gs 'SMStext_builder', 'add_sms', ARGS[2]
+!	
+!	Finally after the player has made a choice, you want to rebuild the SMS-history again (to get rid of the replies).
+!	Starting fresh or having done your final update (even if you never updated it anyway)
+!	End it with:
+!		gs 'SMStext_builder', 'end'
+
+
+
+
+if $ARGS[0] = 'start':
+	$temp_SMStext = ''
+
+elseif $ARGS[0] = 'end':
+	killvar '$temp_SMStext'
+	killvar '$temp_SMSreplies'
+	killvar 'stb_i'
+	killvar 'stb_maxi'
+end
+
+if $ARGS[0] = 'send':
+	$temp_SMStext += '<table width=80%><tr><td width=10%></td><td collspan=2 bgcolor=pink><font color=black>'
+	$temp_SMStext += $ARGS[1]
+	$temp_SMStext += '</font></td></tr></table>'
+
+elseif $ARGS[0] = 'receive':
+	$temp_SMStext += '<table width=80%><tr><td collspan=2 bgcolor="#D4CEF9"><font color=black>'
+	$temp_SMStext += $ARGS[1]
+	$temp_SMStext += '</font></td><td width=10%></td></tr></table>'
+end
+
+
+!	How to use 'add_reply':
+!		gs 'SMStext_builder', 'add_reply', $reply_text, $file_loc, $file_arg1, $file_arg2, $file_args2, ...
+!		gs 'SMStext_builder', 'add_reply', 'Hello', 'band_tour_anushka_SMS', 'week1', 'choice_a'
+if $ARGS[0] = 'add_reply':
+	$temp_reply_str = '<a href="exec: gs '
+
+	stb_n_args = arrsize('$ARGS')
+	stb_i = 2
+	:SMS_build_reply_loop
+		$temp_reply_str += '''<<$ARGS[stb_i]>>'', '
+		stb_i += 1
+	if stb_i < stb_n_args: jump 'SMS_build_reply_loop'
+
+	$temp_reply_str += 'telefon[''SMSid'']">' + $ARGS[1] + '</a>'
+	$temp_SMSreplies[] = $temp_reply_str
+
+	killvar 'temp_reply_str'
+	killvar 'stb_i'
+	killvar 'stb_n_args'
+
+elseif $ARGS[0] = 'set_replies':
+	$temp_SMStext += '<table><tr><th> Reply</th></tr><tr><td>'
+
+	stb_maxi = arrsize('temp_SMSreplies')
+	stb_i = 0
+	if stb_maxi >= 2:
+		:SMS_reply_loop
+			$temp_SMStext += $temp_SMSreplies[stb_i]
+			$temp_SMStext += '</td></tr><tr><td>'
+			stb_i += 1
+		if stb_i < stb_maxi - 1: jump 'SMS_reply_loop'
+	end
+	$temp_SMStext += $temp_SMSreplies[stb_i]
+	$temp_SMStext += '</td></tr></table>'
+
+	killvar '$temp_SMSreplies'
+	killvar 'stb_i'
+	killvar 'stb_maxi'
+end
+
+if $ARGS[0] = 'add_sms':
+	if arrsize('temp_SMSreplies') > 0: gs 'SMStext_builder', 'set_replies'
+	gs 'telefon', 'add_sms', $ARGS[1], $temp_SMStext, $ARGS[2], $ARGS[3], $ARGS[4], $ARGS[5]
+
+elseif $ARGS[0] = 'show_sms':
+	if arrsize('temp_SMSreplies') > 0: gs 'SMStext_builder', 'set_replies'
+	$SMSMessage[ARGS[1]] = $temp_SMStext
+	gs 'telefon', 'show_sms', ARGS[1], $ARGS[2], $ARGS[3], $ARGS[4], $ARGS[5]
+end
+
+
+
+
+--- SMStext_builder ---------------------------------

+ 75 - 88
locations/band_tour_anushka_SMS.qsrc

@@ -16,50 +16,29 @@
 
 
 
-!!=====   Layout stuff   =====================================================================================!!
-!! Open and close receiving text
-$SMS_open_receiving = '<table width=80%><tr><td collspan=2 bgcolor="#D4CEF9"><font color=black>'
-$SMS_close_receiving = '</font></td><td width=10%></td></tr></table>'
+!=====   Reply example here ==================================================================================!
 
-!! Open and close sending text
-$SMS_open_sending = '<table width=80%><tr><td width=10%></td><td collspan=2 bgcolor=pink><font color=black>'
-$SMS_close_sending = '</font></td></tr></table>'
+!	gs 'SMStext_builder', 'add_reply', [$text], [$location], [$args0], [$args1], [$args2], ...
+!	examples:
+!		gs 'SMStext_builder', 'add_reply', 'No, I do''t want to come over', 'booty_call_sms', 'Choice_a', $ARGS[1], $ARGS[2]
+!		gs 'SMStext_builder', 'add_reply', 'Good luck!', 'band_tour_anushka_SMS', 'Week1', 'Choice_a'
 
-!! Start reply
-$SMS_open_replies = '<table><tr><th> Reply</th></tr><tr><td>'
-$SMS_next_reply = '</td></tr><tr><td>'
-$SMS_close_replies = '</td></tr></table>'
-!!=====   Layout stuff   =====================================================================================!!
+!=============================================================================================================!
 
 
+!=====   Adding Images to SMS ================================================================================!
 
-!!=====   Reply example here =================================================================================!!
-
-!!   $temp_SMStext += $SMS_open_replies
-!!   $temp_SMStext += '<a href="exec: gs ''>>Name of the location<<'', ''>>Name of the SMS Branch<<'', ''>>Name of the Choice<<'', telefon[''SMSid'']">' + 'TEXT' + '</a>'
-!!   $temp_SMStext += $SMS_next_reply
-!!   $temp_SMStext += '<a href="exec: gs ''>>Name of the location<<'', ''>>Name of the SMS Branch<<'', ''>>Name of the Choice<<'', telefon[''SMSid'']">' + 'TEXT' + '</a>'
-!!   ....
-!!   $temp_SMStext += $SMS_close_replies
-
-!!=====   Reply example here =================================================================================!!
-
-!!=====   Adding Images to SMS ===============================================================================!!
-
-!!    You can add images at the end by manually setting:
-!!    $SMSPicture1[telefon['SMSid']] = Path to picture 1
-!!    $SMSPicture2[telefon['SMSid']] = Path to picture 2
-!!    $SMSPicture3[telefon['SMSid']] = Path to picture 3
-!!    $SMSPicture4[telefon['SMSid']] = Path to picture 4
+!	You can add images at the end of the text by using:
+!	gs 'SMStext_builder', 'add_sms', $npc_code, $imagepath1, $imagepath2, $imagepath3, $imagepath4
+!	gs 'SMStext_builder', 'add_sms', SMSid, $imagepath1, $imagepath2, $imagepath3, $imagepath4
+!			SMSid is the final ARGS passed to this file (here ARGS[2])
 
 ! You can also always add a picture to the text, scaling is an issue though
 
+!=============================================================================================================!
 
-!!=====   Adding Images to SMS ===============================================================================!!
 
 
-$temp_SMStext = ''
-
 
 if $ARGS[0] = 'start':
 	anushkaQW['num_tour_SMS_send'] += 1
@@ -113,19 +92,15 @@ if $ARGS[0] = 'Week1':
 	
 	!!Add the SMS to the phone
 	if $ARGS[1] = 'Add SMS':
-		$temp_SMStext += $SMS_open_receiving + $SMSTree[ '0'] + $SMS_close_receiving
-		
-		!!replies
-		$temp_SMStext += $SMS_open_replies
+		gs 'SMStext_builder', 'start'
+			gs 'SMStext_builder', 'receive', $SMSTree[ '0']
 		
-		$temp_SMStext += '<a href="exec: gs ''band_tour_anushka_SMS'', ''Week1'', ''Choice_a'', telefon[''SMSid'']">' + 'Good luck!' + '</a>'
-		$temp_SMStext += $SMS_close_replies
-
-		!!$temp_SMStext += $SMS_next_reply
-		!!$temp_SMStext += '<a href="exec: gs ''band_tour_anushka_SMS'', ''Week1'', ''Choice_b'', telefon[''SMSid'']">' + 'Reply2' + '</a>'
-		!!$temp_SMStext += $SMS_close_replies
+			!replies
+			gs 'SMStext_builder', 'add_reply', $SMSTree['a1'], 'band_tour_anushka_SMS', 'Week1', 'Choice_a'
+			!	gs 'SMStext_builder', 'add_reply', $SMSTree['b1'], 'band_tour_anushka_SMS', 'Week1', 'Choice_b'
 
-		gosub 'telefon', 'add_sms', 'A144', $temp_SMStext
+			gs 'SMStext_builder', 'add_sms', 'A144'
+		gs 'SMStext_builder', 'end'
 
 
 	!!===   Choice a   ===!!
@@ -135,11 +110,12 @@ if $ARGS[0] = 'Week1':
 		!! Is here to add it after reading the text.
 		if arrpos('$contact', 'A144') = -1: gs 'telefon', 'AddContact', 'A144', 'images/characters/shared/headshots_main/big144.jpg', "", "1 = 0", "", "", 0
 
-		$temp_SMStext += $SMS_open_receiving + $SMSTree[ '0']  + $SMS_close_receiving
-		$temp_SMStext += $SMS_open_sending   + $SMSTree['a1'] + $SMS_close_sending
-		
-		$SMSMessage[ARGS[2]] = $temp_SMStext
-		gs 'telefon', 'show_sms', ARGS[2]
+		gs 'SMStext_builder', 'start'
+			gs 'SMStext_builder', 'receive', $SMSTree[ '0']
+			gs 'SMStext_builder', 'send', $SMSTree['a1']
+
+			gs 'SMStext_builder', 'show_sms', ARGS[2]
+		gs 'SMStext_builder', 'end'
 	end
 
 
@@ -148,10 +124,10 @@ elseif $ARGS[0] = 'Week2':
 	$SMSTree[ '0'] = '"Got to Smolensk, been playing most nights in local clubs. Going to do a little site seeing today, the boys are all out still. Was a hell of a party last night, so many bitches just throwing themselves at the boys and boy do they love it." Her text is followed by emojis aligned in a lewd way.'
 
 	if $ARGS[1] = 'Add SMS':
-		$temp_SMStext += $SMS_open_receiving + $SMSTree[ '0'] + $SMS_close_receiving
-
-		gosub 'telefon', 'add_sms', 'A144', $temp_SMStext
-
+		gs 'SMStext_builder', 'start'
+			gs 'SMStext_builder', 'receive', $SMSTree[ '0']
+			gs 'SMStext_builder', 'add_sms', 'A144'
+		gs 'SMStext_builder', 'end'
 	end
 
 
@@ -161,12 +137,15 @@ elseif $ARGS[0] = 'Week3':
 	$SMSTree[ '0'] = '"We got to Minsk just in time for Рок За Бобров festival, it was amazing. We camped out all four days. So many bands, so much good music, we got to get up on stage as well. Not the main stage but one of the side stages. So fucking cool, I want to come back next year and do it again." A string of excited emojis follow the text'
 
 	if $ARGS[1] = 'Add SMS':
-		$temp_SMStext += $SMS_open_receiving + $SMSTree[ '0'] + $SMS_close_receiving
-		
-		!! Insert image path here ---- $SMSPicture1[ARGS[2]] = 'images/pc/glare.jpg'
-		$temp_imagepath1 = ''
-		
-		gosub 'telefon', 'add_sms', 'A144', $temp_SMStext, $temp_imagepath1
+		gs 'SMStext_builder', 'start'
+			gs 'SMStext_builder', 'receive', $SMSTree[ '0']
+
+			!! Insert image path here ---- $SMSPicture1[ARGS[2]] = 'images/pc/glare.jpg'
+			$temp_imagepath1 = ''
+			gs 'SMStext_builder', 'add_sms', 'A144', $temp_imagepath1
+		gs 'SMStext_builder', 'end'
+
+		killvar '$temp_imagepath1'
 	end
 
 
@@ -175,9 +154,10 @@ elseif $ARGS[0] = 'Week4':
 	$SMSTree[ '0'] = '"We made Kyiv in time for Atlas music festival, they also had a beer festival and a lot of tattoo artists. I was going to get a new tattoo, but the wait was too long. Val got so drunk we had to carry him back to the hotel."'
 
 	if $ARGS[1] = 'Add SMS':
-		$temp_SMStext += $SMS_open_receiving + $SMSTree[ '0'] + $SMS_close_receiving
-
-		gosub 'telefon', 'add_sms', 'A144', $temp_SMStext
+		gs 'SMStext_builder', 'start'
+			gs 'SMStext_builder', 'receive', $SMSTree[ '0']
+			gs 'SMStext_builder', 'add_sms', 'A144'
+		gs 'SMStext_builder', 'end'
 	end
 
 
@@ -187,12 +167,15 @@ elseif $ARGS[0] = 'Week5':
 	$SMSTree[ '0'] = '"Third festival in a row, we made the Маяк Fest here in Odessa. So cool, I am loving this trip. Spent a lot of time at the music festival, played some gigs, but spent a lot of the time at the beach. I wish another girl had come, hanging out with just the boys is getting old." emoji of a gun to head.'
 
 	if $ARGS[1] = 'Add SMS':
-		$temp_SMStext += $SMS_open_receiving + $SMSTree[ '0'] + $SMS_close_receiving
-		
-		!! Insert image path here ---- $SMSPicture1[ARGS[2]] = 'images/pc/glare.jpg'
-		$temp_imagepath1 = ''
+		gs 'SMStext_builder', 'start'
+			gs 'SMStext_builder', 'receive', $SMSTree[ '0']
+
+			!! Insert image path here ---- $SMSPicture1[ARGS[2]] = 'images/pc/glare.jpg'
+			$temp_imagepath1 = ''
+			gs 'SMStext_builder', 'add_sms', 'A144', $temp_imagepath1
+		gs 'SMStext_builder', 'end'
 
-		gosub 'telefon', 'add_sms', 'A144', $temp_SMStext, $temp_imagepath1
+		killvar '$temp_imagepath1'
 	end
 
 
@@ -201,9 +184,10 @@ elseif $ARGS[0] = 'Week6':
 	$SMSTree[ '0'] = '"There was some watermelon festival going on here at Rostov, Arkadi entered into the eating contest and lost, we took some with us for our next drive. Played at a lot of small clubs while here."'
 
 	if $ARGS[1] = 'Add SMS':
-		$temp_SMStext += $SMS_open_receiving + $SMSTree[ '0'] + $SMS_close_receiving
-
-		gosub 'telefon', 'add_sms', 'A144', $temp_SMStext
+		gs 'SMStext_builder', 'start'
+			gs 'SMStext_builder', 'receive', $SMSTree[ '0']
+			gs 'SMStext_builder', 'add_sms', 'A144'
+		gs 'SMStext_builder', 'end'
 	end
 
 
@@ -212,9 +196,10 @@ elseif $ARGS[0] = 'Week7':
 	$SMSTree[ '0'] = '"Had some big gigs in Volgograd, followed by a two day party at some girls place. I don''t remember half of it, but I woke up in the van, somehow we picked up two bitches who are now with us, the guys take turns fucking them in the back, as we drive." Followed by several lewd emojis for sex'
 
 	if $ARGS[1] = 'Add SMS':
-		$temp_SMStext += $SMS_open_receiving + $SMSTree[ '0'] + $SMS_close_receiving
-
-		gosub 'telefon', 'add_sms', 'A144', $temp_SMStext
+		gs 'SMStext_builder', 'start'
+			gs 'SMStext_builder', 'receive', $SMSTree[ '0']
+			gs 'SMStext_builder', 'add_sms', 'A144'
+		gs 'SMStext_builder', 'end'
 	end
 
 
@@ -223,9 +208,10 @@ elseif $ARGS[0] = 'Week8':
 	$SMSTree[ '0'] = '"Had some great gigs here in Voronezh, one of the bitches took off, getting a bus ride home. Anna stayed, she seems to love it when I drive, so the boys can triple team her. The rest of the time she spends passed out from drinking too much, she is starting to get on my nerves."'
 
 	if $ARGS[1] = 'Add SMS':
-		$temp_SMStext += $SMS_open_receiving + $SMSTree[ '0'] + $SMS_close_receiving
-
-		gosub 'telefon', 'add_sms', 'A144', $temp_SMStext
+		gs 'SMStext_builder', 'start'
+			gs 'SMStext_builder', 'receive', $SMSTree[ '0']
+			gs 'SMStext_builder', 'add_sms', 'A144'
+		gs 'SMStext_builder', 'end'
 	end
 
 
@@ -234,9 +220,10 @@ elseif $ARGS[0] = 'Week9':
 	$SMSTree[ '0'] = '"Moscow is huge and amazing, had a blast here. Getting sick of the boys, after two months with them I am ready to strangle them. At least we ditched the bitch, we just left her passed out in the hotel room."'
 
 	if $ARGS[1] = 'Add SMS':
-		$temp_SMStext += $SMS_open_receiving + $SMSTree[ '0'] + $SMS_close_receiving
-
-		gosub 'telefon', 'add_sms', 'A144', $temp_SMStext
+		gs 'SMStext_builder', 'start'
+			gs 'SMStext_builder', 'receive', $SMSTree[ '0']
+			gs 'SMStext_builder', 'add_sms', 'A144'
+		gs 'SMStext_builder', 'end'
 	end
 
 
@@ -245,9 +232,10 @@ elseif $ARGS[0] = 'Week10':
 	$SMSTree[ '0'] = '"On the way to Novgorod I almost jumped out of the van. We stopped at some diner and the boys all had this bean stew. Within an hour the van was like a toxic gas zone. they made a game out of who could fart the loudest, I almost threw up several times. Spent most of the time with my head hanging out the window." emoji of a vomiting face.'
 
 	if $ARGS[1] = 'Add SMS':
-		$temp_SMStext += $SMS_open_receiving + $SMSTree[ '0'] + $SMS_close_receiving
-
-		gosub 'telefon', 'add_sms', 'A144', $temp_SMStext
+		gs 'SMStext_builder', 'start'
+			gs 'SMStext_builder', 'receive', $SMSTree[ '0']
+			gs 'SMStext_builder', 'add_sms', 'A144'
+		gs 'SMStext_builder', 'end'
 	end
 
 !!11th text
@@ -255,16 +243,15 @@ elseif $ARGS[0] = 'Week11':
 	$SMSTree[ '0'] = '"Back home, can''t believe it but I actually missed this place. Got to start packing tomorrow to move to the city and get ready for Uni."'
 
 	if $ARGS[1] = 'Add SMS':
-		$temp_SMStext += $SMS_open_receiving + $SMSTree[ '0'] + $SMS_close_receiving
-
-		gosub 'telefon', 'add_sms', 'A144', $temp_SMStext
+		gs 'SMStext_builder', 'start'
+			gs 'SMStext_builder', 'receive', $SMSTree[ '0']
+			gs 'SMStext_builder', 'add_sms', 'A144'
+		gs 'SMStext_builder', 'end'
 	end
 
 end
 
-killvar '$temp_SMStext'
-killvar 'SMSTree'
-
+killvar '$SMSTree'
 
 --- band_tour_anushka_SMS ---------------------------------
 

+ 184 - 243
locations/booty_call_sms.qsrc

@@ -1,47 +1,25 @@
 # booty_call_sms
 
-!!=====   Layout stuff   =====================================================================================!!
-!! Open and close receiving text
-$SMS_open_receiving = '<table width=80%><tr><td collspan=2 bgcolor="#D4CEF9"><font color=black>'
-$SMS_close_receiving = '</font></td><td width=10%></td></tr></table>'
+!=====   Reply example here ==================================================================================!
 
-!! Open and close sending text
-$SMS_open_sending = '<table width=80%><tr><td width=10%></td><td collspan=2 bgcolor=pink><font color=black>'
-$SMS_close_sending = '</font></td></tr></table>'
+!	gs 'SMStext_builder', 'add_reply', [$text], [$location], [$args0], [$args1], [$args2], ...
+!	examples:
+!		gs 'SMStext_builder', 'add_reply', 'No, I do''t want to come over', 'booty_call_sms', 'Choice_a', $ARGS[1], $ARGS[2]
+!		gs 'SMStext_builder', 'add_reply', 'Good luck!', 'band_tour_anushka_SMS', 'Week1', 'Choice_a'
 
-!! Start reply
-$SMS_open_replies = '<table><tr><th> Reply</th></tr><tr><td>'
-$SMS_next_reply = '</td></tr><tr><td>'
-$SMS_close_replies = '</td></tr></table>'
-!!=====   END Layout stuff   =====================================================================================!!
+!=============================================================================================================!
 
 
+!=====   Adding Images to SMS ================================================================================!
 
-
-!!=====   Reply example here =================================================================================!!
-
-!!  $temp_SMStext += $SMS_open_replies
-!!  	$temp_SMStext += '<a href="exec: gs ''>>Name of the location<<'', ''>>Name of the SMS Branch<<'', ''>>Name of the Choice<<'', telefon[''SMSid'']">' + 'TEXT' + '</a>'
-!!  	$temp_SMStext += $SMS_next_reply
-!!  	$temp_SMStext += '<a href="exec: gs ''>>Name of the location<<'', ''>>Name of the SMS Branch<<'', ''>>Name of the Choice<<'', telefon[''SMSid'']">' + 'TEXT' + '</a>'
-!!  	....
-!!  $temp_SMStext += $SMS_close_replies
-
-!!=====   END Reply example here =================================================================================!!
-
-
-!!=====   Adding Images to SMS ===============================================================================!!
-
-!!    You can add images at the end by manually setting:
-!!    $SMSPicture1[telefon['SMSid']] = Path to picture 1
-!!    $SMSPicture2[telefon['SMSid']] = Path to picture 2
-!!    $SMSPicture3[telefon['SMSid']] = Path to picture 3
-!!    $SMSPicture4[telefon['SMSid']] = Path to picture 4
+!	You can add images at the end of the text by using:
+!	gs 'SMStext_builder', 'add_sms', $npc_code, $imagepath1, $imagepath2, $imagepath3, $imagepath4
+!	gs 'SMStext_builder', 'add_sms', SMSid, $imagepath1, $imagepath2, $imagepath3, $imagepath4
+!			SMSid is the final ARGS passed to this file (here ARGS[3])
 
 ! You can also always add a picture to the text, scaling is an issue though
 
-
-!!=====   END Adding Images to SMS ===============================================================================!!
+!=============================================================================================================!
 
 
 
@@ -72,7 +50,7 @@ if $ARGS[0] = 'default_booty_call':
 
 				!! player response 1 option 1
 				$SMSTree['a3'] = 'what were you thinking about?'
-	
+
 					!! boy response 1
 					if npc_finance[$ARGS[1]] = 2 and func('homes_properties_attr', 'get_property_attribute', '$town', $home['current']) ! 'city' and npc_residence[$ARGS[1]] >= 3:
 						$SMSTree['a4'] = 'i booked a hotel room in Pav. why dont you come by?'
@@ -231,22 +209,22 @@ end
 if $ARGS[0] = 'std_free':
 	!! boy
 	$SMSTree['0'] = dyneval('$result=''hey <<$pcs_nickname>>'' ')
-	
+
 		!! player
 		$SMSTree['1'] = dyneval('$result=''hey <<$npc_nickname[$ARGS[1]]>>'' ')
-	
+
 			!! boy
 			$SMSTree['2'] = 'got some good news'
-	
+
 				!! player response 1 option 1
 				$SMSTree['a3'] = 'oh?'
-	
+
 					!! boy response 1
 					$SMSTree['a4'] = 'my std test came back clean. why dont we celebrate tog'
-	
+
 				!! player response 1 option 2
 				$SMSTree['b3'] = 'what is it?'
-	
+
 					!! boy response 2
 					$SMSTree['b4'] = 'my std test came back clean'
 
@@ -259,15 +237,15 @@ if $ARGS[0] = 'std_free':
 							$SMSTree['aa5'] = 'its late. text me sooner if you want me to come over.'
 							$SMSTree['ba5'] = $SMSTree['aa5']
 						end
-	
+
 							!! boy response 2 option 1
 							$SMSTree['aa6'] = 'shit, maybe next time then'
 							$SMSTree['ba6'] = $SMSTree['aa6']
-	
+
 						!! player response 2 option 2
 						$SMSTree['ab5'] = 'ill come right now ;)'
 						$SMSTree['bb5'] = $SMSTree['ab5']
-	
+
 							!! boy response 2 option 2
 							if npc_humor[$ARGS[1]] <= 1 and rand(0,1) = 1:
 								$SMSTree['ab6'] = 'im already hard'
@@ -290,16 +268,16 @@ if $ARGS[0] = 'std_free':
 end
 
 
-if $ARGS[0] = 'sugar_daddy_booty_call':	
+if $ARGS[0] = 'sugar_daddy_booty_call':
 	!! boy
 	$SMSTree['0'] = dyneval('$result=''hey <<$pcs_nickname>>'' ')
-		
+
 		!! player
 		$SMSTree['1'] = dyneval('$result=''hey <<$npc_nickname[$ARGS[1]]>>'' ')
-	
+
 			!! boy
 			$SMSTree['2'] = 'ive been thinking about you'
-	
+
 				!! player response 1 option 1
 				$SMSTree['a3'] = 'what were you thinking about?'
 
@@ -333,7 +311,7 @@ if $ARGS[0] = 'sugar_daddy_booty_call':
 						!! player response 2 option 2
 						$SMSTree['ab5'] = 'ill come right now ;)'
 						$SMSTree['bb5'] = $SMSTree['ab5']
-							
+
 							!! boy response 2 option 2
 							if ($home['current'] = 'parents_home' or $home['current'] = 'meynold_household' or $home['current'] = 'shared_apartment') and npc_residence[$ARGS[1]] >= 3:
 								$SMSTree['ab6'] = 'room <<rand(1,3)>><<rand(10,19)>>'
@@ -360,12 +338,11 @@ end
 if $ARGS[0] = 'Add SMS':
 	gs 'booty_call_sms', $ARGS[1], $ARGS[2]
 
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['0'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_replies
-		$temp_SMStext += '<a href="exec: gs ''booty_call_sms'', ''SMS_Base'', ''<<$ARGS[1]>>'', ''<<$ARGS[2]>>'', telefon[''SMSid'']">' + $SMSTree['1'] + '</a>'
-	$temp_SMStext += $SMS_close_replies
-
-	gs 'telefon', 'add_sms', $ARGS[2], $temp_SMStext
+	gs 'SMStext_builder', 'start'
+		gs 'SMStext_builder', 'receive', $SMSTree['0']
+		gs 'SMStext_builder', 'add_reply', $SMSTree['1'], 'booty_call_sms', 'SMS_Base', $ARGS[1], $ARGS[2]
+		gs 'SMStext_builder', 'add_sms', $ARGS[2]
+	gs 'SMStext_builder', 'end'
 end
 
 
@@ -373,96 +350,81 @@ if $ARGS[0] = 'SMS_Base':
 !if $ARGS[0] = 'V0':
 	gs 'booty_call_sms', $ARGS[1], $ARGS[2]
 
-	$temp_SMStext  = $SMS_open_receiving + $SMSTree['0'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['1'] + $SMS_close_sending
-	$SMSMessage[ARGS[3]] = $temp_SMStext
-
-	gs 'telefon', 'show_sms', ARGS[3]
-	wait 500
-
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['2'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_replies
-		$temp_SMStext += '<a href="exec: gs ''booty_call_sms'', ''Choice_a'', ''<<$ARGS[1]>>'', ''<<$ARGS[2]>>'', telefon[''SMSid'']">' + $SMSTree['a3'] + '</a>'
-		$temp_SMStext += $SMS_next_reply
-		$temp_SMStext += '<a href="exec: gs ''booty_call_sms'', ''Choice_b'', ''<<$ARGS[1]>>'', ''<<$ARGS[2]>>'', telefon[''SMSid'']">' + $SMSTree['b3'] + '</a>'
-	$temp_SMStext += $SMS_close_replies
-
-	$SMSMessage[ARGS[3]] = $temp_SMStext
-	gs 'telefon', 'show_sms', ARGS[3]
+	gs 'SMStext_builder', 'start'
+		gs 'SMStext_builder', 'receive', $SMSTree['0']
+		gs 'SMStext_builder', 'send', $SMSTree['1']
+		gs 'SMStext_builder', 'show_sms', ARGS[3]
+		wait 500
+
+		gs 'SMStext_builder', 'receive', $SMSTree['2']
+		gs 'SMStext_builder', 'add_reply', $SMSTree['a3'], 'booty_call_sms', 'Choice_a', $ARGS[1], $ARGS[2]
+		gs 'SMStext_builder', 'add_reply', $SMSTree['b3'], 'booty_call_sms', 'Choice_b', $ARGS[1], $ARGS[2]
+		gs 'SMStext_builder', 'show_sms', ARGS[3]
+	gs 'SMStext_builder', 'end'
 end
 
 
 if $ARGS[0] = 'Choice_a':
 	gs 'booty_call_sms', $ARGS[1], $ARGS[2]
 
-	$temp_SMStext  = $SMS_open_receiving + $SMSTree['0'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['1'] + $SMS_close_sending
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['2'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['a3'] + $SMS_close_sending
-	$SMSMessage[ARGS[3]] = $temp_SMStext
-
-	gs 'telefon', 'show_sms', ARGS[3]
-	wait 500
-
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['a4'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_replies
-		$temp_SMStext += '<a href="exec: gs ''booty_call_sms'', ''Choice_aa'', ''<<$ARGS[1]>>'', ''<<$ARGS[2]>>'', telefon[''SMSid'']">' + $SMSTree['aa5'] + '</a>'
-		$temp_SMStext += $SMS_next_reply
-		$temp_SMStext += '<a href="exec: gs ''booty_call_sms'', ''Choice_ab'', ''<<$ARGS[1]>>'', ''<<$ARGS[2]>>'', telefon[''SMSid'']">' + $SMSTree['ab5'] + '</a>'
-	$temp_SMStext += $SMS_close_replies
-	$SMSMessage[ARGS[3]] = $temp_SMStext
-
-	gs 'telefon', 'show_sms', ARGS[3]
-end
-
-if $ARGS[0] = 'Choice_aa':
+	gs 'SMStext_builder', 'start'
+		gs 'SMStext_builder', 'receive', $SMSTree['0']
+		gs 'SMStext_builder', 'send', $SMSTree['1']
+		gs 'SMStext_builder', 'receive', $SMSTree['2']
+		gs 'SMStext_builder', 'send', $SMSTree['a3']
+		gs 'SMStext_builder', 'show_sms', ARGS[3]
+		wait 500
+
+		gs 'SMStext_builder', 'receive', $SMSTree['a4']
+		gs 'SMStext_builder', 'add_reply', $SMSTree['aa5'], 'booty_call_sms', 'Choice_aa', $ARGS[1], $ARGS[2]
+		gs 'SMStext_builder', 'add_reply', $SMSTree['ab5'], 'booty_call_sms', 'Choice_ab', $ARGS[1], $ARGS[2]
+		gs 'SMStext_builder', 'show_sms', ARGS[3]
+	gs 'SMStext_builder', 'end'
+
+elseif $ARGS[0] = 'Choice_aa':
 	!! booty call is declined
 	
 	gs 'booty_call_sms', $ARGS[1], $ARGS[2]
 
-	$temp_SMStext  = $SMS_open_receiving + $SMSTree['0'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['1'] + $SMS_close_sending
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['2'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['a3'] + $SMS_close_sending
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['a4'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['aa5'] + $SMS_close_sending
-	$SMSMessage[ARGS[3]] = $temp_SMStext
-
-	gs 'telefon', 'show_sms', ARGS[3]
-
-	if sugar_daddy_call[$ARGS[2]] = 1:
-		npc_rel[$ARGS[2]] -= 2
-		sugar_daddy_call[$ARGS[2]] = 0
-	end
+	gs 'SMStext_builder', 'start'
+		gs 'SMStext_builder', 'receive', $SMSTree['0']
+		gs 'SMStext_builder', 'send', $SMSTree['1']
+		gs 'SMStext_builder', 'receive', $SMSTree['2']
+		gs 'SMStext_builder', 'send', $SMSTree['a3']
+		gs 'SMStext_builder', 'receive', $SMSTree['a4']
+		gs 'SMStext_builder', 'send', $SMSTree['aa5']
+		gs 'SMStext_builder', 'show_sms', ARGS[3]
 
-	wait 500
+		if sugar_daddy_call[$ARGS[2]] = 1:
+			npc_rel[$ARGS[2]] -= 2
+			sugar_daddy_call[$ARGS[2]] = 0
+		end
 
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['aa6'] + $SMS_close_receiving
-	$SMSMessage[ARGS[3]] = $temp_SMStext
+		wait 500
 
-	gs 'telefon', 'show_sms', ARGS[3]
-end
+		gs 'SMStext_builder', 'receive', $SMSTree['aa6']
+		gs 'SMStext_builder', 'show_sms', ARGS[3]
+	gs 'SMStext_builder', 'end'
 
-if $ARGS[0] = 'Choice_ab':
+elseif $ARGS[0] = 'Choice_ab':
 	!! booty call is accepted
 
 	gs 'booty_call_sms', $ARGS[1], $ARGS[2]
 
-	$temp_SMStext  = $SMS_open_receiving + $SMSTree['0'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['1'] + $SMS_close_sending
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['2'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['a3'] + $SMS_close_sending
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['a4'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['ab5'] + $SMS_close_sending
-	$SMSMessage[ARGS[3]] = $temp_SMStext
-
-	gs 'telefon', 'show_sms', ARGS[3]
-	wait 500
+	gs 'SMStext_builder', 'start'
+		gs 'SMStext_builder', 'receive', $SMSTree['0']
+		gs 'SMStext_builder', 'send', $SMSTree['1']
+		gs 'SMStext_builder', 'receive', $SMSTree['2']
+		gs 'SMStext_builder', 'send', $SMSTree['a3']
+		gs 'SMStext_builder', 'receive', $SMSTree['a4']
+		gs 'SMStext_builder', 'send', $SMSTree['ab5']
+		gs 'SMStext_builder', 'show_sms', ARGS[3]
 
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['ab6'] + $SMS_close_receiving
-	$SMSMessage[ARGS[3]] = $temp_SMStext
+		wait 500
 
-	gs 'telefon', 'show_sms', ARGS[3]
+		gs 'SMStext_builder', 'receive', $SMSTree['ab6']
+		gs 'SMStext_builder', 'show_sms', ARGS[3]
+	gs 'SMStext_builder', 'end'
 
 	booty_call_invite[$ARGS[2]] = daystart
 	if npc_finance[$ARGS[2]] = 2 and func('homes_properties_attr', 'get_property_attribute', '$town', $home['current']) ! 'city' and npc_residence[$ARGS[2]] >= 3:
@@ -478,76 +440,65 @@ end
 if $ARGS[0] = 'Choice_b':
 	gs 'booty_call_sms', $ARGS[1], $ARGS[2]
 
-	$temp_SMStext  = $SMS_open_receiving + $SMSTree['0'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['1'] + $SMS_close_sending
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['2'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['b3'] + $SMS_close_sending
-	$SMSMessage[ARGS[3]] = $temp_SMStext
-
-	gs 'telefon', 'show_sms', ARGS[3]
-	wait 500
-
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['b4'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_replies
-		$temp_SMStext += '<a href="exec: gs ''booty_call_sms'', ''Choice_ba'', ''<<$ARGS[1]>>'', ''<<$ARGS[2]>>'', telefon[''SMSid'']">' + $SMSTree['ba5'] + '</a>'
-		$temp_SMStext += $SMS_next_reply
-		$temp_SMStext += '<a href="exec: gs ''booty_call_sms'', ''Choice_bb'', ''<<$ARGS[1]>>'', ''<<$ARGS[2]>>'', telefon[''SMSid'']">' + $SMSTree['bb5'] + '</a>'
-	$temp_SMStext += $SMS_close_replies
-	$SMSMessage[ARGS[3]] = $temp_SMStext
-
-	gs 'telefon', 'show_sms', ARGS[3]
-end
-
-
-
-if $ARGS[0] = 'Choice_ba':
+	gs 'SMStext_builder', 'start'
+		gs 'SMStext_builder', 'receive', $SMSTree['0']
+		gs 'SMStext_builder', 'send', $SMSTree['1']
+		gs 'SMStext_builder', 'receive', $SMSTree['2']
+		gs 'SMStext_builder', 'send', $SMSTree['b3']
+		gs 'SMStext_builder', 'show_sms', ARGS[3]
+		wait 500
+
+		gs 'SMStext_builder', 'receive', $SMSTree['b4']
+		gs 'SMStext_builder', 'add_reply', $SMSTree['ba5'], 'booty_call_sms', 'Choice_ba', $ARGS[1], $ARGS[2]
+		gs 'SMStext_builder', 'add_reply', $SMSTree['bb5'], 'booty_call_sms', 'Choice_bb', $ARGS[1], $ARGS[2]
+		gs 'SMStext_builder', 'show_sms', ARGS[3]
+	gs 'SMStext_builder', 'end'
+
+elseif $ARGS[0] = 'Choice_ba':
 	!! booty call is declined
 
 	gs 'booty_call_sms', $ARGS[1], $ARGS[2]
 
-	$temp_SMStext  = $SMS_open_receiving + $SMSTree['0'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['1'] + $SMS_close_sending
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['2'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['b3'] + $SMS_close_sending
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['b4'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['ba5'] + $SMS_close_sending
-	$SMSMessage[ARGS[3]] = $temp_SMStext
-
-	gs 'telefon', 'show_sms', ARGS[3]
-	if sugar_daddy_call[$ARGS[2]] = 1:
-		npc_rel[$ARGS[2]] -= 2
-		sugar_daddy_call[$ARGS[2]] = 0
-	end
-	wait 500
+	gs 'SMStext_builder', 'start'
+		gs 'SMStext_builder', 'receive', $SMSTree['0']
+		gs 'SMStext_builder', 'send', $SMSTree['1']
+		gs 'SMStext_builder', 'receive', $SMSTree['2']
+		gs 'SMStext_builder', 'send', $SMSTree['b3']
+		gs 'SMStext_builder', 'receive', $SMSTree['b4']
+		gs 'SMStext_builder', 'send', $SMSTree['ba5']
+		gs 'SMStext_builder', 'show_sms', ARGS[3]
 
+		if sugar_daddy_call[$ARGS[2]] = 1:
+			npc_rel[$ARGS[2]] -= 2
+			sugar_daddy_call[$ARGS[2]] = 0
+		end
 
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['ba6'] + $SMS_close_receiving
-	$SMSMessage[ARGS[3]] = $temp_SMStext
+		wait 500
 
-	gs 'telefon', 'show_sms', ARGS[3]
-end
+		gs 'SMStext_builder', 'receive', $SMSTree['ba6']
+		gs 'SMStext_builder', 'show_sms', ARGS[3]
+	gs 'SMStext_builder', 'end'
 
-if $ARGS[0] = 'Choice_bb':
+elseif $ARGS[0] = 'Choice_bb':
 	!! booty call is accepted
 
 	gs 'booty_call_sms', $ARGS[1], $ARGS[2]
 
-	$temp_SMStext  = $SMS_open_receiving + $SMSTree['0'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['1'] + $SMS_close_sending
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['2'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['b3'] + $SMS_close_sending
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['b4'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['bb5'] + $SMS_close_sending
-	$SMSMessage[ARGS[3]] = $temp_SMStext
+	gs 'SMStext_builder', 'start'
+		gs 'SMStext_builder', 'receive', $SMSTree['0']
+		gs 'SMStext_builder', 'send', $SMSTree['1']
+		gs 'SMStext_builder', 'receive', $SMSTree['2']
+		gs 'SMStext_builder', 'send', $SMSTree['b3']
+		gs 'SMStext_builder', 'receive', $SMSTree['b4']
+		gs 'SMStext_builder', 'send', $SMSTree['bb5']
+		gs 'SMStext_builder', 'show_sms', ARGS[3]
 
-	gs 'telefon', 'show_sms', ARGS[3]
-	wait 500
-	
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['bb6'] + $SMS_close_receiving
-	$SMSMessage[ARGS[3]] = $temp_SMStext
+		wait 500
 
+		gs 'SMStext_builder', 'receive', $SMSTree['bb6']
+		gs 'SMStext_builder', 'show_sms', ARGS[3]
+	gs 'SMStext_builder', 'end'
 
-	gs 'telefon', 'show_sms', ARGS[3]
 	booty_call_invite[$ARGS[2]] = daystart
 !!	if ($home['current'] = 'parents_home' or $home['current'] = 'meynold_household' or $home['current'] = 'shared_apartment') and npc_residence[$SMSContact[ARGS[1]]] >= 3: 
 	if npc_finance[$ARGS[2]] = 2 and func('homes_properties_attr', 'get_property_attribute', '$town', $home['current']) ! 'city' and npc_residence[$ARGS[2]] >= 3:
@@ -565,25 +516,23 @@ end
 if $ARGS[0] = 'Add SMS2':
 	gs 'booty_call_sms', $ARGS[1], $ARGS[2]
 
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['0'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_replies
-		$temp_SMStext += '<a href="exec: gs ''booty_call_sms'', ''Choice2_a'', ''<<$ARGS[1]>>'', ''<<$ARGS[2]>>'', telefon[''SMSid'']">' + $SMSTree['a1'] + '</a>'
-		$temp_SMStext += $SMS_next_reply
-		$temp_SMStext += '<a href="exec: gs ''booty_call_sms'', ''Choice2_b'', ''<<$ARGS[1]>>'', ''<<$ARGS[2]>>'', telefon[''SMSid'']">' + $SMSTree['b1'] + '</a>'
-	$temp_SMStext += $SMS_close_replies
-
-	gs 'telefon', 'add_sms', $ARGS[2], $temp_SMStext
+	gs 'SMStext_builder', 'start'
+		gs 'SMStext_builder', 'receive', $SMSTree['0']
+		gs 'SMStext_builder', 'add_reply', $SMSTree['a1'], 'booty_call_sms', 'Choice2_a', $ARGS[1], $ARGS[2]
+		gs 'SMStext_builder', 'add_reply', $SMSTree['b1'], 'booty_call_sms', 'Choice2_b', $ARGS[1], $ARGS[2]
+		gs 'SMStext_builder', 'add_sms', $ARGS[2]
+	gs 'SMStext_builder', 'end'
 end
 
 
 if $ARGS[0] = 'Choice2_a':
 	gs 'booty_call_sms', $ARGS[1], $ARGS[2]
 
-	$temp_SMStext  = $SMS_open_receiving + $SMSTree['0'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['a1'] + $SMS_close_sending
-	$SMSMessage[ARGS[3]] = $temp_SMStext
-
-	gs 'telefon', 'show_sms', ARGS[3]
+	gs 'SMStext_builder', 'start'
+		gs 'SMStext_builder', 'receive', $SMSTree['0']
+		gs 'SMStext_builder', 'send', $SMSTree['a1']
+		gs 'SMStext_builder', 'show_sms', ARGS[3]
+	gs 'SMStext_builder', 'end'
 end
 
 
@@ -591,69 +540,63 @@ end
 if $ARGS[0] = 'Choice2_b':
 	gs 'booty_call_sms', $ARGS[1], $ARGS[2]
 
-	$temp_SMStext  = $SMS_open_receiving + $SMSTree['0'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['b1'] + $SMS_close_sending
-	$SMSMessage[ARGS[3]] = $temp_SMStext
-
-	gs 'telefon', 'show_sms', ARGS[3]
-	wait 500
+	gs 'SMStext_builder', 'start'
+		gs 'SMStext_builder', 'receive', $SMSTree['0']
+		gs 'SMStext_builder', 'send', $SMSTree['b1']
+		gs 'SMStext_builder', 'show_sms', ARGS[3]
 
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['b2'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_replies
-		$temp_SMStext += '<a href="exec: gs ''booty_call_sms'', ''Choice2_ba'', ''<<$ARGS[1]>>'', ''<<$ARGS[2]>>'', telefon[''SMSid'']">' + $SMSTree['ba3'] + '</a>'
-		$temp_SMStext += $SMS_next_reply
-		$temp_SMStext += '<a href="exec: gs ''booty_call_sms'', ''Choice2_bb'', ''<<$ARGS[1]>>'', ''<<$ARGS[2]>>'', telefon[''SMSid'']">' + $SMSTree['bb3'] + '</a>'
-	$temp_SMStext += $SMS_close_replies
-	$SMSMessage[ARGS[3]] = $temp_SMStext
-
-	gs 'telefon', 'show_sms', ARGS[3]
-end
+		wait 500
 
+		gs 'SMStext_builder', 'receive', $SMSTree['b2']
+		gs 'SMStext_builder', 'add_reply', $SMSTree['ba3'], 'booty_call_sms', 'Choice2_ba', $ARGS[1], $ARGS[2]
+		gs 'SMStext_builder', 'add_reply', $SMSTree['bb3'], 'booty_call_sms', 'Choice2_bb', $ARGS[1], $ARGS[2]
+		gs 'SMStext_builder', 'show_sms', ARGS[3]
+	gs 'SMStext_builder', 'end'
 
-
-if $ARGS[0] = 'Choice2_ba':
+elseif $ARGS[0] = 'Choice2_ba':
 	!! booty call is declined
 
 	gs 'booty_call_sms', $ARGS[1], $ARGS[2]
 
-	$temp_SMStext  = $SMS_open_receiving + $SMSTree['0'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['b1'] + $SMS_close_sending
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['b2'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['ba3'] + $SMS_close_sending
-	$SMSMessage[ARGS[3]] = $temp_SMStext
-
-	gs 'telefon', 'show_sms', ARGS[3]
-	if sugar_daddy_call[$ARGS[2]] = 1:
-		npc_rel[$ARGS[2]] -= 2
-		sugar_daddy_call[$ARGS[2]] = 0
-	end
-	wait 500
-
+	gs 'SMStext_builder', 'start'
+		gs 'SMStext_builder', 'receive', $SMSTree['0']
+		gs 'SMStext_builder', 'send', $SMSTree['b1']
+		gs 'SMStext_builder', 'receive', $SMSTree['b2']
+		gs 'SMStext_builder', 'send', $SMSTree['ba3']
+		gs 'SMStext_builder', 'show_sms', ARGS[3]
 
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['ba4'] + $SMS_close_receiving
-	$SMSMessage[ARGS[3]] = $temp_SMStext
+		if sugar_daddy_call[$ARGS[2]] = 1:
+			npc_rel[$ARGS[2]] -= 2
+			sugar_daddy_call[$ARGS[2]] = 0
+		end
+		wait 500
 
-	gs 'telefon', 'show_sms', ARGS[3]
-end
+		gs 'SMStext_builder', 'receive', $SMSTree['ba4']
+		gs 'SMStext_builder', 'show_sms', ARGS[3]
+	gs 'SMStext_builder', 'end'
 
-if $ARGS[0] = 'Choice2_bb':
+elseif $ARGS[0] = 'Choice2_bb':
 	!! booty call is accepted
 
 	gs 'booty_call_sms', $ARGS[1], $ARGS[2]
-	$temp_SMStext  = $SMS_open_receiving + $SMSTree['0'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['b1'] + $SMS_close_sending
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['b2'] + $SMS_close_receiving
-	$temp_SMStext += $SMS_open_sending + $SMSTree['bb3'] + $SMS_close_sending
-	$SMSMessage[ARGS[3]] = $temp_SMStext
-
-	gs 'telefon', 'show_sms', ARGS[3]
-	wait 500
-	
-	$temp_SMStext += $SMS_open_receiving + $SMSTree['bb4'] + $SMS_close_receiving
-	$SMSMessage[ARGS[3]] = $temp_SMStext
 
+	gs 'SMStext_builder', 'start'
+		gs 'SMStext_builder', 'receive', $SMSTree['0']
+		gs 'SMStext_builder', 'send', $SMSTree['b1']
+		gs 'SMStext_builder', 'receive', $SMSTree['b2']
+		gs 'SMStext_builder', 'send', $SMSTree['bb3']
+		gs 'SMStext_builder', 'show_sms', ARGS[3]
+
+		if sugar_daddy_call[$ARGS[2]] = 1:
+			npc_rel[$ARGS[2]] -= 2
+			sugar_daddy_call[$ARGS[2]] = 0
+		end
+		wait 500
+
+		gs 'SMStext_builder', 'receive', $SMSTree['bb4']
+		gs 'SMStext_builder', 'show_sms', ARGS[3]
+	gs 'SMStext_builder', 'end'
 
-	gs 'telefon', 'show_sms', ARGS[3]
 	booty_call_invite[$ARGS[2]] = daystart
 !!	if ($home['current'] = 'parents_home' or $home['current'] = 'meynold_household' or $home['current'] = 'shared_apartment') and npc_residence[$SMSContact[ARGS[1]]] >= 3: 
 	if npc_finance[$ARGS[2]] = 2 and func('homes_properties_attr', 'get_property_attribute', '$town', $home['current']) ! 'city' and npc_residence[$ARGS[2]] >= 3:
@@ -666,9 +609,7 @@ end
 
 
 if $ARGS[0] ! 'default_booty_call' and $ARGS[0] ! 'pre_planned_booty_call' and $ARGS[0] ! 'std_free' and $ARGS[0] ! 'sugar_daddy_booty_call':
-	killvar '$trialSMS'
 	killvar '$SMSTree'
-	killvar '$temp_SMStext'
 end
 
 --- hookup_sms ---------------------------------

+ 95 - 128
locations/nerd_game_night.qsrc

@@ -1468,57 +1468,43 @@ end
 
 
 if $ARGS[0] = 'summer_invite_sms':
-	$SMS_open_receiving = '<table width=80%><tr><td collspan=2 bgcolor="#D4CEF9"><font color=black>'
-	$SMS_close_receiving = '</font></td><td width=10%></td></tr></table>'
-
-	!! Open and close sending text
-	$SMS_open_sending = '<table width=80%><tr><td width=10%></td><td collspan=2 bgcolor=pink><font color=black>'
-	$SMS_close_sending = '</font></td></tr></table>'
-
-	!! Start reply
-	$SMS_open_replies = '<table><tr><th> Reply</th></tr><tr><td>'
-	$SMS_next_reply = '</td></tr><tr><td>'
-	$SMS_close_replies = '</td></tr></table>'
-	
-	$temp_SMStext = ''
 
 	if $ARGS[1] = 'Add SMS':
 		nerd_game['lot'] = func('shortgs', 'rand_pick', '', 12, 13, 14, 23, 24, 34)
-		nerd_game['invite_day'] = daystart
 	end
 
 	$temp_start_text = ''
 	if nerd_game['first_SMS_received'] = 0:
-		$temp_start_text = 'Hey <<$pcs_nickname>> this is Feofan. We do a weekly game night, mostly playing Dungeons and Dragons and board games. I was talking to the others and we were wondering if you would like to join us? We have a few nights free this week and were wondering which one works best for you. We can do it either on <<$week[val(mid(nerd_game[''lot''],1,1))]>> or <<$week[val(mid(nerd_game[''lot''],2,1))]>>.'
+		$SMSTree[ '0'] = 'Hey <<$pcs_nickname>> this is Feofan. We do a weekly game night, mostly playing Dungeons and Dragons and board games. I was talking to the others and we were wondering if you would like to join us? We have a few nights free this week and were wondering which one works best for you. We can do it either on <<$week[val(mid(nerd_game[''lot''],1,1))]>> or <<$week[val(mid(nerd_game[''lot''],2,1))]>>.'
 	else
-		$temp_start_text = 'Hey <<$pcs_nickname>>, would you like to join us for our weekly game night? We have a few nights free this week and were wondering which one works best for you. We can do it either on <<$week[val(mid(nerd_game[''lot''],1,1))]>> or <<$week[val(mid(nerd_game[''lot''],2,1))]>>.'
+		$SMSTree[ '0'] = 'Hey <<$pcs_nickname>>, would you like to join us for our weekly game night? We have a few nights free this week and were wondering which one works best for you. We can do it either on <<$week[val(mid(nerd_game[''lot''],1,1))]>> or <<$week[val(mid(nerd_game[''lot''],2,1))]>>.'
 	end
-	
-	$SMSTree[ '0'] = $temp_start_text
 
-		$SMSTree['a1'] = 'Sorry, but I''m just not interested in stuff like that. Thanks for the invite though.'
-			$SMSTree['a2'] = ':-( Oh... okay yeah I get it. Guess we''ll see you around.'
+		$SMSTree['ca1'] = 'Not interested'
+			$SMSTree['a1'] = 'Sorry, but I''m just not interested in stuff like that. Thanks for the invite though.'
+				$SMSTree['a2'] = ':-( Oh... okay yeah I get it. Guess we''ll see you around.'
+
+		$SMSTree['cb1'] = '<<$week[val(mid(nerd_game[''lot''],1,1))]>>'
+			$SMSTree['b1'] = 'Sure, I can make it on <<$week[val(mid(nerd_game[''lot''],1,1))]>>.'
+				$SMSTree['b2'] = ':-) Great! I''ll see you on <<$week[val(mid(nerd_game[''lot''],1,1))]>> at 20:00 in the library then! Be ready to get your nerd on, because we''re going to rock it so hard! We also meet for board games on Saturday and Sunday if you want to show up for those.'
+
+		$SMSTree['cc1'] = '<<$week[val(mid(nerd_game[''lot''],2,1))]>>'
+			$SMSTree['c1'] = 'Sure, I can make it on <<$week[val(mid(nerd_game[''lot''],2,1))]>>.'
+				$SMSTree['c2'] = ':-) Great! I''ll see you on <<$week[val(mid(nerd_game[''lot''],2,1))]>> at 20:00 in the library then! Be ready to get your nerd on, because we''re going to rock it so hard! We also meet for board games on Saturday and Sunday if you want to show up for those.'
 
-		$SMSTree['b1'] = 'Sure, I can make it on <<$week[val(mid(nerd_game[''lot''],1,1))]>>.'
-			$SMSTree['b2'] = ':-) Great! I''ll see you on <<$week[val(mid(nerd_game[''lot''],1,1))]>> at 20:00 in the library then! Be ready to get your nerd on, because we''re going to rock it so hard! We also meet for board games on Saturday and Sunday if you want to show up for those.'
 
-		$SMSTree['c1'] = 'Sure, I can make it on <<$week[val(mid(nerd_game[''lot''],2,1))]>>.'
-			$SMSTree['c2'] = ':-) Great! I''ll see you on <<$week[val(mid(nerd_game[''lot''],2,1))]>> at 20:00 in the library then! Be ready to get your nerd on, because we''re going to rock it so hard! We also meet for board games on Saturday and Sunday if you want to show up for those.'
-	
-	killvar '$temp_start_text'
-	
 	if $ARGS[1] = 'Add SMS':
-		$temp_SMStext += $SMS_open_receiving + $SMSTree[ '0'] + $SMS_close_receiving
-
-		$temp_SMStext += $SMS_open_replies
-		$temp_SMStext += '<a href="exec: gs ''nerd_game_night'', ''summer_invite_sms'', ''Choice_a'', telefon[''SMSid'']">' + 'Not interested' + '</a>'
-		$temp_SMStext += $SMS_next_reply
-		$temp_SMStext += '<a href="exec: gs ''nerd_game_night'', ''summer_invite_sms'', ''Choice_b'', telefon[''SMSid'']">' + '<<$week[val(mid(nerd_game[''lot''],1,1))]>>' + '</a>'
-		$temp_SMStext += $SMS_next_reply
-		$temp_SMStext += '<a href="exec: gs ''nerd_game_night'', ''summer_invite_sms'', ''Choice_c'', telefon[''SMSid'']">' + '<<$week[val(mid(nerd_game[''lot''],2,1))]>>' + '</a>'
-		$temp_SMStext += $SMS_close_replies
-		
-		gs 'telefon', 'add_sms', 'A152', $temp_SMStext
+		nerd_game['invite_day'] = daystart
+
+		gs 'SMStext_builder', 'start'
+			gs 'SMStext_builder', 'receive', $SMSTree[ '0']
+			
+			gs 'SMStext_builder', 'add_reply', $SMSTree['ca1'], 'summer_invite_sms', 'Choice_a'
+			gs 'SMStext_builder', 'add_reply', $SMSTree['cb1'], 'summer_invite_sms', 'Choice_b'
+			gs 'SMStext_builder', 'add_reply', $SMSTree['cc1'], 'summer_invite_sms', 'Choice_c'
+
+			gs 'SMStext_builder', 'add_sms', 'A152'
+		gs 'SMStext_builder', 'end'
 	
 	elseif $ARGS[1] = 'Choice_a':
 		!! Add Feofan to the contact list if he isn''t in it yet.
@@ -1528,17 +1514,15 @@ if $ARGS[0] = 'summer_invite_sms':
 			nerd_game['first_SMS_received'] = 1
 		end
 
-		$temp_SMStext += $SMS_open_receiving + $SMSTree[ '0'] + $SMS_close_receiving
-		$temp_SMStext += $SMS_open_sending   + $SMSTree['a1'] + $SMS_close_sending
-
-		$SMSMessage[ARGS[2]] = $temp_SMStext
-		gs 'telefon', 'show_sms', ARGS[2]
-		wait 1000
+		gs 'SMStext_builder', 'start'
+			gs 'SMStext_builder', 'receive', $SMSTree[ '0']
+			gs 'SMStext_builder', 'send', $SMSTree['a1']
+			gs 'SMStext_builder', 'show_sms', ARGS[2]
+			wait 1000
 
-		$temp_SMStext += $SMS_open_receiving + $SMSTree['a2'] + $SMS_close_receiving
-		
-		$SMSMessage[ARGS[2]] = $temp_SMStext
-		gs 'telefon', 'show_sms', ARGS[2]
+			gs 'SMStext_builder', 'receive', $SMSTree['a2']
+			gs 'SMStext_builder', 'show_sms', ARGS[2]
+		gs 'SMStext_builder', 'end'
 !!		nerd_game['invite_day'] = 2147483647 & ! block the event
 	
 	elseif $ARGS[1] = 'Choice_b':
@@ -1551,17 +1535,15 @@ if $ARGS[0] = 'summer_invite_sms':
 
 		nerd_game['game_day'] = daystart - week + val(mid(nerd_game['lot'],1,1))
 
-		$temp_SMStext += $SMS_open_receiving + $SMSTree[ '0'] + $SMS_close_receiving
-		$temp_SMStext += $SMS_open_sending   + $SMSTree['b1'] + $SMS_close_sending
-
-		$SMSMessage[ARGS[2]] = $temp_SMStext
-		gs 'telefon', 'show_sms', ARGS[2]
-		wait 1000
+		gs 'SMStext_builder', 'start'
+			gs 'SMStext_builder', 'receive', $SMSTree[ '0']
+			gs 'SMStext_builder', 'send', $SMSTree['b1']
+			gs 'SMStext_builder', 'show_sms', ARGS[2]
+			wait 1000
 
-		$temp_SMStext += $SMS_open_receiving + $SMSTree['b2'] + $SMS_close_receiving
-		
-		$SMSMessage[ARGS[2]] = $temp_SMStext
-		gs 'telefon', 'show_sms', ARGS[2]
+			gs 'SMStext_builder', 'receive', $SMSTree['b2']
+			gs 'SMStext_builder', 'show_sms', ARGS[2]
+		gs 'SMStext_builder', 'end'
 
 	elseif $ARGS[1] = 'Choice_c':
 		!! Add Feofan to the contact list if he isn''t in it yet.
@@ -1573,21 +1555,17 @@ if $ARGS[0] = 'summer_invite_sms':
 
 		nerd_game['game_day'] = daystart - week + val(mid(nerd_game['lot'],2,1))
 
-		$temp_SMStext += $SMS_open_receiving + $SMSTree[ '0'] + $SMS_close_receiving
-		$temp_SMStext += $SMS_open_sending   + $SMSTree['c1'] + $SMS_close_sending
-
-		$SMSMessage[ARGS[2]] = $temp_SMStext
-		gs 'telefon', 'show_sms', ARGS[2]
-		wait 1000
-
-		$temp_SMStext += $SMS_open_receiving + $SMSTree['c2'] + $SMS_close_receiving
-		
-		$SMSMessage[ARGS[2]] = $temp_SMStext
-		gs 'telefon', 'show_sms', ARGS[2]
+		gs 'SMStext_builder', 'start'
+			gs 'SMStext_builder', 'receive', $SMSTree[ '0']
+			gs 'SMStext_builder', 'send', $SMSTree['c1']
+			gs 'SMStext_builder', 'show_sms', ARGS[2]
+			wait 1000
 
+			gs 'SMStext_builder', 'receive', $SMSTree['c2']
+			gs 'SMStext_builder', 'show_sms', ARGS[2]
+		gs 'SMStext_builder', 'end'
 	end
 
-	killvar '$temp_SMStext'
 	killvar '$SMSTree'
 end
 
@@ -1607,39 +1585,36 @@ if $ARGS[0] = 'summer2_invite_sms':
 	$temp_SMStext = ''
 
 
-	if $ARGS[1] = 'Add SMS':
-		nerd_game['invite_day'] = daystart
-	end
-
 	if nerd_game['first_SMS_received'] = 0:
-		$temp_start_text = 'Hey <<$pcs_nickname>> this is Feofan. We are doing our weekly game night at the Coffee Hole, coffee shop now. We will mostly be playing Dungeons and Dragons and board games. I was talking to the others and we were wondering if you was going to keep playing with us? We have a few nights free this week and were wondering which night works best for you. We can do it either on Tuesday or Thursday.'
+		$SMSTree[ '0'] = 'Hey <<$pcs_nickname>> this is Feofan. We are doing our weekly game night at the Coffee Hole, coffee shop now. We will mostly be playing Dungeons and Dragons and board games. I was talking to the others and we were wondering if you was going to keep playing with us? We have a few nights free this week and were wondering which night works best for you. We can do it either on Tuesday or Thursday.'
 	else
-		$temp_start_text = 'Hey <<$pcs_nickname>>, would you like to join us for our weekly game night at the Coffee Hole? We have a few nights free this week and were wondering which night works best for you. We can do it either on Tuesday or Thursday.'
+		$SMSTree[ '0'] = 'Hey <<$pcs_nickname>>, would you like to join us for our weekly game night at the Coffee Hole? We have a few nights free this week and were wondering which night works best for you. We can do it either on Tuesday or Thursday.'
 	end
 
-	$SMSTree[ '0'] = $temp_start_text
-
-		$SMSTree['a1']  = 'Sorry, but I''m just not interested in stuff like that anymore. Thanks for the invite though.'
-			$SMSTree['a2'] = ':-( Oh... Okay, yeah I get it. Guess we''ll see you around.'
+		$SMSTree['ca1'] = 'Not interested'
+			$SMSTree['a1']  = 'Sorry, but I''m just not interested in stuff like that anymore. Thanks for the invite though.'
+				$SMSTree['a2'] = ':-( Oh... Okay, yeah I get it. Guess we''ll see you around.'
 
-		$SMSTree['b1'] = 'Sure, I can make it on Tuesday.'
-			$SMSTree['b2'] = ':-) Great! I''ll see you on Tuesday at 18:00 at the Coffee Hole then! Be ready to get your nerd on, because we''re going to rock it so hard! We also meet for board games on Saturday and Sunday if you want to show up for those.'
+		$SMSTree['cb1'] = 'Tuesday'
+			$SMSTree['b1'] = 'Sure, I can make it on Tuesday.'
+				$SMSTree['b2'] = ':-) Great! I''ll see you on Tuesday at 18:00 at the Coffee Hole then! Be ready to get your nerd on, because we''re going to rock it so hard! We also meet for board games on Saturday and Sunday if you want to show up for those.'
 
-		$SMSTree['c1'] = 'Sure, I can make it on Thursday.'
-			$SMSTree['c2'] = ':-) Great! I''ll see you on Thursday at 18:00 at the Coffee Hole then! Be ready to get your nerd on, because we''re going to rock it so hard! We also meet for board games on Saturday and Sunday if you want to show up for those.'
+		$SMSTree['cc1'] = 'Thursday'
+			$SMSTree['c1'] = 'Sure, I can make it on Thursday.'
+				$SMSTree['c2'] = ':-) Great! I''ll see you on Thursday at 18:00 at the Coffee Hole then! Be ready to get your nerd on, because we''re going to rock it so hard! We also meet for board games on Saturday and Sunday if you want to show up for those.'
 
 	if $ARGS[1] = 'Add SMS':
-		$temp_SMStext += $SMS_open_receiving + $SMSTree[ '0'] + $SMS_close_receiving
-		
-		$temp_SMStext += $SMS_open_replies
-		$temp_SMStext += '<a href="exec: gs ''nerd_game_night'', ''summer2_invite_sms'', ''Choice_a'', telefon[''SMSid'']">' + 'Not interested' + '</a>'
-		$temp_SMStext += $SMS_next_reply
-		$temp_SMStext += '<a href="exec: gs ''nerd_game_night'', ''summer2_invite_sms'', ''Choice_b'', telefon[''SMSid'']">' + 'Tuesday' + '</a>'
-		$temp_SMStext += $SMS_next_reply
-		$temp_SMStext += '<a href="exec: gs ''nerd_game_night'', ''summer2_invite_sms'', ''Choice_c'', telefon[''SMSid'']">' + 'Thursday' + '</a>'
-		$temp_SMStext += $SMS_close_replies
-		
-		gs 'telefon', 'add_sms', 'A152', $temp_SMStext
+		nerd_game['invite_day'] = daystart
+
+		gs 'SMStext_builder', 'start'
+			gs 'SMStext_builder', 'receive', $SMSTree[ '0']
+			
+			gs 'SMStext_builder', 'add_reply', $SMSTree['ca1'], 'summer_invite_sms', 'Choice_a'
+			gs 'SMStext_builder', 'add_reply', $SMSTree['cb1'], 'summer_invite_sms', 'Choice_b'
+			gs 'SMStext_builder', 'add_reply', $SMSTree['cc1'], 'summer_invite_sms', 'Choice_c'
+
+			gs 'SMStext_builder', 'add_sms', 'A152'
+		gs 'SMStext_builder', 'end'
 
 	elseif $ARGS[1] = 'Choice_a':
 		!! Add Feofan to the contact list if he isn''t in it yet.
@@ -1649,17 +1624,15 @@ if $ARGS[0] = 'summer2_invite_sms':
 			nerd_game['first_SMS_received'] = 1
 		end
 
-		$temp_SMStext += $SMS_open_receiving + $SMSTree[ '0'] + $SMS_close_receiving
-		$temp_SMStext += $SMS_open_sending   + $SMSTree['a1'] + $SMS_close_sending
-		
-		$SMSMessage[ARGS[2]] = $temp_SMStext
-		gs 'telefon', 'show_sms', ARGS[2]
-		wait 1000
-		
-		$temp_SMStext += $SMS_open_receiving + $SMSTree['a2'] + $SMS_close_receiving
+		gs 'SMStext_builder', 'start'
+			gs 'SMStext_builder', 'receive', $SMSTree[ '0']
+			gs 'SMStext_builder', 'send', $SMSTree['a1']
+			gs 'SMStext_builder', 'show_sms', ARGS[2]
+			wait 1000
 
-		$SMSMessage[ARGS[2]] = $temp_SMStext
-		gs 'telefon', 'show_sms', ARGS[2]
+			gs 'SMStext_builder', 'receive', $SMSTree['a2']
+			gs 'SMStext_builder', 'show_sms', ARGS[2]
+		gs 'SMStext_builder', 'end'
 !!		nerd_game['invite_day'] = 2147483647 & ! block the event
 
 	elseif $ARGS[1] = 'Choice_b':
@@ -1672,17 +1645,15 @@ if $ARGS[0] = 'summer2_invite_sms':
 
 		nerd_game['fixed_uni_day'] = 2
 		
-		$temp_SMStext += $SMS_open_receiving + $SMSTree[ '0'] + $SMS_close_receiving
-		$temp_SMStext += $SMS_open_sending   + $SMSTree['b1'] + $SMS_close_sending
-		
-		$SMSMessage[ARGS[2]] = $temp_SMStext
-		gs 'telefon', 'show_sms', ARGS[2]
-		wait 1000
-		
-		$temp_SMStext += $SMS_open_receiving + $SMSTree['b2'] + $SMS_close_receiving
+		gs 'SMStext_builder', 'start'
+			gs 'SMStext_builder', 'receive', $SMSTree[ '0']
+			gs 'SMStext_builder', 'send', $SMSTree['b1']
+			gs 'SMStext_builder', 'show_sms', ARGS[2]
+			wait 1000
 
-		$SMSMessage[ARGS[2]] = $temp_SMStext
-		gs 'telefon', 'show_sms', ARGS[2]
+			gs 'SMStext_builder', 'receive', $SMSTree['b2']
+			gs 'SMStext_builder', 'show_sms', ARGS[2]
+		gs 'SMStext_builder', 'end'
 
 	elseif $ARGS[1] = 'Choice_c':
 		!! Add Feofan to the contact list if he isn''t in it yet.
@@ -1694,21 +1665,17 @@ if $ARGS[0] = 'summer2_invite_sms':
 
 		nerd_game['fixed_uni_day'] = 4
 		
-		$temp_SMStext += $SMS_open_receiving + $SMSTree[ '0'] + $SMS_close_receiving
-		$temp_SMStext += $SMS_open_sending   + $SMSTree['c1'] + $SMS_close_sending
-		
-		$SMSMessage[ARGS[2]] = $temp_SMStext
-		gs 'telefon', 'show_sms', ARGS[2]
-		wait 1000
-		
-		$temp_SMStext += $SMS_open_receiving + $SMSTree['c2'] + $SMS_close_receiving
-
-		$SMSMessage[ARGS[2]] = $temp_SMStext
-		gs 'telefon', 'show_sms', ARGS[2]
-
+		gs 'SMStext_builder', 'start'
+			gs 'SMStext_builder', 'receive', $SMSTree[ '0']
+			gs 'SMStext_builder', 'send', $SMSTree['c1']
+			gs 'SMStext_builder', 'show_sms', ARGS[2]
+			wait 1000
+
+			gs 'SMStext_builder', 'receive', $SMSTree['c2']
+			gs 'SMStext_builder', 'show_sms', ARGS[2]
+		gs 'SMStext_builder', 'end'
 	end
 
-	killvar '$temp_SMStext'
 	killvar '$SMSTree'
 end