agentned.qsrc 17 KB

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