agentned.qsrc 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. # agentned
  2. if $ARGS[0] = 'start':
  3. CLOSE ALL
  4. *clr & cla
  5. $loc = $curloc
  6. $metka = $ARGS[0]
  7. $location_type = 'indoors'
  8. gs'stat'
  9. gs'dina'
  10. gs 'housing', 'rent'
  11. '<center><b><font color = maroon>Kirsanova Real Estate Agency</font></b></center>'
  12. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo.jpg"></center>'
  13. *nl
  14. 'The head office of the largest real estate agency in the area.'
  15. *nl
  16. 'At the reception you notice a banner, which is written in large print:'
  17. '"Please note, that all transactions of purchases and sales are made exclusively through your bank account. Rent payments excluded."'
  18. if home_owned[1] = 1 and ArendHouseSL > 0:
  19. *nl
  20. 'You have <B><<ArendHouseSL>> days</B> rental on your St. Petersburg apartment remaining. '+iif(money >= home_rent[1],'You can make a rent <a href="exec:money -= home_rent[1] & home_owned[1] = 1 & ArendHouseSL += ArendHouseSL_due & gs ''$menu_obnovit''">payment</a> in cash.','You can''t afford to pay rent at the moment')+''
  21. end
  22. if home_owned[4] > 0 and ArendHouseSL4 > 0:
  23. *nl
  24. 'You have <B><<ArendHouseSL4>> days</B> rental on your Pushkin apartment. '+iif(money >= home_rent[4],'You can make a rent <a href="exec:money -= home_rent[4] & home_owned[1] = 1 & ArendHouseSL4 += ArendHouseSL_due & gs ''$menu_obnovit''">payment</a> in cash.','You can''t afford to pay rent at the moment')+''
  25. end
  26. if home_owned[1] = 2 or home_owned[3] > 0 or home_owned[5] = 1:
  27. *nl
  28. 'You own the follwing property:'
  29. *nl
  30. if home_owned[1] = 2: 'An apartment in St. Petersburg residential area'
  31. if home_owned[1] = 3: 'An apartment in St. Petersburg residential area, that is currently occupied by your tenants'
  32. if home_owned[3] > 0: 'An cottage located in the cooperative village'
  33. if home_owned[5] = 1: 'A plot of land in the St. Petersburg suburbs'
  34. *nl
  35. 'We are at your service if you decide to <a href="exec:GT ''agentned'',''sell''">sell</a>.'
  36. end
  37. act 'Leave':
  38. minut += 5
  39. gt'down'
  40. end
  41. act 'View rentals': gt 'agentned', 'rent'
  42. act 'View properties for sale': gt 'agentned', 'buy'
  43. end
  44. if $ARGS[0] = 'buy':
  45. *clr & cla
  46. $loc = $curloc
  47. $metka = $ARGS[0]
  48. $location_type = 'indoors'
  49. gs 'housing', 'sale'
  50. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  51. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo.jpg"></center>'
  52. *nl
  53. minut += 5
  54. gs 'stat'
  55. act 'Return':gt'agentned', 'start'
  56. if home_owned[1] = 0 or home_owned[3] = 0 or home_owned[4] = 0 or home_owned[5] = 0:
  57. if home_owned[1] = 0:
  58. 'There is an apartment in the city residential area available for <<$home_value_txt[1]>> <b>₽</b>.'
  59. *nl
  60. if karta + bankDebtLimit >= home_value[1]:act 'Buy the city residential apartment': gt 'agentned', 'buy_cityres'
  61. elseif home_owned[1] = 1:
  62. 'You could buy your current rental apartment for <<$home_value_txt[1]>> <b>₽</b>.'
  63. *nl
  64. if karta + bankDebtLimit >= home_value[1]:act 'Buy the city residential apartment': gt 'agentned', 'buy_cityres'
  65. end
  66. if home_owned[3] = 0:
  67. 'There is a holiday cottage with an adjacent allotment in the village, for <<$home_value_txt[3]>> <b>₽</b>.'
  68. *nl
  69. if karta + bankDebtLimit >= home_value[3]:act 'Buy the cottage in the village': gt 'agentned','buy_dacha'
  70. end
  71. if home_owned[5] = 0:
  72. 'There is a plot in the suburbs with planning permission for a mansion for <<$home_value_txt[5]>> <b>₽</b>.'
  73. *nl
  74. if karta + bankDebtLimit >= home_value[5]:act 'Buy the plot in the suburbs': gt 'agentned','buy_Mansion'
  75. end
  76. else
  77. 'We currently have no properties listed for sale.'
  78. end
  79. end
  80. if $ARGS[0] = 'sell':
  81. *clr & cla
  82. $loc = $curloc
  83. $metka = $ARGS[0]
  84. $location_type = 'indoors'
  85. gs 'housing', 'sale'
  86. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  87. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo.jpg"></center>'
  88. *nl
  89. act 'Return':gt'agentned', 'start'
  90. if home_owned[1] = 2 and rembedr = 1 and remsitr = 1 and remkorr = 1 and remvanr = 1 and remkuhr = 1:
  91. !Renovated city residential apartment
  92. home_value1 = ((home_value[1] + 250000) + rand(-100000, 100000))
  93. 'We have found a buyer for your renovated apartment in the city residential area. They will offer <<home_value1>> <b>₽</b>, minus 5% for fees and taxes, bringing the total to <<home_value1/100*95>>'
  94. act 'Sell the renovated apartment':
  95. *clr
  96. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  97. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg"></center>'
  98. minut += 30
  99. 'You spend half an hour filling in the paperwork for the sale of your renovated apartment, with a loss of around 5% for fees and taxes. <<home_value1/100*95>> <b>₽</b> has been paid into your bank account.'
  100. home_owned[1] = 0
  101. ArendHouseSL = 0
  102. if bankaccount = 1:
  103. karta += home_value1/100*95
  104. else
  105. money += home_value1/100*95
  106. end
  107. delact 'Sell the renovated apartment'
  108. gs 'stat'
  109. end
  110. end
  111. if home_owned[1] = 2:
  112. !City residential apartment
  113. home_value1 = (home_value[1] + rand(-100000, 100000))
  114. 'We have found a buyer for your apartment in the city residential area. They will offer <<home_value1>> <b>₽</b>, minus 5% for fees and taxes, bringing the total to <<home_value1/100*95>>'
  115. act 'Sell the city apartment':
  116. *clr
  117. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  118. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg"></center>'
  119. minut += 30
  120. 'You spend half an hour filling in the paperwork for the sale of your apartment, with a loss of around 5% for fees and taxes. <<home_value1/100*95>> <b>₽</b> has been paid into your bank account.'
  121. home_owned[1] = 0
  122. ArendHouseSL = 0
  123. if bankaccount = 1:
  124. karta += home_value1/100*95
  125. else
  126. money += home_value1/100*95
  127. end
  128. delact 'Sell the city apartment'
  129. gs 'stat'
  130. end
  131. end
  132. if home_owned[3] = 1:
  133. !Communal cottage
  134. home_value3 = (home_value[3] + rand(-5000, 5000))
  135. 'We have found a buyer for your small communal cottage. They will offer <<home_value3>> <b>₽</b>, minus 5% for fees and taxes, bringing the total to <<home_value3/100*95>>'
  136. act 'Sell the holiday cottage':
  137. *clr
  138. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  139. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg"></center>'
  140. minut += 30
  141. 'You spend half an hour filling in the paperwork for the sale of your small cottage, with a loss of around 5% for fees and taxes. <<home_value3/100*95>> <b>₽</b> has been paid into your bank account.'
  142. home_owned[3] = 0
  143. if bankaccount = 1:
  144. karta += home_value3/100*95
  145. else
  146. money += home_value3/100*95
  147. end
  148. delact 'Sell the holiday cottage'
  149. gs 'stat'
  150. end
  151. end
  152. if home_owned[3] = 2:
  153. !Renovated communal cottage
  154. home_value3 = ((home_value[3] + 200000) + rand(-10000, 10000))
  155. 'We have found a buyer for your small renovated communal cottage. They will offer <<home_value3>> <b>₽</b>, minus 5% for fees and taxes, bringing the total to <<home_value3/100*95>>'
  156. act 'Sell the renovated cottage':
  157. *clr
  158. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  159. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg"></center>'
  160. minut += 30
  161. 'You spend half an hour filling in the paperwork for the sale of the renovated cottage, with a loss of 1around 5% for fees and taxes. <<home_value3/100*95>> <b>₽</b> has been paid into your bank account.'
  162. home_owned[3] = 0
  163. if bankaccount = 1:
  164. karta += home_value3/100*95
  165. else
  166. money += home_value3/100*95
  167. end
  168. delact 'Sell the renovated cottage'
  169. gs 'stat'
  170. end
  171. end
  172. if home_owned[5] = 1:
  173. !Suburban land only - currently too many variables for selling upgraded mansion - might do later - 3xpurt.
  174. home_value5 = (home_value[5] + rand(-50000, 50000))
  175. 'We have found a buyer for your vacant plot of land in the suburbs. They will offer <<home_value5>> <b>₽</b>, minus 5% for fees and taxes, bringing the total to <<home_value5/100*95>>'
  176. act 'Sell the vacant plot':
  177. *clr
  178. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  179. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg"></center>'
  180. minut += 30
  181. 'You spend half an hour filling in the paperwork for the vacant plot, with a loss of around 5% for fees and taxes. <<home_value5/100*95>> <b>₽</b> has been paid into your bank account.'
  182. home_owned[5] = 0
  183. if bankaccount = 1:
  184. karta += home_value5/100*95
  185. else
  186. money += home_value5/100*95
  187. end
  188. delact 'Sell the vacant plot'
  189. gs 'stat'
  190. end
  191. end
  192. if home_owned[5] = 2:
  193. !Suburban land only - currently too many variables for selling upgraded mansion - might do later - 3xpurt.
  194. 'Sorry, we are unable to find a buyer for your property at this time.'
  195. end
  196. if home_owned[5] = 3:
  197. !Suburban land only - currently too many variables for selling upgraded mansion - might do later - 3xpurt.
  198. 'Sorry, we are unable to find a buyer for your property at this time.'
  199. end
  200. if home_owned[1] = 0 and home_owned[3] = 0 and home_owned[4] = 0 and home_owned[5] = 0:
  201. 'You don''t currently own any property.'
  202. end
  203. end
  204. if $ARGS[0] = 'rent':
  205. *clr & cla
  206. $loc = $curloc
  207. $metka = $ARGS[0]
  208. $location_type = 'indoors'
  209. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  210. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo.jpg"></center>'
  211. *nl
  212. minut += 5
  213. gs 'stat'
  214. act 'Return':gt'agentned', 'start'
  215. if home_owned[1] > 0 and home_owned[4] > 0:
  216. 'We currently have no properties for rent.'
  217. elseif home_owned[1] = 0 and home_owned[4] = 0:
  218. ''
  219. 'There are two properties available for rent.'
  220. *nl
  221. 'There is an apartment in the city residential area, and an apartment in Pushkin available'
  222. act 'View the city apartment details': gt 'agentned', 'rent_cityres'
  223. act 'View the Pushkin apartment details': gt 'agentned', 'rent_pushkin'
  224. elseif home_owned[1] = 0:
  225. 'There is a property for rent in the city residential area'
  226. act 'View the city apartment details': gt 'agentned', 'rent_cityres'
  227. elseif home_owned[4] = 0:
  228. 'There is a property for rent in the old town of Pushkin'
  229. act 'View the Pushkin apartment details': gt 'agentned', 'rent_pushkin'
  230. end
  231. end
  232. if $ARGS[0] = 'rent_cityres':
  233. *clr & cla
  234. gs 'housing', 'rent'
  235. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  236. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo.jpg"></center>'
  237. *nl
  238. '“We have a flat available right now in the residential area of St. Petersburg.” The receptionist says as he starts pulling out the paperwork. “Rent is <<$home_rent_txt[1]>> ₽ and leases have to be renewed every 30 days, which can be taken automatically from your account or you can come in and pay directly. Last but not least, you have to make your first payment up front at signing.”'
  239. '<br>He pulls out a pen and slides the paperwork onto the counter. “Interested? We can get you moved in right away.”'
  240. if money >= home_rent[1] or karta >= home_rent[1]:
  241. act 'Agree and pay':
  242. *clr & cla
  243. cls
  244. minut += 30
  245. if money >= home_rent[1]:
  246. money -= home_rent[1]
  247. else
  248. karta -= home_rent[1]
  249. end
  250. home_owned[1] = 1
  251. if ARRSIZE('home_owned') = 0: gs 'set_home', 1
  252. ArendHouseSL += ArendHouseSL_due
  253. gs'stat'
  254. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  255. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg"></center>'
  256. *nl
  257. 'You take the pen and start filling out the paperwork. Half an hour later, you’re handing over the money and getting the keys to your new apartment.'
  258. act 'Return':gt'agentned', 'start'
  259. end
  260. else
  261. *nl
  262. 'You do not have enough money with you or in your bank account to rent this.'
  263. end
  264. act 'Decline':
  265. *clr & cla
  266. minut += 5
  267. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  268. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo.jpg"></center>'
  269. *nl
  270. 'You shake your head, “Actually, I need more time to think about this.”'
  271. '<br>The receptionist seems a bit miffed, but says nothing as he grabs the paperwork and stuffs it back in a drawer.'
  272. act 'Return':gt'agentned', 'start'
  273. end
  274. end
  275. if $ARGS[0] = 'rent_pushkin':
  276. *clr & cla
  277. gs 'housing', 'rent'
  278. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  279. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo.jpg"></center>'
  280. *nl
  281. '“We have a small apartment available right now in Pushkin’s city center. It’s a little bit pricey, but it’s been recently renovated to be more modern, and it looks quite nice. You won’t find a place like that outside of Pushkin.” The receptionist says as he starts pulling out the paperwork. “Rent is <<$home_rent_txt[4]>> ₽ and leases have to be renewed every 30 days, which can be taken automatically from your account or you can come in and pay directly. Last but not least, you have to make your first payment up front at signing.”'
  282. '<br>He pulls out a pen and slides the paperwork onto the counter. “Interested? We can get you moved in right away.”'
  283. if money >= home_rent[4] or karta >= home_rent[4]:
  284. act 'Agree and pay':
  285. *clr & cla
  286. minut += 30
  287. if money >= home_rent[4]:
  288. money -= home_rent[4]
  289. else
  290. karta >= home_rent[4]
  291. end
  292. home_owned[4] = 1
  293. if ARRSIZE('home_owned') = 0: gs 'set_home', 4
  294. ArendHouseSL4 += ArendHouseSL_due
  295. gs'stat'
  296. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  297. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg"></center>'
  298. *nl
  299. 'You take the pen and start filling out the paperwork. An hour later, you’re handing over the money and getting the keys to your new apartment.'
  300. act 'Return':gt'agentned', 'start'
  301. end
  302. else
  303. *nl
  304. 'You do not have enough money with you or in your bank account to rent this.'
  305. end
  306. act 'Decline':
  307. *clr & cla
  308. minut += 5
  309. gs 'stat'
  310. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  311. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo.jpg"></center>'
  312. *nl
  313. 'You shake your head, “Actually, I need more time to think about this.”'
  314. '<br>The receptionist seems a bit miffed, but says nothing as he grabs the paperwork and stuffs it back in a drawer.'
  315. act 'Return':gt'agentned', 'start'
  316. end
  317. end
  318. if $ARGS[0] = 'buy_cityres':
  319. *clr & cla
  320. gs 'housing', 'sale'
  321. minut += 30
  322. karta -= home_value[1]
  323. home_owned[1] = 2
  324. if ARRSIZE('home_owned') = 0: gs 'set_home', 1
  325. gs'stat'
  326. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  327. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg"></center>'
  328. *nl
  329. 'You spend half an hour filling in the paperwork to buy an apartment in the residential area. <<$home_value_txt[1]>> <b>₽</b> has been removed from your bank account.'
  330. act 'Return':gt'agentned', 'start'
  331. end
  332. if $ARGS[0] = 'buy_dacha':
  333. *clr & cla
  334. gs 'housing', 'sale'
  335. minut += 30
  336. karta -= home_value[3]
  337. home_owned[3] = 1
  338. if ARRSIZE('home_owned') = 0: gs 'set_home', 3
  339. etoexhib = 0
  340. gs'stat'
  341. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  342. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg"></center>'
  343. *nl
  344. 'You spend half an hour filling in the paperwork for the purchase of a cottage with a garden on the co-op 5km up the north road. <<$home_value_txt[3]>> <b>₽</b> has been removed from your bank account.'
  345. act 'Return':gt'agentned', 'start'
  346. end
  347. if $ARGS[0] = 'buy_Mansion':
  348. *clr & cla
  349. gs 'housing', 'sale'
  350. minut += 30
  351. karta -= home_value[5]
  352. home_owned[5] = 1
  353. if ARRSIZE('home_owned') = 0: gs 'set_home', 5
  354. gs'stat'
  355. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  356. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg"></center>'
  357. *nl
  358. 'You spend half an hour filling in the paperwork for the purchase of a lot for building a mansion 1km up the north road. <<$home_value_txt[5]>> <b>₽</b> has been removed from your bank account.'
  359. act 'Return':gt'agentned', 'start'
  360. end
  361. --- agentned ---------------------------------