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 / 00087.ls < prev    next >
Encoding:
Text File  |  2017-09-21  |  8.7 KB  |  271 lines

  1. global gloch, glocv, gkanseilist
  2.  
  3. on init_rtn5
  4.   cursor([201, 202])
  5.   set gkanseilist to [0, 0, 0, 0, 0]
  6.   repeat with n = 28 to 32
  7.     set the visible of sprite n to 0
  8.   end repeat
  9.   repeat with n = 33 to 35
  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 + 32) to 430
  22.       set the locV of sprite (n + 32) to 235
  23.     end if
  24.     if getAt(worklist, position) = 2 then
  25.       set the locH of sprite (n + 32) to 385
  26.       set the locV of sprite (n + 32) to 190
  27.     end if
  28.     if getAt(worklist, position) = 3 then
  29.       set the locH of sprite (n + 32) to 345
  30.       set the locV of sprite (n + 32) to 235
  31.     end if
  32.     deleteAt(worklist, position)
  33.   end repeat
  34. end
  35.  
  36. on main_rtn5
  37.   when mouseDown then LOCATION_SET_RTN5
  38.   name_rtn5()
  39.   shadow_rtn5()
  40.   when mouseUp then S5_SET_RTN
  41.   kansei_chk5()
  42. end
  43.  
  44. on location_set_rtn5
  45.   if (clickOn() >= 33) and (clickOn() <= 35) 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() = 33) then
  54.     puppetSound("SE01.AIF")
  55.   end if
  56.   if (getAt(gkanseilist, 2) = 0) and (clickOn() = 34) then
  57.     puppetSound("SE01.AIF")
  58.   end if
  59.   if (getAt(gkanseilist, 3) = 0) and (clickOn() = 35) 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_rtn5
  67.   repeat with n = 33 to 35
  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 s5_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() = 33) then
  97.     if (the locH of sprite 33 >= 220) and (the locH of sprite 33 <= 230) then
  98.       if (the locV of sprite 33 >= 229) and (the locV of sprite 33 <= 239) then
  99.         puppetSound("SE02.AIF")
  100.         set the locH of sprite 33 to 225
  101.         set the locV of sprite 33 to 234
  102.         set the moveableSprite of sprite 33 to 0
  103.         set the visible of sprite 30 to 1
  104.         set the visible of sprite 33 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() = 34) then
  111.     if (the locH of sprite 34 >= 153) and (the locH of sprite 34 <= 163) then
  112.       if (the locV of sprite 34 >= 230) and (the locV of sprite 34 <= 240) then
  113.         puppetSound("SE02.AIF")
  114.         set the locH of sprite 34 to 158
  115.         set the locV of sprite 34 to 235
  116.         set the moveableSprite of sprite 34 to 0
  117.         set the visible of sprite 31 to 1
  118.         set the visible of sprite 34 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() = 35) then
  125.     if (the locH of sprite 35 >= 82) and (the locH of sprite 35 <= 92) then
  126.       if (the locV of sprite 35 >= 231) and (the locV of sprite 35 <= 241) then
  127.         puppetSound("SE02.AIF")
  128.         set the locH of sprite 35 to 87
  129.         set the locV of sprite 35 to 236
  130.         set the moveableSprite of sprite 35 to 0
  131.         set the visible of sprite 32 to 1
  132.         set the visible of sprite 35 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() = 33) 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() = 34) 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() = 35) 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_chk5
  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 1
  166.     set the visible of sprite 8 to 1
  167.     set the visible of sprite 9 to 1
  168.     set the visible of sprite 10 to 1
  169.     set the visible of sprite 11 to 1
  170.     set the visible of sprite 28 to 1
  171.     set the visible of sprite 29 to 1
  172.     puppetSprite(33, 0)
  173.     puppetSprite(34, 0)
  174.     puppetSprite(35, 0)
  175.     go(the frame + 1)
  176.   end if
  177. end
  178.  
  179. on bunki_rtn5
  180.   if the machineType = 256 then
  181.     puppetTransition(26, 4, 6)
  182.   else
  183.     puppetTransition(51, 4, 6)
  184.   end if
  185.   go("KANSEI")
  186. end
  187.  
  188. on name_rtn5
  189.   if clickOn() = 14 then
  190.     set the castNum of sprite 3 to the number of cast 61
  191.   else
  192.     if clickOn() = 15 then
  193.       set the castNum of sprite 3 to the number of cast 62
  194.     else
  195.       if clickOn() = 17 then
  196.         set the castNum of sprite 3 to the number of cast 64
  197.       else
  198.         if clickOn() = 18 then
  199.           set the castNum of sprite 3 to the number of cast 65
  200.         else
  201.           if clickOn() = 19 then
  202.             set the castNum of sprite 3 to the number of cast 66
  203.           else
  204.             if clickOn() = 20 then
  205.               set the castNum of sprite 3 to the number of cast 67
  206.             else
  207.               if clickOn() = 21 then
  208.                 set the castNum of sprite 3 to the number of cast 68
  209.               else
  210.                 if clickOn() = 22 then
  211.                   set the castNum of sprite 3 to the number of cast 69
  212.                 else
  213.                   if clickOn() = 23 then
  214.                     set the castNum of sprite 3 to the number of cast 70
  215.                   else
  216.                     if clickOn() = 24 then
  217.                       set the castNum of sprite 3 to the number of cast 71
  218.                     else
  219.                       if clickOn() = 26 then
  220.                         set the castNum of sprite 3 to the number of cast 73
  221.                       else
  222.                         if clickOn() = 27 then
  223.                           set the castNum of sprite 3 to the number of cast 74
  224.                         else
  225.                           if clickOn() = 28 then
  226.                             set the castNum of sprite 3 to the number of cast 79
  227.                           else
  228.                             if clickOn() = 29 then
  229.                               set the castNum of sprite 3 to the number of cast 80
  230.                             else
  231.                               if clickOn() = 30 then
  232.                                 set the castNum of sprite 3 to the number of cast 76
  233.                               else
  234.                                 if clickOn() = 31 then
  235.                                   set the castNum of sprite 3 to the number of cast 77
  236.                                 else
  237.                                   if clickOn() = 32 then
  238.                                     set the castNum of sprite 3 to the number of cast 78
  239.                                   else
  240.                                     if clickOn() = 33 then
  241.                                       set the castNum of sprite 3 to the number of cast 76
  242.                                     else
  243.                                       if clickOn() = 34 then
  244.                                         set the castNum of sprite 3 to the number of cast 77
  245.                                       else
  246.                                         if clickOn() = 35 then
  247.                                           set the castNum of sprite 3 to the number of cast 78
  248.                                         else
  249.                                           set the castNum of sprite 3 to the number of cast 81
  250.                                         end if
  251.                                       end if
  252.                                     end if
  253.                                   end if
  254.                                 end if
  255.                               end if
  256.                             end if
  257.                           end if
  258.                         end if
  259.                       end if
  260.                     end if
  261.                   end if
  262.                 end if
  263.               end if
  264.             end if
  265.           end if
  266.         end if
  267.       end if
  268.     end if
  269.   end if
  270. end
  271.