SMStext_builder.qsrc 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. !
  12. ! If you want Sveta to reply to this (and thus the player potentially having a choice):
  13. ! gs 'SMStext_builder', 'add_reply', [$text], [$file_name], [$file_args0], [$file_args1], ...
  14. ! gs 'SMStext_builder', 'add_reply', [$text], [$file_name], [$file_args0], [$file_args1], ...
  15. !
  16. ! Finally, if this is a new sms-chain, use:
  17. ! gs 'SMStext_builder', 'add_sms', [$npc_code]
  18. !
  19. ! If you are updating an ongoing sms-chain (usually in reponse to a choice made in the replies), use:
  20. ! gs 'SMStext_builder', 'show_sms', ARGS[{n}]
  21. ! where {n} is one more than the number of args you passed to the choice.
  22. ! So if you are used:
  23. ! gs 'SMStext_builder', 'add_reply', [$text], [$file_name], [$file_args0], [$file_args1].
  24. ! Then you would pass ARGS[2] (since you used $ARGS[0] and $ARGS[1]):
  25. ! gs 'SMStext_builder', 'add_sms', ARGS[2]
  26. !
  27. ! Finally after the player has made a choice, you want to rebuild the SMS-history again (to get rid of the replies).
  28. ! Starting fresh or having done your final update (even if you never updated it anyway)
  29. ! End it with:
  30. ! gs 'SMStext_builder', 'end'
  31. if $ARGS[0] = 'start':
  32. $temp_SMStext = ''
  33. elseif $ARGS[0] = 'end':
  34. killvar '$temp_SMStext'
  35. killvar '$temp_SMSreplies'
  36. killvar 'stb_i'
  37. killvar 'stb_maxi'
  38. end
  39. if $ARGS[0] = 'send':
  40. temp_text_width = max(10, 90 - 2 * len($ARGS[1]))
  41. $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>'
  42. $temp_SMStext += $ARGS[1]
  43. $temp_SMStext += '</font></td></tr></table>'
  44. killvar 'temp_text_width'
  45. elseif $ARGS[0] = 'send_img':
  46. $temp_SMStext += '<table width=80%><tr><td width=10%></td><td collspan=2 bgcolor=pink align=center style="white-space:pre-wrap">'
  47. if $ARGS[2] = '': $ARGS[2] = $ARGS[1]
  48. $temp_SMStext += '<br><img src="<<$ARGS[1]>>" alt="<<$ARGS[2]>>" style="horizontal-align:center; max-height:90%; max-width:90%"><br><br>'
  49. $temp_SMStext += '</td></tr></table>'
  50. elseif $ARGS[0] = 'receive':
  51. temp_text_width = max(10, 90 - 2 * len($ARGS[1]))
  52. $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>'
  53. $temp_SMStext += $ARGS[1]
  54. $temp_SMStext += '</font></td><td width=<<temp_text_width>>%></td></tr></table>'
  55. killvar 'temp_text_width'
  56. elseif $ARGS[0] = 'receive_img':
  57. $temp_SMStext += '<table width=80%><tr><td collspan=2 bgcolor="#D4CEF9" align=center style="white-space:pre-wrap">'
  58. if $ARGS[2] = '': $ARGS[2] = $ARGS[1]
  59. $temp_SMStext += '<br><img src="<<$ARGS[1]>>" alt="<<$ARGS[2]>>" style="horizontal-align:center; max-height:90%; max-width:90%"><br><br>'
  60. $temp_SMStext += '</td><td width=10%></td></tr></table>'
  61. end
  62. ! How to use 'add_reply':
  63. ! gs 'SMStext_builder', 'add_reply', $reply_text, $file_loc, $file_arg1, $file_arg2, $file_args2, ...
  64. ! gs 'SMStext_builder', 'add_reply', 'Hello', 'band_tour_anushka_SMS', 'week1', 'choice_a'
  65. if $ARGS[0] = 'add_reply':
  66. $temp_reply_str = '<a href="exec: gs '
  67. stb_n_args = arrsize('$ARGS')
  68. stb_i = 2
  69. :SMS_build_reply_loop
  70. if stb_i <= stb_n_args:
  71. $temp_reply_str += '''<<$ARGS[stb_i]>>'', '
  72. stb_i += 1
  73. jump 'SMS_build_reply_loop'
  74. end
  75. $temp_reply_str += 'telefon[''SMSid'']">' + $ARGS[1] + '</a>'
  76. $temp_SMSreplies[] = $temp_reply_str
  77. killvar 'temp_reply_str'
  78. killvar 'stb_i'
  79. killvar 'stb_n_args'
  80. elseif $ARGS[0] = 'set_replies':
  81. $temp_SMStext += '<table><tr><th> Reply</th></tr><tr><td>'
  82. stb_maxi = arrsize('temp_SMSreplies')
  83. stb_i = 0
  84. if stb_maxi >= 2:
  85. :SMS_reply_loop
  86. $temp_SMStext += $temp_SMSreplies[stb_i]
  87. $temp_SMStext += '</td></tr><tr><td>'
  88. stb_i += 1
  89. if stb_i < stb_maxi - 1: jump 'SMS_reply_loop'
  90. end
  91. $temp_SMStext += $temp_SMSreplies[stb_i]
  92. $temp_SMStext += '</td></tr></table>'
  93. killvar '$temp_SMSreplies'
  94. killvar 'stb_i'
  95. killvar 'stb_maxi'
  96. end
  97. if $ARGS[0] = 'add_sms':
  98. if arrsize('temp_SMSreplies') > 0: gs 'SMStext_builder', 'set_replies'
  99. gs 'telefon', 'add_sms', $ARGS[1], $temp_SMStext, $ARGS[2], $ARGS[3], $ARGS[4], $ARGS[5]
  100. elseif $ARGS[0] = 'show_sms':
  101. if arrsize('temp_SMSreplies') > 0: gs 'SMStext_builder', 'set_replies'
  102. $SMSMessage[ARGS[1]] = $temp_SMStext
  103. gs 'telefon', 'show_sms', ARGS[1], $ARGS[2], $ARGS[3], $ARGS[4], $ARGS[5]
  104. end
  105. ! $ARGS[1] = displayed text
  106. ! $ARGS[2] = control string = 'c|sw|u|n|b|sh|ft|fa|fp'
  107. ! c: clothed | sw: swim | u: underwear
  108. ! n: nude | b: bath | sh: shower
  109. ! ft: flash tits | fa: flash ass | fp: flash pussy
  110. ! $ARGS[3] -> onward = the return location.
  111. ! gs 'SMStext_builder', 'send_selfie', 'Send a sexy selfie', 'cbf',
  112. if $ARGS[0] = 'send_selfie':
  113. $temp_reply_str = '<a href="exec: gs ''SMS_selfies'', ''selfie_menu'', ''<<lcase($ARGS[2])>>'', telefon[''SMSid''], '
  114. stb_n_args = arrsize('$ARGS')
  115. stb_i = 3
  116. :SMS_build_send_selfie_loop
  117. if stb_i < stb_n_args:
  118. $temp_reply_str += '''<<$ARGS[stb_i]>>'', '
  119. stb_i += 1
  120. jump 'SMS_build_send_selfie_loop'
  121. end
  122. $temp_reply_str = mid($temp_reply_str, 1, len($temp_reply_str)-2)
  123. $temp_reply_str += '"><<$ARGS[1]>></a>'
  124. $temp_SMSreplies[] = $temp_reply_str
  125. killvar 'temp_reply_str'
  126. killvar 'stb_i'
  127. killvar 'stb_n_args'
  128. end
  129. --- SMStext_builder ---------------------------------