city_library.qsrc 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. # city_library
  2. $loc_arg = $ARGS[0]
  3. $loc = 'city_library'
  4. $menu_loc = 'city_library'
  5. $menu_arg = ''
  6. menu_off = 0
  7. $location_type = 'public_indoors'
  8. frost = 0
  9. gs 'stat'
  10. gs 'themes', 'indoors'
  11. ! Stuff to do on Studying a Book
  12. ! $ARGS[0] = Skill to Check
  13. killvar '$downlibrary'
  14. $downlibrary['BookStudy'] = {
  15. $downlibrary['Skill'] = $ARGS[0]
  16. *clr & cla
  17. menu_off = 1
  18. if blizoruk = 500 or glassqw = 1:
  19. glassqw = 1
  20. msg ' The text blurs across the page. It seems you have poor eyesight. Maybe you should visit an ophthalmologist?'
  21. gt 'city_library'
  22. end
  23. if pcs_nerd > 0:
  24. lastread = totminut
  25. lastreadday = daystart
  26. pcs_nerd += 1
  27. end
  28. minut += 60
  29. if $downlibrary['Skill'] ! '':
  30. dynamic "
  31. if pcs_<<$downlibrary['Skill']>> >= 50:
  32. <<$downlibrary['Skill']>>_exp += rand(0,1)
  33. elseif pcs_<<$downlibrary['Skill']>> >= 25:
  34. <<$downlibrary['Skill']>>_exp += rand(1,2)
  35. else
  36. <<$downlibrary['Skill']>>_exp += rand(1,3)
  37. end"
  38. end
  39. blizoruk += 1
  40. }
  41. '<center><b><font color="maroon">National Library of Russia</font></b></center>'
  42. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/library/downlibint.jpg"></center>'
  43. 'A huge library with thousands upon thousands of books. You could spend years in here and probably still wouldn''t be able to read it all.'
  44. act 'Leave': minut += 5 & gt 'city_center'
  45. if hour >= 8 and hour <= 18:
  46. 'There is a large IT section with <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> available for public use.'
  47. act 'Read a book':
  48. gt 'city_library', 'read'
  49. end
  50. act 'Borrow a book':
  51. gt 'city_library', 'loan'
  52. end
  53. if MagicLibrary = 1:
  54. act 'Read magic books':
  55. dynamic $downlibrary['BookStudy'], 'splcstng'
  56. gs 'stat'
  57. 'You pick out one of the magic books you can actually read and sit down with it.'
  58. 'You discover that not only is the subject matter complex and mostly a mystery to you, but the descriptions and explanations are unnecessarily wordy, as if the writer had something to prove.'
  59. 'After about an hour, you decide to take a break from it and instead test your memory. You don''t remember much, but you understand magic a little better than before.'
  60. ! Find Researchable Spells
  61. if func('spellList','numAvailableSpells','librarySpells') > 0:
  62. if rand(1,10) = 10:
  63. gs 'spellList','addAvailableSpells','librarySpells'
  64. *nl
  65. *pl 'You have come across a lead on a new spell.'
  66. end
  67. else
  68. 'There doesn''t seem to be any more spells to learn here, but you can still improve your skills in the ones that you''ve already found.'
  69. end
  70. !!Adding to the Actions opportunity to practice spells MC found
  71. gs 'spellList', 'teacherActions', '$librarySpells', 'city_library', ''
  72. act 'Put the book down': gt $curloc
  73. end
  74. !!Adding to the Actions opportunity to practice spells MC found
  75. gs 'spellList', 'teacherActions', '$librarySpells', 'city_library', ''
  76. end
  77. else
  78. 'The library is closed.'
  79. end
  80. gs 'camera', 'check_location'
  81. if $ARGS[0] = 'read':
  82. cla
  83. act 'Read a book on science (1:00)':
  84. dynamic $downlibrary['BookStudy'], ''
  85. gs 'exp_gain', 'intel', rand(3,6) + (mentats_dose - rand(0,mentats_dose))
  86. grupvalue[3] += 1
  87. gs 'stat'
  88. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/science1.jpg"></center>'
  89. 'You spend an hour reading, trying to make sense of all the clever propositions writen inside and understand the subject it describes.'
  90. act 'Put the book back': gt 'city_library', 'read'
  91. end
  92. act 'Read an adventure novel (1:00)':
  93. dynamic $downlibrary['BookStudy'], ''
  94. pcs_mood = 100
  95. grupvalue[3] += 1
  96. gs 'stat'
  97. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/fiction' + rand(1,2) + '.jpg"></center>'
  98. 'You spend an hour reading an adventure novel, immersing yourself in daring deeds and awesome twists.'
  99. act 'Put the book back': gt 'city_library', 'read'
  100. end
  101. act 'Read a fantasy novel (1:00)':
  102. dynamic $downlibrary['BookStudy'], ''
  103. pcs_mood = 100
  104. grupvalue[3] += 1
  105. gs 'stat'
  106. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/fantasy' + rand(1,9) + '.jpg"></center>'
  107. '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.'
  108. act 'Put the book back': gt 'city_library', 'read'
  109. end
  110. act 'Read a science fiction novel (1:00)':
  111. dynamic $downlibrary['BookStudy'], ''
  112. pcs_mood = 100
  113. grupvalue[3] += 1
  114. gs 'stat'
  115. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/scifi' + rand(1,6) + '.jpg"></center>'
  116. '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.'
  117. act 'Put the book back': gt 'city_library', 'read'
  118. end
  119. act 'Read a romance novel (1:00)':
  120. dynamic $downlibrary['BookStudy'], ''
  121. pcs_mood = 100
  122. pcs_horny += 20
  123. gs 'stat'
  124. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/romance' + rand(1,20) + '.jpg"></center>'
  125. '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.'
  126. act 'Put the book back': gt 'city_library', 'read'
  127. end
  128. temp = pcs_intel * 2 + pcs_sprt
  129. if temp < 100:
  130. $diff = 'hard'
  131. elseif temp < 150:
  132. $diff = 'medium'
  133. else
  134. $diff = 'easy'
  135. end
  136. gs 'willpower', 'misc', 'self', $diff
  137. if will_cost <= pcs_willpwr:
  138. act 'Read from the collected works of Leo Tolstoy (1:00) (<<will_cost>> Willpower)':
  139. gs 'willpower', 'pay', 'self'
  140. killvar 'will_cost'
  141. dynamic $downlibrary['BookStudy'], ''
  142. gs 'exp_gain', 'sprt', rand(3,6)
  143. grupvalue[3] += 2
  144. gs 'stat'
  145. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/tolstoy.jpg"></center>'
  146. 'You read the book for an hour. Tolstoy is certainly a classic writer, but he used a <i>lot</i> of words.'
  147. act 'Put the book back': gt 'city_library', 'read'
  148. end
  149. else
  150. 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>'
  151. end
  152. act 'Go back': gt 'city_library'
  153. end
  154. if $ARGS[0] = 'loan':
  155. if $lib_book_loaned ! '':
  156. 'You''ve currently borrowed a <<$lib_book_loaned>>.'
  157. if lib_debt <= 0:
  158. temp_loan_days_left = lib_debt / -50
  159. 'You have <<temp_loan_days_left>> days left before you need to return it.'
  160. else
  161. '<font color="red">Your book is overdue!</font>'
  162. end
  163. act 'Return your loaned book':
  164. if lib_book_read = 0:
  165. if $lib_book_loaned = 'fantasy': f_book -= 1
  166. elseif lib_book_read = 1:
  167. if $lib_book_loaned = 'fantasy': fantasybook = 0
  168. end
  169. $lib_book_loaned = ''
  170. if lib_debt <= 0: lib_debt = 0
  171. gt 'city_library'
  172. end
  173. end
  174. if lib_debt > 0:
  175. 'You owe an outstanding debt of <<lib_debt>> <b>₽</b> to the library.'
  176. if money < lib_debt and karta < lib_debt:
  177. 'You don''t have enough money to pay your debt!'
  178. else
  179. if money >= lib_debt:
  180. act 'Pay your debt (cash)':
  181. money -= lib_debt
  182. lib_debt = 0
  183. gt 'city_library', 'loan'
  184. end
  185. end
  186. if karta >= lib_debt:
  187. act 'Pay your debt (card)':
  188. karta -= lib_debt
  189. lib_debt = 0
  190. gt 'city_library', 'loan'
  191. end
  192. end
  193. end
  194. end
  195. if $lib_book_loaned = '' and lib_debt = 0:
  196. !!There''s currently only code for fantasy novels
  197. !{act 'Borrow a book on science':
  198. *clr & cla
  199. menu_off = 1
  200. s_book += 1
  201. $lib_book_loaned = 'a science book'
  202. lib_debt = -700
  203. !!Picture here
  204. '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.'
  205. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  206. act 'Continue': gt 'city_library'
  207. end
  208. act 'Borrow an adventure novel':
  209. *clr & cla
  210. menu_off = 1
  211. a_book += 1
  212. $lib_book_loaned = 'an adventure novel'
  213. lib_debt = -700
  214. !!Picture here
  215. '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.'
  216. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  217. act 'Continue': gt 'city_library'
  218. end}
  219. act 'Borrow a fantasy novel':
  220. *clr & cla
  221. menu_off = 1
  222. f_book += 1
  223. $lib_book_loaned = 'a fantasy novel'
  224. lib_debt = -700
  225. !!Picture here
  226. '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.'
  227. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  228. act 'Continue': gt 'city_library'
  229. end
  230. !{act 'Borrow a science fiction novel':
  231. *clr & cla
  232. menu_off = 1
  233. sf_book += 1
  234. $lib_book_loaned = 'a science fiction novel'
  235. lib_debt = -700
  236. !!Picture here
  237. '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.'
  238. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  239. act 'Continue': gt 'city_library'
  240. end
  241. act 'Borrow a romance novel':
  242. *clr & cla
  243. menu_off = 1
  244. r_book += 1
  245. $lib_book_loaned = 'a romance novel'
  246. lib_debt = -700
  247. !!Picture here
  248. '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.'
  249. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  250. act 'Continue': gt 'city_library'
  251. end}
  252. end
  253. act 'Go back': gt 'city_library'
  254. end
  255. --- city_library ---------------------------------