autotraidF.qsrc 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. # autotraidF
  2. !2021/04/26
  3. if $ARGS[0] = 'start':
  4. $loc_arg = $ARGS[0]
  5. $loc = 'autotraidF'
  6. $location_type = 'event'
  7. $menu_arg = 'start'
  8. $menu_loc = 'autotraidF'
  9. menu_off = 0
  10. *clr & cla
  11. gs 'stat'
  12. '<center><b>Car Dealership</b></center>'
  13. '<center><img <<$set_imgh>> src="images/locations/city/industrial/UsedCar/autotraid.jpg"></center>'
  14. 'Upon entering the yard, you see a laminated piece of paper pinned to a wall near the entrance:'
  15. '- We only sell to people with valid driver''s licenses.'
  16. '- New State law: No sale if you already own a car.'
  17. if car > 0 and cardrive = 9:'Your <a href="exec:gs ''carF'', ''start''"><<$car>></a> is parked just inside.'
  18. act 'Leave': minut += 5 & gt 'city_industrial'
  19. if func('autotraidF', 'is_open'):
  20. if car > 0:act 'Ask about selling your car':gt 'autotraidF', 'manager1'
  21. act 'Look at the new cars for sale': gt 'autosalonF', 'start'
  22. act 'Look at the used cars for sale':gt 'autotraidF', 'car'
  23. end
  24. end
  25. if $ARGS[0] = 'is_open':
  26. RESULT = hour >= 9 and hour < 18 and week > 1
  27. end
  28. if $ARGS[0] = 'manager1':
  29. $loc_arg = $ARGS[0]
  30. $loc = 'autotraidF'
  31. $menu_arg = 'manager1'
  32. $menu_loc = 'autotraidF'
  33. menu_off = 0
  34. *clr & cla
  35. gs 'stat'
  36. '<center><b>Used Car Dealership</b></center>'
  37. '<center><img <<$set_imgh>> src="images/locations/city/industrial/UsedCar/autotraid.jpg"></center>'
  38. gs 'avb'
  39. act 'Leave': killvar 'bupay' & minut += 5 & gt 'city_industrial'
  40. if cardrive = 9 and car > 0:
  41. 'The shifty-looking salesman circles around your car a couple of times, making exaggerated displeased noises all the while and pointing out practically every speck of dust as if it is major damage. When he turns to you, he states that the best he can do is <<bupay>> <b>₽</b> - while he claims that he''s taking a risk with that price, you''re pretty sure he''s ripping you off.'
  42. act 'No way, not at that price - Leave': killvar 'bupay' & minut += 5 & gt 'city_industrial'
  43. act 'Sell ​your car (<<bupay>> <b>₽</b>) (1:00)':
  44. cla
  45. menu_off = 1
  46. minut += 60
  47. money += bupay
  48. car = 0
  49. 'While you are almost certain that he''s offering less than the car is actually worth, you doubt that you''re going to find somebody who''s going to offer you more for it, and your attempts at haggling with the fence fall flat - he''s just too experienced at this.'
  50. 'So, as much as you hate it, you give your car one last look before you shake hands with him and follow him into the tiny shed he calls his "office" to sign the papers. He hands you the money in cash and, with a nasty grin, suggests that you look around the yard.'
  51. '"Maybe you''ll see something you like?"'
  52. act 'Leave': killvar 'bupay' & minut += 5 & gt 'city_industrial'
  53. end
  54. elseif cardrive ! 9:
  55. 'The salesman tells you, his smile sneering rather than friendly, that he needs to look at your car before he can tell you how much it''s worth. "If you want, I can have somebody tow it here. It only costs 3000 <b>₽</b>. Very cheap!"'
  56. if money >= 3000:
  57. act 'Pay for towing service to the car market (3,000 <b>₽</b>) (1:00)':
  58. cla
  59. menu_off = 1
  60. minut += 60
  61. cardrive = 9
  62. money -= 3000
  63. 'You give him the money - certain that he''s ripping you off - and wait for an hour until the tow truck finally drives into the yard, your car hooked up to the rear of it.'
  64. act 'Talk to the car salesman again': killvar 'bupay' & gt 'autotraidF', 'manager1'
  65. end
  66. end
  67. end
  68. end
  69. if $ARGS[0] = 'car':
  70. $loc_arg = $ARGS[0]
  71. $loc = 'autotraidF'
  72. $menu_arg = 'car'
  73. $menu_loc = 'autotraidF'
  74. menu_off = 0
  75. *clr & cla
  76. minut += 5
  77. carT = 0
  78. gs 'stat'
  79. '<center><b>Used Car Dealership</b></center>'
  80. '<center><img <<$set_imgh>> src="images/locations/city/industrial/UsedCar/autotraid.jpg"></center>'
  81. 'There are so many cars on the parking lot that you could spend a lifetime looking around without ever seeing all of them. According to the salesman, several cars are currently being test-driven or maintained. You doubt that there''s actually any maintenance going on though: several of the cars are visibly damaged or make awful sounds when they are started.'
  82. *nl
  83. 'It''s obvious that most, if not all of them have sustained some visible or invisible damage. Buying a car here could be a fantastic bargain... or a complete waste of money. If you are to buy any of them, you know that the first place to visit should be a service center.'
  84. act 'Return': killvar 'carT' & killvar 'bupay' & gt 'autotraidF', 'start'
  85. if hour <= 17:
  86. if car = 0 or car > 199:
  87. !! this is a VERY crude fix for when car[] was created before car
  88. !! if we ever add cars with indices past 199 its gonna break
  89. killvar 'car'
  90. car = 0
  91. end
  92. act 'Inspect a 2107':gt 'autotraidF', 'inspect', '2107', 1, 200, 1, 3
  93. act 'Inspect another 2107 (Broken Engine)':
  94. cla
  95. *clr
  96. menu_off = 1
  97. '<center><b>2107 (Broken engine)</b></center>'
  98. '<center><img <<$set_imgh>> src="images/pc/items/accessories/car/car.jpg"></center>'
  99. !! caching offers, resets on monday (via cikl)
  100. if used_car['wrek_condition'] = 0 and used_car['wrek_price'] = 0:
  101. used_car['wrek_condition'] = rand(10, 200)
  102. used_car['wrek_price'] = rand(10000, 50000)
  103. end
  104. 'The car is basically a wreck. It doesn''t even start. When you ask the salesman how much it costs, he tells you "<<used_car[''wrek_price'']>> <b>₽</b>" without hesitation.'
  105. act 'Look around some more':gt 'autotraidf', 'car'
  106. if car = 0 and prava = 1 and money >= used_car['wrek_price']:
  107. act 'Buy it for <<used_car[''wrek_price'']>><b>₽</b>':
  108. cla
  109. money -= used_car['wrek_price']
  110. $car = '2107'
  111. car = 1
  112. benz = 3
  113. cardrive = 9
  114. car['new_condition'] = 200
  115. car['current_condition'] = used_car['wrek_condition']
  116. wrek = 1
  117. 'You agree and before you know it, the car salesman and you have signed all the necessary documents. You hand over the <<used_car[''wrek_price'']>> <b>₽</b> in cash, and the car is yours.'
  118. 'Since it''s crammed in between about a million other vehicles, the car salesman moves it outside near the yard''s entrance for you... and that''s it.'
  119. 'If you want to get the car to a garage, you''ll have to go there and have it towed.'
  120. gs 'shortgs', 'remove_array_element', 'used_car', 'wrek_condition'
  121. gs 'shortgs', 'remove_array_element', 'used_car', 'wrek_price'
  122. act 'Leave': minut += 5 & gt 'city_industrial'
  123. end
  124. end
  125. end
  126. act 'Inspect a VAZ 2115':gt 'autotraidF', 'inspect', 'VAZ 2115', 2, 300, 1, 3
  127. act 'Inspect a VAZ 2113':gt 'autotraidF', 'inspect', 'VAZ 2113', 3, 290, 1, 3
  128. act 'Inspect a VAZ 2114':gt 'autotraidF', 'inspect', 'VAZ 2114', 4, 300, 1, 3
  129. act 'Inspect a VAZ 2110':gt 'autotraidF', 'inspect', 'VAZ 2110', 5, 350, 1, 3
  130. act 'Inspect a GAZ 3102':gt 'autotraidF', 'inspect', '3102 GAS', 11, 1000, 2, 5
  131. act 'Inspect a 3110':gt 'autotraidF', 'inspect', '3110', 13, 800, 2, 5
  132. end
  133. end
  134. if $ARGS[0] = 'inspect':
  135. cla
  136. *clr
  137. menu_off = 1
  138. $autotraidF_carname = $ARGS[1]
  139. autotraidF_carnum = ARGS[2]
  140. !! max potential condition, used in 'avt' to generate actual condition and price
  141. car['potential_new_condition'] = ARGS[3]
  142. autotraidF_benz = ARGS[5]
  143. '<center><b><<$autotraidF_carname>></b></center>'
  144. !! currently theres no car1.jpg, only car.jpg, either we need logic (which was removed btw)
  145. !! or we need an actual car1.jpg image
  146. '<center><img <<$set_imgh>> src="images/pc/items/accessories/car/car<<autotraidF_carnum>>.jpg"></center>'
  147. !! caching offers, resets on monday (via cikl)
  148. if used_car['<<autotraidF_carnum>>_condition'] = 0 and used_car['<<autotraidF_carnum>>_price'] = 0:
  149. !! used in 'avt' as branching selector, affects price
  150. carT = ARGS[4]
  151. !! generates condition and price for the car
  152. gs 'avt'
  153. end
  154. '<<$car[''potential_current_condition'']>> The car salesman wants <<used_car[''<<autotraidF_carnum>>_price'']>> <b>₽</b> for it.'
  155. act 'Look around some more':
  156. killvar '$autotraidF_carname'
  157. killvar 'autotraidF_carnum'
  158. killvar 'autotraidF_benz'
  159. gt 'autotraidF', 'car'
  160. end
  161. if car = 0 and prava = 1 and money >= used_car['<<autotraidF_carnum>>_price']:
  162. act 'Buy (<<used_car[''<<autotraidF_carnum>>_price'']>> <b>₽</b>)':
  163. cla
  164. money -= used_car['<<autotraidF_carnum>>_price']
  165. $car = $autotraidF_carname
  166. car = autotraidF_carnum
  167. !!benz means fuel
  168. benz = autotraidF_benz
  169. cardrive = 9
  170. car['current_condition'] = used_car['<<autotraidF_carnum>>_condition']
  171. !! sets condition when new (ie max possible condition)
  172. car['new_condition'] = car['potential_new_condition']
  173. wrek = 0
  174. 'You agree and before you know it, the car salesman and you have signed all the necessary documents. You hand over the <<used_car[''<<autotraidF_carnum>>_price'']>> <b>₽</b> in cash, and the car is yours.'
  175. 'Since it''s crammed in between about a million other vehicles, the car salesman moves it outside near the yard''s entrance for you and warns you that there is very little gas in the tank.'
  176. killvar '$autotraidF_carname'
  177. killvar 'autotraidF_carnum'
  178. killvar 'autotraidF_benz'
  179. gs 'shortgs', 'remove_array_element', 'car', 'potential_new_condition'
  180. gs 'shortgs', 'remove_array_element', 'used_car', '<<autotraidF_carnum>>_condition'
  181. gs 'shortgs', 'remove_array_element', 'used_car', '<<autotraidF_carnum>>_price'
  182. act 'Leave': minut += 5 & gt 'city_industrial'
  183. end
  184. end
  185. end
  186. --- autotraidF ---------------------------------