Explorar el Código

Merge remote-tracking branch 'Anjuna/master'

Kevin_Smarts hace 8 meses
padre
commit
d0c4022962
Se han modificado 1 ficheros con 129 adiciones y 87 borrados
  1. 129 87
      locations/nerd_game_night.qsrc

+ 129 - 87
locations/nerd_game_night.qsrc

@@ -1465,149 +1465,191 @@ 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>'
 
-	$SMSFrM = '<table width=80%><tr><td collspan=2 bgcolor="#D4CEF9"><font color=black> '
-	$SMSBkM = '</font></td><td width=10%></td></tr></table>'
-	$SMSFrF = '<table width=80%><tr><td width=10%></td><td collspan=2 bgcolor=pink><font color=black>'
-	$SMSBkF = '</font></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
 
-	$VM['0'] = 'Hey <<$pcs_nickname>>, we do a weekly game night. We mostly play 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>>, we do a weekly game night. We mostly play 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))]>>.'
 
-		$VF['0a'] = 'Sorry, but I''m just not interested in stuff like that. Thanks for the invite though.'
-			$VM['1a'] = ':-( Oh... okay yeah I get it. Guess we''ll see you around.'
+		$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.'
 
-		$VF['0b'] = 'Sure, I can make it on <<$week[val(mid(nerd_game[''lot''],1,1))]>>.'
-			$VM['1b'] = ':-) 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['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.'
 
-		$VF['0c'] = 'Sure, I can make it on <<$week[val(mid(nerd_game[''lot''],2,1))]>>.'
-			$VM['1c'] = ':-) 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['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.'
 	
 	if $ARGS[1] = 'Add SMS':
-		$trialSMS  = $SMSFrM+$VM['0']+$SMSBkM
-		$trialSMS += '<table><tr><th> Reply</th></tr>'
-		$trialSMS += '<tr><td><a href="exec: gs ''nerd_game_night'', ''summer_invite_sms'', ''V1'',telefon[''SMSid'']">'+'Not interested'+'</a></td></tr>'
-		$trialSMS += '<tr><td><a href="exec: gs ''nerd_game_night'', ''summer_invite_sms'', ''V2'',telefon[''SMSid'']">'+'<<$week[val(mid(nerd_game[''lot''],1,1))]>>'+'</a></td></tr></table>'
-		$trialSMS += '<tr><td><a href="exec: gs ''nerd_game_night'', ''summer_invite_sms'', ''V3'',telefon[''SMSid'']">'+'<<$week[val(mid(nerd_game[''lot''],2,1))]>>'+'</a></td></tr></table>'
-		gs 'telefon', 'add_sms', 'A152', $trialSMS
-	end
+		$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
+	
+	elseif $ARGS[1] = 'Choice_a':
+		$temp_SMStext += $SMS_open_receiving + $SMSTree[ '0'] + $SMS_close_receiving
+		$temp_SMStext += $SMS_open_sending   + $SMSTree['a1'] + $SMS_close_sending
 
-	if $ARGS[1] = 'V1':
-		$trialSMS  = $SMSFrM+$VM[ '0']+$SMSBkM
-		$trialSMS += $SMSFrF+$VF['0a']+$SMSBkF
-		$SMSMessage[ARGS[1]] = $trialSMS
+		$SMSMessage[ARGS[2]] = $temp_SMStext
 		gs 'telefon', 'show_sms', ARGS[2]
 		wait 1000
-		$trialSMS += $SMSFrM+$VM['1a']+$SMSBkM
-		$SMSMessage[ARGS[1]] = $trialSMS
+
+		$temp_SMStext += $SMS_open_receiving + $SMSTree['a2'] + $SMS_close_receiving
+		
+		$SMSMessage[ARGS[2]] = $temp_SMStext
 		gs 'telefon', 'show_sms', ARGS[2]
 !!		nerd_game['invite_day'] = 2147483647 & ! block the event
-	end
+	
+	elseif $ARGS[1] = 'Choice_b':
+		nerd_game['game_day'] = daystart - week + val(mid(nerd_game['lot'],1,1))
 
-	if $ARGS[1] = 'V2':
-		$trialSMS  = $SMSFrM+$VM[ '0']+$SMSBkM
-		$trialSMS += $SMSFrF+$VF['0b']+$SMSBkF
-		$SMSMessage[ARGS[1]] = $trialSMS
+		$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
-		$trialSMS += $SMSFrM+$VM['1b']+$SMSBkM
-		$SMSMessage[ARGS[1]] = $trialSMS
+
+		$temp_SMStext += $SMS_open_receiving + $SMSTree['b2'] + $SMS_close_receiving
+		
+		$SMSMessage[ARGS[2]] = $temp_SMStext
 		gs 'telefon', 'show_sms', ARGS[2]
-		nerd_game['game_day'] = daystart - week + val(mid(nerd_game['lot'],1,1))
 
-	end
+	elseif $ARGS[1] = 'Choice_c':
+		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
 
-	if $ARGS[1] = 'V3':
-		$trialSMS  = $SMSFrM+$VM[ '0']+$SMSBkM
-		$trialSMS += $SMSFrF+$VF['0c']+$SMSBkF
-		$SMSMessage[ARGS[1]] = $trialSMS
+		$SMSMessage[ARGS[2]] = $temp_SMStext
 		gs 'telefon', 'show_sms', ARGS[2]
 		wait 1000
