shortgs.qsrc 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672
  1. # shortgs
  2. !! smoker - handles all changes which happen when PC smokes one cigarette
  3. !! use : gs 'shortgs','smoker'
  4. if $ARGS[0] = 'smoker':
  5. siga -= 1
  6. if NarkImmune = 0: smoker += 1
  7. smokeHour = hour
  8. smokeDay = daystart
  9. smokeminut = minut + 5
  10. smokerNeed = 0
  11. cumspclnt = 2
  12. gs 'cum_cleanup'
  13. pcs_breath = 0
  14. pcs_mood += 100
  15. wipo += 100
  16. if pcs_hydra >= 100:
  17. pcs_hydra -= 5
  18. else
  19. pcs_hydra -= 10
  20. end
  21. if pcs_energy < 80: pcs_energy += 4
  22. gs '$menu_obnovit'
  23. end &!--- smoker ---
  24. !! following function counts the number of guys which PC slept with.
  25. !! use func('shortgs','guy') or func('shortgs','guy',X) for subset (X can be 'A','B','C','AB','AC','BC')
  26. if $ARGS[0] = 'guy':
  27. r_sht=0
  28. if $ARGS[1] = '': $temptask = 'ABC' else $temptask = $ARGS[1]
  29. :loop_shtty
  30. $temptaskchar = mid($temptask,1,1)
  31. $temptask = mid($temptask,2,len($temptask)-1)
  32. s_sht=0
  33. :loop_shya
  34. if s_sht<=dyneval("result = <<$temptaskchar>>arraynumber"):
  35. s_sht += 1
  36. if npc_sex['<<$temptaskchar>><<s_sht>>'] > 0: r_sht = r_sht + iif(npc_gender['<<$temptaskchar>><<s_sht>>'] = 0,1,0)
  37. jump 'loop_shya'
  38. end
  39. if len($temptask) > 0:jump 'loop_shtty'
  40. result = r_sht
  41. killvar 'r_sht'
  42. killvar '$temptask'
  43. killvar '$temptaskchar'
  44. killvar 's_sht'
  45. end &! --- guy ---
  46. !! following function counts the number of girls which PC slept with.
  47. !! use func('shortgs','girl') or func('shortgs','girl',X) for subset (X can be 'A','B','C','AB','AC','BC')
  48. if $ARGS[0] = 'girl':
  49. r_sht=0
  50. if $ARGS[1] = '': $temptask = 'ABC' else $temptask = $ARGS[1]
  51. :loop_shttl
  52. $temptaskchar = mid($temptask,1,1)
  53. $temptask = mid($temptask,2,len($temptask)-1)
  54. s_sht=0
  55. :loop_shl
  56. if s_sht<=dyneval("result = <<$temptaskchar>>arraynumber"):
  57. s_sht += 1
  58. if npc_sex['<<$temptaskchar>><<s_sht>>'] > 0: r_sht = r_sht + iif(npc_gender['<<$temptaskchar>><<s_sht>>'] = 1,1,0)
  59. jump 'loop_shl'
  60. end
  61. if len($temptask) > 0: jump 'loop_shttl'
  62. result = r_sht
  63. killvar 'r_sht'
  64. killvar '$temptask'
  65. killvar '$temptaskchar'
  66. killvar 's_sht'
  67. end &! --- girl ---
  68. !! following procedure should be used when PC gets naked, but it should be paired with the reverse procedure
  69. !! use gs 'shortgs','undress'
  70. if $ARGS[0] = 'undress':
  71. gs 'clothing','strip'
  72. gs 'underwear', 'remove'
  73. end &! --- undress ---
  74. !! reverse procedure, it can be modified for lose or stolen panties later.
  75. !! use gs 'shortgs','dress'
  76. if $ARGS[0] = 'dress':
  77. gs 'clothing','wear_last_worn'
  78. gs 'underwear', 'wear'
  79. end &! --- dress ---
  80. !! procedure, which prevents PC to leave a room naked.
  81. !! use gs 'shortgs','checkdress',' <<$loc>>,<<$metka>> ' or equivalent
  82. if $ARGS[0] = 'checkdress':
  83. if $clothingworntype = 'nude':
  84. msg '<b><font color="red">You need to get dressed before going out.</font></b>'
  85. dynamic 'gt <<$ARGS[1]>>'
  86. end
  87. end &! --- checkdress ---
  88. !! this is an integer sqrt function
  89. !! call func('shortgs','sqrt', n)
  90. if $ARGS[0] = 'sqrt':
  91. sqrtnum = ARGS[1]
  92. if sqrtnum = 0: result = 0 & exit
  93. sqrtn = sqrtnum/2 + 1
  94. sqrtn1 = (sqrtn + sqrtnum / sqrtn) / 2
  95. :sqrtloop
  96. if sqrtn1 < sqrtn:
  97. sqrtn = sqrtn1
  98. sqrtn1 = (sqrtn + sqrtnum / sqrtn) / 2
  99. jump 'sqrtloop'
  100. end
  101. result = sqrtn
  102. end
  103. !! this function calculates modul of given arguments as it was coordinates in cartezian systeme
  104. !! use func('shortgs','modul',n1,n2,..n8)
  105. if $ARGS[0] = 'modul':
  106. modul_sum = ARGS[1]*ARGS[1]+ARGS[2]*ARGS[2]+ARGS[3]*ARGS[3]+ARGS[4]*ARGS[4]+ARGS[5]*ARGS[5]+ARGS[6]*ARGS[6]+ARGS[7]*ARGS[7]+ARGS[8]*ARGS[8]
  107. result = func('shortgs','sqrt',modul_sum)
  108. killvar 'modul_sum'
  109. end
  110. !! day of week 1 - Monday .. 7 - Sunday
  111. if $ARGS[0] = 'dow':
  112. if ARGS[1]=0:
  113. D_dow = day
  114. M_dow = month
  115. Y_dow = year
  116. else
  117. D_dow = ARGS[3]
  118. M_dow = ARGS[2]
  119. Y_dow = ARGS[1]
  120. end
  121. dow_a = (14 - M_dow) / 12
  122. dow_Y = Y_dow - dow_a
  123. dow_M = M_dow + 12*dow_a - 2
  124. dummy = (D_dow + dow_y + dow_y/4 - dow_y/100 + dow_y/400 + (31*dow_m)/12) mod 7
  125. if dummy = 0: dummy = 7
  126. result = dummy
  127. end
  128. !! day of year
  129. !! use xdoy = func('shortgs','doy',year,month,day)
  130. if $ARGS[0] = 'doy':
  131. doy_N1 = 275 * ARGS[2] / 9
  132. doy_N2 = (ARGS[2] + 9) / 12
  133. doy_N3 = 1 + (ARGS[1] - 4 * (ARGS[1] / 4) + 2) / 3
  134. result = doy_N1 - (doy_N2 * doy_N3) + ARGS[3] - 30
  135. end
  136. if $ARGS[0] = 'mk1':
  137. gs 'saveposition'
  138. *clr & cla
  139. $mk_subst['0'] = 'M' & $mk_subst['1'] = 'F' & $mk_subst['2'] = 'O' & $mk_subst['3'] = 'L' & $mk_subst['4'] = 'R' & $mk_subst['5'] = 'P'
  140. '<center><font face="courier" size=1>'
  141. '<table border = 1>'
  142. '<tr><th>Mon</th><th>Tue</th><th>Wen</th><th>Thu</th><th>Fri</th><th>Sat</th><th>Sun</th><th>Mon</th><th>Tue</th><th>Wen</th><th>Thu</th><th>Fri</th><th>Sat</th><th>Sun</th>
  143. <th>Mon</th><th>Tue</th><th>Wen</th><th>Thu</th><th>Fri</th><th>Sat</th><th>Sun</th><th>Mon</th><th>Tue</th><th>Wen</th><th>Thu</th><th>Fri</th><th>Sat</th><th>Sun</th></tr>'
  144. i = ArrSize('$MenCal')
  145. empty0 = week + 29 - i - 1
  146. empty1 = min(28,empty0)
  147. full1 = max(0,28 - empty0)
  148. empty2 = max(0,empty0-28)
  149. full2 = i - full1
  150. empty3 = 28 - empty2 - full2
  151. count=0
  152. $tabmc = '<tr>'
  153. :tabmcl1
  154. if empty1 > 0: empty1 -=1 & $tabmc +='<td>&nbsp</td>' & jump 'tabmcl1'
  155. :tabmcl2
  156. if full1 > 0:
  157. full1 -=1
  158. if $MenCal[count]='0': $tabmc +='<td bgcolor="red"><<$mk_subst[$MenCal[count]]>></td>' else $tabmc +='<td><<$mk_subst[$MenCal[count]]>></td>'
  159. count +=1
  160. jump 'tabmcl1'
  161. end
  162. $tabmc += '</tr><tr>'
  163. :tabmcl3
  164. if empty2 > 0: empty2 -=1 & $tabmc +='<td>&nbsp</td>' & jump 'tabmcl3'
  165. :tabmcl4
  166. if full2 > 0:
  167. full2 -=1
  168. if $MenCal[count]='0': $tabmc +='<td bgcolor="red"><<$mk_subst[$MenCal[count]]>></td>' else $tabmc +='<td><<$mk_subst[$MenCal[count]]>></td>'
  169. count +=1
  170. jump 'tabmcl4'
  171. end
  172. :tabmcl5
  173. if empty3 > 0: empty3 -=1 & $tabmc +='<td></td>' & jump 'tabmcl5'
  174. $tabmc += '</tr><table></font></center>'
  175. $tabmc
  176. act 'Back': gt 'restoreposition'
  177. end
  178. !! use gs 'shortgs','mk'
  179. if $ARGS[0] = 'mk':
  180. gs 'saveposition'
  181. *clr & cla
  182. copyarr '$MenCalCopy','$MenCal'
  183. length_of_month_field = arrsize('$MenCalCopy')
  184. if daystart - firstmens > 40:
  185. mensnotfound = 1
  186. i = 0
  187. :tabmcfm
  188. if $MenCalCopy[length_of_month_field-i] = '0' and $MenCalCopy[length_of_month_field-i-1] = '3': mensnotfound = 0
  189. i += 1
  190. if i < length_of_month_field and mensnotfound = 1: jump 'tabmcfm'
  191. if mensnotfound = 0:
  192. firstmens = daystart - i + 1
  193. end
  194. end
  195. i=1
  196. :tabmcc1
  197. if daystart - firstmens < 40:
  198. if (daystart - firstmens + i) = 28:
  199. $MenCalCopy[] = ' bgcolor="#df2020"'
  200. elseif (daystart - firstmens + i) = 29:
  201. $MenCalCopy[] = ' bgcolor="#df3030"'
  202. elseif (daystart - firstmens + i) = 30:
  203. $MenCalCopy[] = ' bgcolor="#df4040"'
  204. elseif (daystart - firstmens + i) = 12:
  205. $MenCalCopy[] = ' bgcolor="#d8ff00"'
  206. elseif (daystart - firstmens + i) = 13:
  207. $MenCalCopy[] = ' bgcolor="#d0ff00"'
  208. elseif (daystart - firstmens + i) = 14:
  209. $MenCalCopy[] = ' bgcolor="#c8ff00"'
  210. elseif (daystart - firstmens + i) = 15:
  211. $MenCalCopy[] = ' bgcolor="#c0ff00"'
  212. elseif (daystart - firstmens + i) = 16:
  213. $MenCalCopy[] = ' bgcolor="#d0ff00"'
  214. elseif (daystart - firstmens + i) = 12+28:
  215. $MenCalCopy[] = ' bgcolor="#d8ff00"'
  216. elseif (daystart - firstmens + i) = 13+28:
  217. $MenCalCopy[] = ' bgcolor="#d0ff00"'
  218. elseif (daystart - firstmens + i) = 14+28:
  219. $MenCalCopy[] = ' bgcolor="#c8ff00"'
  220. elseif (daystart - firstmens + i) = 15+28:
  221. $MenCalCopy[] = ' bgcolor="#c0ff00"'
  222. elseif (daystart - firstmens + i) = 16+28:
  223. $MenCalCopy[] = ' bgcolor="#d0ff00"'
  224. else
  225. $MenCalCopy[] = ''
  226. end
  227. i += 1
  228. if i < 40: jump 'tabmcc1'
  229. end
  230. i = length_of_month_field
  231. :tabmcc2
  232. if i > 0:
  233. if $MenCalCopy[i-1] = '2' and i = 1 : $MenCalCopy[i-1] = ' bgcolor="#c0ff00"'
  234. if $MenCalCopy[i-1] = '2' and $MenCalCopy[i-2] = '2': $MenCalCopy[i-1] = ' bgcolor="#c0ff00"'
  235. if $MenCalCopy[i-1] = '2' and $MenCalCopy[i-2] = '1': $MenCalCopy[i-1] = ' bgcolor="#80ff00"' & $MenCalCopy[i-2] = ' bgcolor="#90ff00"' & $MenCalCopy[i-3] = ' bgcolor="#a0ff00"' & $MenCalCopy[i-4] = ' bgcolor="#b0ff00"' & $MenCalCopy[i-5] = ' bgcolor="#c0ff00"'
  236. if $MenCalCopy[i-1] = '1' and (daystart - firstmens - length_of_month_field + i) < 12: $MenCalCopy[i-1] =''
  237. if $MenCalCopy[i-1] = '1' and (daystart - firstmens - length_of_month_field + i) = 12: $MenCalCopy[i-1] =' bgcolor="#b0ff00"'
  238. if $MenCalCopy[i-1] = '1' and (daystart - firstmens - length_of_month_field + i) = 13: $MenCalCopy[i-1] =' bgcolor="#a0ff00"'
  239. if $MenCalCopy[i-1] = '1' and (daystart - firstmens - length_of_month_field + i) = 14: $MenCalCopy[i-1] =' bgcolor="#90ff00"'
  240. if $MenCalCopy[i-1] = '1' and (daystart - firstmens - length_of_month_field + i) = 15: $MenCalCopy[i-1] =' bgcolor="#80ff00"'
  241. if $MenCalCopy[i-1] = '1' and (daystart - firstmens - length_of_month_field + i) > 15: $MenCalCopy[i-1] =''
  242. if $MenCalCopy[i-1] = '0': $MenCalCopy[i-1] =' bgcolor="#df2020"'
  243. if $MenCalCopy[i-1] = '3': $MenCalCopy[i-1] =''
  244. if $MenCalCopy[i-1] = '4': $MenCalCopy[i-1] =''
  245. if $MenCalCopy[i-1] = '5': $MenCalCopy[i-1] =''
  246. if $MenCalCopy[i-1] = '6': $MenCalCopy[i-1] =''
  247. i -= 1
  248. jump 'tabmcc2'
  249. end
  250. cur_day_doy = func('shortgs','doy',year,month,day)
  251. if month = 1:
  252. dif_days = cur_day_doy + 30
  253. prev_month = 12
  254. prev_month_length = 31
  255. else
  256. prev_month = month - 1
  257. dif_days = cur_day_doy - func('shortgs','doy',year,prev_month,1)
  258. prev_month_length = func('shortgs','doy',year,month,1) - func('shortgs','doy',year,prev_month,1)
  259. end
  260. first_month_first_day_week = week - (dif_days mod 7)
  261. first_month_first_day_index = length_of_month_field -1 - dif_days
  262. r = first_month_first_day_index
  263. if first_month_first_day_week < 1: first_month_first_day_week += 7
  264. i = 42
  265. :tabmc21
  266. $mk1_mdays[] = '&nbsp' & i -= 1 & if i > 0: jump 'tabmc21'
  267. i = 0
  268. :tabmc21a
  269. $mk1_mdays[i+first_month_first_day_week-1] = $str(i+1)
  270. i += 1
  271. if i < prev_month_length: jump 'tabmc21a'
  272. $prev_month_name = $mid($monthName[prev_month],1,1) + '<br>' + $mid($monthName[prev_month],2,1) + '<br>' + $mid($monthName[prev_month],3,1)
  273. k = 0
  274. $tabmc ='<center><font face="courier" size=5>'
  275. $tabmc +='<table border = 1 cellspacing="0" cellpadding="5">'
  276. $tabmc +='<tr><th>Month</th><th>Mon</th><th>Tue</th><th>Wen</th><th>Thu</th><th>Fri</th><th>Sat</th><th>Sun</th></tr>'
  277. month_weeks = (first_month_first_day_week + prev_month_length + 5)/7 - 1
  278. i = month_weeks
  279. :tabmc22
  280. $tabmc +='<tr>'
  281. j = 7
  282. if i = month_weeks:$tabmc +='<td rowspan="<<month_weeks+1>>" align = "center"><<$prev_month_name>></td>'
  283. :tabmc23
  284. if j > 0:
  285. j -=1
  286. if $mk1_mdays[k]='&nbsp':
  287. $tabmc +='<td><<$mk1_mdays[k]>></td>'
  288. else
  289. $tabmc +='<td<<$MenCalCopy[r]>> ><<$mk1_mdays[k]>></td>'
  290. r +=1
  291. end
  292. k +=1
  293. jump 'tabmc23' & !<<$MenCalCopy[r]>>
  294. end
  295. if i > 0: i -=1 & $tabmc +='</tr>' & jump 'tabmc22'
  296. killvar '$mk1_mdays'
  297. killvar '$mk1_mdays_color'
  298. !! current month
  299. if month = 12:
  300. dif_days = day - 1
  301. cur_month = month
  302. cur_month_length = 31
  303. else
  304. dif_days = day - 1
  305. cur_month_length = func('shortgs','doy',year,month+1,1) - func('shortgs','doy',year,month,1)
  306. end
  307. second_month_first_day_week = week - (dif_days mod 7)
  308. second_month_first_day_index = length_of_month_field -1 - dif_days
  309. if second_month_first_day_week < 1: second_month_first_day_week += 7
  310. i = 42
  311. :tabmc31
  312. $mk1_mdays[] = '&nbsp' & i -= 1 & if i > 0: jump 'tabmc31'
  313. i = 0
  314. :tabmc31a
  315. $mk1_mdays[i+second_month_first_day_week-1] = $str(i+1)
  316. i += 1
  317. if i < cur_month_length: jump 'tabmc31a'
  318. $cur_month_name = $mid($monthName[month],1,1) + '<br>' + $mid($monthName[month],2,1) + '<br>' + $mid($monthName[month],3,1)
  319. k = 0
  320. month_weeks = (second_month_first_day_week + cur_month_length + 5)/7 - 1
  321. i = month_weeks
  322. :tabmc32
  323. $tabmc +='<tr>'
  324. j = 7
  325. if i = month_weeks:$tabmc +='<td rowspan="<<month_weeks+1>>" align = "center"><<$cur_month_name>></td>'
  326. :tabmc33
  327. if j > 0:
  328. j -=1
  329. if $mk1_mdays[k]='&nbsp':
  330. $tabmc +='<td><<$mk1_mdays[k]>></td>'
  331. else
  332. if day + second_month_first_day_week - 2 = k: $tabmc +='<td<<$MenCalCopy[r]>> ><u><b><<$mk1_mdays[k]>></b></u></td>' else $tabmc +='<td<<$MenCalCopy[r]>> ><<$mk1_mdays[k]>></td>'
  333. r +=1
  334. end
  335. k +=1
  336. jump 'tabmc33'
  337. end
  338. if i > 0: i -=1 & $tabmc +='</tr>' & jump 'tabmc32'
  339. killvar '$mk1_mdays'
  340. killvar '$mk1_mdays_color'
  341. !! next month
  342. if month = 12:
  343. dif_days = 31 - day + 1
  344. next_month = 1
  345. next_month_length = 31
  346. elseif month = 11:
  347. dif_days = 30 - day + 1
  348. next_month = 12
  349. next_month_length = 31
  350. else
  351. next_month = month + 1
  352. dif_days = cur_month_length - day + 1
  353. next_month_length = func('shortgs','doy',year,month+2,1) - func('shortgs','doy',year,month+1,1)
  354. end
  355. next_month_first_day_week = week + (dif_days mod 7)
  356. next_month_first_day_index = length_of_month_field -1 - dif_days
  357. if next_month_first_day_week < 1: next_month_first_day_week += 7
  358. i = 35
  359. :tabmc41
  360. $mk1_mdays[] = '&nbsp' & i -= 1 & if i > 0: jump 'tabmc41'
  361. i = 0
  362. :tabmc41a
  363. $mk1_mdays[i+next_month_first_day_week-1] = $str(i+1)
  364. !! if next_month_first_day_index + i >= 0: $mk1_mdays[i+next_month_first_day_week-1] += $mk_subst[$MenCal[second_month_first_day_index + i]]
  365. i += 1
  366. if i < next_month_length: jump 'tabmc41a'
  367. $next_month_name = $mid($monthName[next_month],1,1) + '<br>' + $mid($monthName[next_month],2,1) + '<br>' + $mid($monthName[next_month],3,1)
  368. k = 0
  369. month_weeks = (next_month_first_day_week + next_month_length + 5)/7 - 1
  370. i = month_weeks
  371. :tabmc42
  372. $tabmc +='<tr>'
  373. j = 7
  374. if i = month_weeks:$tabmc +='<td rowspan="<<month_weeks+1>>" align = "center"><<$next_month_name>></td>'
  375. :tabmc43
  376. if j > 0:
  377. j -=1
  378. if $mk1_mdays[k]='&nbsp':
  379. $tabmc +='<td><<$mk1_mdays[k]>></td>'
  380. else
  381. $tabmc +='<td<<$MenCalCopy[r]>> ><<$mk1_mdays[k]>></td>'
  382. r +=1
  383. end
  384. k +=1
  385. jump 'tabmc43'
  386. end
  387. if i > 0: i -=1 & $tabmc +='</tr>' & jump 'tabmc42'
  388. killvar '$mk1_mdays'
  389. $tabmc += '</tr><table></font></center>'
  390. $tabmc
  391. act 'Back': gt 'restoreposition'
  392. end
  393. !! gs 'shortgs','fonts'
  394. if $ARGS[0] = 'fonts':
  395. if $ARGS[1] = 'refresh':
  396. jump 'fontsloop'
  397. else
  398. $dynamicreturn = $ARGS[1]
  399. $OpenPhraseSave = $ARGS[2]
  400. $ClosePhraseSave = $ARGS[3]
  401. end
  402. gs 'saveposition'
  403. $fontlist[] = 'Lucida' & $fontlist[] = 'Ariel' & $fontlist[] = 'Tahoma' & $fontlist[] = 'Verdana' & $fontlist[] = 'Courier New' & $fontlist[] = 'Courier' & $fontlist[] = 'Georgia' & $fontlist[] = 'Times New Roman' & $fontlist[] = 'Garamond' & $fontlist[] = 'Bookman' & $fontlist[] = 'Times New Roman' & $fontlist[] = 'Times' & $fontlist[] = 'Comic Sans MS' & $fontlist[] = 'Trebuchet MS' & $fontlist[] = 'Impact' & $fontlist[] = 'BankGothic'
  404. $fontcolor[] = 'aqua' & $fontcolor[] = 'black' & $fontcolor[] = 'blue' & $fontcolor[] = 'fuchsia' & $fontcolor[] = 'green' & $fontcolor[] = 'gray' & $fontcolor[] = 'lime' & $fontcolor[] = 'maroon' & $fontcolor[] = 'navy' & $fontcolor[] = 'olive' & $fontcolor[] = 'purple' & $fontcolor[] = 'red' & $fontcolor[] = 'silver' & $fontcolor[] = 'teal' & $fontcolor[] = 'white' & $fontcolor[] = 'yellow'
  405. i = 15
  406. :fontsloop0
  407. if $CurFont = $fontlist[i]: curfont = i
  408. if $CurColor = $fontcolor[i]: curcolor = i
  409. i -= 1
  410. if i > 0: jump 'fontsloop0'
  411. jump 'fontsloop1'
  412. :fontsloop
  413. $OpenPhrase = '<font size="<<CurFontSize>>" color="<<$CurColor>>" face="<<$CurFont>>" >'+$CurBold+$CurItalic
  414. $ClosePhrase = $CurItalicBack+$CurBoldBack+'</font>'
  415. :fontsloop1
  416. *clr & cla
  417. $OpenPhrase+'Current font is <<$CurFont>> Size <<CurFontSize>>, the color is <<$CurColor>>, the Bold is <<iif($CurBold = ''<b>'',''On'',''Off'')>> and Italic is <<iif($CurItalic = ''<i>'',''On'',''Off'')>>'+$ClosePhrase
  418. '<a href="exec: curfont = (curfont + 1) mod 16 & $CurFont = $fontlist[curfont] & gs ''shortgs'',''fonts'',''refresh'' ">Change the Font</a>'
  419. '<a href="exec: curcolor = (curcolor + 1) mod 16 & $CurColor = $fontcolor[curcolor] & gs ''shortgs'',''fonts'',''refresh'' ">Change the Color</a>'
  420. '<a href="exec:$CurBold = iif($CurBold ! ''<b>'',''<b>'','' '') & $CurBoldBack = iif($CurBold = ''<b>'',''</b>'','' '') & gs ''shortgs'',''fonts'',''refresh'' ">Change the BoldState</a>'
  421. '<a href="exec:$CurItalic = iif($CurItalic ! ''<i>'',''<i>'','' '') & $CurItalicBack = iif($CurItalic = ''<i>'',''</i>'','' '') & gs ''shortgs'',''fonts'',''refresh'' ">Change the ItalicState</a>'
  422. '<a href="exec:CurfontSize -= 1 & gs ''shortgs'',''fonts'',''refresh'' ">Decrease the Font</a>&nbsp&nbsp&nbsp<a href="exec:CurfontSize += 1 & gs ''shortgs'',''fonts'',''refresh'' ">Increase the font</a>'
  423. act 'Back':
  424. killvar '$fontlist'
  425. killvar '$fontcolor'
  426. dynamic '<<$OpenPhraseSave>> = $OpenPhrase'
  427. dynamic '<<$ClosePhraseSave>> = $ClosePhrase'
  428. if $dynamicreturn ! '': dynamic 'dynamic <<$dynamicreturn>>'
  429. gt 'restoreposition'
  430. end
  431. end
  432. !! use gs 'shortgs','ncp_update'
  433. if $ARGS[0] = 'ncp_update':
  434. copyarr 'copy_npc_QW','npc_QW'
  435. copyarr 'copy_npc_rel','npc_rel'
  436. copyarr 'copy_npc_love','npc_love'
  437. copyarr '$copy_npc_usedname','$npc_usedname'
  438. gs 'npcstatic1'
  439. gs 'npcstatic2'
  440. gs 'npcstatic3'
  441. gs 'npcstatic4'
  442. gs 'npcstatic5'
  443. i = arrsize('copy_npc_QW')
  444. j = 1
  445. :loopnpcupdate
  446. $boy = 'A<<j>>'
  447. npc_QW[$boy] = copy_npc_QW[$boy]
  448. npc_rel[$boy] = copy_npc_rel[$boy]
  449. npc_love[$boy] = copy_npc_love[$boy]
  450. $npc_usedname[$boy] = $copy_npc_usedname[$boy]
  451. j += 1
  452. if j <= i: jump 'loopnpcupdate'
  453. killvar 'copy_npc_QW'
  454. killvar 'copy_npc_rel'
  455. killvar 'copy_npc_love'
  456. killvar '$copy_npc_usedname'
  457. end
  458. !! this function returns the numeric index of the array element which is indexed by string value.
  459. !! call func('shortgs', 'get_me_index', 'name of array','string index')
  460. !! the array can be both numeric or string: Be aware, for the search is used the value 'SearchTag' for string arrays and -999 for numeric arrays.
  461. !! if the array consists such value, the fuction can mess the array content and return wrong value
  462. if $ARGS[0] = 'get_me_index':
  463. $test = '<<$ARGS[1]>>[''<<$ARGS[2]>>'']'
  464. testas0 = arrsize('<<$ARGS[1]>>')
  465. if $mid($test,1,1)='$':
  466. $temp=dyneval('$result=<<$test>>')
  467. dynamic '<<$test>> = ''SearchTag'' '
  468. testas1 = arrsize('<<$ARGS[1]>>')
  469. if testas0 = testas1:
  470. res = dyneval('result = arrpos(0,''<<$ARGS[1]>>'',''SearchTag'')')
  471. dynamic '<<$test>> = ''<<$temp>>'' '
  472. else
  473. res = -1
  474. killvar '<<$ARGS[1]>>',testas0
  475. end
  476. else
  477. temp=dyneval('result=<<$test>>')
  478. dynamic '<<$test>> = -999'
  479. testas1 = arrsize('<<$ARGS[1]>>')
  480. if testas0 = testas1:
  481. res = dyneval('result = arrpos(0,''<<$ARGS[1]>>'',-999)')
  482. dynamic '<<$test>> = <<temp>>'
  483. else
  484. res = -1
  485. killvar '<<$ARGS[1]>>',testas0
  486. end
  487. end
  488. result = res
  489. end
  490. !! call gs 'shortgs', 'remove_array_element', 'name of array','string index'
  491. if $ARGS[0] = 'remove_array_element':
  492. i = func('shortgs', 'get_me_index', $ARGS[1],$ARGS[2])
  493. killvar '<<$ARGS[1]>>',i
  494. end
  495. if $ARGS[0] = 'testsize':
  496. arrsize('$npc_cur_rel')
  497. arrsize('$npc_dad')
  498. arrsize('$npc_dna')
  499. arrsize('$npc_firstname')
  500. arrsize('$npc_firstpart')
  501. arrsize('$npc_kidpater')
  502. arrsize('$npc_lastname')
  503. arrsize('$npc_lastpart')
  504. arrsize('$npc_mom')
  505. arrsize('$npc_nickname')
  506. arrsize('$npc_notes')
  507. arrsize('$npc_orgasm_txt')
  508. arrsize('$npc_PersType')
  509. arrsize('$npc_pic')
  510. arrsize('$npc_rel')
  511. arrsize('$npc_thdick')
  512. arrsize('$npc_usedname')
  513. arrsize('npc_agil')
  514. arrsize('npc_app')
  515. arrsize('npc_apprnc')
  516. arrsize('npc_ass')
  517. arrsize('npc_bodyhair')
  518. arrsize('npc_breath')
  519. arrsize('npc_bust')
  520. arrsize('npc_cloc')
  521. arrsize('npc_clothpref')
  522. arrsize('npc_cyc')
  523. arrsize('npc_dance')
  524. arrsize('npc_danceero')
  525. arrsize('npc_def')
  526. arrsize('npc_dick')
  527. arrsize('npc_dnc')
  528. arrsize('npc_dob')
  529. arrsize('npc_dom')
  530. arrsize('npc_drunk')
  531. arrsize('npc_dye')
  532. arrsize('npc_erodnc')
  533. arrsize('npc_eyecol')
  534. arrsize('npc_eyesize')
  535. arrsize('npc_fat')
  536. arrsize('npc_fert')
  537. arrsize('npc_gender')
  538. arrsize('npc_genwart')
  539. arrsize('npc_glasses')
  540. arrsize('npc_Godrep')
  541. arrsize('npc_gon')
  542. arrsize('npc_grades')
  543. arrsize('npc_hair')
  544. arrsize('npc_hairbsh')
  545. arrsize('npc_haircol')
  546. arrsize('npc_haircurl')
  547. arrsize('npc_hairlng')
  548. arrsize('npc_herpes')
  549. arrsize('npc_hgt')
  550. arrsize('npc_hipcurv')
  551. arrsize('npc_Hiv')
  552. arrsize('npc_horny')
  553. arrsize('npc_hymen')
  554. arrsize('npc_chem')
  555. arrsize('npc_chess')
  556. arrsize('npc_chlam')
  557. arrsize('npc_int')
  558. arrsize('npc_intel')
  559. arrsize('npc_jab')
  560. arrsize('npc_job')
  561. arrsize('npc_kick')
  562. arrsize('npc_lashes')
  563. arrsize('npc_lip')
  564. arrsize('npc_lipbalm')
  565. arrsize('npc_lipstick')
  566. arrsize('npc_love')
  567. arrsize('npc_mag')
  568. arrsize('npc_magik')
  569. arrsize('npc_makeup')
  570. arrsize('npc_malen')
  571. arrsize('npc_nerd')
  572. arrsize('npc_nips')
  573. arrsize('npc_orgasm_txt')
  574. arrsize('npc_pantys')
  575. arrsize('npc_Pavrep')
  576. arrsize('npc_pubes')
  577. arrsize('npc_punch')
  578. arrsize('npc_Qstlvl')
  579. arrsize('npc_QW')
  580. arrsize('npc_rel')
  581. arrsize('npc_run')
  582. arrsize('npc_serve')
  583. arrsize('npc_serving')
  584. arrsize('npc_sew')
  585. arrsize('npc_sewing')
  586. arrsize('npc_sex')
  587. arrsize('npc_sexskill')
  588. arrsize('npc_shoot')
  589. arrsize('npc_sing')
  590. arrsize('npc_skin')
  591. arrsize('npc_spermpot')
  592. arrsize('npc_spirit')
  593. arrsize('npc_sprt')
  594. arrsize('npc_str')
  595. arrsize('npc_stren')
  596. arrsize('npc_sub')
  597. arrsize('npc_sweat')
  598. arrsize('npc_syph')
  599. arrsize('npc_syth')
  600. arrsize('npc_tan')
  601. arrsize('npc_teach')
  602. arrsize('npc_thrush')
  603. arrsize('npc_undies')
  604. arrsize('npc_vag')
  605. arrsize('npc_vball')
  606. arrsize('npc_vit')
  607. arrsize('npc_vital')
  608. arrsize('npc_vokal')
  609. arrsize('npcbrokehymen')
  610. end
  611. if $ARGS[0] = 'replace header':
  612. wait(ARGS[1])
  613. RH_Count = ARGS[2]
  614. $RH_temp = $MAINTXT
  615. :RH_label
  616. RH_temp_lenght = LEN($RH_temp)
  617. RH_temp_LFpos = STRPOS($RH_temp,'\n')
  618. $RH_temp = $MID($RH_temp, RH_temp_LFpos+1, RH_temp_lenght - RH_temp_LFpos)
  619. RH_Count -=1
  620. if RH_Count > 0: jump 'RH_label'
  621. *clr
  622. $ARGS[3] & $ARGS[4] & $ARGS[5] & $ARGS[6] & $ARGS[7]
  623. $RH_temp
  624. killvar '$RH_temp'
  625. killvar 'RH_Count'
  626. killvar 'RH_temp_lenght'
  627. killvar 'RH_temp_LFpos'
  628. end
  629. if $ARGS[0]='img msg':
  630. $shortgstemp = '<center><img height=280 src="<<$ARGS[1]>>"></center>'
  631. msg $shortgstemp
  632. killvar '$shortgstemp'
  633. end
  634. --- shortgs ---------------------------------