noticeboard.qsrc 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. # noticeboard
  2. !! use gs 'noticeboard','start'
  3. $location_type = 'public_indoors'
  4. if $ARGS[0] = 'start':
  5. menu_off = 1
  6. gs 'saveposition'
  7. gt 'noticeboard','look'
  8. end
  9. if $ARGS[0] = 'look':
  10. if $set_imgh!'':givemeheight=val(mid($set_imgh,10,len($set_imgh)-9))/20 else givemeheight = 30
  11. NumberOfNewAdverts = 0
  12. $advert0 = func('noticeboard','test_advert0')
  13. $advert1 = func('noticeboard','test_advert1')
  14. $advert2 = func('noticeboard','test_advert2')
  15. $advert3 = func('noticeboard','test_advert3')
  16. $advert4 = func('noticeboard','test_advert4')
  17. $advert5 = func('noticeboard','test_advert5')
  18. $advert6 = func('noticeboard','test_advert6')
  19. $advert7 = func('noticeboard','test_advert7')
  20. !!$advert8 = func('noticeboard','test_advert8')
  21. !!$advert9 = func('noticeboard','test_advert9')
  22. $noticeboardmap = '<map name="noticemap">'
  23. $noticeboardmap += '<area shape="rect" coords="<<$advert0>>" href="exec:gt ''noticeboard'', ''advert0''" alt="--0--">'
  24. $noticeboardmap += '<area shape="rect" coords="<<$advert1>>" href="exec:gt ''noticeboard'', ''advert1''" alt="--1--">'
  25. $noticeboardmap += '<area shape="rect" coords="<<$advert2>>" href="exec:gt ''noticeboard'', ''advert2''" alt="--2--">'
  26. $noticeboardmap += '<area shape="rect" coords="<<$advert3>>" href="exec:gt ''noticeboard'', ''advert3''" alt="--3--">'
  27. $noticeboardmap += '<area shape="rect" coords="<<$advert4>>" href="exec:gt ''noticeboard'', ''advert4''" alt="--4--">'
  28. $noticeboardmap += '<area shape="rect" coords="<<$advert5>>" href="exec:gt ''noticeboard'', ''advert5''" alt="--5--">'
  29. $noticeboardmap += '<area shape="rect" coords="<<$advert6>>" href="exec:gt ''noticeboard'', ''advert6''" alt="--6--">'
  30. $noticeboardmap += '<area shape="rect" coords="<<$advert7>>" href="exec:gt ''noticeboard'', ''advert7''" alt="--7--">'
  31. $noticeboardmap += '</map>'
  32. if $loc = 'torgcentr':
  33. $name_of_the_picure = 'city_citycenter'
  34. else
  35. $name_of_the_picure = $loc
  36. end
  37. $noticeboardmap += '<center><img <<$set_imgh>> src="images/locations/shared/noticeboards/<<$name_of_the_picure>>.jpg" USEMAP="#noticemap"></center>'
  38. *pl $noticeboardmap
  39. killvar '$noticeboardmap'
  40. if NumberOfNewAdverts = 0: *nl 'There are no interesting adverts at the board.'
  41. if NumberOfNewAdverts = 1: *nl 'There is one interesting advert at the board.'
  42. if NumberOfNewAdverts > 1: *nl 'There are <<NumberOfNewAdverts>> interesting adverts at the board.'
  43. act 'Leave the board':
  44. killvar '$noticeboardmap'
  45. gt 'restoreposition'
  46. end
  47. end
  48. if $ARGS[0] = 'advert0':
  49. $temp = '<p><center><table><tr><td><img <<$set_imgh>> src="images/locations/shared/noticeboards/'
  50. if $loc = 'pav_commercial' or $loc = 'pav_commcenter':
  51. $temp += 'city/flyer_modelling.jpg'
  52. else
  53. $temp += 'city/flyer_modelling.jpg'
  54. end
  55. $temp += '"></td></tr></table></center>'
  56. '<<$temp>>'
  57. killvar '$temp'
  58. minut +=2
  59. gs 'stat'
  60. act 'Continue': gt 'noticeboard','look'
  61. !! 'Wanted dog walker!'
  62. !! act 'Call the number': gs 'telefon', 'phone_call_reject'
  63. !! act 'Record the phone number':
  64. !! gs 'telefon','Add_contact','images/system/phone/icons/icon_na.png',' gs ''telefon'', ''phone_call_reject'' '
  65. !! gt 'noticeboard','look'
  66. !! end
  67. end
  68. if $ARGS[0] = 'advert1':
  69. $temp = '<p><center><table><tr><td><img <<$set_imgh>> src="images/locations/shared/noticeboards/'
  70. if $loc = 'pav_commercial' or $loc = 'pav_commcenter':
  71. $temp += 'pav/flyer_music_guitar.jpg'
  72. else
  73. $temp += 'city/flyer_music_singing.jpg'
  74. end
  75. $temp += '"></td></tr></table></center>'
  76. '<<$temp>>'
  77. killvar '$temp'
  78. minut +=2
  79. gs 'stat'
  80. act 'Continue': gt 'noticeboard','look'
  81. end
  82. if $ARGS[0] = 'advert2':
  83. $temp = '<p><center><table><tr><td><img <<$set_imgh>> src="images/locations/shared/noticeboards/'
  84. if $loc = 'pav_commercial' or $loc = 'pav_commcenter':
  85. $temp += 'pav/flyer_pushkin_burlesque.jpg'
  86. else
  87. $temp += 'pav/flyer_pushkin_burlesque.jpg'
  88. end
  89. $temp += '"></td></tr></table></center>'
  90. '<<$temp>>'
  91. killvar '$temp'
  92. minut +=2
  93. gs 'stat'
  94. act 'Continue': gt 'noticeboard','look'
  95. end
  96. if $ARGS[0] = 'advert3':
  97. $temp = '<p><center><table><tr><td><img <<$set_imgh>> src="images/locations/shared/noticeboards/'
  98. if $loc = 'pav_commercial' or $loc = 'pav_commcenter':
  99. $temp += 'city/flyer_secretary.jpg'
  100. end
  101. $temp += '"></td></tr></table></center>'
  102. '<<$temp>>'
  103. killvar '$temp'
  104. minut +=2
  105. gs 'stat'
  106. act 'Continue': gt 'noticeboard','look'
  107. end
  108. if $ARGS[0] = 'advert4':
  109. $temp = '<p><center><table><tr><td><img <<$set_imgh>> src="images/locations/shared/noticeboards/'
  110. if $loc ! 'pav_commercial' and $loc ! 'pav_commcenter':
  111. $temp += 'city/flyer_secretary.jpg'
  112. end
  113. $temp += '"></td></tr></table></center>'
  114. '<<$temp>>'
  115. killvar '$temp'
  116. minut +=2
  117. gs 'stat'
  118. act 'Continue': gt 'noticeboard','look'
  119. end
  120. if $ARGS[0] = 'advert5':
  121. $temp = '<p><center><table><tr><td><img <<$set_imgh>> src="images/locations/shared/noticeboards/'
  122. if $loc = 'pav_commercial' or $loc = 'pav_commcenter':
  123. $temp += 'pav/flyer_pushkin.jpg'
  124. else
  125. $temp += 'city/flyer_diner.jpg'
  126. end
  127. $temp += '"></td></tr></table></center>'
  128. '<<$temp>>'
  129. killvar '$temp'
  130. minut +=2
  131. gs 'stat'
  132. act 'Continue': gt 'noticeboard','look'
  133. end
  134. if $ARGS[0] = 'advert6':
  135. $temp = '<p><center><table><tr><td><img <<$set_imgh>> src="images/locations/shared/noticeboards/'
  136. if $loc = 'pav_commercial' or $loc = 'pav_commcenter':
  137. $temp += 'pav/flyer_therapy.jpg'
  138. else
  139. $temp += 'city/flyer_fitness.jpg'
  140. end
  141. $temp += '"></td></tr></table></center>'
  142. '<<$temp>>'
  143. killvar '$temp'
  144. minut +=2
  145. gs 'stat'
  146. act 'Continue': gt 'noticeboard','look'
  147. end
  148. if $ARGS[0] = 'advert7':
  149. end
  150. !! possible coordinates
  151. !! upper row
  152. !! 1 '<<3*givemeheight>>,<<2*givemeheight>>,<<7*givemeheight>>,<<8*givemeheight>>' - taken by advert0
  153. !! 2 '<<8*givemeheight>>,<<2*givemeheight>>,<<12*givemeheight>>,<<8*givemeheight>>' - taken by advert3
  154. !! 3 '<<13*givemeheight>>,<<2*givemeheight>>,<<17*givemeheight>>,<<8*givemeheight>>' - taken by advert5
  155. !! 4 '<<18*givemeheight>>,<<2*givemeheight>>,<<22*givemeheight>>,<<8*givemeheight>>' - taken by advert2
  156. !! lower row
  157. !! 5 '<<3*givemeheight>>,<<12*givemeheight>>,<<7*givemeheight>>,<<18*givemeheight>>' - taken by advert6
  158. !! 6 '<<8*givemeheight>>,<<12*givemeheight>>,<<12*givemeheight>>,<<18*givemeheight>>' - taken by advert1
  159. !! 7 '<<13*givemeheight>>,<<12*givemeheight>>,<<17*givemeheight>>,<<18*givemeheight>>' - taken by advert7
  160. !! 8 '<<18*givemeheight>>,<<12*givemeheight>>,<<22*givemeheight>>,<<18*givemeheight>>' - taken by advert4
  161. if $ARGS[0] = 'test_advert0':
  162. if $loc ! '':
  163. $result = '<<3*givemeheight>>,<<2*givemeheight>>,<<7*givemeheight>>,<<8*givemeheight>>'
  164. NumberOfNewAdverts += 1
  165. else
  166. $result = '0,0,0,0'
  167. end
  168. end
  169. if $ARGS[0] = 'test_advert1':
  170. if $loc ! '':
  171. $result = '<<8*givemeheight>>,<<12*givemeheight>>,<<12*givemeheight>>,<<18*givemeheight>>'
  172. NumberOfNewAdverts += 1
  173. else
  174. $result = '0,0,0,0'
  175. end
  176. end
  177. if $ARGS[0] = 'test_advert2':
  178. if $loc ! '':
  179. $result = '<<18*givemeheight>>,<<2*givemeheight>>,<<22*givemeheight>>,<<8*givemeheight>>'
  180. NumberOfNewAdverts += 1
  181. else
  182. $result = '0,0,0,0'
  183. end
  184. end
  185. if $ARGS[0] = 'test_advert3':
  186. if $loc = 'pav_commercial' or $loc = 'pav_commcenter':
  187. $result = '<<8*givemeheight>>,<<2*givemeheight>>,<<12*givemeheight>>,<<8*givemeheight>>'
  188. NumberOfNewAdverts += 1
  189. else
  190. $result = '0,0,0,0'
  191. end
  192. end
  193. if $ARGS[0] = 'test_advert4':
  194. if $loc ! 'pav_commercial' and $loc ! 'pav_commcenter':
  195. $result = '<<18*givemeheight>>,<<12*givemeheight>>,<<22*givemeheight>>,<<18*givemeheight>>'
  196. NumberOfNewAdverts += 1
  197. else
  198. $result = '0,0,0,0'
  199. end
  200. end
  201. if $ARGS[0] = 'test_advert5':
  202. if $loc ! '':
  203. $result = '<<13*givemeheight>>,<<2*givemeheight>>,<<17*givemeheight>>,<<8*givemeheight>>'
  204. NumberOfNewAdverts += 1
  205. else
  206. $result = '0,0,0,0'
  207. end
  208. end
  209. if $ARGS[0] = 'test_advert6':
  210. if $loc ! '':
  211. $result = '<<3*givemeheight>>,<<12*givemeheight>>,<<7*givemeheight>>,<<18*givemeheight>>'
  212. NumberOfNewAdverts += 1
  213. else
  214. $result = '0,0,0,0'
  215. end
  216. end
  217. if $ARGS[0] = 'test_advert7':
  218. if $loc = '':
  219. $result = '<<13*givemeheight>>,<<12*givemeheight>>,<<17*givemeheight>>,<<18*givemeheight>>'
  220. NumberOfNewAdverts += 1
  221. else
  222. $result = '0,0,0,0'
  223. end
  224. end
  225. --- noticeboard ---------------------------------