1
0

city_library.qsrc 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  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. cla
  156. if $lib_book_loaned ! '':
  157. 'You''ve currently borrowed a <<$lib_book_loaned>>.'
  158. if lib_debt <= 0:
  159. temp_loan_days_left = lib_debt / -50
  160. 'You have <<temp_loan_days_left>> days left before you need to return it.'
  161. else
  162. '<font color="red">Your book is overdue!</font>'
  163. end
  164. act 'Return your loaned book':
  165. if lib_book_read = 0:
  166. if $lib_book_loaned = 'fantasy': f_book -= 1
  167. elseif lib_book_read = 1:
  168. if $lib_book_loaned = 'fantasy': fantasybook = 0
  169. end
  170. $lib_book_loaned = ''
  171. if lib_debt <= 0: lib_debt = 0
  172. gt 'city_library'
  173. end
  174. end
  175. if lib_debt > 0:
  176. 'You owe an outstanding debt of <<lib_debt>> <b>₽</b> to the library.'
  177. if money < lib_debt and karta < lib_debt:
  178. 'You don''t have enough money to pay your debt!'
  179. else
  180. if money >= lib_debt:
  181. act 'Pay your debt (cash)':
  182. money -= lib_debt
  183. lib_debt = 0
  184. gt 'city_library', 'loan'
  185. end
  186. end
  187. if karta >= lib_debt:
  188. act 'Pay your debt (card)':
  189. karta -= lib_debt
  190. lib_debt = 0
  191. gt 'city_library', 'loan'
  192. end
  193. end
  194. end
  195. end
  196. if $lib_book_loaned = '' and lib_debt = 0:
  197. !!There''s currently only code for fantasy novels
  198. !{act 'Borrow a book on science':
  199. *clr & cla
  200. menu_off = 1
  201. s_book += 1
  202. $lib_book_loaned = 'a science book'
  203. lib_debt = -700
  204. !!Picture here
  205. '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.'
  206. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  207. act 'Continue': gt 'city_library'
  208. end
  209. act 'Borrow an adventure novel':
  210. *clr & cla
  211. menu_off = 1
  212. a_book += 1
  213. $lib_book_loaned = 'an adventure novel'
  214. lib_debt = -700
  215. !!Picture here
  216. '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.'
  217. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  218. act 'Continue': gt 'city_library'
  219. end}
  220. act 'Borrow a fantasy novel':
  221. *clr & cla
  222. menu_off = 1
  223. f_book += 1
  224. $lib_book_loaned = 'a fantasy novel'
  225. lib_debt = -700
  226. !!Picture here
  227. '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.'
  228. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  229. act 'Continue': gt 'city_library'
  230. end
  231. !{act 'Borrow a science fiction novel':
  232. *clr & cla
  233. menu_off = 1
  234. sf_book += 1
  235. $lib_book_loaned = 'a science fiction novel'
  236. lib_debt = -700
  237. !!Picture here
  238. '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.'
  239. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  240. act 'Continue': gt 'city_library'
  241. end
  242. act 'Borrow a romance novel':
  243. *clr & cla
  244. menu_off = 1
  245. r_book += 1
  246. $lib_book_loaned = 'a romance novel'
  247. lib_debt = -700
  248. !!Picture here
  249. '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.'
  250. '"You need to return it within 2 weeks. Every day that you''re late incurs a 50 <b>₽</b> fine."'
  251. act 'Continue': gt 'city_library'
  252. end}
  253. end
  254. act 'Go back': gt 'city_library'
  255. end
  256. --- city_library ---------------------------------