SMStext_builder.qsrc 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  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', 'show_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. !!=====================================================!!
  40. !! !!
  41. !! Examples !!
  42. !! !!
  43. !!=====================================================!!
  44. ! This example is in a non-existing file called "lukaqw". Here luka has npc code A6969
  45. ! if $ARGS[0] = 'SMS1':
  46. ! if $ARGS[1] = 'start':
  47. ! gs 'SMStext_builder', 'start'
  48. ! gs 'SMStext_builder', 'receive', '"hey Sveta", it''s Luka!'
  49. ! gs 'SMStext_builder', 'receive', '"how are you doing?"'
  50. ! gs 'SMStext_builder', 'add_reply', 'im good, you?', 'lukaqw', 'SMS1', '1'
  51. ! gs 'SMStext_builder', 'add_sms', 'A6969'
  52. ! gs 'SMStext_builder', 'end'
  53. ! end
  54. !
  55. ! if $ARGS[1] = '1':
  56. ! !! The replies are removed, but the rest is not. We first send the reply text, wait, then
  57. ! gs 'SMStext_builder', 'start'
  58. ! gs 'SMStext_builder', 'send', 'im good, you?'
  59. ! gs 'SMStext_builder', 'show_sms', ARGS[2]
  60. ! wait 500
  61. !
  62. ! gs 'SMStext_builder', 'receive', 'could you send me a picture?'
  63. ! gs 'SMStext_builder', 'add_reply', 'sure!', 'lukaqw', 'SMS1', 'send_pic'
  64. ! gs 'SMStext_builder', 'add_reply', 'you first', 'lukaqw', 'SMS1', 'receive_pic'
  65. ! gs 'SMStext_builder', 'add_reply', 'no', 'lukaqw', 'SMS1', 'no'
  66. ! gs 'SMStext_builder', 'show_sms', ARGS[2]
  67. ! gs 'SMStext_builder', 'end'
  68. ! end
  69. !
  70. ! if $ARGS[1] = 'send_pic':
  71. ! gs 'SMStext_builder', 'start'
  72. ! gs 'SMStext_builder', 'send', 'sure!'
  73. ! gs 'SMStext_builder', 'show_sms', ARGS[2]
  74. ! wait 500
  75. !
  76. ! gs 'SMStext_builder', 'receive', 'better make it sexy :))!'
  77. ! gs 'SMStext_builder', 'send_selfie', 'c|u|n|b|sh|ft', 'lukaqw', 'SMS1', 'Selfie_send'
  78. ! gs 'SMStext_builder', 'end'
  79. ! end
  80. !
  81. ! if $ARGS[1] = 'Selfie_send':
  82. ! gs 'SMStext_builder', 'start'
  83. ! gs 'SMStext_builder', 'send_img', $ARGS[3]
  84. ! gs 'SMStext_builder', 'show_sms', ARGS[2]
  85. ! wait 500
  86. !
  87. ! !$ARGS[5] is the state of dress:
  88. ! if $ARGS[5] = 'clothed':
  89. ! gs 'SMStext_builder', 'receive', 'disapointing, but better than nothin i sup'
  90. ! elseif $ARGS[5] = 'nude' or $ARGS[5] = 'pussyflash':
  91. ! gs 'SMStext_builder', 'receive', 'DAMN!'
  92. ! else
  93. ! gs 'SMStext_builder', 'receive', 'nice'
  94. ! end
  95. ! gs 'SMStext_builder', 'end'
  96. ! end
  97. !
  98. ! if $ARGS[1] = 'receive_pic':
  99. ! gs 'SMStext_builder', 'start'
  100. ! gs 'SMStext_builder', 'send', 'you first'
  101. ! gs 'SMStext_builder', 'show_sms', ARGS[2]
  102. ! wait 500
  103. !
  104. ! gs 'SMStext_builder', 'receive_img', 'image/characters/pavlovsk/resident/luka/selfies/sexy3.jpg'
  105. ! gs 'SMStext_builder', 'receive', 'now you'
  106. ! gs 'SMStext_builder', 'add_reply', 'sure!', 'lukaqw', 'SMS1', 'send_pic'
  107. ! gs 'SMStext_builder', 'add_reply', 'no', 'lukaqw', 'SMS1', 'no2'
  108. ! gs 'SMStext_builder', end
  109. ! end
  110. !
  111. ! if $ARGS[1] = 'no':
  112. ! gs 'SMStext_builder', 'start'
  113. ! gs 'SMStext_builder', 'send', 'no'
  114. ! gs 'SMStext_builder', 'show_sms', ARGS[2]
  115. ! wait 500
  116. !
  117. ! gs 'SMStext_builder', 'receive', 'sad'
  118. ! gs 'SMStext_builder', end
  119. ! end
  120. !
  121. ! if $ARGS[1] = 'no2':
  122. ! gs 'SMStext_builder', 'start'
  123. ! gs 'SMStext_builder', 'send', 'no'
  124. ! gs 'SMStext_builder', 'show_sms', ARGS[2]
  125. ! wait 500
  126. !
  127. ! gs 'SMStext_builder', 'receive', 'what? but i send you mine?!'
  128. ! gs 'SMStext_builder', 'add_reply', 'get blackmailed noob', 'lukaqw', 'SMS1', 'blackmail'
  129. ! gs 'SMStext_builder', 'add_reply', 'that time of month, sorry', 'lukaqw', 'SMS1', 'excuses'
  130. ! gs 'SMStext_builder', end
  131. ! end
  132. ! ...
  133. ! ...
  134. ! end
  135. !!=====================================================!!
  136. !! !!
  137. !! CODE !!
  138. !! !!
  139. !!=====================================================!!
  140. if $ARGS[0] = 'start':
  141. killvar 'SMSBuilderVars'
  142. killvar 'SMSBuilderReplies'
  143. killvar 'SMSBuilderImages'
  144. elseif $ARGS[0] = 'end':
  145. killvar 'stb_i'
  146. killvar 'stb_maxi'
  147. killvar 'SMSBuilderVars'
  148. killvar 'SMSBuilderReplies'
  149. killvar 'SMSBuilderImages'
  150. end
  151. if $ARGS[0] = 'reset':
  152. SMSBuilderVars['reset_flag'] = 1
  153. end
  154. if $ARGS[0] = 'send':
  155. temp_text_width = max(10, 90 - 2 * len($ARGS[1]))
  156. $SMSBuilderVars['text'] += '<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>'
  157. $SMSBuilderVars['text'] += $ARGS[1]
  158. $SMSBuilderVars['text'] += '</font></td></tr></table>'
  159. killvar 'temp_text_width'
  160. elseif $ARGS[0] = 'send_img':
  161. $SMSBuilderVars['text'] += '<table width=80%><tr><td width=10%></td><td collspan=2 bgcolor=pink align=center style="white-space:pre-wrap">'
  162. if $ARGS[2] = '': $ARGS[2] = $ARGS[1]
  163. $SMSBuilderVars['text'] += '<br><img src="<<$ARGS[1]>>" alt="<<$ARGS[2]>>" style="horizontal-align:center; max-height:90%; max-width:90%"><br><br>'
  164. $SMSBuilderVars['text'] += '</td></tr></table>'
  165. elseif $ARGS[0] = 'receive':
  166. temp_text_width = max(10, 90 - 2 * len($ARGS[1]))
  167. $SMSBuilderVars['text'] += '<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>'
  168. $SMSBuilderVars['text'] += $ARGS[1]
  169. $SMSBuilderVars['text'] += '</font></td><td width=<<temp_text_width>>%></td></tr></table>'
  170. killvar 'temp_text_width'
  171. elseif $ARGS[0] = 'receive_img':
  172. $SMSBuilderVars['text'] += '<table width=80%><tr><td collspan=2 bgcolor="#D4CEF9" align=center style="white-space:pre-wrap">'
  173. if $ARGS[2] = '': $ARGS[2] = $ARGS[1]
  174. $SMSBuilderVars['text'] += '<br><img src="<<$ARGS[1]>>" alt="<<$ARGS[2]>>" style="horizontal-align:center; max-height:90%; max-width:90%"><br><br>'
  175. $SMSBuilderVars['text'] += '</td><td width=10%></td></tr></table>'
  176. end
  177. ! How to use 'add_reply':
  178. ! gs 'SMStext_builder', 'add_reply', $reply_text, $file_loc, $file_arg1, $file_arg2, $file_args2, ...
  179. ! gs 'SMStext_builder', 'add_reply', 'Hello', 'band_tour_anushka_SMS', 'week1', 'choice_a'
  180. if $ARGS[0] = 'add_reply':
  181. $temp_reply_str = '[Reply] <a href="exec: gs '
  182. stb_n_args = arrsize('$ARGS')
  183. stb_i = 2
  184. :SMS_build_reply_loop
  185. if stb_i < stb_n_args:
  186. $temp_reply_str += '''<<$ARGS[stb_i]>>'', '
  187. stb_i += 1
  188. jump 'SMS_build_reply_loop'
  189. end
  190. $temp_reply_str += 'telefon[''SMSid'']">' + $ARGS[1] + '</a>'
  191. $SMSBuilderReplies[] = $temp_reply_str
  192. killvar 'temp_reply_str'
  193. killvar 'stb_i'
  194. killvar 'stb_n_args'
  195. elseif $ARGS[0] = 'private_set_replies':
  196. $SMSBuilderVars['replies'] += '<table>'
  197. stb_maxi = arrsize('SMSBuilderReplies')
  198. stb_i = 0
  199. :SMS_reply_loop
  200. $SMSBuilderVars['replies'] += '<tr><td>' + $SMSBuilderReplies[stb_i] + '</td></tr>'
  201. stb_i += 1
  202. if stb_i < stb_maxi: jump 'SMS_reply_loop'
  203. $SMSBuilderVars['replies'] += '</table>'
  204. killvar 'SMSBuilderReplies'
  205. killvar 'stb_i'
  206. killvar 'stb_maxi'
  207. end
  208. if $ARGS[0] = 'add_end_img':
  209. if $temp_imgs[0] = '':
  210. $SMSBuilderImages[0] = $ARGS[1]
  211. elseif $temp_imgs[1] = '':
  212. $SMSBuilderImages[1] = $ARGS[1]
  213. elseif $temp_imgs[2] = '':
  214. $SMSBuilderImages[2] = $ARGS[1]
  215. elseif $temp_imgs[3] = '':
  216. $SMSBuilderImages[3] = $ARGS[1]
  217. end
  218. end
  219. if $ARGS[0] = 'private_set_end_img':
  220. stb_i = 0
  221. :stb_psei_loop
  222. if stb_i < arrsize('SMSBuilderImages'):
  223. if $SMSPicture1[ARGS[1]] = '':
  224. $SMSPicture1[ARGS[1]] = $SMSBuilderImages[stb_i]
  225. elseif $SMSPicture2[ARGS[1]] = '':
  226. $SMSPicture2[ARGS[1]] = $SMSBuilderImages[stb_i]
  227. elseif $SMSPicture3[ARGS[1]] = '':
  228. $SMSPicture3[ARGS[1]] = $SMSBuilderImages[stb_i]
  229. elseif $SMSPicture4[ARGS[1]] = '':
  230. $SMSPicture4[ARGS[1]] = $SMSBuilderImages[stb_i]
  231. end
  232. stb_i += 1
  233. end
  234. killvar 'stb_i'
  235. killvar '$SMSBuilderImages'
  236. end
  237. if $ARGS[0] = 'add_sms':
  238. if arrsize('SMSBuilderReplies') > 0:
  239. gs 'SMStext_builder', 'private_set_replies'
  240. else
  241. $SMSBuilderVars['replies'] = ''
  242. end
  243. gs 'telefon', 'add_sms', $ARGS[1], $SMSBuilderVars['text'], $SMSBuilderVars['replies'], $SMSBuilderImages[0], $SMSBuilderImages[1], $SMSBuilderImages[2], $SMSBuilderImages[3]
  244. $SMSBuilderVars['replies'] = ''
  245. elseif $ARGS[0] = 'show_sms':
  246. if arrsize('SMSBuilderReplies') > 0:
  247. gs 'SMStext_builder', 'private_set_replies'
  248. else
  249. $SMSBuilderVars['replies'] = ''
  250. end
  251. if arrsize('SMSBuilderImages') > 0: gs 'SMStext_builder', 'private_set_end_img', ARGS[1]
  252. if SMSBuilderVars['reset_flag'] = 1: $SMSMessage[ARGS[1]] = ''
  253. $SMSMessage[ARGS[1]] += $SMSBuilderVars['text']
  254. $SMSReplies[ARGS[1]] = $SMSBuilderVars['replies']
  255. gs 'telefon', 'show_sms', ARGS[1]
  256. SMSBuilderVars['reset_flag'] = 0
  257. $SMSBuilderVars['text'] = ''
  258. $SMSBuilderVars['replies'] = ''
  259. end
  260. ! $ARGS[1] = displayed text
  261. ! $ARGS[2] = control string = 'c|sw|u|n|b|sh|ft|fa|fp'
  262. ! c: clothed | sw: swim | u: underwear
  263. ! n: nude | b: bath | sh: shower
  264. ! ft: flash tits | fa: flash ass | fp: flash pussy
  265. ! $ARGS[3] -> onward = the return location.
  266. ! gs 'SMStext_builder', 'send_selfie', 'Send a sexy selfie', 'c|b|ft', 'band_tour_anushka_SMS', 'Week8', 'Choice_a'
  267. if $ARGS[0] = 'send_selfie':
  268. $temp_reply_str = '[Selfie] <a href="exec: gs ''SMS_selfies'', ''send_selfie'', ''<<lcase($ARGS[2])>>'', telefon[''SMSid'']'
  269. stb_n_args = arrsize('$ARGS')
  270. stb_i = 3
  271. :SMS_build_send_selfie_loop
  272. if stb_i < stb_n_args:
  273. $temp_reply_str += ', ''<<$ARGS[stb_i]>>'''
  274. stb_i += 1
  275. jump 'SMS_build_send_selfie_loop'
  276. end
  277. $temp_reply_str += '"><<$ARGS[1]>></a>'
  278. $SMSBuilderReplies[] = $temp_reply_str
  279. killvar 'temp_reply_str'
  280. killvar 'stb_i'
  281. killvar 'stb_n_args'
  282. end
  283. !! Might add directly taking a selfie in the future.
  284. !{
  285. ! $ARGS[1] = displayed text
  286. ! $ARGS[2] = control string = 'c|sw|u|n|b|sh|ft|fa|fp'
  287. ! c: clothed | sw: bikini | u: underwear
  288. ! n: nude | b: bath | sh: shower
  289. ! ft: titflash | fa: assflash | fp: pussyflash
  290. ! $ARGS[3] -> onward = the return location.
  291. ! gs 'SMStext_builder', 'take_selfie', 'Send a sexy selfie', 'c|b|ft', 'band_tour_anushka_SMS', 'Week8', 'Choice_a'
  292. if $ARGS[0] = 'take_selfie':
  293. $temp_reply_str = '[Selfie] <a href="exec: gs ''SMS_selfies'', ''take_selfie_menu'', ''<<lcase($ARGS[2])>>'', telefon[''SMSid'']'
  294. stb_n_args = arrsize('$ARGS')
  295. stb_i = 3
  296. :SMS_build_send_selfie_loop
  297. if stb_i < stb_n_args:
  298. $temp_reply_str += ', ''<<$ARGS[stb_i]>>'''
  299. stb_i += 1
  300. jump 'SMS_build_send_selfie_loop'
  301. end
  302. $temp_reply_str += '"><<$ARGS[1]>></a>'
  303. $SMSBuilderReplies[] = $temp_reply_str
  304. killvar 'temp_reply_str'
  305. killvar 'stb_i'
  306. killvar 'stb_n_args'
  307. end
  308. }
  309. --- SMStext_builder ---------------------------------