agentned.qsrc 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462
  1. # agentned
  2. if $ARGS[0] = 'start':
  3. CLOSE ALL
  4. *clr & cla
  5. $loc = 'agentned'
  6. $loc_arg = $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 are excluded from this policy."'
  21. if home_owned[1] = 1 and ArendHouseSL > 0:
  22. *nl
  23. 'You have <B><<ArendHouseSL>> days</B> remaining on your St. Petersburg apartment lease. '+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 to extend it.','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> remaining on your Pushkin apartment lease. '+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 to extend it.','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 = 'agentned'
  63. $loc_arg = $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 = 'agentned'
  102. $loc_arg = $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 = 'agentned'
  234. $loc_arg = $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 apartments available for rent. They are located in the city residential area and in Pushkin.'
  250. act 'View the city apartment details': gt 'agentned', 'rent_cityres'
  251. act 'View the Pushkin apartment details': gt 'agentned', 'rent_pushkin'
  252. elseif home_owned[1] = 0:
  253. 'There is a property for rent in the city residential area'
  254. act 'View the city apartment details': gt 'agentned', 'rent_cityres'
  255. elseif home_owned[4] = 0:
  256. 'There is a property for rent in the old town of Pushkin'
  257. act 'View the Pushkin apartment details': gt 'agentned', 'rent_pushkin'
  258. end
  259. end
  260. if $ARGS[0] = 'rent_cityres':
  261. *clr & cla
  262. menu_off = 1
  263. gs 'housing', 'rent'
  264. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  265. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo.jpg"></center>'
  266. *nl
  267. '"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."'
  268. '<br>He pulls out a pen and slides the paperwork onto the counter. "Interested? You can move in right away," he calmly says.'
  269. if money >= home_rent[1] or karta >= home_rent[1]:
  270. act 'Agree and pay':
  271. *clr & cla
  272. cls
  273. minut += 30
  274. if money >= home_rent[1]:
  275. money -= home_rent[1]
  276. else
  277. karta -= home_rent[1]
  278. end
  279. home_owned[1] = 1
  280. if ARRSIZE('home_owned') = 0:
  281. gs 'set_home', 1
  282. else
  283. $set_homeyn = input("Would you like to set this as your new home? (yes/no)")
  284. if $set_homeyn = 'yes': gs 'set_home', 1
  285. killvar '$set_homeyn'
  286. end
  287. ArendHouseSL += ArendHouseSL_due
  288. gs'stat'
  289. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  290. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg"></center>'
  291. *nl
  292. '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.'
  293. act 'Return':gt'agentned', 'start'
  294. end
  295. else
  296. *nl
  297. 'You do not have enough money with you or in your bank account to pay the rent.'
  298. end
  299. act 'Decline':
  300. *clr & cla
  301. minut += 5
  302. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  303. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo.jpg"></center>'
  304. *nl
  305. 'You shake your head, "Actually, I need more time to think about this."'
  306. '<br>The receptionist seems a bit miffed, but says nothing as he takes back the paperwork and stuffs it back into his desk drawer.'
  307. act 'Return':gt'agentned', 'start'
  308. end
  309. end
  310. if $ARGS[0] = 'rent_pushkin':
  311. *clr & cla
  312. menu_off = 1
  313. gs 'housing', 'rent'
  314. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  315. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo.jpg"></center>'
  316. *nl
  317. '"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."'
  318. '<br>He pulls out a pen and slides the paperwork onto the counter. "Interested? You can move in right away," he calmly says.'
  319. if money >= home_rent[4] or karta >= home_rent[4]:
  320. act 'Agree and pay':
  321. *clr & cla
  322. minut += 30
  323. if money >= home_rent[4]:
  324. money -= home_rent[4]
  325. else
  326. karta -= home_rent[4]
  327. end
  328. home_owned[4] = 1
  329. if ARRSIZE('home_owned') = 0:
  330. gs 'set_home', 4
  331. else
  332. $set_homeyn = input("Would you like to set this as your new home? (yes/no)")
  333. if $set_homeyn = 'yes': gs 'set_home', 4
  334. killvar '$set_homeyn'
  335. end
  336. ArendHouseSL4 += ArendHouseSL_due
  337. gs'stat'
  338. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  339. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg"></center>'
  340. *nl
  341. 'You take the pen and start filling out the paperwork. After writing for an hour, you hand over the money and receive the keys to your new apartment.'
  342. act 'Return':gt'agentned', 'start'
  343. end
  344. else
  345. *nl
  346. 'You do not have enough money with you or in your bank account to rent this.'
  347. end
  348. act 'Decline':
  349. *clr & cla
  350. minut += 5
  351. gs 'stat'
  352. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  353. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo.jpg"></center>'
  354. *nl
  355. 'You shake your head, "Actually, I need more time to think about this."'
  356. '<br>The receptionist seems a bit miffed, but says nothing as he takes back the paperwork and stuffs it back into his desk drawer.'
  357. act 'Return':gt'agentned', 'start'
  358. end
  359. end
  360. if $ARGS[0] = 'buy_cityres':
  361. *clr & cla
  362. menu_off = 1
  363. gs 'housing', 'sale'
  364. minut += 30
  365. karta -= home_value[1]
  366. home_owned[1] = 2
  367. if ARRSIZE('home_owned') = 0:
  368. gs 'set_home', 1
  369. else
  370. $set_homeyn = input("Would you like to set this as your new home? (yes/no)")
  371. if $set_homeyn = 'yes': gs 'set_home', 1
  372. killvar '$set_homeyn'
  373. end
  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 to buy the apartment in the residential area. <<$home_value_txt[1]>> <b>₽</b> has been removed from your bank account.'
  379. act 'Return':gt'agentned', 'start'
  380. end
  381. if $ARGS[0] = 'buy_dacha':
  382. *clr & cla
  383. menu_off = 1
  384. gs 'housing', 'sale'
  385. minut += 30
  386. karta -= home_value[3]
  387. home_owned[3] = 1
  388. if ARRSIZE('home_owned') = 0:
  389. gs 'set_home', 3
  390. else
  391. $set_homeyn = input("Would you like to set this as your new home? (yes/no)")
  392. if $set_homeyn = 'yes': gs 'set_home', 3
  393. killvar '$set_homeyn'
  394. end
  395. etoexhib = 0
  396. gs'stat'
  397. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  398. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg"></center>'
  399. *nl
  400. '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 5 km away from St. Petersburg. <<$home_value_txt[3]>> <b>₽</b> has been removed from your bank account.'
  401. act 'Return':gt'agentned', 'start'
  402. end
  403. if $ARGS[0] = 'buy_Mansion':
  404. *clr & cla
  405. menu_off = 1
  406. gs 'housing', 'sale'
  407. minut += 30
  408. karta -= home_value[5]
  409. home_owned[5] = 1
  410. if ARRSIZE('home_owned') = 0:
  411. gs 'set_home', 5
  412. else
  413. $set_homeyn = input("Would you like to set this as your new home? (yes/no)")
  414. if $set_homeyn = 'yes': gs 'set_home', 5
  415. killvar '$set_homeyn'
  416. end
  417. gs'stat'
  418. '<center><b><font color = maroon>Real Estate Agency</font></b></center>'
  419. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg"></center>'
  420. *nl
  421. 'You spend half an hour filling in the paperwork for the purchase of a lot for building a mansion 1 km up the north road. <<$home_value_txt[5]>> <b>₽</b> has been removed from your bank account.'
  422. act 'Return':gt'agentned', 'start'
  423. end
  424. --- agentned ---------------------------------