city_library.qsrc 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  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. act 'Read a book':
  47. gt 'city_library', 'read'
  48. end
  49. act 'Borrow a book':
  50. gt 'city_library', 'loan'
  51. end
  52. if MagicLibrary = 1:
  53. act 'Read magic books':
  54. dynamic $downlibrary['BookStudy'], 'splcstng'
  55. gs 'stat'
  56. 'You pick out one of the magic books you can actually read and sit down with it.'
  57. '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.'
  58. '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.'
  59. ! Find Researchable Spells
  60. if func('spellList','numAvailableSpells','librarySpells') > 0:
  61. if rand(1,10) = 10:
  62. gs 'spellList','addAvailableSpells','librarySpells'
  63. *nl
  64. *pl 'You have come across a lead on a new spell.'
  65. end
  66. else
  67. '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.'
  68. end
  69. !!Adding to the Actions opportunity to practice spells MC found
  70. gs 'spellList', 'teacherActions', '$librarySpells', 'city_library', ''
  71. act 'Put the book down': gt $curloc
  72. end
  73. !!Adding to the Actions opportunity to practice spells MC found
  74. gs 'spellList', 'teacherActions', '$librarySpells', 'city_library', ''
  75. end
  76. else
  77. 'The library is closed.'
  78. end
  79. gs 'camera', 'check_location'
  80. if $ARGS[0] = 'read':
  81. cla
  82. act 'Read a book on science (1:00)':
  83. dynamic $downlibrary['BookStudy'], ''
  84. gs 'exp_gain', 'intel', rand(3,6) + (mentats_dose - rand(0,mentats_dose))
  85. grupvalue[3] += 1
  86. gs 'stat'
  87. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/science1.jpg"></center>'
  88. 'You spend an hour reading, trying to make sense of all the clever propositions writen inside and understand the subject it describes.'
  89. act 'Put the book back': gt 'city_library', 'read'
  90. end
  91. act 'Read an adventure novel (1:00)':
  92. dynamic $downlibrary['BookStudy'], ''
  93. pcs_mood = 100
  94. grupvalue[3] += 1
  95. gs 'stat'
  96. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/fiction' + rand(1,2) + '.jpg"></center>'
  97. 'You spend an hour reading an adventure novel, immersing yourself in daring deeds and awesome twists.'
  98. act 'Put the book back': gt 'city_library', 'read'
  99. end
  100. act 'Read a fantasy novel (1:00)':
  101. dynamic $downlibrary['BookStudy'], ''
  102. pcs_mood = 100
  103. grupvalue[3] += 1
  104. gs 'stat'
  105. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/fantasy' + rand(1,9) + '.jpg"></center>'
  106. '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.'
  107. act 'Put the book back': gt 'city_library', 'read'
  108. end
  109. act 'Read a science fiction novel (1:00)':
  110. dynamic $downlibrary['BookStudy'], ''
  111. pcs_mood = 100
  112. grupvalue[3] += 1
  113. gs 'stat'
  114. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/scifi' + rand(1,6) + '.jpg"></center>'
  115. '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.'
  116. act 'Put the book back': gt 'city_library', 'read'
  117. end
  118. act 'Read a romance novel (1:00)':
  119. dynamic $downlibrary['BookStudy'], ''
  120. pcs_mood = 100
  121. pcs_horny += 20
  122. gs 'stat'
  123. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/romance' + rand(1,20) + '.jpg"></center>'
  124. '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.'
  125. act 'Put the book back': gt 'city_library', 'read'
  126. end
  127. temp = pcs_intel * 2 + pcs_sprt
  128. if temp < 100:
  129. $diff = 'hard'
  130. elseif temp < 150:
  131. $diff = 'medium'
  132. else
  133. $diff = 'easy'
  134. end
  135. gs 'willpower', 'misc', 'self', $diff
  136. if will_cost <= pcs_willpwr:
  137. act 'Read from the collected works of Leo Tolstoy (1:00) (<<will_cost>> Willpower)':
  138. gs 'willpower', 'pay', 'self'
  139. killvar 'will_cost'
  140. dynamic $downlibrary['BookStudy'], ''
  141. gs 'exp_gain', 'sprt', rand(3,6)
  142. grupvalue[3] += 2
  143. gs 'stat'
  144. '<center><img <<$set_imgh>> src="images/pc/items/accessories/books/tolstoy.jpg"></center>'
  145. 'You read the book for an hour. Tolstoy is certainly a classic writer, but he used a <i>lot</i> of words.'
  146. act 'Put the book back': gt 'city_library', 'read'
  147. end
  148. else
  149. 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>'
  150. end
  151. act 'Go back': gt 'city_library'
  152. end
  153. if $ARGS[0] = 'loan':
  154. cla
  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. act 'Go back': gt 'city_library'
  174. end
  175. if lib_debt > 0:
  176. 'You owe an outstanding debt of <<lib_debt>> <b>₽</b> to the library.'
  177. if pcs_money >= lib_debt:
  178. act 'Pay your debt':
  179. pcs_money -= lib_debt
  180. lib_debt = 0
  181. gt 'city_library', 'Pay_debt'
  182. end
  183. else
  184. act '<font color="red">Pay your debt</font>': '<br><font color="red">You don''t have enough money to pay your debt.</font>'
  185. end
  186. end
  187. if $lib_book_loaned = '' and lib_debt = 0:
  188. !!There''s currently only code for fantasy novels
  189. !{act 'Borrow a book on science':
  190. *clr & cla
  191. menu_off = 1
  192. s_book += 1
  193. $lib_book_loaned = 'a science book'
  194. lib_debt = -700
  195. !!Picture here
  196. '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.'
  197. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  198. act 'Continue': gt 'city_library'
  199. end
  200. act 'Borrow an adventure novel':
  201. *clr & cla
  202. menu_off = 1
  203. a_book += 1
  204. $lib_book_loaned = 'an adventure novel'
  205. lib_debt = -700
  206. !!Picture here
  207. '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.'
  208. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  209. act 'Continue': gt 'city_library'
  210. end}
  211. act 'Borrow a fantasy novel':
  212. *clr & cla
  213. menu_off = 1
  214. f_book += 1
  215. $lib_book_loaned = 'a fantasy novel'
  216. lib_debt = -700
  217. !!Picture here
  218. '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.'
  219. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  220. act 'Continue': gt 'city_library'
  221. end
  222. !{act 'Borrow a science fiction novel':
  223. *clr & cla
  224. menu_off = 1
  225. sf_book += 1
  226. $lib_book_loaned = 'a science fiction novel'
  227. lib_debt = -700
  228. !!Picture here
  229. '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.'
  230. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  231. act 'Continue': gt 'city_library'
  232. end
  233. act 'Borrow a romance novel':
  234. *clr & cla
  235. menu_off = 1
  236. r_book += 1
  237. $lib_book_loaned = 'a romance novel'
  238. lib_debt = -700
  239. !!Picture here
  240. '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.'
  241. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  242. act 'Continue': gt 'city_library'
  243. end}
  244. act 'Go back': gt 'city_library'
  245. end
  246. end
  247. --- city_library ---------------------------------