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 / 00085.ls < prev    next >
Encoding:
Text File  |  2017-09-21  |  9.7 KB  |  313 lines

  1. global gloch, glocv, gkanseilist
  2.  
  3. on init_rtn3
  4.   cursor([201, 202])
  5.   set gkanseilist to [0, 0, 0, 0, 0]
  6.   repeat with n = 20 to 24
  7.     set the visible of sprite n to 0
  8.   end repeat
  9.   repeat with n = 25 to 29
  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, 4, 5]
  18.   repeat with n = 1 to 5
  19.     set position to random(6 - n)
  20.     if getAt(worklist, position) = 1 then
  21.       set the locH of sprite (n + 24) to 340
  22.       set the locV of sprite (n + 24) to 234
  23.     end if
  24.     if getAt(worklist, position) = 2 then
  25.       set the locH of sprite (n + 24) to 360
  26.       set the locV of sprite (n + 24) to 185
  27.     end if
  28.     if getAt(worklist, position) = 3 then
  29.       set the locH of sprite (n + 24) to 420
  30.       set the locV of sprite (n + 24) to 185
  31.     end if
  32.     if getAt(worklist, position) = 4 then
  33.       set the locH of sprite (n + 24) to 390
  34.       set the locV of sprite (n + 24) to 234
  35.     end if
  36.     if getAt(worklist, position) = 5 then
  37.       set the locH of sprite (n + 24) to 440
  38.       set the locV of sprite (n + 24) to 234
  39.     end if
  40.     deleteAt(worklist, position)
  41.   end repeat
  42. end
  43.  
  44. on main_rtn3
  45.   when mouseDown then LOCATION_SET_RTN3
  46.   name_rtn3()
  47.   shadow_rtn3()
  48.   when mouseUp then S3_SET_RTN
  49.   kansei_chk3()
  50. end
  51.  
  52. on location_set_rtn3
  53.   if (clickOn() >= 25) and (clickOn() <= 29) then
  54.     nothing()
  55.   else
  56.     set gloch to 0
  57.     set glocv to 0
  58.     return 
  59.   end if
  60.   cursor([203, 204])
  61.   if (getAt(gkanseilist, 1) = 0) and (clickOn() = 25) then
  62.     puppetSound("SE01.AIF")
  63.   end if
  64.   if (getAt(gkanseilist, 2) = 0) and (clickOn() = 26) then
  65.     puppetSound("SE01.AIF")
  66.   end if
  67.   if (getAt(gkanseilist, 3) = 0) and (clickOn() = 27) then
  68.     puppetSound("SE01.AIF")
  69.   end if
  70.   if (getAt(gkanseilist, 4) = 0) and (clickOn() = 28) then
  71.     puppetSound("SE01.AIF")
  72.   end if
  73.   if (getAt(gkanseilist, 5) = 0) and (clickOn() = 29) then
  74.     puppetSound("SE01.AIF")
  75.   end if
  76.   set gloch to the locH of sprite clickOn()
  77.   set glocv to the locV of sprite clickOn()
  78. end
  79.  
  80. on shadow_rtn3
  81.   repeat with n = 25 to 29
  82.     if clickOn() = n then
  83.       if sprite n intersects 7 then
  84.         set the visible of sprite 7 to 1
  85.       else
  86.         set the visible of sprite 7 to 0
  87.       end if
  88.       if sprite n intersects 8 then
  89.         set the visible of sprite 8 to 1
  90.       else
  91.         set the visible of sprite 8 to 0
  92.       end if
  93.       if sprite n intersects 9 then
  94.         set the visible of sprite 9 to 1
  95.       else
  96.         set the visible of sprite 9 to 0
  97.       end if
  98.       if sprite n intersects 10 then
  99.         set the visible of sprite 10 to 1
  100.       else
  101.         set the visible of sprite 10 to 0
  102.       end if
  103.       if sprite n intersects 11 then
  104.         set the visible of sprite 11 to 1
  105.       else
  106.         set the visible of sprite 11 to 0
  107.       end if
  108.       exit repeat
  109.     end if
  110.   end repeat
  111.   updateStage()
  112. end
  113.  
  114. on s3_set_rtn
  115.   if gloch = 0 then
  116.     return 
  117.   end if
  118.   cursor([201, 202])
  119.   set kanseiflg to 0
  120.   if (getAt(gkanseilist, 1) = 0) and (clickOn() = 25) then
  121.     if (the locH of sprite 25 >= 259) and (the locH of sprite 25 <= 269) then
  122.       if (the locV of sprite 25 >= 144) and (the locV of sprite 25 <= 154) then
  123.         puppetSound("SE02.AIF")
  124.         set the locH of sprite 25 to 264
  125.         set the locV of sprite 25 to 149
  126.         set the moveableSprite of sprite 25 to 0
  127.         set the visible of sprite 20 to 1
  128.         set the visible of sprite 25 to 0
  129.         setAt(gkanseilist, 1, 1)
  130.         set kanseiflg to 1
  131.       end if
  132.     end if
  133.   end if
  134.   if (getAt(gkanseilist, 2) = 0) and (clickOn() = 26) then
  135.     if (the locH of sprite 26 >= 204) and (the locH of sprite 26 <= 214) then
  136.       if (the locV of sprite 26 >= 144) and (the locV of sprite 26 <= 154) then
  137.         puppetSound("SE02.AIF")
  138.         set the locH of sprite 26 to 209
  139.         set the locV of sprite 26 to 149
  140.         set the moveableSprite of sprite 26 to 0
  141.         set the visible of sprite 21 to 1
  142.         set the visible of sprite 26 to 0
  143.         setAt(gkanseilist, 2, 1)
  144.         set kanseiflg to 1
  145.       end if
  146.     end if
  147.   end if
  148.   if (getAt(gkanseilist, 3) = 0) and (clickOn() = 27) then
  149.     if (the locH of sprite 27 >= 153) and (the locH of sprite 27 <= 163) then
  150.       if (the locV of sprite 27 >= 140) and (the locV of sprite 27 <= 150) then
  151.         puppetSound("SE02.AIF")
  152.         set the locH of sprite 27 to 158
  153.         set the locV of sprite 27 to 145
  154.         set the moveableSprite of sprite 27 to 0
  155.         set the visible of sprite 22 to 1
  156.         set the visible of sprite 27 to 0
  157.         setAt(gkanseilist, 3, 1)
  158.         set kanseiflg to 1
  159.       end if
  160.     end if
  161.   end if
  162.   if (getAt(gkanseilist, 4) = 0) and (clickOn() = 28) then
  163.     if (the locH of sprite 28 >= 105) and (the locH of sprite 28 <= 115) then
  164.       if (the locV of sprite 28 >= 139) and (the locV of sprite 28 <= 149) then
  165.         puppetSound("SE02.AIF")
  166.         set the locH of sprite 28 to 110
  167.         set the locV of sprite 28 to 144
  168.         set the moveableSprite of sprite 28 to 0
  169.         set the visible of sprite 23 to 1
  170.         set the visible of sprite 28 to 0
  171.         setAt(gkanseilist, 4, 1)
  172.         set kanseiflg to 1
  173.       end if
  174.     end if
  175.   end if
  176.   if (getAt(gkanseilist, 5) = 0) and (clickOn() = 29) then
  177.     if (the locH of sprite 29 >= 49) and (the locH of sprite 29 <= 59) then
  178.       if (the locV of sprite 29 >= 144) and (the locV of sprite 29 <= 154) then
  179.         puppetSound("SE02.AIF")
  180.         set the locH of sprite 29 to 54
  181.         set the locV of sprite 29 to 149
  182.         set the moveableSprite of sprite 29 to 0
  183.         set the visible of sprite 24 to 1
  184.         set the visible of sprite 29 to 0
  185.         setAt(gkanseilist, 5, 1)
  186.         set kanseiflg to 1
  187.       end if
  188.     end if
  189.   end if
  190.   if kanseiflg = 0 then
  191.     if (getAt(gkanseilist, 1) = 0) and (clickOn() = 25) then
  192.       puppetSound("SE03.AIF")
  193.       set the locH of sprite clickOn() to gloch
  194.       set the locV of sprite clickOn() to glocv
  195.     end if
  196.     if (getAt(gkanseilist, 2) = 0) and (clickOn() = 26) then
  197.       puppetSound("SE03.AIF")
  198.       set the locH of sprite clickOn() to gloch
  199.       set the locV of sprite clickOn() to glocv
  200.     end if
  201.     if (getAt(gkanseilist, 3) = 0) and (clickOn() = 27) then
  202.       puppetSound("SE03.AIF")
  203.       set the locH of sprite clickOn() to gloch
  204.       set the locV of sprite clickOn() to glocv
  205.     end if
  206.     if (getAt(gkanseilist, 4) = 0) and (clickOn() = 28) then
  207.       puppetSound("SE03.AIF")
  208.       set the locH of sprite clickOn() to gloch
  209.       set the locV of sprite clickOn() to glocv
  210.     end if
  211.     if (getAt(gkanseilist, 5) = 0) and (clickOn() = 29) then
  212.       puppetSound("SE03.AIF")
  213.       set the locH of sprite clickOn() to gloch
  214.       set the locV of sprite clickOn() to glocv
  215.     end if
  216.   end if
  217. end
  218.  
  219. on kansei_chk3
  220.   set cnt to 0
  221.   repeat with n = 1 to 5
  222.     if getAt(gkanseilist, n) = 1 then
  223.       set cnt to cnt + 1
  224.     end if
  225.   end repeat
  226.   if cnt = 5 then
  227.     set the visible of sprite 7 to 0
  228.     set the visible of sprite 8 to 0
  229.     set the visible of sprite 9 to 0
  230.     set the visible of sprite 10 to 0
  231.     set the visible of sprite 11 to 0
  232.     puppetSprite(25, 0)
  233.     puppetSprite(26, 0)
  234.     puppetSprite(27, 0)
  235.     puppetSprite(28, 0)
  236.     puppetSprite(29, 0)
  237.     go(the frame + 1)
  238.   end if
  239. end
  240.  
  241. on bunki_rtn3
  242.   if the machineType = 256 then
  243.     puppetTransition(26, 4, 6)
  244.   else
  245.     puppetTransition(51, 4, 6)
  246.   end if
  247.   go("S4")
  248. end
  249.  
  250. on name_rtn3
  251.   if clickOn() = 14 then
  252.     set the castNum of sprite 3 to the number of cast 61
  253.   else
  254.     if clickOn() = 15 then
  255.       set the castNum of sprite 3 to the number of cast 62
  256.     else
  257.       if clickOn() = 17 then
  258.         set the castNum of sprite 3 to the number of cast 64
  259.       else
  260.         if clickOn() = 18 then
  261.           set the castNum of sprite 3 to the number of cast 65
  262.         else
  263.           if clickOn() = 19 then
  264.             set the castNum of sprite 3 to the number of cast 66
  265.           else
  266.             if clickOn() = 20 then
  267.               set the castNum of sprite 3 to the number of cast 67
  268.             else
  269.               if clickOn() = 21 then
  270.                 set the castNum of sprite 3 to the number of cast 68
  271.               else
  272.                 if clickOn() = 22 then
  273.                   set the castNum of sprite 3 to the number of cast 69
  274.                 else
  275.                   if clickOn() = 23 then
  276.                     set the castNum of sprite 3 to the number of cast 70
  277.                   else
  278.                     if clickOn() = 24 then
  279.                       set the castNum of sprite 3 to the number of cast 71
  280.                     else
  281.                       if clickOn() = 25 then
  282.                         set the castNum of sprite 3 to the number of cast 67
  283.                       else
  284.                         if clickOn() = 26 then
  285.                           set the castNum of sprite 3 to the number of cast 68
  286.                         else
  287.                           if clickOn() = 27 then
  288.                             set the castNum of sprite 3 to the number of cast 69
  289.                           else
  290.                             if clickOn() = 28 then
  291.                               set the castNum of sprite 3 to the number of cast 70
  292.                             else
  293.                               if clickOn() = 29 then
  294.                                 set the castNum of sprite 3 to the number of cast 71
  295.                               else
  296.                                 set the castNum of sprite 3 to the number of cast 81
  297.                               end if
  298.                             end if
  299.                           end if
  300.                         end if
  301.                       end if
  302.                     end if
  303.                   end if
  304.                 end if
  305.               end if
  306.             end if
  307.           end if
  308.         end if
  309.       end if
  310.     end if
  311.   end if
  312. end
  313.