-		$trialSMS += $SMSFrM+$VM['1c']+$SMSBkM
-		$SMSMessage[ARGS[1]] = $trialSMS
+
+		$temp_SMStext += $SMS_open_receiving + $SMSTree['c2'] + $SMS_close_receiving
+		
+		$SMSMessage[ARGS[2]] = $temp_SMStext
 		gs 'telefon', 'show_sms', ARGS[2]
-		nerd_game['game_day'] = daystart - week + val(mid(nerd_game['lot'],2,1))
+
 	end
 
-	killvar '$trialSMS'
-	killvar '$VF'
-	killvar '$MF'
+	killvar '$temp_SMStext'
+	killvar '$SMSTree'
 end
 
 if $ARGS[0] = 'summer2_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 = ''
 
-	$SMSFrM = '<table width=80%><tr><td collspan=2 bgcolor="#D4CEF9"><font color=black> '
-	$SMSBkM = '</font></td><td width=10%></td></tr></table>'
-	$SMSFrF = '<table width=80%><tr><td width=10%></td><td collspan=2 bgcolor=pink><font color=black>'
-	$SMSBkF = '</font></td></tr></table>'
 
 	if $ARGS[1] = 'Add SMS':
 		nerd_game['invite_day'] = daystart
 	end
 
-	$VM['0'] = 'Hey <<$pcs_nickname>>, 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 was 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>>, 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 was 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.'
 
-		$VF['0a'] = 'Sorry, but I''m just not interested in stuff like that anymore. Thanks for the invite though.'
-			$VM['1a'] = ':-( Oh... Okay, yeah I get it. Guess we''ll see you around.'
+		$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.'
 
-		$VF['0b'] = 'Sure, I can make it on Tuesday.'
-			$VM['1b'] = ':-) 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['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.'
 
-		$VF['0c'] = 'Sure, I can make it on Thursday.'
-			$VM['1c'] = ':-) 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['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':
-		$trialSMS  = $SMSFrM+$VM['0']+$SMSBkM
-		$trialSMS += '<table><tr><th> Reply</th></tr>'
-		$trialSMS += '<tr><td><a href="exec: gs ''nerd_game_night'', ''summer2_invite_sms'', ''V1'',telefon[''SMSid'']">'+'Not interested'+'</a></td></tr>'
-		$trialSMS += '<tr><td><a href="exec: gs ''nerd_game_night'', ''summer2_invite_sms'', ''V2'',telefon[''SMSid'']">'+'<<$week[val(mid(nerd_game[''lot''],1,1))]>>'+'</a></td></tr></table>'
-		$trialSMS += '<tr><td><a href="exec: gs ''nerd_game_night'', ''summer2_invite_sms'', ''V3'',telefon[''SMSid'']">'+'<<$week[val(mid(nerd_game[''lot''],2,1))]>>'+'</a></td></tr></table>'
-		gs 'telefon', 'add_sms', 'A152', $trialSMS
-	end
-
-	if $ARGS[1] = 'V1':
-		$trialSMS  = $SMSFrM+$VM[ '0']+$SMSBkM
-		$trialSMS += $SMSFrF+$VF['0a']+$SMSBkF
-		$SMSMessage[ARGS[1]] = $trialSMS
+		$temp_SMStext += $SMS_open_receiving + $SMSTee[ '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
+
+	elseif $ARGS[1] = 'Choice_a':
+		$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
-		$trialSMS += $SMSFrM+$VM['1a']+$SMSBkM
-		$SMSMessage[ARGS[1]] = $trialSMS
+		
+		$temp_SMStext += $SMS_open_receiving + $SMSTree['a2'] + $SMS_close_receiving
+
+		$SMSMessage[ARGS[2]] = $temp_SMStext
 		gs 'telefon', 'show_sms', ARGS[2]
 !!		nerd_game['invite_day'] = 2147483647 & ! block the event
-	end
 
-	if $ARGS[1] = 'V2':
-		$trialSMS  = $SMSFrM+$VM[ '0']+$SMSBkM
-		$trialSMS += $SMSFrF+$VF['0b']+$SMSBkF
-		$SMSMessage[ARGS[1]] = $trialSMS
+	elseif $ARGS[1] = 'Choice_b':
+		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
-		$trialSMS += $SMSFrM+$VM['1b']+$SMSBkM
-		$SMSMessage[ARGS[1]] = $trialSMS
+		
+		$temp_SMStext += $SMS_open_receiving + $SMSTree['b2'] + $SMS_close_receiving
+
+		$SMSMessage[ARGS[2]] = $temp_SMStext
 		gs 'telefon', 'show_sms', ARGS[2]
-		nerd_game['fixed_uni_day'] = 2
-	end
 
-	if $ARGS[1] = 'V3':
-		$trialSMS  = $SMSFrM+$VM[ '0']+$SMSBkM
-		$trialSMS += $SMSFrF+$VF['0c']+$SMSBkF
-		$SMSMessage[ARGS[1]] = $trialSMS
+	elseif $ARGS[1] = 'Choice_c':
+		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
-		$trialSMS += $SMSFrM+$VM['1c']+$SMSBkM
-		$SMSMessage[ARGS[1]] = $trialSMS
+		
+		$temp_SMStext += $SMS_open_receiving + $SMSTree['c2'] + $SMS_close_receiving
+
+		$SMSMessage[ARGS[2]] = $temp_SMStext
 		gs 'telefon', 'show_sms', ARGS[2]
-		nerd_game['fixed_uni_day'] = 4
+
 	end
 
-	killvar '$trialSMS'
-	killvar '$VF'
-	killvar '$MF'
+	killvar '$temp_SMStext'
+	killvar '$SMSTree'
 end
 
 if $ARGS[0] = 'invite_uni':