1
0

noticeboard.qsrc 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  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. if month > 8 and ml_guitarlesson['advertisement'] = 0: $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. if month > 8 and ml_guitarlesson['advertisement'] = 0: $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 = 'city_mall':
  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. jobsec = 1
  117. minut +=2
  118. gs 'stat'
  119. act 'Continue': gt 'noticeboard','look'
  120. end
  121. if $ARGS[0] = 'advert5':
  122. $temp = '<p><center><table><tr><td><img <<$set_imgh>> src="images/locations/shared/noticeboards/'
  123. if $loc = 'pav_commercial' or $loc = 'pav_commcenter':
  124. $temp += 'pav/flyer_pushkin.jpg'
  125. else
  126. $temp += 'city/flyer_diner.jpg'
  127. end
  128. $temp += '"></td></tr></table></center>'
  129. '<<$temp>>'
  130. killvar '$temp'
  131. minut +=2
  132. gs 'stat'
  133. act 'Continue': gt 'noticeboard','look'
  134. end
  135. if $ARGS[0] = 'advert6':
  136. $temp = '<p><center><table><tr><td><img <<$set_imgh>> src="images/locations/shared/noticeboards/'
  137. if $loc = 'pav_commercial' or $loc = 'pav_commcenter':
  138. $temp += 'pav/flyer_therapy.jpg'
  139. else
  140. $temp += 'city/flyer_fitness.jpg'
  141. end
  142. $temp += '"></td></tr></table></center>'
  143. '<<$temp>>'
  144. killvar '$temp'
  145. minut +=2
  146. gs 'stat'
  147. act 'Continue': gt 'noticeboard','look'
  148. end
  149. if $ARGS[0] = 'advert7':
  150. end
  151. !! possible coordinates
  152. !! upper row
  153. !! 1 '<<3*givemeheight>>,<<2*givemeheight>>,<<7*givemeheight>>,<<8*givemeheight>>' - taken by advert0
  154. !! 2 '<<8*givemeheight>>,<<2*givemeheight>>,<<12*givemeheight>>,<<8*givemeheight>>' - taken by advert3
  155. !! 3 '<<13*givemeheight>>,<<2*givemeheight>>,<<17*givemeheight>>,<<8*givemeheight>>' - taken by advert5
  156. !! 4 '<<18*givemeheight>>,<<2*givemeheight>>,<<22*givemeheight>>,<<8*givemeheight>>' - taken by advert2
  157. !! lower row
  158. !! 5 '<<3*givemeheight>>,<<12*givemeheight>>,<<7*givemeheight>>,<<18*givemeheight>>' - taken by advert6
  159. !! 6 '<<8*givemeheight>>,<<12*givemeheight>>,<<12*givemeheight>>,<<18*givemeheight>>' - taken by advert1
  160. !! 7 '<<13*givemeheight>>,<<12*givemeheight>>,<<17*givemeheight>>,<<18*givemeheight>>' - taken by advert7
  161. !! 8 '<<18*givemeheight>>,<<12*givemeheight>>,<<22*givemeheight>>,<<18*givemeheight>>' - taken by advert4
  162. if $ARGS[0] = 'test_advert0':
  163. if $loc ! '':
  164. $result = '<<3*givemeheight>>,<<2*givemeheight>>,<<7*givemeheight>>,<<8*givemeheight>>'
  165. NumberOfNewAdverts += 1
  166. else
  167. $result = '0,0,0,0'
  168. end
  169. end
  170. if $ARGS[0] = 'test_advert1':
  171. if $loc ! '':
  172. $result = '<<8*givemeheight>>,<<12*givemeheight>>,<<12*givemeheight>>,<<18*givemeheight>>'
  173. NumberOfNewAdverts += 1
  174. else
  175. $result = '0,0,0,0'
  176. end
  177. end
  178. if $ARGS[0] = 'test_advert2':
  179. if $loc ! '':
  180. $result = '<<18*givemeheight>>,<<2*givemeheight>>,<<22*givemeheight>>,<<8*givemeheight>>'
  181. NumberOfNewAdverts += 1
  182. else
  183. $result = '0,0,0,0'
  184. end
  185. end
  186. if $ARGS[0] = 'test_advert3':
  187. if $loc = 'pav_commercial' or $loc = 'pav_commcenter':
  188. $result = '<<8*givemeheight>>,<<2*givemeheight>>,<<12*givemeheight>>,<<8*givemeheight>>'
  189. NumberOfNewAdverts += 1
  190. else
  191. $result = '0,0,0,0'
  192. end
  193. end
  194. if $ARGS[0] = 'test_advert4':
  195. if $loc ! 'pav_commercial' and $loc ! 'pav_commcenter':
  196. $result = '<<18*givemeheight>>,<<12*givemeheight>>,<<22*givemeheight>>,<<18*givemeheight>>'
  197. NumberOfNewAdverts += 1
  198. else
  199. $result = '0,0,0,0'
  200. end
  201. end
  202. if $ARGS[0] = 'test_advert5':
  203. if $loc ! '':
  204. $result = '<<13*givemeheight>>,<<2*givemeheight>>,<<17*givemeheight>>,<<8*givemeheight>>'
  205. NumberOfNewAdverts += 1
  206. else
  207. $result = '0,0,0,0'
  208. end
  209. end
  210. if $ARGS[0] = 'test_advert6':
  211. if $loc ! '':
  212. $result = '<<3*givemeheight>>,<<12*givemeheight>>,<<7*givemeheight>>,<<18*givemeheight>>'
  213. NumberOfNewAdverts += 1
  214. else
  215. $result = '0,0,0,0'
  216. end
  217. end
  218. if $ARGS[0] = 'test_advert7':
  219. if $loc = '':
  220. $result = '<<13*givemeheight>>,<<12*givemeheight>>,<<17*givemeheight>>,<<18*givemeheight>>'
  221. NumberOfNewAdverts += 1
  222. else
  223. $result = '0,0,0,0'
  224. end
  225. end
  226. --- noticeboard ---------------------------------