pav_library.qsrc 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. # pav_library
  2. !2021/10/05
  3. !2023/09/11 Loan update by Anjuna
  4. $loc_arg = ''
  5. $loc = 'pav_library'
  6. $location_type = 'public_indoors'
  7. $menu_loc = 'pav_library'
  8. $menu_arg = ''
  9. menu_off = 0
  10. frost = 0
  11. gs 'stat'
  12. gs 'themes', 'indoors'
  13. '<center><b><font color="maroon">Community center library</font></b></center>'
  14. '<center><img <<$set_imgh>> src="images/locations/pavlovsk/community/library/gdkbibl.jpg"></center>'
  15. 'For such a small town, the library is surprisingly large, containing many interesting books on a wide variety of subjects.'
  16. 'Between the bookshelves are some tables which can be used for studying. Some of them have <a href="exec: gs ''internet_mobile'', ''get_access'', ''free'', ''noporn'',''nocamshow'' & gs ''internet_mobile'', ''add_limitation'', ''general-text'', ''On this public computer all adult content sites are blocked'' & gt ''Komp'',''start''">computers</a> for public use.'
  17. if lernHome > 0:
  18. 'You could do your homework with the help of one of the computers.'
  19. end
  20. if mid($start_type,1,2) = 'sg' and kanikuli = 0 and week < 6 and nerdstudynight['day'] ! daystart and hour > 14:
  21. 'The nerds are sitting at a table studying together.'
  22. end
  23. if mid($start_type,1,2) = 'sg' and kanikuli = 0 and week > 5 and hour >= 12 and hour < 14:
  24. if nataliaQW['library_day_check'] ! daystart:
  25. nataliaQW['library_day_check'] = daystart
  26. if rand(0,3) = 0: nataliaQW['library_day'] = daystart
  27. end
  28. if nataliaQW['library_day'] = daystart:
  29. 'You see your classmate <a href="exec: gt ''natalia_pavlova'',''library''">Natalia Pavlova</a> .'
  30. end
  31. end
  32. act 'Leave': gt 'pav_commcenter'
  33. act 'Go to the toilets': gt 'gdktoilet', 'start'
  34. if nerd_game['game_day'] = daystart and hour = 19: act 'Wait for game night to start': minut += 60-minut & gt 'pav_library'
  35. if nerd_game['game_day'] = daystart and hour = 20: act 'Join the nerds': gt 'nerd_game_night', 'game'
  36. killvar '$downlibrary'
  37. $downlibrary['read'] = {
  38. *clr & cla
  39. menu_off = 1
  40. if blizoruk = 500 or glassqw = 1:
  41. glassqw = 1
  42. msg ' The text blurs across the page. It seems you have poor eyesight. Maybe you should visit an ophthalmologist?'
  43. gt 'pav_library'
  44. end
  45. if pcs_nerd > 0:
  46. lastread = totminut
  47. lastreadday = daystart
  48. pcs_nerd += 1
  49. end
  50. minut += 60
  51. blizoruk += 1
  52. }
  53. if hour >= 8 and hour < 18:
  54. act 'Read a book':
  55. gt 'pav_library', 'read'
  56. end
  57. act 'Borrow a book':
  58. gt 'pav_library', 'loan'
  59. end
  60. act 'Study for an hour':
  61. dynamic $downlibrary['read']
  62. lern += rand(1,3)
  63. grupvalue[3] += 2
  64. gs 'stat'
  65. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/learning' + rand(1,3) + '.jpg"></center>'
  66. 'You read several books that should help you with your school work, you feel that you learned something today.'
  67. act 'Put the book back': gt 'pav_library'
  68. end
  69. gs 'willpower', 'chore', 'self', iif(grupTipe = 4 and pcs_traits['nerd_status'] = 0, 'hard', iif(pcs_traits['nerd_status'] > 0, 'easy', 'medium'))
  70. if pcs_traits['nerd_status'] = 2: will_cost = will_cost / 2
  71. if lernHome > 0 and (will_cost <= pcs_willpwr or pcs_traits['nerd_status'] = 3):
  72. act 'Do your homework (1:00'+iif(pcs_traits['nerd_status'] = 3, '', ' and <<will_cost>> Willpower')+')':
  73. cla & *clr
  74. '<center><img <<$set_imgh>> src="images/locations/pavlovsk/community/library/homework.jpg"></center>'
  75. minut += 60
  76. pcs_mood += 5 * pcs_traits['nerd_status']
  77. lern += 1
  78. gs 'willpower', 'chore', 'self', iif(grupTipe = 4, 'hard', iif(pcs_traits['nerd_status'] > 0, 'easy', 'medium'))
  79. if pcs_traits['nerd_status'] = 2: will_cost = will_cost / 2
  80. if pcs_traits['nerd_status'] < 3: gs 'willpower', 'pay', 'self'
  81. gs 'stat'
  82. gs 'grades', 'homework', 'school', 'yes', 1, 0, 0
  83. 'You sit down at one of the tables with a a computer and use it to help you do your homework.'
  84. 'After an hour, you''ve '+iif(lernHome = 0, 'completed', 'done a part of')+' your homework.'
  85. act 'Get up from the table': gt 'pav_library'
  86. end
  87. elseif lernHome > 0 and will_cost > pcs_willpwr:
  88. act 'Do your homework (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
  89. end
  90. if mid($start_type,1,2) = 'sg' and kanikuli = 0 and week < 6 and nerdstudynight['day'] ! daystart and hour > 14:
  91. act 'Join the nerd''s study group': gt 'pav_library_nerdstudy', 'nerd_study_night'
  92. end
  93. else
  94. 'The library is closed.'
  95. end
  96. if $ARGS[0] = 'read':
  97. cla
  98. act 'Read a book on science (1:00)':
  99. dynamic $downlibrary['read']
  100. gs 'exp_gain', 'intel', rand(3,6) + (mentats_dose - rand(0,mentats_dose))
  101. grupvalue[3] +=1
  102. gs 'stat'
  103. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/science1.jpg"></center>'
  104. 'You spend an hour reading, trying to make sense of all the clever propositions written inside and understand the subject it describes.'
  105. act 'Put the book back': gt 'pav_library', 'read'
  106. end
  107. act 'Read an adventure novel (1:00)':
  108. dynamic $downlibrary['read']
  109. pcs_mood = 100
  110. grupvalue[3] +=1
  111. gs 'stat'
  112. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/fiction' + rand(1,2) + '.jpg"></center>'
  113. 'You spend an hour reading an adventure novel, immersing yourself in daring deeds and awesome twists.'
  114. act 'Put the book back': gt 'pav_library', 'read'
  115. end
  116. act 'Read a fantasy novel (1:00)':
  117. dynamic $downlibrary['read']
  118. pcs_mood = 100
  119. grupvalue[3] += 1
  120. gs 'stat'
  121. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/fantasy' + rand(1,9) + '.jpg"></center>'
  122. 'You spend an hour reading a fantasy novel, rescuing damsels from dragons, digging for jewels with dwarves and performing word changing magic alongside elves and druids.'
  123. act 'Put the book back': gt 'pav_library', 'read'
  124. end
  125. act 'Read a science fiction novel (1:00)':
  126. dynamic $downlibrary['read']
  127. pcs_mood = 100
  128. grupvalue[3] += 1
  129. gs 'stat'
  130. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/scifi' + rand(1,6) + '.jpg"></center>'
  131. 'You spend an hour reading a science fiction novel - flying off into space, travelling though time, running from rogue AI and creating monsters with your hunchbacked assistant.'
  132. act 'Put the book back': gt 'pav_library', 'read'
  133. end
  134. act 'Read a romance novel (1:00)':
  135. dynamic $downlibrary['read']
  136. pcs_mood = 100
  137. pcs_horny += 20
  138. gs 'stat'
  139. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/romance' + rand(1,20) + '.jpg"></center>'
  140. 'You spend a very short hour reading a romance novel - choosing between a vampire or a werewolf, falling in love with an obscenely wealthy Grey... Several of the scenes are very steamy and you find yourself getting quite aroused.'
  141. act 'Put the book back': gt 'pav_library', 'read'
  142. end
  143. temp = pcs_intel * 2 + pcs_sprt
  144. if temp < 100:
  145. $diff = 'hard'
  146. elseif temp < 150:
  147. $diff = 'medium'
  148. else
  149. $diff = 'easy'
  150. end
  151. gs 'willpower', 'misc', 'self', $diff
  152. if will_cost <= pcs_willpwr:
  153. act 'Read from the collected works of Leo Tolstoy (1:00) (<<will_cost>> Willpower)':
  154. gs 'willpower', 'pay', 'self'
  155. killvar 'will_cost'
  156. dynamic $downlibrary['read']
  157. gs 'exp_gain', 'sprt', rand(3,6)
  158. grupvalue[3] += 2
  159. gs 'stat'
  160. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/tolstoy.jpg"></center>'
  161. 'You read the book for an hour. Tolstoy is certainly a classic writer, but he used a <i>lot</i> of words.'
  162. act 'Put the book back': gt 'pav_library', 'read'
  163. end
  164. else
  165. act 'Read from the collected works of Leo Tolstoy (1:00) (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
  166. end
  167. act 'Go back': gt 'pav_library'
  168. end
  169. if $ARGS[0] = 'loan':
  170. cla
  171. if $lib_book_loaned ! '':
  172. 'You''ve currently borrowed a <<$lib_book_loaned>>.'
  173. if lib_debt <= 0:
  174. temp_loan_days_left = lib_debt / -50
  175. 'You have <<temp_loan_days_left>> days left before you need to return it.'
  176. else
  177. '<font color="red">Your book is overdue!</font>'
  178. end
  179. act 'Return your loaned book':
  180. if lib_book_read = 0:
  181. if $lib_book_loaned = 'fantasy': f_book -= 1
  182. elseif lib_book_read = 1:
  183. if $lib_book_loaned = 'fantasy': fantasybook = 0
  184. end
  185. $lib_book_loaned = ''
  186. if lib_debt <= 0: lib_debt = 0
  187. lib_book_read = 0
  188. gt 'pav_library'
  189. end
  190. act 'Go back': gt 'pav_library'
  191. end
  192. if lib_debt > 0:
  193. 'You''ve owe an outstanding debt of <<lib_debt>> <b>₽</b> to the library.'
  194. if pcs_money >= lib_debt:
  195. act 'Pay your debt':
  196. pcs_money -= lib_debt
  197. lib_debt = 0
  198. gt 'pav_library', 'Pay_debt'
  199. end
  200. else
  201. act '<font color="red">Pay your debt</font>': '<br><font color="red">You don''t have enough money to pay your debt.</font>'
  202. end
  203. end
  204. if $lib_book_loaned = '' and lib_debt = 0:
  205. !!There''s currently only code for fantasy novels
  206. !{act 'Borrow a science book':
  207. *clr & cla
  208. menu_off = 1
  209. s_book += 1
  210. $lib_book_loaned = 'a science book'
  211. lib_debt = -700
  212. !!Picture here
  213. 'You find a science book that catches your interest and bring it to the librarian, who notes your name and the title of the book down before handing it to you.'
  214. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  215. act 'Continue': gt 'pav_library'
  216. end
  217. act 'Borrow an adventure novel':
  218. *clr & cla
  219. menu_off = 1
  220. a_book += 1
  221. $lib_book_loaned = 'an adventure novel'
  222. lib_debt = -700
  223. !!Picture here
  224. 'You find an adventure novel that catches your interest and bring it to the librarian, who notes your name and the title of the book down before handing it to you.'
  225. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  226. act 'Continue': gt 'pav_library'
  227. end}
  228. act 'Borrow a fantasy novel':
  229. *clr & cla
  230. menu_off = 1
  231. f_book += 1
  232. $lib_book_loaned = 'a fantasy novel'
  233. lib_debt = -700
  234. !!Picture here
  235. 'You find a fantasy novel that catches your interest and bring it to the librarian, who notes your name and the title of the book down before handing it to you.'
  236. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  237. act 'Continue': gt 'pav_library'
  238. end
  239. !{act 'Borrow a science fiction novel':
  240. *clr & cla
  241. menu_off = 1
  242. sf_book += 1
  243. $lib_book_loaned = 'a science fiction novel'
  244. lib_debt = -700
  245. !!Picture here
  246. 'You find a science fiction novel that catches your interest and bring it to the librarian, who notes your name and the title of the book down before handing it to you.'
  247. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  248. act 'Continue': gt 'pav_library'
  249. end
  250. act 'Borrow a romance novel':
  251. *clr & cla
  252. menu_off = 1
  253. r_book += 1
  254. $lib_book_loaned = 'a romance novel'
  255. lib_debt = -700
  256. !!Picture here
  257. 'You find a romance novel that catches your interest and bring it to the librarian, who notes your name and the title of the book down before handing it to you.'
  258. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  259. act 'Continue': gt 'pav_library'
  260. end}
  261. act 'Go back': gt 'pav_library'
  262. end
  263. end
  264. --- pav_library ---------------------------------