pav_library.qsrc 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  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 and SchoolAtestat = 0:
  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> sitting alone at one of the tables.'
  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 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 and SchoolAtestat = 0 and SchoolBlock = 0 and _
  91. (class['school_grades_above_40'] + class['school_grades_above_70'] + class['school_grades_above_90'] <= 20 or grupTipe = 3):
  92. act 'Join the nerd''s study group': gt 'pav_library_nerdstudy', 'nerd_study_night'
  93. end
  94. else
  95. 'The library is closed.'
  96. end
  97. if $ARGS[0] = 'read':
  98. cla
  99. if hour < 18:
  100. act 'Go back': gt 'pav_library'
  101. act 'Read a book on science (1:00)':
  102. dynamic $downlibrary['read']
  103. gs 'exp_gain', 'intel', rand(3,6) + rand(0, drugVars['mentats_dose'])
  104. grupvalue[3] +=1
  105. gs 'stat'
  106. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/science1.jpg"></center>'
  107. 'You spend an hour reading, trying to make sense of all the clever propositions written inside and understand the subject it describes.'
  108. act 'Put the book back': gt 'pav_library', 'read'
  109. end
  110. act 'Read an adventure novel (1:00)':
  111. dynamic $downlibrary['read']
  112. pcs_mood = 100
  113. grupvalue[3] +=1
  114. gs 'stat'
  115. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/fiction' + rand(1,2) + '.jpg"></center>'
  116. 'You spend an hour reading an adventure novel, immersing yourself in daring deeds and awesome twists.'
  117. act 'Put the book back': gt 'pav_library', 'read'
  118. end
  119. act 'Read a fantasy novel (1:00)':
  120. dynamic $downlibrary['read']
  121. pcs_mood = 100
  122. grupvalue[3] += 1
  123. gs 'stat'
  124. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/fantasy' + rand(1,9) + '.jpg"></center>'
  125. '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.'
  126. act 'Put the book back': gt 'pav_library', 'read'
  127. end
  128. act 'Read a science fiction novel (1:00)':
  129. dynamic $downlibrary['read']
  130. pcs_mood = 100
  131. grupvalue[3] += 1
  132. gs 'stat'
  133. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/scifi' + rand(1,6) + '.jpg"></center>'
  134. '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.'
  135. act 'Put the book back': gt 'pav_library', 'read'
  136. end
  137. act 'Read a romance novel (1:00)':
  138. dynamic $downlibrary['read']
  139. pcs_mood = 100
  140. pcs_horny += 20
  141. gs 'stat'
  142. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/romance' + rand(1,20) + '.jpg"></center>'
  143. '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.'
  144. act 'Put the book back': gt 'pav_library', 'read'
  145. end
  146. temp = pcs_intel * 2 + pcs_sprt
  147. if temp < 100:
  148. $diff = 'hard'
  149. elseif temp < 150:
  150. $diff = 'medium'
  151. else
  152. $diff = 'easy'
  153. end
  154. gs 'willpower', 'misc', 'self', $diff
  155. if will_cost <= pcs_willpwr:
  156. act 'Read from the collected works of Leo Tolstoy (1:00) (<<will_cost>> Willpower)':
  157. gs 'willpower', 'pay', 'self'
  158. killvar 'will_cost'
  159. dynamic $downlibrary['read']
  160. gs 'exp_gain', 'sprt', rand(3,6)
  161. grupvalue[3] += 2
  162. gs 'stat'
  163. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/tolstoy.jpg"></center>'
  164. 'You read the book for an hour. Tolstoy is certainly a classic writer, but he used a <i>lot</i> of words.'
  165. act 'Put the book back': gt 'pav_library', 'read'
  166. end
  167. else
  168. 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>'
  169. end
  170. else
  171. !! Note find stern librarian image
  172. 'The librarian finds you still reading and shooshes you out of the library'
  173. act 'Leave': gt 'pav_commcenter'
  174. end
  175. end
  176. if $ARGS[0] = 'loan':
  177. cla
  178. if $lib_book_loaned ! '':
  179. 'You''ve currently borrowed a <<$lib_book_loaned>>.'
  180. if lib_debt <= 0:
  181. temp_loan_days_left = lib_debt / -50
  182. 'You have <<temp_loan_days_left>> days left before you need to return it.'
  183. else
  184. '<font color="red">Your book is overdue!</font>'
  185. end
  186. act 'Return your loaned book':
  187. if lib_book_read = 0:
  188. if $lib_book_loaned = 'fantasy': f_book -= 1
  189. elseif lib_book_read = 1:
  190. if $lib_book_loaned = 'fantasy': fantasybook = 0
  191. end
  192. $lib_book_loaned = ''
  193. if lib_debt <= 0: lib_debt = 0
  194. lib_book_read = 0
  195. gt 'pav_library'
  196. end
  197. end
  198. if lib_debt > 0:
  199. 'You owe an outstanding debt of <<lib_debt>> <b>₽</b> to the library.'
  200. if money < lib_debt and karta < lib_debt:
  201. 'You don''t have enough money to pay your debt!'
  202. else
  203. if money >= lib_debt:
  204. act 'Pay your debt (cash)':
  205. money -= lib_debt
  206. lib_debt = 0
  207. gt 'pav_library', 'loan'
  208. end
  209. end
  210. if karta >= lib_debt:
  211. act 'Pay your debt (card)':
  212. karta -= lib_debt
  213. lib_debt = 0
  214. gt 'pav_library', 'loan'
  215. end
  216. end
  217. end
  218. end
  219. if $lib_book_loaned = '' and lib_debt = 0:
  220. !!There''s currently only code for fantasy novels
  221. !{act 'Borrow a science book':
  222. *clr & cla
  223. menu_off = 1
  224. s_book += 1
  225. $lib_book_loaned = 'a science book'
  226. lib_debt = -700
  227. !!Picture here
  228. '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.'
  229. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  230. act 'Continue': gt 'pav_library'
  231. end
  232. act 'Borrow an adventure novel':
  233. *clr & cla
  234. menu_off = 1
  235. a_book += 1
  236. $lib_book_loaned = 'an adventure novel'
  237. lib_debt = -700
  238. !!Picture here
  239. '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.'
  240. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  241. act 'Continue': gt 'pav_library'
  242. end}
  243. act 'Borrow a fantasy novel':
  244. *clr & cla
  245. menu_off = 1
  246. f_book += 1
  247. $lib_book_loaned = 'a fantasy novel'
  248. lib_debt = -700
  249. !!Picture here
  250. '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.'
  251. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  252. act 'Continue': gt 'pav_library'
  253. end
  254. !{act 'Borrow a science fiction novel':
  255. *clr & cla
  256. menu_off = 1
  257. sf_book += 1
  258. $lib_book_loaned = 'a science fiction novel'
  259. lib_debt = -700
  260. !!Picture here
  261. '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.'
  262. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  263. act 'Continue': gt 'pav_library'
  264. end
  265. act 'Borrow a romance novel':
  266. *clr & cla
  267. menu_off = 1
  268. r_book += 1
  269. $lib_book_loaned = 'a romance novel'
  270. lib_debt = -700
  271. !!Picture here
  272. '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.'
  273. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  274. act 'Continue': gt 'pav_library'
  275. end}
  276. end
  277. act 'Go back': gt 'pav_library'
  278. end
  279. --- pav_library ---------------------------------