shortgs 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480
  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. 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_energy < 80: pcs_energy += 4
  17. gs '$menu_obnovit'
  18. end &!--- smoker ---
  19. !! milk_me
  20. !! use href="exec:gt ''shortgs'',''milk_me''"
  21. if $ARGS[0] = 'milk_me':
  22. minut += 15
  23. if $location_type ! 'bathroom':
  24. 'You can''t use it here.'
  25. elseif lactatemv > 0 and pain['nipples'] < 60:
  26. '<center><img <<$set_imgh>> src="images/pc/body/tits/pump_lactating.jpg"></center>'
  27. 'You attach the pump to your breast and start rythmically squeezing the bulb until your breasts feel empty.<br>You give it a few more pumps and detach the pump.<br>You filled the bottle with <<lactatemv/10>>ml of your milk.'
  28. breastcounter += 1
  29. lactatemv = 0
  30. if breastpumped = 1:pain['nipples'] += 10 & 'Your nipples are feeling sore.'
  31. breastpumped = 1
  32. pcs_nips += rand(0,1)
  33. if bcream_used = 1:pcs_nips += 1
  34. elseif lactate = 0 and pain['nipples'] < 60:
  35. if rand(1,100) + breastcounter >= rand(100,200):
  36. '<center><img <<$set_imgh>> src="images/pc/body/tits/lactate_start.jpg"></center>'
  37. 'As usual, you attach the pump but after a few pumps white liquid suddenly starts spurting from your nipples.<br>You started lactating!'
  38. lactate = 1
  39. lactatemv = 0
  40. lactatemm = 100
  41. else
  42. '<center><img <<$set_imgh>> src="images/pc/body/tits/t<<tits>>.jpg"></center>'
  43. 'You attach the pump to your nipples and start squeezing the bulb. The vacuum feels good on your nipples.<br>A few droplets of liquid come out of your nipples but it is not milk.'
  44. breastcounter += 1
  45. if breastpumped = 1:pain['nipples'] += 10 & 'Your nipples are feeling sore.'
  46. breastpumped = 1
  47. pcs_nips += rand(0,1)
  48. if bcream_used = 1:pcs_nips += 1
  49. end
  50. else
  51. 'Your nipples feel too sore to use the pump right now.'
  52. end
  53. act 'Finish':gt $loc, $metka
  54. end &! --- milk_me ---
  55. !! following function counts the number of guys which PC slept with.
  56. !! use func('shortgs','guy') or func('shortgs','guy',X) for subset (X can be 'A','B','C','AB','AC','BC')
  57. if $ARGS[0] = 'guy':
  58. r_sht=0
  59. if $ARGS[1] = '': $temptask = 'ABC' else $temptask = $ARGS[1]
  60. :loop_shtty
  61. $temptaskchar = mid($temptask,1,1)
  62. $temptask = mid($temptask,2,len($temptask)-1)
  63. s_sht=0
  64. :loop_shya
  65. if s_sht<=dyneval("result = <<$temptaskchar>>arraynumber"):
  66. s_sht += 1
  67. if npc_sex['<<$temptaskchar>><<s_sht>>'] > 0: r_sht = r_sht + iif(npc_gender['<<$temptaskchar>><<s_sht>>'] = 0,1,0)
  68. jump 'loop_shya'
  69. end
  70. if len($temptask) > 0:jump 'loop_shtty'
  71. result = r_sht
  72. killvar 'r_sht'
  73. killvar '$temptask'
  74. killvar '$temptaskchar'
  75. killvar 's_sht'
  76. end &! --- guy ---
  77. !! following function counts the number of girls which PC slept with.
  78. !! use func('shortgs','girl') or func('shortgs','girl',X) for subset (X can be 'A','B','C','AB','AC','BC')
  79. if $ARGS[0] = 'girl':
  80. r_sht=0
  81. if $ARGS[1] = '': $temptask = 'ABC' else $temptask = $ARGS[1]
  82. :loop_shttl
  83. $temptaskchar = mid($temptask,1,1)
  84. $temptask = mid($temptask,2,len($temptask)-1)
  85. s_sht=0
  86. :loop_shl
  87. if s_sht<=dyneval("result = <<$temptaskchar>>arraynumber"):
  88. s_sht += 1
  89. if npc_sex['<<$temptaskchar>><<s_sht>>'] > 0: r_sht = r_sht + iif(npc_gender['<<$temptaskchar>><<s_sht>>'] = 1,1,0)
  90. jump 'loop_shl'
  91. end
  92. if len($temptask) > 0: jump 'loop_shttl'
  93. result = r_sht
  94. killvar 'r_sht'
  95. killvar '$temptask'
  96. killvar '$temptaskchar'
  97. killvar 's_sht'
  98. end &! --- girl ---
  99. !! following procedure should be used when PC gets naked, but it should be paired with the reverse procedure
  100. !! use gs 'shortgs','undress'
  101. if $ARGS[0] = 'undress':
  102. gs 'clothing','strip'
  103. gs 'underwear', 'remove'
  104. end &! --- undress ---
  105. !! reverse procedure, it can be modified for lose or stolen panties later.
  106. !! use gs 'shortgs','dress'
  107. if $ARGS[0] = 'dress':
  108. gs 'clothing','wear_last_worn'
  109. gs 'underwear', 'wear'
  110. end &! --- dress ---
  111. !! procedure, which prevents PC to leave a room naked.
  112. !! use gs 'shortgs','checkdress',' <<$loc>>,<<$metka>> ' or equivalent
  113. if $ARGS[0] = 'checkdress':
  114. if $clothingworntype = 'nude':
  115. msg '<b><font color="red">You need to get dressed before going out.</font></b>'
  116. dynamic 'gt <<$ARGS[1]>>'
  117. end
  118. end &! --- checkdress ---
  119. !! this is an integer sqrt function
  120. !! call func('shortgs','sqrt', n)
  121. if $ARGS[0] = 'sqrt':
  122. sqrtnum = ARGS[1]
  123. if sqrtnum = 0: result = 0 & exit
  124. sqrtn = sqrtnum/2 + 1
  125. sqrtn1 = (sqrtn + sqrtnum / sqrtn) / 2
  126. :sqrtloop
  127. if sqrtn1 < sqrtn:
  128. sqrtn = sqrtn1
  129. sqrtn1 = (sqrtn + sqrtnum / sqrtn) / 2
  130. jump 'sqrtloop'
  131. end
  132. result = sqrtn
  133. end
  134. !! this function calculates modul of given arguments as it was coordinates in cartezian systeme
  135. !! use func('shortgs','modul',n1,n2,..n8)
  136. if $ARGS[0] = 'modul':
  137. 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]
  138. result = func('shortgs','sqrt',modul_sum)
  139. killvar 'modul_sum'
  140. end
  141. !! day of week 1 - Monday .. 7 - Sunday
  142. if $ARGS[0] = 'dow':
  143. dow_a = (14 - month) / 12
  144. dow_Y = year - dow_a
  145. dow_M = month + 12*dow_a - 2
  146. dummy = (day + dow_y + dow_y/4 - dow_y/100 + dow_y/400 + (31*dow_m)/12) mod 7
  147. if dummy = 0: dummy = 7
  148. result = dummy
  149. end
  150. !! day of year
  151. !! use xdoy = func('shortgs','doy',year,month,day)
  152. if $ARGS[0] = 'doy':
  153. doy_N1 = 275 * ARGS[2] / 9
  154. doy_N2 = (ARGS[2] + 9) / 12
  155. doy_N3 = 1 + (ARGS[1] - 4 * (ARGS[1] / 4) + 2) / 3
  156. result = doy_N1 - (doy_N2 * doy_N3) + ARGS[3] - 30
  157. end
  158. if $ARGS[0] = 'mk1':
  159. gs 'saveposition'
  160. *clr & cla
  161. $mk_subst['0'] = 'M' & $mk_subst['1'] = 'F' & $mk_subst['2'] = 'O' & $mk_subst['3'] = 'L' & $mk_subst['4'] = 'R' & $mk_subst['5'] = 'P'
  162. '<center><font face="courier" size=1>'
  163. '<table border = 1>'
  164. '<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>
  165. <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>'
  166. i = ArrSize('$MenCal')
  167. empty0 = week + 29 - i - 1
  168. empty1 = min(28,empty0)
  169. full1 = max(0,28 - empty0)
  170. empty2 = max(0,empty0-28)
  171. full2 = i - full1
  172. empty3 = 28 - empty2 - full2
  173. count=0
  174. $tabmc = '<tr>'
  175. :tabmcl1
  176. if empty1 > 0: empty1 -=1 & $tabmc +='<td>&nbsp</td>' & jump 'tabmcl1'
  177. :tabmcl2
  178. if full1 > 0:
  179. full1 -=1
  180. if $MenCal[count]='0': $tabmc +='<td bgcolor="red"><<$mk_subst[$MenCal[count]]>></td>' else $tabmc +='<td><<$mk_subst[$MenCal[count]]>></td>'
  181. count +=1
  182. jump 'tabmcl1'
  183. end
  184. $tabmc += '</tr><tr>'
  185. :tabmcl3
  186. if empty2 > 0: empty2 -=1 & $tabmc +='<td>&nbsp</td>' & jump 'tabmcl3'
  187. :tabmcl4
  188. if full2 > 0:
  189. full2 -=1
  190. if $MenCal[count]='0': $tabmc +='<td bgcolor="red"><<$mk_subst[$MenCal[count]]>></td>' else $tabmc +='<td><<$mk_subst[$MenCal[count]]>></td>'
  191. count +=1
  192. jump 'tabmcl4'
  193. end
  194. :tabmcl5
  195. if empty3 > 0: empty3 -=1 & $tabmc +='<td></td>' & jump 'tabmcl5'
  196. $tabmc += '</tr><table></font></center>'
  197. $tabmc
  198. act 'Back': gt 'restoreposition'
  199. end
  200. !! use gs 'shortgs','mk'
  201. if $ARGS[0] = 'mk':
  202. gs 'saveposition'
  203. *clr & cla
  204. copyarr '$MenCalCopy','$MenCal'
  205. length_of_month_field = arrsize('$MenCalCopy')
  206. if daystart - firstmens > 40:
  207. mensnotfound = 1
  208. i = 0
  209. :tabmcfm
  210. if $MenCalCopy[length_of_month_field-i] = '0' and $MenCalCopy[length_of_month_field-i-1] = '3': mensnotfound = 0
  211. i += 1
  212. if i < length_of_month_field and mensnotfound = 1: jump 'tabmcfm'
  213. if mensnotfound = 0:
  214. firstmens = daystart - i + 1
  215. end
  216. end
  217. i=1
  218. :tabmcc1
  219. if daystart - firstmens < 40:
  220. if (daystart - firstmens + i) = 28:
  221. $MenCalCopy[] = ' bgcolor="#df2020"'
  222. elseif (daystart - firstmens + i) = 29:
  223. $MenCalCopy[] = ' bgcolor="#df3030"'
  224. elseif (daystart - firstmens + i) = 30:
  225. $MenCalCopy[] = ' bgcolor="#df4040"'
  226. elseif (daystart - firstmens + i) = 12:
  227. $MenCalCopy[] = ' bgcolor="#d8ff00"'
  228. elseif (daystart - firstmens + i) = 13:
  229. $MenCalCopy[] = ' bgcolor="#d0ff00"'
  230. elseif (daystart - firstmens + i) = 14:
  231. $MenCalCopy[] = ' bgcolor="#c8ff00"'
  232. elseif (daystart - firstmens + i) = 15:
  233. $MenCalCopy[] = ' bgcolor="#c0ff00"'
  234. elseif (daystart - firstmens + i) = 16:
  235. $MenCalCopy[] = ' bgcolor="#d0ff00"'
  236. elseif (daystart - firstmens + i) = 12+28:
  237. $MenCalCopy[] = ' bgcolor="#d8ff00"'
  238. elseif (daystart - firstmens + i) = 13+28:
  239. $MenCalCopy[] = ' bgcolor="#d0ff00"'
  240. elseif (daystart - firstmens + i) = 14+28:
  241. $MenCalCopy[] = ' bgcolor="#c8ff00"'
  242. elseif (daystart - firstmens + i) = 15+28:
  243. $MenCalCopy[] = ' bgcolor="#c0ff00"'
  244. elseif (daystart - firstmens + i) = 16+28:
  245. $MenCalCopy[] = ' bgcolor="#d0ff00"'
  246. else
  247. $MenCalCopy[] = ''
  248. end
  249. i += 1
  250. if i < 40: jump 'tabmcc1'
  251. end
  252. i = length_of_month_field
  253. :tabmcc2
  254. if i > 0:
  255. if $MenCalCopy[i-1] = '2' and i = 1 : $MenCalCopy[i-1] = ' bgcolor="#c0ff00"'
  256. if $MenCalCopy[i-1] = '2' and $MenCalCopy[i-2] = '2': $MenCalCopy[i-1] = ' bgcolor="#c0ff00"'
  257. 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"'
  258. if $MenCalCopy[i-1] = '1' and (daystart - firstmens - length_of_month_field + i) < 12: $MenCalCopy[i-1] =''
  259. if $MenCalCopy[i-1] = '1' and (daystart - firstmens - length_of_month_field + i) = 12: $MenCalCopy[i-1] =' bgcolor="#b0ff00"'
  260. if $MenCalCopy[i-1] = '1' and (daystart - firstmens - length_of_month_field + i) = 13: $MenCalCopy[i-1] =' bgcolor="#a0ff00"'
  261. if $MenCalCopy[i-1] = '1' and (daystart - firstmens - length_of_month_field + i) = 14: $MenCalCopy[i-1] =' bgcolor="#90ff00"'
  262. if $MenCalCopy[i-1] = '1' and (daystart - firstmens - length_of_month_field + i) = 15: $MenCalCopy[i-1] =' bgcolor="#80ff00"'
  263. if $MenCalCopy[i-1] = '1' and (daystart - firstmens - length_of_month_field + i) > 15: $MenCalCopy[i-1] =''
  264. if $MenCalCopy[i-1] = '0': $MenCalCopy[i-1] =' bgcolor="#df2020"'
  265. if $MenCalCopy[i-1] = '3': $MenCalCopy[i-1] =''
  266. if $MenCalCopy[i-1] = '4': $MenCalCopy[i-1] =''
  267. if $MenCalCopy[i-1] = '5': $MenCalCopy[i-1] =''
  268. i -= 1
  269. jump 'tabmcc2'
  270. end
  271. cur_day_doy = func('shortgs','doy',year,month,day)
  272. if month = 1:
  273. dif_days = cur_day_doy + 30
  274. prev_month = 12
  275. prev_month_length = 31
  276. else
  277. prev_month = month - 1
  278. dif_days = cur_day_doy - func('shortgs','doy',year,prev_month,1)
  279. prev_month_length = func('shortgs','doy',year,month,1) - func('shortgs','doy',year,prev_month,1)
  280. end
  281. first_month_first_day_week = week - (dif_days mod 7)
  282. first_month_first_day_index = length_of_month_field -1 - dif_days
  283. r = first_month_first_day_index
  284. if first_month_first_day_week < 1: first_month_first_day_week += 7
  285. i = 42
  286. :tabmc21
  287. $mk1_mdays[] = '&nbsp' & i -= 1 & if i > 0: jump 'tabmc21'
  288. i = 0
  289. :tabmc21a
  290. $mk1_mdays[i+first_month_first_day_week-1] = $str(i+1)
  291. i += 1
  292. if i < prev_month_length: jump 'tabmc21a'
  293. $prev_month_name = $mid($monthName[prev_month],1,1) + '<br>' + $mid($monthName[prev_month],2,1) + '<br>' + $mid($monthName[prev_month],3,1)
  294. k = 0
  295. $tabmc ='<center><font face="courier" size=5>'
  296. $tabmc +='<table border = 1 cellspacing="0" cellpadding="5">'
  297. $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>'
  298. month_weeks = (first_month_first_day_week + prev_month_length + 5)/7 - 1
  299. i = month_weeks
  300. :tabmc22
  301. $tabmc +='<tr>'
  302. j = 7
  303. if i = month_weeks:$tabmc +='<td rowspan="<<month_weeks+1>>" align = "center"><<$prev_month_name>></td>'
  304. :tabmc23
  305. if j > 0:
  306. j -=1
  307. if $mk1_mdays[k]='&nbsp':
  308. $tabmc +='<td><<$mk1_mdays[k]>></td>'
  309. else
  310. $tabmc +='<td<<$MenCalCopy[r]>> ><<$mk1_mdays[k]>></td>'
  311. r +=1
  312. end
  313. k +=1
  314. jump 'tabmc23' & !<<$MenCalCopy[r]>>
  315. end
  316. if i > 0: i -=1 & $tabmc +='</tr>' & jump 'tabmc22'
  317. killvar '$mk1_mdays'
  318. killvar '$mk1_mdays_color'
  319. !! current month
  320. if month = 12:
  321. dif_days = day - 1
  322. cur_month = month
  323. cur_month_length = 31
  324. else
  325. dif_days = day - 1
  326. cur_month_length = func('shortgs','doy',year,month+1,1) - func('shortgs','doy',year,month,1)
  327. end
  328. second_month_first_day_week = week - (dif_days mod 7)
  329. second_month_first_day_index = length_of_month_field -1 - dif_days
  330. if second_month_first_day_week < 1: second_month_first_day_week += 7
  331. i = 42
  332. :tabmc31
  333. $mk1_mdays[] = '&nbsp' & i -= 1 & if i > 0: jump 'tabmc31'
  334. i = 0
  335. :tabmc31a
  336. $mk1_mdays[i+second_month_first_day_week-1] = $str(i+1)
  337. i += 1
  338. if i < cur_month_length: jump 'tabmc31a'
  339. $cur_month_name = $mid($monthName[month],1,1) + '<br>' + $mid($monthName[month],2,1) + '<br>' + $mid($monthName[month],3,1)
  340. k = 0
  341. month_weeks = (second_month_first_day_week + cur_month_length + 5)/7 - 1
  342. i = month_weeks
  343. :tabmc32
  344. $tabmc +='<tr>'
  345. j = 7
  346. if i = month_weeks:$tabmc +='<td rowspan="<<month_weeks+1>>" align = "center"><<$cur_month_name>></td>'
  347. :tabmc33
  348. if j > 0:
  349. j -=1
  350. if $mk1_mdays[k]='&nbsp':
  351. $tabmc +='<td><<$mk1_mdays[k]>></td>'
  352. else
  353. 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>'
  354. r +=1
  355. end
  356. k +=1
  357. jump 'tabmc33'
  358. end
  359. if i > 0: i -=1 & $tabmc +='</tr>' & jump 'tabmc32'
  360. killvar '$mk1_mdays'
  361. killvar '$mk1_mdays_color'
  362. !! next month
  363. if month = 12:
  364. dif_days = 31 - day + 1
  365. next_month = 1
  366. next_month_length = 31
  367. elseif month = 11:
  368. dif_days = 30 - day + 1
  369. next_month = 12
  370. next_month_length = 31
  371. else
  372. next_month = month + 1
  373. dif_days = cur_month_length - day + 1
  374. next_month_length = func('shortgs','doy',year,month+2,1) - func('shortgs','doy',year,month+1,1)
  375. end
  376. next_month_first_day_week = week + (dif_days mod 7)
  377. next_month_first_day_index = length_of_month_field -1 - dif_days
  378. if next_month_first_day_week < 1: next_month_first_day_week += 7
  379. i = 35
  380. :tabmc41
  381. $mk1_mdays[] = '&nbsp' & i -= 1 & if i > 0: jump 'tabmc41'
  382. i = 0
  383. :tabmc41a
  384. $mk1_mdays[i+next_month_first_day_week-1] = $str(i+1)
  385. !! 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]]
  386. i += 1
  387. if i < next_month_length: jump 'tabmc41a'
  388. $next_month_name = $mid($monthName[next_month],1,1) + '<br>' + $mid($monthName[next_month],2,1) + '<br>' + $mid($monthName[next_month],3,1)
  389. k = 0
  390. month_weeks = (next_month_first_day_week + next_month_length + 5)/7 - 1
  391. i = month_weeks
  392. :tabmc42
  393. $tabmc +='<tr>'
  394. j = 7
  395. if i = month_weeks:$tabmc +='<td rowspan="<<month_weeks+1>>" align = "center"><<$next_month_name>></td>'
  396. :tabmc43
  397. if j > 0:
  398. j -=1
  399. if $mk1_mdays[k]='&nbsp':
  400. $tabmc +='<td><<$mk1_mdays[k]>></td>'
  401. else
  402. $tabmc +='<td<<$MenCalCopy[r]>> ><<$mk1_mdays[k]>></td>'
  403. r +=1
  404. end
  405. k +=1
  406. jump 'tabmc43'
  407. end
  408. if i > 0: i -=1 & $tabmc +='</tr>' & jump 'tabmc42'
  409. killvar '$mk1_mdays'
  410. $tabmc += '</tr><table></font></center>'
  411. $tabmc
  412. act 'Back': gt 'restoreposition'
  413. end
  414. !! gs 'shortgs','fonts'
  415. if $ARGS[0] = 'fonts':
  416. if $ARGS[1] = 'refresh':
  417. jump 'fontsloop'
  418. else
  419. $dynamicreturn = $ARGS[1]
  420. $OpenPhraseSave = $ARGS[2]
  421. $ClosePhraseSave = $ARGS[3]
  422. end
  423. gs 'saveposition'
  424. $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'
  425. $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'
  426. i = 15
  427. :fontsloop0
  428. if $CurFont = $fontlist[i]: curfont = i
  429. if $CurColor = $fontcolor[i]: curcolor = i
  430. i -= 1
  431. if i > 0: jump 'fontsloop0'
  432. jump 'fontsloop1'
  433. :fontsloop
  434. $OpenPhrase = '<font size="<<CurFontSize>>" color="<<$CurColor>>" face="<<$CurFont>>" >'+$CurBold+$CurItalic
  435. $ClosePhrase = $CurItalicBack+$CurBoldBack+'</font>'
  436. :fontsloop1
  437. *clr & cla
  438. $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
  439. '<a href="exec: curfont = (curfont + 1) mod 16 & $CurFont = $fontlist[curfont] & gs ''shortgs'',''fonts'',''refresh'' ">Change the Font</a>'
  440. '<a href="exec: curcolor = (curcolor + 1) mod 16 & $CurColor = $fontcolor[curcolor] & gs ''shortgs'',''fonts'',''refresh'' ">Change the Color</a>'
  441. '<a href="exec:$CurBold = iif($CurBold ! ''<b>'',''<b>'','' '') & $CurBoldBack = iif($CurBold = ''<b>'',''</b>'','' '') & gs ''shortgs'',''fonts'',''refresh'' ">Change the BoldState</a>'
  442. '<a href="exec:$CurItalic = iif($CurItalic ! ''<i>'',''<i>'','' '') & $CurItalicBack = iif($CurItalic = ''<i>'',''</i>'','' '') & gs ''shortgs'',''fonts'',''refresh'' ">Change the ItalicState</a>'
  443. '<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>'
  444. act 'Back':
  445. killvar '$fontlist'
  446. killvar '$fontcolor'
  447. dynamic '<<$OpenPhraseSave>> = $OpenPhrase'
  448. dynamic '<<$ClosePhraseSave>> = $ClosePhrase'
  449. if $dynamicreturn ! '': dynamic 'dynamic <<$dynamicreturn>>'
  450. gt 'restoreposition'
  451. end
  452. end
  453. --- shortgs ---------------------------------