SMStext_builder.qsrc 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. # SMStext_builder
  2. ! How to use SMStext_builder:
  3. !
  4. ! Start with:
  5. ! gs 'SMStext_builder', 'start'
  6. ! Then add your content through "send" and "receive":
  7. ! gs 'SMStext_builder', 'send', [$text]
  8. ! gs 'SMStext_builder', 'receive', [$text]
  9. ! ...
  10. ! ...
  11. ! You can send/receive an image using "send_img" and "receive_img". Optionally, you can add an alt-name to the image in case it does not load
  12. ! gs 'SMStext_builder', 'send_img', [$img_path], ([$img_name])
  13. ! gs 'SMStext_builder', 'receive_img', [$img_path], ([$img_name])
  14. !
  15. ! If you want Sveta to reply to this (and thus the player potentially having a choice):
  16. ! gs 'SMStext_builder', 'add_reply', [$text], [$file_name], [$file_args0], [$file_args1], ...
  17. ! gs 'SMStext_builder', 'add_reply', [$text], [$file_name], [$file_args0], [$file_args1], ...
  18. !
  19. ! If you want Sveta to choose a selfie to send, use:
  20. ! gs 'SMStext_builder', 'send_selfie', [$text], [$file_name], [$file_args0], [$file_args1]
  21. ! Where the file_name and args are where the text chain continues.
  22. !
  23. ! Finally, if this is a new sms-chain, use:
  24. ! gs 'SMStext_builder', 'add_sms', [$npc_code]
  25. !
  26. ! If you are updating an ongoing sms-chain (usually in reponse to a choice made in the replies), use:
  27. ! gs 'SMStext_builder', 'show_sms', ARGS[{n}]
  28. ! where {n} is one more than the number of args you passed to the choice.
  29. ! So if you are used:
  30. ! gs 'SMStext_builder', 'add_reply', [$text], [$file_name], [$file_args0], [$file_args1].
  31. ! Then you would pass ARGS[2] (since you used $ARGS[0] and $ARGS[1]):
  32. ! gs 'SMStext_builder', 'add_sms', ARGS[2]
  33. !
  34. ! Finally after the player has made a choice, everything but the replies are stored.
  35. ! If you want to reset the text (but not the end images), use gs 'SMStext_builder', 'reset'
  36. ! Starting fresh or having done your final update (even if you never updated it anyway)
  37. ! End it with:
  38. ! gs 'SMStext_builder', 'end'
  39. if $ARGS[0] = 'start':
  40. $temp_SMStext = ''
  41. elseif $ARGS[0] = 'end':
  42. killvar '$temp_SMStext'
  43. killvar '$temp_SMSreplies'
  44. killvar '$temp_SMSimgs'
  45. killvar 'stb_i'
  46. killvar 'stb_maxi'
  47. killvar '$temp_SMS_reset_flag'
  48. killvar '$temp_SMSRepliestext'
  49. end
  50. if $ARGS[0] = 'reset':
  51. $temp_SMS_reset_flag = 1
  52. end
  53. if $ARGS[0] = 'send':
  54. temp_text_width = max(10, 90 - 2 * len($ARGS[1]))
  55. $temp_SMStext += '<table width=80%><tr><td width=<<temp_text_width>>%></td><td collspan=2 bgcolor=pink style="padding-top:5pt; padding-bottom:5pt; padding-left:10pt; padding-right:3pt"><font color=black>'
  56. $temp_SMStext += $ARGS[1]
  57. $temp_SMStext += '</font></td></tr></table>'
  58. killvar 'temp_text_width'
  59. elseif $ARGS[0] = 'send_img':
  60. $temp_SMStext += '<table width=80%><tr><td width=10%></td><td collspan=2 bgcolor=pink align=center style="white-space:pre-wrap">'
  61. if $ARGS[2] = '': $ARGS[2] = $ARGS[1]
  62. $temp_SMStext += '<br><img src="<<$ARGS[1]>>" alt="<<$ARGS[2]>>" style="horizontal-align:center; max-height:90%; max-width:90%"><br><br>'
  63. $temp_SMStext += '</td></tr></table>'
  64. elseif $ARGS[0] = 'receive':
  65. temp_text_width = max(10, 90 - 2 * len($ARGS[1]))
  66. $temp_SMStext += '<table width=80%><tr><td collspan=2 bgcolor="#D4CEF9" style="padding-top:5pt; padding-bottom:5pt; padding-left:10pt; padding-right:3pt"><font color=black>'
  67. $temp_SMStext += $ARGS[1]
  68. $temp_SMStext += '</font></td><td width=<<temp_text_width>>%></td></tr></table>'
  69. killvar 'temp_text_width'
  70. elseif $ARGS[0] = 'receive_img':
  71. $temp_SMStext += '<table width=80%><tr><td collspan=2 bgcolor="#D4CEF9" align=center style="white-space:pre-wrap">'
  72. if $ARGS[2] = '': $ARGS[2] = $ARGS[1]
  73. $temp_SMStext += '<br><img src="<<$ARGS[1]>>" alt="<<$ARGS[2]>>" style="horizontal-align:center; max-height:90%; max-width:90%"><br><br>'
  74. $temp_SMStext += '</td><td width=10%></td></tr></table>'
  75. end
  76. ! How to use 'add_reply':
  77. ! gs 'SMStext_builder', 'add_reply', $reply_text, $file_loc, $file_arg1, $file_arg2, $file_args2, ...
  78. ! gs 'SMStext_builder', 'add_reply', 'Hello', 'band_tour_anushka_SMS', 'week1', 'choice_a'
  79. if $ARGS[0] = 'add_reply':
  80. $temp_reply_str = '[Reply] <a href="exec: gs '
  81. stb_n_args = arrsize('$ARGS')
  82. stb_i = 2
  83. :SMS_build_reply_loop
  84. if stb_i < stb_n_args:
  85. $temp_reply_str += '''<<$ARGS[stb_i]>>'', '
  86. stb_i += 1
  87. jump 'SMS_build_reply_loop'
  88. end
  89. $temp_reply_str += 'telefon[''SMSid'']">' + $ARGS[1] + '</a>'
  90. $temp_SMSreplies[] = $temp_reply_str
  91. killvar 'temp_reply_str'
  92. killvar 'stb_i'
  93. killvar 'stb_n_args'
  94. elseif $ARGS[0] = 'private_set_replies':
  95. $temp_SMSRepliestext += '<table>'
  96. stb_maxi = arrsize('temp_SMSreplies')
  97. stb_i = 0
  98. :SMS_reply_loop
  99. $temp_SMSRepliestext += '<tr><td>' + $temp_SMSreplies[stb_i] + '</td></tr>'
  100. stb_i += 1
  101. if stb_i < stb_maxi: jump 'SMS_reply_loop'
  102. $temp_SMSRepliestext += '</table>'
  103. killvar '$temp_SMSreplies'
  104. killvar 'stb_i'
  105. killvar 'stb_maxi'
  106. end
  107. if $ARGS[0] = 'add_end_img':
  108. if $temp_imgs[0] = '':
  109. $temp_SMSimgs[0] = $ARGS[1]
  110. elseif $temp_imgs[1] = '':
  111. $temp_SMSimgs[1] = $ARGS[1]
  112. elseif $temp_imgs[2] = '':
  113. $temp_SMSimgs[2] = $ARGS[1]
  114. elseif $temp_imgs[3] = '':
  115. $temp_SMSimgs[3] = $ARGS[1]
  116. end
  117. end
  118. if $ARGS[0] = 'private_set_end_img':
  119. stb_i = 0
  120. :stb_psei_loop
  121. if stb_i < arrsize('temp_SMSimgs'):
  122. if $SMSPicture1[ARGS[1]] = '':
  123. $SMSPicture1[ARGS[1]] = $temp_SMSimgs[stb_i]
  124. elseif $SMSPicture2[ARGS[1]] = '':
  125. $SMSPicture2[ARGS[1]] = $temp_SMSimgs[stb_i]
  126. elseif $SMSPicture3[ARGS[1]] = '':
  127. $SMSPicture3[ARGS[1]] = $temp_SMSimgs[stb_i]
  128. elseif $SMSPicture4[ARGS[1]] = '':
  129. $SMSPicture4[ARGS[1]] = $temp_SMSimgs[stb_i]
  130. end
  131. stb_i += 1
  132. end
  133. killvar 'stb_i'
  134. killvar '$temp_SMSimgs'
  135. end
  136. if $ARGS[0] = 'add_sms':
  137. if arrsize('temp_SMSreplies') > 0:
  138. gs 'SMStext_builder', 'private_set_replies'
  139. else
  140. $temp_SMSRepliestext = ''
  141. end
  142. gs 'telefon', 'add_sms', $ARGS[1], $temp_SMStext, $temp_SMSRepliestext, $temp_SMSimgs[0], $temp_SMSimgs[1], $temp_SMSimgs[2], $temp_SMSimgs[3]
  143. killvar '$temp_SMSRepliestext'
  144. elseif $ARGS[0] = 'show_sms':
  145. if arrsize('temp_SMSreplies') > 0:
  146. gs 'SMStext_builder', 'private_set_replies'
  147. else
  148. killvar '$temp_SMSRepliestext'
  149. end
  150. if arrsize('temp_SMSimgs') > 0: gs 'SMStext_builder', 'private_set_end_img', ARGS[1]
  151. if temp_SMS_reset_flag = 1: $SMSMessage[ARGS[1]] = ''
  152. $SMSMessage[ARGS[1]] += $temp_SMStext
  153. $SMSReplies[ARGS[1]] = $temp_SMSRepliestext
  154. gs 'telefon', 'show_sms', ARGS[1]
  155. killvar 'temp_SMS_reset_flag'
  156. killvar '$temp_SMStext'
  157. killvar '$temp_SMSRepliestext'
  158. end
  159. ! $ARGS[1] = displayed text
  160. ! $ARGS[2] = control string = 'c|sw|u|n|b|sh|ft|fa|fp'
  161. ! c: clothed | sw: swim | u: underwear
  162. ! n: nude | b: bath | sh: shower
  163. ! ft: flash tits | fa: flash ass | fp: flash pussy
  164. ! $ARGS[3] -> onward = the return location.
  165. ! gs 'SMStext_builder', 'send_selfie', 'Send a sexy selfie', 'c|b|ft', 'band_tour_anushka_SMS', 'Week8', 'Choice_a'
  166. if $ARGS[0] = 'send_selfie':
  167. $temp_reply_str = '[Selfie] <a href="exec: gs ''SMS_selfies'', ''selfie_menu'', ''<<lcase($ARGS[2])>>'', telefon[''SMSid'']'
  168. stb_n_args = arrsize('$ARGS')
  169. stb_i = 3
  170. :SMS_build_send_selfie_loop
  171. if stb_i < stb_n_args:
  172. $temp_reply_str += ', ''<<$ARGS[stb_i]>>'''
  173. stb_i += 1
  174. jump 'SMS_build_send_selfie_loop'
  175. end
  176. $temp_reply_str += '"><<$ARGS[1]>></a>'
  177. $temp_SMSreplies[] = $temp_reply_str
  178. killvar 'temp_reply_str'
  179. killvar 'stb_i'
  180. killvar 'stb_n_args'
  181. end
  182. --- SMStext_builder ---------------------------------