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 / 00086.ls < prev    next >
Encoding:
Text File  |  2017-09-21  |  6.1 KB  |  214 lines

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