home *** CD-ROM | disk | FTP | other *** search
/ Internet 1996 World Exposition / park.org.s3.amazonaws.com.7z / park.org.s3.amazonaws.com / Japan / Kyoto / culture / hinadan / hina.dcr / 00084.ls < prev    next >
Encoding:
Text File  |  2017-09-21  |  6.1 KB  |  220 lines

  1. global gloch, glocv, gkanseilist
  2.  
  3. on init_rtn2
  4.   cursor([201, 202])
  5.   set gkanseilist to [0, 0, 0, 0, 0]
  6.   repeat with n = 16 to 19
  7.     set the visible of sprite n to 0
  8.   end repeat
  9.   repeat with n = 22 to 24
  10.     puppetSprite(n, 1)
  11.     set the moveableSprite of sprite n to 1
  12.     set the visible of sprite n to 1
  13.   end repeat
  14.   repeat with n = 7 to 11
  15.     set the visible of sprite n to 0
  16.   end repeat
  17.   set worklist to [1, 2, 3]
  18.   repeat with n = 1 to 3
  19.     set position to random(4 - n)
  20.     if getAt(worklist, position) = 1 then
  21.       set the locH of sprite (n + 21) to 335
  22.       set the locV of sprite (n + 21) to 230
  23.     end if
  24.     if getAt(worklist, position) = 2 then
  25.       set the locH of sprite (n + 21) to 385
  26.       set the locV of sprite (n + 21) to 230
  27.     end if
  28.     if getAt(worklist, position) = 3 then
  29.       set the locH of sprite (n + 21) to 435
  30.       set the locV of sprite (n + 21) to 230
  31.     end if
  32.     deleteAt(worklist, position)
  33.   end repeat
  34. end
  35.  
  36. on main_rtn2
  37.   when mouseDown then LOCATION_SET_RTN2
  38.   name_rtn2()
  39.   shadow_rtn2()
  40.   when mouseUp then S2_SET_RTN
  41.   kansei_chk2()
  42. end
  43.  
  44. on location_set_rtn2
  45.   if (clickOn() >= 22) and (clickOn() <= 24) then
  46.     nothing()
  47.   else
  48.     set gloch to 0
  49.     set glocv to 0
  50.     return 
  51.   end if
  52.   cursor([203, 204])
  53.   if (getAt(gkanseilist, 1) = 0) and (clickOn() = 22) then
  54.     puppetSound("SE01.AIF")
  55.   end if
  56.   if (getAt(gkanseilist, 2) = 0) and (clickOn() = 23) then
  57.     puppetSound("SE01.AIF")
  58.   end if
  59.   if (getAt(gkanseilist, 3) = 0) and (clickOn() = 24) then
  60.     puppetSound("SE01.AIF")
  61.   end if
  62.   set gloch to the locH of sprite clickOn()
  63.   set glocv to the locV of sprite clickOn()
  64. end
  65.  
  66. on shadow_rtn2
  67.   repeat with n = 22 to 24
  68.     if clickOn() = n then
  69.       if sprite n intersects 7 then
  70.         set the visible of sprite 7 to 1
  71.       else
  72.         set the visible of sprite 7 to 0
  73.       end if
  74.       if sprite n intersects 8 then
  75.         set the visible of sprite 8 to 1
  76.       else
  77.         set the visible of sprite 8 to 0
  78.       end if
  79.       if sprite n intersects 9 then
  80.         set the visible of sprite 9 to 1
  81.       else
  82.         set the visible of sprite 9 to 0
  83.       end if
  84.       exit repeat
  85.     end if
  86.   end repeat
  87.   updateStage()
  88. end
  89.  
  90. on s2_set_rtn
  91.   if gloch = 0 then
  92.     return 
  93.   end if
  94.   cursor([201, 202])
  95.   set kanseiflg to 0
  96.   if (getAt(gkanseilist, 1) = 0) and (clickOn() = 22) then
  97.     if (the locH of sprite 22 >= 249) and (the locH of sprite 22 <= 259) then
  98.       if (the locV of sprite 22 >= 102) and (the locV of sprite 22 <= 112) then
  99.         puppetSound("SE02.AIF")
  100.         set the locH of sprite 22 to 254
  101.         set the locV of sprite 22 to 107
  102.         set the moveableSprite of sprite 22 to 0
  103.         set the visible of sprite 17 to 1
  104.         set the visible of sprite 22 to 0
  105.         setAt(gkanseilist, 1, 1)
  106.         set kanseiflg to 1
  107.       end if
  108.     end if
  109.   end if
  110.   if (getAt(gkanseilist, 2) = 0) and (clickOn() = 23) then
  111.     if (the locH of sprite 23 >= 152) and (the locH of sprite 23 <= 162) then
  112.       if (the locV of sprite 23 >= 110) and (the locV of sprite 23 <= 120) then
  113.         puppetSound("SE02.AIF")
  114.         set the locH of sprite 23 to 157
  115.         set the locV of sprite 23 to 115
  116.         set the moveableSprite of sprite 23 to 0
  117.         set the visible of sprite 18 to 1
  118.         set the visible of sprite 23 to 0
  119.         setAt(gkanseilist, 2, 1)
  120.         set kanseiflg to 1
  121.       end if
  122.     end if
  123.   end if
  124.   if (getAt(gkanseilist, 3) = 0) and (clickOn() = 24) then
  125.     if (the locH of sprite 24 >= 54) and (the locH of sprite 24 <= 64) then
  126.       if (the locV of sprite 24 >= 102) and (the locV of sprite 24 <= 112) then
  127.         puppetSound("SE02.AIF")
  128.         set the locH of sprite 24 to 59
  129.         set the locV of sprite 24 to 107
  130.         set the moveableSprite of sprite 24 to 0
  131.         set the visible of sprite 19 to 1
  132.         set the visible of sprite 24 to 0
  133.         setAt(gkanseilist, 3, 1)
  134.         set kanseiflg to 1
  135.       end if
  136.     end if
  137.   end if
  138.   if kanseiflg = 0 then
  139.     if (getAt(gkanseilist, 1) = 0) and (clickOn() = 22) then
  140.       puppetSound("SE03.AIF")
  141.       set the locH of sprite clickOn() to gloch
  142.       set the locV of sprite clickOn() to glocv
  143.     end if
  144.     if (getAt(gkanseilist, 2) = 0) and (clickOn() = 23) then
  145.       puppetSound("SE03.AIF")
  146.       set the locH of sprite clickOn() to gloch
  147.       set the locV of sprite clickOn() to glocv
  148.     end if
  149.     if (getAt(gkanseilist, 3) = 0) and (clickOn() = 24) then
  150.       puppetSound("SE03.AIF")
  151.       set the locH of sprite clickOn() to gloch
  152.       set the locV of sprite clickOn() to glocv
  153.     end if
  154.   end if
  155. end
  156.  
  157. on kansei_chk2
  158.   set cnt to 0
  159.   repeat with n = 1 to 3
  160.     if getAt(gkanseilist, n) = 1 then
  161.       set cnt to cnt + 1
  162.     end if
  163.   end repeat
  164.   if cnt = 3 then
  165.     set the visible of sprite 7 to 0
  166.     set the visible of sprite 8 to 0
  167.     set the visible of sprite 9 to 0
  168.     set the visible of sprite 16 to 1
  169.     puppetSprite(22, 0)
  170.     puppetSprite(23, 0)
  171.     puppetSprite(24, 0)
  172.     go(the frame + 1)
  173.   end if
  174. end
  175.  
  176. on bunki_rtn2
  177.   if the machineType = 256 then
  178.     puppetTransition(26, 4, 6)
  179.   else
  180.     puppetTransition(51, 4, 6)
  181.   end if
  182.   go("S3")
  183. end
  184.  
  185. on name_rtn2
  186.   if clickOn() = 14 then
  187.     set the castNum of sprite 3 to the number of cast 61
  188.   else
  189.     if clickOn() = 15 then
  190.       set the castNum of sprite 3 to the number of cast 62
  191.     else
  192.       if clickOn() = 22 then
  193.         set the castNum of sprite 3 to the number of cast 64
  194.       else
  195.         if clickOn() = 23 then
  196.           set the castNum of sprite 3 to the number of cast 65
  197.         else
  198.           if clickOn() = 24 then
  199.             set the castNum of sprite 3 to the number of cast 66
  200.           else
  201.             if clickOn() = 17 then
  202.               set the castNum of sprite 3 to the number of cast 64
  203.             else
  204.               if clickOn() = 18 then
  205.                 set the castNum of sprite 3 to the number of cast 65
  206.               else
  207.                 if clickOn() = 19 then
  208.                   set the castNum of sprite 3 to the number of cast 66
  209.                 else
  210.                   set the castNum of sprite 3 to the number of cast 81
  211.                 end if
  212.               end if
  213.             end if
  214.           end if
  215.         end if
  216.       end if
  217.     end if
  218.   end if
  219. end
  220.