agentned.tw 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  1. :: agentned[public indoors]
  2. /*<<set $here = 'agentned'>>
  3. <<set $ARGS = $location_var[$here]>>
  4. <<if $location_var[$here][0] == 'start'>>
  5. <<set $loc = 'agentned'>>
  6. <<set $loc_arg = $location_var[$here][0]>>
  7. <<set $location_type = 'indoors'>>
  8. <<set $menu_loc = 'agentned'>>
  9. <<set $menu_arg = 'start'>>
  10. <<set $menu_off = 0>>
  11. <<gs 'dina'>>
  12. <!-- !! gs 'housing', 'rent'-->*/
  13. <<ConnectedLocation 'Leave' 'city_center' '' 'locations/city/citycenter/down.jpg' 5>>
  14. <h2>Kirsanova Real Estate Agency</h2>
  15. <<image "locations/city/citycenter/realestate/agenstvo.jpg">>
  16. This is the head office of the largest real estate agency in the Leningrad Oblast.
  17. /*At the reception, you notice a large print banner:
  18. <b>"Please be aware that all sales transactions are made exclusively through your bank account. Rent payments are excluded from this policy."</b>
  19. <<actCLA 'View rentals'>>
  20. <<gt 'agentned' 'rent'>>
  21. <</actCLA>>
  22. <<actCLA 'View properties for sale'>>
  23. <<gt 'agentned' 'buy'>>
  24. <</actCLA>>
  25. <!-- !! Get a list of the properties and their attributes that the player rented:-->
  26. <!-- !! Returns: $property_name[$i], $property_code[$i], $property_display[$i], property_rent[$i], property_days[$i]-->
  27. <<gs 'homes_properties' 'get_rented_properties' 'home'>>
  28. <<set $count = ARRSIZE('$property_name')>>
  29. <<if getvar("$count") > 0>>
  30. <<set $i = 0>>
  31. <h4>Rent Information</h4>
  32. <<warn 'JUMP MARKER ENCOUNTERED: :listing_rented_properties_loop'>>
  33. <!-- FAILED TO CONVERT
  34. 'You have <B><<property_days[i]>> days</B> remaining on the lease of your <<$property_display[i]>>, and your monthly rent is <<func(''agentned'', ''format_price_string'', property_rent[i])>><b>₽</b>. '+iif(money >= property_rent[i],'You can make a rent <a href="exec:money -= <<property_rent[i]>> & gs ''homes_properties'', ''add_rental_days'', ''<<$property_code[i]>>'' & gt ''agentned'', ''start''">payment</a> in cash to extend it.','You can''t afford to pay your rent at the moment')
  35. -----
  36. <<set ERROR: FAILED TO CONVERT LITERAL: """'You have <B><<property_days[$i]>> days<""" / ERROR: FAILED TO CONVERT LITERAL: """B> remaining on the lease of your $property_display[$i]""" , ERROR: FAILED TO CONVERT LITERAL: """and your monthly rent is <<func(''agentned''""" , 'format_price_string' , ERROR: FAILED TO CONVERT LITERAL: """property_rent[$i])>><b>₽<""" / ERROR: FAILED TO CONVERT LITERAL: """b>. '""" + ERROR: FAILED TO CONVERT LITERAL: """iif(money >""" = $property_rent[$i] , ERROR: FAILED TO CONVERT LITERAL: """'You can make a rent <a href="exec:money""" - ERROR: FAILED TO CONVERT LITERAL: """= <<property_rent[$i]>>""">> <<gs 'homes_properties' 'add_rental_days' '$property_code[$i]'>> <<gt 'agentned' 'start'">payment</a> in cash to extend it.' 'You can't afford to pay your rent at the moment')>>
  37. -->
  38. <<warn "CONVERSION ERROR 69f513222de378b8391d0cb6e9970213">>
  39. <!-- !! TODO: Make the duplication way less.-->
  40. <<if $property_code[$i] == 'city_apartment'>>
  41. <<actCLA 'Cancel the lease of the $property_display['+$i]+''>>
  42. <!-- !! TODO: 1 month notice period like in real life?-->
  43. Attention: You won''t be able to return to your apartment when you cancel the lease.
  44. <<actCLA 'Return'>>
  45. <<gt 'agentned' 'start'>>
  46. <</actCLA>>
  47. <<actCLA 'Cancel it'>>
  48. <<gs 'homes_properties' 'cancel_rent' 'city_apartment'>> <<gt 'agentned' 'start'>>
  49. <</actCLA>>
  50. <</actCLA>>
  51. <<elseif $property_code[$i] == 'old_town_apartment'>>
  52. <<actCLA 'Cancel the lease of the $property_display['+$i]+''>>
  53. <!-- !! TODO: 1 month notice period like in real life?-->
  54. Attention: You won''t be able to return to your apartment when you cancel the lease.
  55. <<actCLA 'Return'>>
  56. <<gt 'agentned' 'start'>>
  57. <</actCLA>>
  58. <<actCLA 'Cancel it'>>
  59. <<gs 'homes_properties' 'cancel_rent' 'old_town_apartment'>> <<gt 'agentned' 'start'>>
  60. <</actCLA>>
  61. <</actCLA>>
  62. <</if>>
  63. <<set $i += 1>>
  64. <<if $i < $count>>
  65. <<warn 'JUMP COMMAND ENCOUNTERED: jump listing_rented_properties_loop'>>
  66. <</if>>
  67. <</if>>
  68. <!-- !! Get a list of the properties and their attributes that the player rented:-->
  69. <!-- !! $property_code[], $property_name[], $property_display[], $property_status_display[], $property_type[]-->
  70. <!-- !! property_construction_status, property_is_renovated[], property_sales_price[], property_renovation_value[]-->
  71. <<gs 'homes_properties' 'get_owned_properties' 'home'>>
  72. <<set $count = ARRSIZE('$property_name')>>
  73. <<if getvar("$count") > 0>>
  74. <h4>You own the following properties</h4>
  75. <<set $i = 0>>
  76. <<warn 'JUMP MARKER ENCOUNTERED: :listing_owned_properties_loop'>>
  77. $property_status_display[$i]
  78. <<set $i += 1>>
  79. <<if $i < $count>>
  80. <<warn 'JUMP COMMAND ENCOUNTERED: jump listing_owned_properties_loop'>>
  81. <</if>>
  82. We are at your service if you decide to <<link "sell">><<gt 'agentned' 'sell'>><</link>>.
  83. <</if>>
  84. <<gs 'homes_properties' 'clean_up_property_data'>>
  85. <<actCLA 'Leave'>>
  86. <<set $time.minutes += 5>> <<gt 'city_center'>>
  87. <</actCLA>>
  88. <</if>>
  89. <<if $location_var[$here][0] == 'buy'>>
  90. <<set $loc = 'agentned'>>
  91. <<set $loc_arg = $location_var[$here][0]>>
  92. <<set $location_type = 'indoors'>>
  93. <<set $menu_loc = 'agentned'>>
  94. <<set $menu_arg = 'buy'>>
  95. <<set $menu_off = 0>>
  96. <<gs 'housing' 'sale'>>
  97. <<gs 'homes_properties' 'clean_up_property_data'>>
  98. <h2>Real Estate Agency</h2>
  99. <<image "locations/city/citycenter/realestate/agenstvo.jpg">>
  100. <h4> The purchase of any properties requires a bank account. The Agency is not conducting business in cash in compliance with the Anti-Money Laundering Regulations</h4>
  101. <<set $time.minutes += 5>>
  102. <<actCLA 'Return'>>
  103. <<gt 'agentned' 'start'>>
  104. <</actCLA>>
  105. <!-- !! "Returns":-->
  106. <!-- !! $property_code[], $property_name[], $property_display[], $property_agency_name[],-->
  107. <!-- !! property_construction_status,property_is_renovated[], property_sales_price[],-->
  108. <!-- !! property_type[]-->
  109. <<gs 'homes_properties' 'get_properties_for_sale'>>
  110. <<set $count = ARRSIZE('$property_name')>>
  111. <<if getvar("$count") > 0>>
  112. <<set $i = 0>>
  113. <h4>We have the following properties for sales</h4>
  114. <<warn 'JUMP MARKER ENCOUNTERED: :listing_properties_for_sale_loop'>>
  115. <<if getvar("$property_is_rented["+$i+"]") != 0>>
  116. <p>You could buy the $property_display[$i] you're currently renting, for func('agentned', 'format_price_string', property_sales_price[$i]) <b>₽</b>.</p>
  117. <<else>>
  118. <p>A(n) $property_display[$i] is available for sale for func('agentned', 'format_price_string', property_sales_price[$i]) <b>₽</b>.</p>
  119. <</if>>
  120. <<if $finances.bankAvailable >= $property_sales_price[$i]>>
  121. <<if $property_code[$i] == 'city_apartment'>>
  122. <<actCLA 'Buy the $property_display['+'+$i]+'+''>>
  123. <<gs 'agentned' 'buy_property' 'city_apartment'>>
  124. <</actCLA>>
  125. <</if>>
  126. <<if $property_code[$i] == 'village_cottage'>>
  127. <<actCLA 'Buy the $property_display['+'+$i]+'+''>>
  128. <<gs 'agentned' 'buy_property' 'village_cottage'>>
  129. <</actCLA>>
  130. <</if>>
  131. <<if $property_code[$i] == 'matryona_mansion'>>
  132. <<actCLA 'Buy the $property_display['+'+$i]+'+''>>
  133. <<gs 'agentned' 'buy_property' 'matryona_mansion'>>
  134. <</actCLA>>
  135. <</if>>
  136. <<if $property_code[$i] == 'city_house'>>
  137. <<actCLA 'Buy the $property_display['+'+$i]+'+''>>
  138. <<gs 'agentned' 'buy_property' 'city_house'>>
  139. <</actCLA>>
  140. <</if>>
  141. <</if>>
  142. <<set $i += 1>>
  143. <<if $i < $count>>
  144. <<warn 'JUMP COMMAND ENCOUNTERED: jump listing_properties_for_sale_loop'>>
  145. <</if>>
  146. <<else>>
  147. We currently have no properties listed for sale.
  148. <</if>>
  149. <<gs 'homes_properties' 'clean_up_property_data'>>
  150. <</if>>
  151. <<if $location_var[$here][0] == 'buy_property'>>
  152. <<set $menu_off = 1>>
  153. <<gs 'homes_properties' 'get_property_sales_info' $location_var[$here][1]>>
  154. <<set $time.minutes += 30>>
  155. <<set $finances.bank -= $property_sales_price>>
  156. <<gs 'homes_properties' 'buy_property' $location_var[$here][1] $property_sales_price>>
  157. <<set $set_homeyn = input("Would you like to set this as your new home? ($yes / $no)")>>
  158. <<if $set_homeyn == 'yes'>>
  159. <<gs 'homes_properties' 'set_home' $location_var[$here][1]>>
  160. <</if>>
  161. <<set $set_homeyn to null>>
  162. <!-- !!TODO: this etoexhib will need some rethinking I get what it means by now, but some better name would help a lot.-->
  163. <!-- !!NOTE: It means how "famous" Sveta is for being an exhibitionist.-->
  164. <<if $location_var[$here][1] == 'village_cottage'>>
  165. <<set $etoexhib = 0>>
  166. <</if>>
  167. <h2>Real Estate Agency</h2>
  168. <<image "locations/city/citycenter/realestate/agenstvo_paperwork.jpg">>
  169. <p>You spend half an hour filling in the paperwork to buy the $property_display. func('agentned', 'format_price_string', property_sales_price)<b>₽</b> has been removed from your bank account.</p>
  170. <<actCLA 'Return'>>
  171. <<gt 'agentned' 'start'>>
  172. <</actCLA>>
  173. <</if>>
  174. <!-- !! NOTE: When a property is sold, it can be bought back. To avoid a guaranteed income from the-->
  175. <!-- !! "I buy property for X, renovate it, sell it for X+Y, then buy it for X, then repeat" loop,-->
  176. <!-- !! the sales price of the property is updated with the price that it was sold for.-->
  177. <<if $location_var[$here][0] == 'sell'>>
  178. <<set $loc = 'agentned'>>
  179. <<set $loc_arg = $location_var[$here][0]>>
  180. <<set $location_type = 'indoors'>>
  181. <<set $menu_loc = 'agentned'>>
  182. <<set $menu_arg = 'sell'>>
  183. <<set $menu_off = 0>>
  184. <<gs 'homes_properties' 'clean_up_property_data'>>
  185. <h2>Real Estate Agency</h2>
  186. <<image "locations/city/citycenter/realestate/agenstvo.jpg">>
  187. <h4>Any purchase or sale of a property requires a bank account. The Agency is not conducting business in cash in compliance with the Anti-Money Laundering Regulations</h4>
  188. <<actCLA 'Return'>>
  189. <<gs 'homes_properties' 'clean_up_property_data'>> <<gt 'agentned' 'start'>>
  190. <</actCLA>>
  191. <<if $finances.hasBankAccount == 1>>
  192. <!-- !! Get a list of the properties and their attributes that the player rented:-->
  193. <!-- !! $property_code[], $property_name[], $property_display[], $property_status_display[], $property_type[]-->
  194. <!-- !! property_construction_status, property_is_renovated[], property_sales_price[], property_renovation_value[]-->
  195. <<gs 'homes_properties' 'get_owned_properties' 'home'>>
  196. <<set $count = ARRSIZE('$property_name')>>
  197. <<if getvar("$count") > 0>>
  198. <h4>Available offers for your properties</h4>
  199. <<set $i = 0>>
  200. <<warn 'JUMP MARKER ENCOUNTERED: :listing_offers_on_owned_properties_loop'>>
  201. <<if $property_code[$i] != 'matryona_mansion' or ($property_code[$i] == 'matryona_mansion' and getvar("$property_construction_status["+$i+"]") == 0)>>
  202. <!-- !! NOTE: Offer: (last sales price + rand(-10%, +10%)) + (renovation value + rand(0%,+10%)-->
  203. <!-- !! No need to check what has been renovated, the only thing that matters is the total value of the renovation-->
  204. <!-- !! If Sveta sells, this will be stored as the new sales price of the property-->
  205. <<set $offer = $property_sales_price + $property_renovation_value + (property_sales_price * rand(-10,10)) / 100 + (property_renovation_value * rand(0,10)) / 100>>
  206. <p>We have found a buyer for your $property_display[$i]. They will offer func('agentned', 'format_price_string', offer)<b>₽</b>, minus 5% for fees and taxes to the value of func('agentned', 'format_price_string', ( (offer*5)/100) ), bringing the total to func('agentned', 'format_price_string', ( (offer*95)/100 ) )</p>
  207. <<if $property_code[$i] == 'city_apartment'>>
  208. <<actCLA 'Sell the $property_display['+'+$i]+'+''>>
  209. <<gs 'agentned' 'finalise_sale' 'city_apartment'>>
  210. <</actCLA>>
  211. <</if>>
  212. <<if $property_code[$i] == 'village_cottage'>>
  213. <<actCLA 'Sell the $property_display['+'+$i]+'+''>>
  214. <<gs 'agentned' 'finalise_sale' 'village_cottage'>>
  215. <</actCLA>>
  216. <</if>>
  217. <<if $property_code[$i] == 'matryona_mansion'>>
  218. <<actCLA 'Sell the $property_display['+'+$i]+'+''>>
  219. <<gs 'agentned' 'finalise_sale' 'matryona_mansion'>>
  220. <</actCLA>>
  221. <</if>>
  222. <<if $property_code[$i] == 'city_house'>>
  223. <<actCLA 'Sell the $property_display['+'+$i]+'+''>>
  224. <<gs 'agentned' 'finalise_sale' 'city_house'>>
  225. <</actCLA>>
  226. <</if>>
  227. <</if>>
  228. <<set $i += 1>>
  229. <<if $i < $count>>
  230. <<warn 'JUMP COMMAND ENCOUNTERED: jump listing_offers_on_owned_properties_loop'>>
  231. <</if>>
  232. <</if>>
  233. <<gs 'homes_properties' 'clean_up_property_data'>>
  234. <<actCLA 'Leave'>>
  235. <<set $time.minutes += 5>> <<gt 'city_center'>>
  236. <</actCLA>>
  237. <!-- !! NOTE: Keeping this here for future renovation related reference.-->
  238. <!-- !!{
  239. if bankAccount = 1:
  240. if rembedr = 1 and remsitr = 1 and remkorr = 1 and remvanr = 1 and remkuhr = 1:
  241. !Renovated city residential apartment
  242. offer1 = ((800000 + 250000) + rand(-100000, 100000))
  243. else
  244. offer1 = (800000 + rand(-100000, 100000))
  245. end
  246. if func('homes_properties', 'property_renovated', 'village_cottage') = 1:
  247. !Renovated communal cottage
  248. offer2 = ((prop_price['village_cottage'] + 200000) + rand(-10000, 10000))
  249. else
  250. !Communal cottage
  251. offer2 = (prop_price['village_cottage'] + rand(-5000, 5000))
  252. end
  253. } -->
  254. <<else>>
  255. <b>You need to open a bank account to sell your property</b>
  256. <</if>>
  257. <</if>>
  258. <<if $location_var[$here][0] == 'finalise_sale'>>
  259. <<set $menu_off = 1>>
  260. <<gs 'homes_properties' 'get_property_sales_info' $location_var[$here][1]>>
  261. <h2>Real Estate Agency</h2>
  262. <<image "locations/city/citycenter/realestate/agenstvo_paperwork.jpg">>
  263. <<set $time.minutes += 30>>
  264. <p>You spend thirty minutes filling out the paperwork for the sale of your $property_display. func('agentned', 'format_price_string', ( (offer*95)/100) )<b>₽</b> has been paid into your bank account.</p>
  265. <<gs 'homes_properties' 'sell_property' $location_var[$here][1] $offer>>
  266. <<set $finances.bank += ($offer * 95) / 100>>
  267. delact 'Sell the $property_display'
  268. <</if>>
  269. <<if $location_var[$here][0] == 'rent'>>
  270. <<set $loc = 'agentned'>>
  271. <<set $loc_arg = $location_var[$here][0]>>
  272. <<set $location_type = 'indoors'>>
  273. <<set $menu_loc = 'agentned'>>
  274. <<set $menu_arg = 'rent'>>
  275. <<set $menu_off = 0>>
  276. <h2>Real Estate Agency</h2>
  277. <<image "locations/city/citycenter/realestate/agenstvo.jpg">>
  278. <<set $time.minutes += 5>>
  279. <<actCLA 'Return'>>
  280. <<gt 'agentned' 'start'>>
  281. <</actCLA>>
  282. <<gs 'homes_properties' 'get_properties_for_rent' 'home'>>
  283. <<set $count = ARRSIZE('property_name')>>
  284. <<if getvar("$count") > 0>>
  285. <<set $i = 0>>
  286. <h4>Properties currently available for rent</h4>
  287. <<warn 'JUMP MARKER ENCOUNTERED: :listing_properties_for_rent_loop'>>
  288. <p>We have a(n) $property_display[$i] avaible for a monthly rent of func('agentned', 'format_price_string', property_rent[$i])<b>₽</b>.</p>
  289. <<setinit $time.monthly_rent[$property_code[$i]] = $property_rent[$i]>>
  290. <<if $property_code[$i] == 'city_apartment'>>
  291. <<actCLA 'View the $property_display['+'+$i]+'+' details'>>
  292. <<gt 'agentned' 'view_property_details' 'city_apartment' $time.monthly_rent['city_apartment']>>
  293. <</actCLA>>
  294. <</if>>
  295. <<if $property_code[$i] == 'old_town_apartment'>>
  296. <<actCLA 'View the $property_display['+'+$i]+'+' details'>>
  297. <<gt 'agentned' 'view_property_details' 'old_town_apartment' $time.monthly_rent['old_town_apartment']>>
  298. <</actCLA>>
  299. <</if>>
  300. <<set $i += 1>>
  301. <<if $i < $count>>
  302. <<warn 'JUMP COMMAND ENCOUNTERED: jump listing_properties_for_rent_loop'>>
  303. <</if>>
  304. <<else>>
  305. We currently have no properties listed for rent.
  306. <</if>>
  307. <<gs 'homes_properties' 'clean_up_property_data'>>
  308. <</if>>
  309. <<if $location_var[$here][0] == 'view_property_details'>>
  310. <<set $menu_off = 1>>
  311. <h2>Real Estate Agency</h2>
  312. <<image "locations/city/citycenter/realestate/agenstvo.jpg">>
  313. <p>func('agentned', 'get_rent_detail_dialogue', $ARGS[1] ) The receptionist says as he starts pulling out the paperwork, "Rent is func('agentned', 'format_price_string', ARGS[2] )<b>₽</b> 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. Last, but not least, you must make pay the first month when you sign for the lease."</p>
  314. <p><br>He pulls out a pen and slides the paperwork onto the counter. "Interested? You can move in right away," he says calmly.</p>
  315. <<if $finances.cash >= $ARGS[2] or $finances.bankAvailable >= $ARGS[2]>>
  316. <<actCLA 'Agree and pay'>>
  317. <<set $time.minutes += 30>>
  318. <<if $finances.cash >= $ARGS[2]>>
  319. <<set $finances.cash -= $ARGS[2]>>
  320. <<else>>
  321. <<set $finances.bank -= $ARGS[2]>>
  322. <</if>>
  323. <<gs 'homes_properties' 'rent_property' $location_var[$here][1]>>
  324. <<if func( 'homes_properties', 'get_accessible_property_count', 'home') == 1>>
  325. <<gs 'homes_properties' 'set_home' $location_var[$here][1]>>
  326. <<else>>
  327. <<set $set_homeyn = input("Would you like to set this as your new home? ($yes / $no)")>>
  328. <<if $set_homeyn == 'yes'>>
  329. <<gs 'homes_properties' 'set_home' $location_var[$here][1]>>
  330. <</if>>
  331. <<set $set_homeyn to null>>
  332. <</if>>
  333. <h2>Real Estate Agency</h2>
  334. <<image "locations/city/citycenter/realestate/agenstvo_paperwork.jpg">>
  335. 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.
  336. <<actCLA 'Return'>>
  337. <<gt 'agentned' 'start'>>
  338. <</actCLA>>
  339. <</actCLA>>
  340. <<else>>
  341. You do not have enough money with you or in your bank account to pay the rent.
  342. <</if>>
  343. <<actCLA 'Decline'>>
  344. <<set $time.minutes += 5>>
  345. <h2>Real Estate Agency</h2>
  346. <<image "locations/city/citycenter/realestate/agenstvo.jpg">>
  347. You shake your head, "Actually, I need more time to think about this."
  348. <br>The receptionist seems a bit miffed, but says nothing as he takes back the paperwork and stuffs it back into his desk drawer.
  349. <<actCLA 'Return'>>
  350. <<gt 'agentned' 'start'>>
  351. <</actCLA>>
  352. <</actCLA>>
  353. <</if>>
  354. <!-- !! $ARGS[1] - the code of the property.-->
  355. <<if $location_var[$here][0] == 'get_rent_detail_dialogue'>>
  356. <<if $location_var[$here][1] == 'old_town_apartment'>>
  357. <<set $result = '"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."'>>
  358. <<elseif $location_var[$here][1] == 'city_apartment'>>
  359. <<set $result = '"We have a flat available right now in the St. Petersburg residential area."'>>
  360. <<else>>
  361. <<gs 'agentned' 'get_rent_detail_dialogue_hook' $location_var[$here][1]>>
  362. <<set $result = $agency_rental_dialogue>>
  363. <<set $agency_rental_dialogue to null>>
  364. <</if>>
  365. <</if>>
  366. <!-- !! $ARGS[1] - the code of the property.-->
  367. <<if $location_var[$here][0] == 'get_rent_detail_dialogue_hook'>>
  368. <!-- !! In a mod just redirect this call and set the value of the variable below to the text-->
  369. <!-- !! that should be used for the property by the agency.-->
  370. <<set $agency_rental_dialogue = ''>>
  371. <</if>>
  372. <!-- !! Call: `func('agentned', 'format_price_string', ARGS[1])-->
  373. <!-- !! ARGS[1] - the price (as a number)-->
  374. <<if $location_var[$here][0] == 'format_price_string'>>
  375. <<set $worknum = STR(ARGS[1])>>
  376. <<set $worknumlength = LEN($worknum)>>
  377. <<set $pos1 = 1>>
  378. <<warn 'JUMP MARKER ENCOUNTERED: :format_price_string_loop'>>
  379. <<set $split = mid($worknum, pos1, 1)>>
  380. <<if ($worknumlength - 1) / 3>>
  381. <<set $result += $split + ','>>
  382. <<else>>
  383. <<set $result += $split>>
  384. <</if>>
  385. <<set $worknumlength -= 1>>
  386. <<set $pos1 += 1>>
  387. <<if $pos2 <= $worknumlength>>
  388. <<warn 'JUMP COMMAND ENCOUNTERED: jump format_price_string_loop'>>
  389. <</if>>
  390. <</if>>*/