shortgs.qsrc 22 KB

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