gad_market.qsrc 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488
  1. # gad_market
  2. if $ARGS[0] = 'start':
  3. $region = 'gad'
  4. menu_off = 0
  5. gs 'shortgs', 'setloc', 'gad_market', 'start'
  6. $location_type = 'public_outdoors'
  7. CLOSE ALL
  8. if sound = 0:
  9. if month >=11 and month <= 12 or month >=1 and month <=3:
  10. PLAY 'sound/street2.mp3',30 & PLAY 'sound/zima.mp3',30
  11. else
  12. PLAY 'sound/street2.mp3',30 & PLAY 'sound/street_leto.mp3',30
  13. end
  14. end
  15. gs 'stat'
  16. '<center><h2>Farmers Market</h2></center>'
  17. '<center><img <<$set_imgh>> src="images/locations/gadukino/market/main.jpg"></center>'
  18. 'A small and modest farmers market, a few small shops fill the space.'
  19. *nl
  20. if hour < 8 or hour > 20:
  21. gs 'gad_market', 'close'
  22. exit
  23. end
  24. 'On one side you spot a stand where' + iif(hunters_were_met = 1, ' the hunters are ', ' ') + 'selling <a href="exec:minut += 1 & gt ''gad_market'', ''hunter_stand''">dried goods</a>.'
  25. act 'Browse the <<iif(hunters_were_met = 1, ''hunters'', ''dried food'')>> stand': minut += 1 & gt 'gad_market', 'hunter_stand'
  26. 'You spot a stand filled with <a href="exec:minut += 1 & gt ''gad_market'', ''clothing_stand''">cheap clothing</a>.'
  27. act 'Browse the clothing stand': minut += 1 & gt 'gad_market', 'clothing_stand'
  28. if gad_stand = 1:
  29. if hour <= 20:
  30. act 'Go to your own stand (0:01)': minut += 1 & gt 'gad_market', 'your_stand'
  31. end
  32. act 'Breakdown your stand (0:30)': gt 'gad_market', 'breakdown_stand'
  33. act '<font color="red">Return</font>': *nl '<font color="red">You can''t leave while your stand is still open.</font>'
  34. else
  35. if hour < 18 and (boletus_stored + bilberry_stored + fish_stored) > 0:
  36. act 'Setup your own stand (1:00)': gt 'gad_market', 'build_stand'
  37. elseif hour >= 18:
  38. *nl
  39. 'It''s too late to build your stand'
  40. else
  41. *nl
  42. 'You have nothing to sell.'
  43. end
  44. act 'Return': gt 'gad_market', 'leave'
  45. end
  46. end
  47. !----- Shops -----
  48. if $ARGS[0] = 'hunter_stand':
  49. menu_off = 0
  50. gs 'shortgs', 'setloc', 'gad_market', 'hunter_stand'
  51. $loc_s = 'gad_market'
  52. $args_s = 'hunter_stand'
  53. gs 'stat'
  54. if hour < 8 or hour > 20:
  55. 'The shop is currently closed.'
  56. act 'Leave': gt 'gad_market', 'clothing_stand'
  57. exit
  58. end
  59. '<center><img <<$set_imgh>> src="images/location/gadukino/market/hunter_stand.jpg"></center>'
  60. 'A small stand selling dried meat'
  61. if hunters_were_met = 1: act 'Talk to one of the hunters': gt 'gad_market', 'hunter_talk'
  62. act 'Browse the stand': gt 'gad_market', 'hunter_cart'
  63. act 'Stop browsing': gt 'gad_market', 'start'
  64. end
  65. if $ARGS[0] = 'hunter_cart':
  66. menu_off = 1
  67. gs 'shortgs', 'setloc', 'gad_market', 'hunter_cart'
  68. $loc_s = 'gad_market'
  69. $args_s = 'hunter_cart'
  70. gs 'stat'
  71. $backimage='images/location/gadukino/market/hunter_stand.jpg'
  72. if hour < 8 or hour > 20:
  73. 'The shop is currently closed.'
  74. act 'Leave': gt 'gad_market', 'hunter_stand'
  75. exit
  76. end
  77. gs 'item_cart', 'shoppping_aisle', 'gad_market_hunter'
  78. gs 'stat'
  79. gs 'themes', 'outdoors'
  80. act 'Exit shopping cart': $backimage = '' & gt 'gad_market', 'hunter_stand'
  81. act 'Leave the stand': minut += 1 & gt 'gad_market', 'start'
  82. end
  83. if $ARGS[0] = 'clothing_stand':
  84. menu_off = 0
  85. gs 'shortgs', 'setloc', 'gad_market', 'clothing_stand'
  86. $loc_s = 'gad_market'
  87. $args_s = 'clothing_stand'
  88. '<center><img <<$set_imgh>> src="images/location/gadukino/market/clothing_stand.jpg"></center>'
  89. 'A small stand selling cheap clothes'
  90. if hour < 8 or hour > 20:
  91. 'The shop is currently closed.'
  92. act 'Leave': gt 'gad_market', 'clothing_stand'
  93. exit
  94. end
  95. act 'Browse the clothes': gt 'gad_market', 'clothing_cart'
  96. act 'Browse the swimsuits': gt 'gad_market', 'swimsuit_cart'
  97. act 'Stop browsing': gt 'gad_market', 'start'
  98. end
  99. if $ARGS[0] = 'clothing_cart':
  100. menu_off = 0
  101. gs 'shortgs', 'setloc', 'gad_market', 'clothing_cart'
  102. $loc_s = 'gad_market'
  103. $args_s = 'clothing_cart'
  104. gs 'stat'
  105. '<center><b><font color="maroon">Clothes</font></b></center>'
  106. if hour < 8 or hour > 20:
  107. 'The shop is currently closed.'
  108. act 'Leave': gt 'gad_market', 'clothing_stand'
  109. exit
  110. end
  111. act 'Return': minut += 5 & gt 'gad_market', 'clothing_stand'
  112. gs 'clothing_QV', 'shop_filter_header'
  113. gs 'clothing', 'totals', 'market_outfits'
  114. !!To filter just this set
  115. clo_i = 0
  116. :loopmarket_outfits_filter
  117. i = 1 + clothingstock mod 4
  118. :loopmarket_outfits
  119. if market_outfits[i] = 0:
  120. gs 'clothing_attributes', 'market_outfits', i
  121. gs 'clothing_QV', 'shop_filter'
  122. !!sort by filter
  123. if (clothingfilter['quality'] = 0 and CloQuality = clo_i) or (clothingfilter['inhibition'] = 0 and CloInhibit = clo_i) or clothingfilter['number'] = 0:
  124. if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1:*p '<a href="exec: i = <<i>> & gt ''gad_market'', ''marketclo''"><img <<$set_imgh>> src="images/pc/items/market/clothes/<<i>>.jpg" height="250" /></a>'
  125. end
  126. end
  127. !! Only half of the market outfits are ever sold here.
  128. i += 8
  129. if i <= total: jump 'loopmarket_outfits'
  130. clo_i += 1
  131. if (clothingfilter['quality'] = 0 and clo_i <= 7) or (clothingfilter['inhibition'] = 0 and clo_i <= 50):
  132. jump 'loopmarket_outfits_filter'
  133. end
  134. end
  135. if $ARGS[0] = 'marketclo':
  136. if market_outfits[i] ! 0:
  137. msg 'You already own these clothes.'
  138. gt 'gad_market', 'clothing_cart'
  139. end
  140. gt 'clothing', 'view_clothing_item', 'market_outfits', i, 750, 'shop'
  141. end
  142. if $ARGS[0] = 'swimsuit_cart':
  143. menu_off = 0
  144. gs 'shortgs', 'setloc', 'gad_market', 'swimsuit_cart'
  145. $loc_s = 'gad_market'
  146. $args_s = 'swimsuit_cart'
  147. gs 'stat'
  148. '<center><b><font color="maroon">Swimsuits</font></b></center>'
  149. if hour < 8 or hour > 20:
  150. 'The shop is currently closed.'
  151. act 'Leave': gt 'gad_market', 'clothing_stand'
  152. exit
  153. end
  154. act 'Return': minut += 5 & gt 'gad_market', 'clothing_stand'
  155. gs 'clothing_QV', 'shop_filter_header'
  156. !!To filter just this set
  157. clo_i = 0
  158. :loopgad_swim_filter
  159. if (Clothingstock / 4) mod 2 = 0:
  160. i = 4
  161. if scandalicious_swimsuit[i] = 0:
  162. gs 'clothing_attributes', 'scandalicious_swimsuit', i
  163. gs 'clothing_QV', 'shop_filter'
  164. !!sort by filter
  165. if (clothingfilter['quality'] = 0 and CloQuality = clo_i) or (clothingfilter['inhibition'] = 0 and CloInhibit = clo_i) or clothingfilter['number'] = 0:
  166. if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1: *p '<a href="exec: i = <<i>> & gt ''gad_market'', ''swim1''"><img src="images/pc/items/scandalicious/swim/one/<<i>>.jpg" height="250" /></a>'
  167. end
  168. end
  169. i = 6
  170. if scandalicious_bikinis[i] = 0:
  171. gs 'clothing_attributes', 'scandalicious_bikinis', i
  172. gs 'clothing_QV', 'shop_filter'
  173. !!sort by filter
  174. if (clothingfilter['quality'] = 0 and CloQuality = clo_i) or (clothingfilter['inhibition'] = 0 and CloInhibit = clo_i) or clothingfilter['number'] = 0:
  175. if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1: *p '<a href="exec: i = <<i>> & gt ''gad_market'', ''bikini1''"><img src="images/pc/items/scandalicious/swim/two/<<i>>.jpg" height="250" /></a>'
  176. end
  177. end
  178. i = 7
  179. if scandalicious_bikinis[i] = 0:
  180. gs 'clothing_attributes', 'scandalicious_bikinis', i
  181. gs 'clothing_QV', 'shop_filter'
  182. !!sort by filter
  183. if (clothingfilter['quality'] = 0 and CloQuality = clo_i) or (clothingfilter['inhibition'] = 0 and CloInhibit = clo_i) or clothingfilter['number'] = 0:
  184. if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1: *p '<a href="exec: i = <<i>> & gt ''gad_market'', ''bikini1''"><img src="images/pc/items/scandalicious/swim/two/<<i>>.jpg" height="250" /></a>'
  185. end
  186. end
  187. else
  188. i = 15
  189. if scandalicious_swimsuit[i] = 0:
  190. gs 'clothing_attributes', 'scandalicious_swimsuit', i
  191. gs 'clothing_QV', 'shop_filter'
  192. !!sort by filter
  193. if (clothingfilter['quality'] = 0 and CloQuality = clo_i) or (clothingfilter['inhibition'] = 0 and CloInhibit = clo_i) or clothingfilter['number'] = 0:
  194. if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1: *p '<a href="exec: i = <<i>> & gt ''gad_market'', ''swim1''"><img src="images/pc/items/scandalicious/swim/one/<<i>>.jpg" height="250" /></a>'
  195. end
  196. end
  197. i = 22
  198. if scandalicious_swimsuit[i] = 0:
  199. gs 'clothing_attributes', 'scandalicious_swimsuit', i
  200. gs 'clothing_QV', 'shop_filter'
  201. !!sort by filter
  202. if (clothingfilter['quality'] = 0 and CloQuality = clo_i) or (clothingfilter['inhibition'] = 0 and CloInhibit = clo_i) or clothingfilter['number'] = 0:
  203. if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1: *p '<a href="exec: i = <<i>> & gt ''gad_market'', ''swim1''"><img src="images/pc/items/scandalicious/swim/one/<<i>>.jpg" height="250" /></a>'
  204. end
  205. end
  206. i = 60
  207. if scandalicious_bikinis[i] = 0:
  208. gs 'clothing_attributes', 'scandalicious_bikinis', i
  209. gs 'clothing_QV', 'shop_filter'
  210. !!sort by filter
  211. if (clothingfilter['quality'] = 0 and CloQuality = clo_i) or (clothingfilter['inhibition'] = 0 and CloInhibit = clo_i) or clothingfilter['number'] = 0:
  212. if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1: *p '<a href="exec: i = <<i>> & gt ''gad_market'', ''bikini1''"><img src="images/pc/items/scandalicious/swim/two/<<i>>.jpg" height="250" /></a>'
  213. end
  214. end
  215. end
  216. clo_i += 1
  217. if clothingfilter['quality'] = 0 and clo_i <= 7 or clothingfilter['inhibition'] = 0 and clo_i <= 50:
  218. jump 'loopgad_swim_filter'
  219. end
  220. end
  221. if $ARGS[0] = 'bikini1': gt 'clothing', 'view_clothing_item', 'scandalicious_bikinis', i, 1750, 'shop'
  222. if $ARGS[0] = 'swim1': gt 'clothing', 'view_clothing_item', 'scandalicious_swimsuit', i, 1750, 'shop'
  223. if $ARGS[0] = 'build_stand':
  224. menu_off = 1
  225. gs 'stat'
  226. '<center><img <<$set_imgh>> src="images/locations/gadukino/market/build_stand.jpg"></center>'
  227. 'It takes you roughly an hour to setup your stand.'
  228. act 'Continue':
  229. minut += rand(40, 60)
  230. gad_stand = 1
  231. gt 'gad_market', 'your_stand'
  232. end
  233. end
  234. if $ARGS[0] = 'breakdown_stand':
  235. menu_off = 1
  236. gs 'stat'
  237. '<center><img <<$set_imgh>> src="images/locations/gadukino/market/build_stand.jpg"></center>'
  238. 'It takes you roughly half an hour to break down your stand.'
  239. act 'Continue':
  240. minut += rand(20, 30)
  241. gad_stand = 0
  242. gt 'gad_market', 'start'
  243. end
  244. end
  245. if $ARGS[0] = 'your_stand':
  246. gs 'shortgs', 'setloc', 'gad_market', 'your_stand'
  247. gs 'stat'
  248. '<center><b><font color="maroon">Your Stand</font></b></center>'
  249. '<center><img <<$set_imgh>> src="images/locations/gadukino/market/your_stand.png"></center>'
  250. gs 'gad_market', 'see_stored'
  251. act 'Try and sell your wares': gt 'gad_market', 'sell_wares'
  252. act 'Go back': gt 'gad_market', 'start'
  253. end
  254. if $ARGS[0] = 'sell_wares':
  255. menu_off = 1
  256. gs 'stat'
  257. if hour < 8 or hour > 20:
  258. '<center><b><font color="maroon">Your Stand</font></b></center>'
  259. '<center><img <<$set_imgh>> src="images/locations/gadukino/market/your_stand.png"></center>'
  260. 'The market is closed, you should break down your stand.'
  261. act 'Break down your stand': gt 'gad_market', 'breakdown_stand'
  262. exit
  263. end
  264. temp_rand = rand(0, 249)
  265. if temp_rand >= pcs_chrsm + pcs_persuas:
  266. if rand(0, 2) > 0:
  267. gt 'gad_market', 'sell_talk'
  268. else
  269. gt 'gad_market', 'sell_nobody'
  270. end
  271. else
  272. temp_rand = rand(0, 6)
  273. if temp_rand < 2 and boletus_stored > 0:
  274. gt 'gad_market', 'sell_mushrooms'
  275. elseif temp_rand >= 2 and temp_rand < 4 and bilberry_stored > 0:
  276. gt 'gad_market', 'sell_berries'
  277. elseif temp_rand >= 4 and temp_rand < 6 and fish_stored > 0:
  278. gt 'gad_market', 'sell_fish'
  279. else
  280. gt 'gad_market', 'sell_talk'
  281. end
  282. end
  283. end
  284. if $ARGS[0] = 'sell_nobody':
  285. minut += 10
  286. gs 'stat'
  287. '<center><img <<$set_imgh>> src="images/locations/gadukino/market/sell_nobody.jpg"></center>'
  288. gs 'gad_market', 'see_stored'
  289. 'You wait 10 minutes, but nobody seems interested in what you have to sell'
  290. act 'Continue trying to sell your wares': gt 'gad_market', 'sell_wares'
  291. act 'Stop selling your wares': gt 'gad_market', 'your_stand'
  292. elseif $ARGS[0] = 'sell_mushrooms':
  293. minut += 10
  294. gs 'stat'
  295. '<center><img <<$set_imgh>> src="images/locations/gadukino/market/sell_mushrooms1.jpg"></center>'
  296. gs 'gad_market', 'see_stored'
  297. 'Somebody wants to buy a kg of mushrooms!'
  298. act 'Sell them 1 kg of stored mushrooms':
  299. *clr & cla
  300. money += 20
  301. boletus_stored -= 1
  302. gs 'stat'
  303. '<center><img <<$set_imgh>> src="images/locations/gadukino/market/sale<<rand(1, 4)>>.jpg"></center>'
  304. gs 'gad_market', 'see_stored'
  305. 'You sell 1 kg of stored mushrooms'
  306. act 'Continue trying to sell your wares': gt 'gad_market', 'sell_wares'
  307. act 'Stop selling your wares': gt 'gad_market', 'your_stand'
  308. end
  309. elseif $ARGS[0] = 'sell_berries':
  310. minut += 10
  311. gs 'stat'
  312. '<center><img <<$set_imgh>> src="images/locations/gadukino/market/sell_berries1.jpg"></center>'
  313. gs 'gad_market', 'see_stored'
  314. 'Somebody wants to buy a kg of berries!'
  315. act 'Sell them 1 kg of stored berries':
  316. *clr & cla
  317. money += 20
  318. bilberry_stored -= 1
  319. gs 'stat'
  320. '<center><img <<$set_imgh>> src="images/locations/gadukino/market/sale<<rand(1, 4)>>.jpg"></center>'
  321. gs 'gad_market', 'see_stored'
  322. 'You sell 1 kg of stored berries'
  323. act 'Continue trying to sell your wares': gt 'gad_market', 'sell_wares'
  324. act 'Stop selling your wares': gt 'gad_market', 'your_stand'
  325. end
  326. elseif $ARGS[0] = 'sell_fish':
  327. minut += 10
  328. gs 'stat'
  329. '<center><img <<$set_imgh>> src="images/locations/gadukino/market/sell_fish1.jpg"></center>'
  330. gs 'gad_market', 'see_stored'
  331. 'Somebody wants to buy a kg of preserved fish!'
  332. act 'Sell them 1 kg of preserved fish':
  333. *clr & cla
  334. money += 20
  335. fish_stored -= 1
  336. gs 'stat'
  337. '<center><img <<$set_imgh>> src="images/locations/gadukino/market/sale<<rand(1, 4)>>.jpg"></center>'
  338. gs 'gad_market', 'see_stored'
  339. 'You sell 1 kg of preserved fish'
  340. act 'Continue trying to sell your wares': gt 'gad_market', 'sell_wares'
  341. act 'Stop selling your wares': gt 'gad_market', 'your_stand'
  342. end
  343. elseif $ARGS[0] = 'sell_talk':
  344. minut += 10
  345. gs 'stat'
  346. '<center><img <<$set_imgh>> src="images/locations/gadukino/market/sell_talk.jpg"></center>'
  347. gs 'gad_market', 'see_stored'
  348. 'A couple of people walk up to your stand and you spend tem minutes making some small-talk.'
  349. act 'Continue trying to sell your wares': gt 'gad_market', 'sell_wares'
  350. act 'Stop selling your wares': gt 'gad_market', 'your_stand'
  351. end
  352. if $ARGS[0] = 'see_stored':
  353. if boletus_stored > 0: 'You currently are storing <b><<boletus_stored>></b> kg of raw mushrooms.'
  354. if bilberry_stored > 0: 'You currently are storing <b><<bilberry_stored>></b> kg of raw berries.'
  355. if fish_stored > 0: 'You currently are storing <b><<fish_stored>></b> kg of preserved fish.'
  356. if boletus_stored + bilberry_stored + fish_stored = 0: 'You currently have nothing that you can sell'
  357. end
  358. if $ARGS[0] = 'hunter_talk':
  359. menu_off = 1
  360. minut += 5
  361. gs 'stat'
  362. '<center><img <<$set_imgh>> scr="images/system/image_needed.png"></center>'
  363. 'You talk to the hunters.'
  364. act 'Return': gt 'gad_market', 'hunter_stand'
  365. end
  366. if $ARGS[0] = 'close':
  367. menu_off = 1
  368. gs 'stat'
  369. if gad_stand = 1:
  370. 'The market is closing, you should break down your stand.'
  371. act 'Break down your stand': gt 'gad_market', 'breakdown_stand'
  372. else
  373. 'The market is closing and so you head back to the main street.'
  374. act 'Return': gt 'gad_market', 'leave'
  375. end
  376. end
  377. if $ARGS[0] = 'leave':
  378. minut += 5
  379. killvar 'temp_rand'
  380. gt 'gadukino'
  381. end
  382. --- gad_market ---------------------------------