agentned.qsrc 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  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. 'This is the head office of the largest real estate agency in the Leningrad Oblast.'
  18. *nl
  19. 'At the reception you notice a large print banner,'
  20. '"Please be aware that all sales transactions are made exclusively through your bank account. Rent payments excluded from this policy."'
  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 your 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 your 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 which 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 'city_center'
  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. 'Attention: 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. 'Attention: 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 of land 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 land 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 thirty minutes filling out the paperwork for the sale of your renovated apartment. You will suffer 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 thirty minutes filling out the paperwork for the sale of your apartment. You will suffer 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 thirty minutes filling out the paperwork for the sale of your small cottage. You will suffer 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 thirty minutes filling out the paperwork for the sale of your small cottage. You will suffer a loss of around 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 thirty minutes filling out the paperwork for the vacant plot. You will suffer 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 listed 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 are two apartments for available to rent. They are located in the city residential area and in Pushkin.'
  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 St. Petersburg residential area." 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. Payment will be automatically deducted from your account or you can come into the office to pay. When you sign for the lease you must make your first month''s rental payment upfront."'
  270. '<br>He pulls out a pen and slides the paperwork onto the counter. "Interested? You can move in right away," he calmly says.'
  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:
  283. gs 'set_home', 1
  284. else
  285. $set_homeyn = input("Would you like to set this as your new home? (yes/no)")
  286. if $set_homeyn = 'yes': gs 'set_home', 1
  287. killvar '$set_homeyn'
  288. end
  289. ArendHouseSL += ArendHouseSL_due
  290. gs'stat'
  291. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  292. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg"></center>'
  293. *nl
  294. 'You take the pen then start filling out the paperwork. After writing for half an hour, you hand over the money and receive the keys to your new apartment.'
  295. act 'Return':gt'agentned', 'start'
  296. end
  297. else
  298. *nl
  299. 'You do not have enough money with you or in your bank account to pay the rent.'
  300. end
  301. act 'Decline':
  302. *clr & cla
  303. minut += 5
  304. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  305. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo.jpg"></center>'
  306. *nl
  307. 'You shake your head, "Actually, I need more time to think about this."'
  308. '<br>The receptionist seems a bit miffed, but says nothing as he takes back the paperwork and stuffs it back into his desk drawer.'
  309. act 'Return':gt'agentned', 'start'
  310. end
  311. end
  312. if $ARGS[0] = 'rent_pushkin':
  313. *clr & cla
  314. menu_off = 1
  315. gs 'housing', 'rent'
  316. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  317. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo.jpg"></center>'
  318. *nl
  319. '"We have a small apartment available right now that is in Pushkin’s city center. It’s a little bit pricey, but it’s been recently renovated to be more modern. It looks quite nice, so 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."'
  320. '<br>He pulls out a pen and slides the paperwork onto the counter. "Interested? You can move in right away," he calmly says.'
  321. if money >= home_rent[4] or karta >= home_rent[4]:
  322. act 'Agree and pay':
  323. *clr & cla
  324. minut += 30
  325. if money >= home_rent[4]:
  326. money -= home_rent[4]
  327. else
  328. karta -= home_rent[4]
  329. end
  330. home_owned[4] = 1
  331. if ARRSIZE('home_owned') = 0:
  332. gs 'set_home', 4
  333. else
  334. $set_homeyn = input("Would you like to set this as your new home? (yes/no)")
  335. if $set_homeyn = 'yes': gs 'set_home', 4
  336. killvar '$set_homeyn'
  337. end
  338. ArendHouseSL4 += ArendHouseSL_due
  339. gs'stat'
  340. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  341. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg"></center>'
  342. *nl
  343. 'You take the pen and start filling out the paperwork. After writting for an hour, you hand over the money and receive the keys to your new apartment.'
  344. act 'Return':gt'agentned', 'start'
  345. end
  346. else
  347. *nl
  348. 'You do not have enough money with you or in your bank account to rent this.'
  349. end
  350. act 'Decline':
  351. *clr & cla
  352. minut += 5
  353. gs 'stat'
  354. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  355. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo.jpg"></center>'
  356. *nl
  357. 'You shake your head, "Actually, I need more time to think about this."'
  358. '<br>The receptionist seems a bit miffed, but says nothing as he takes back the paperwork and stuffs it back into his desk drawer.'
  359. act 'Return':gt'agentned', 'start'
  360. end
  361. end
  362. if $ARGS[0] = 'buy_cityres':
  363. *clr & cla
  364. menu_off = 1
  365. gs 'housing', 'sale'
  366. minut += 30
  367. karta -= home_value[1]
  368. home_owned[1] = 2
  369. if ARRSIZE('home_owned') = 0:
  370. gs 'set_home', 1
  371. else
  372. $set_homeyn = input("Would you like to set this as your new home? (yes/no)")
  373. if $set_homeyn = 'yes': gs 'set_home', 1
  374. killvar '$set_homeyn'
  375. end
  376. gs'stat'
  377. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  378. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg"></center>'
  379. *nl
  380. 'You spend half an hour filling in the paperwork to buy the apartment in the residential area. <<$home_value_txt[1]>> <b>₽</b> has been removed from your bank account.'
  381. act 'Return':gt'agentned', 'start'
  382. end
  383. if $ARGS[0] = 'buy_dacha':
  384. *clr & cla
  385. menu_off = 1
  386. gs 'housing', 'sale'
  387. minut += 30
  388. karta -= home_value[3]
  389. home_owned[3] = 1
  390. if ARRSIZE('home_owned') = 0:
  391. gs 'set_home', 3
  392. else
  393. $set_homeyn = input("Would you like to set this as your new home? (yes/no)")
  394. if $set_homeyn = 'yes': gs 'set_home', 3
  395. killvar '$set_homeyn'
  396. end
  397. etoexhib = 0
  398. gs'stat'
  399. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  400. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg"></center>'
  401. *nl
  402. 'You spend half an hour filling in the paperwork for the purchase of a cottage with a garden in the co-op. It''s located 5km away from St. Petersburg. <<$home_value_txt[3]>> <b>₽</b> has been removed from your bank account.'
  403. act 'Return':gt'agentned', 'start'
  404. end
  405. if $ARGS[0] = 'buy_Mansion':
  406. *clr & cla
  407. menu_off = 1
  408. gs 'housing', 'sale'
  409. minut += 30
  410. karta -= home_value[5]
  411. home_owned[5] = 1
  412. if ARRSIZE('home_owned') = 0:
  413. gs 'set_home', 5
  414. else
  415. $set_homeyn = input("Would you like to set this as your new home? (yes/no)")
  416. if $set_homeyn = 'yes': gs 'set_home', 5
  417. killvar '$set_homeyn'
  418. end
  419. gs'stat'
  420. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  421. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg"></center>'
  422. *nl
  423. '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.'
  424. act 'Return':gt'agentned', 'start'
  425. end
  426. --- agentned ---------------------------------