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 / 00083.ls < prev    next >
Encoding:
Text File  |  2017-09-21  |  4.6 KB  |  180 lines

  1. global gloch, glocv, gkanseilist
  2.  
  3. on init_rtn1
  4.   set gkanseilist to [0, 0, 0, 0, 0]
  5.   repeat with n = 12 to 15
  6.     set the visible of sprite n to 0
  7.   end repeat
  8.   repeat with n = 19 to 20
  9.     puppetSprite(n, 1)
  10.     set the moveableSprite of sprite n to 1
  11.     set the visible of sprite n to 1
  12.   end repeat
  13.   if random(2) = 1 then
  14.     set the locH of sprite 19 to 423
  15.     set the locV of sprite 19 to 221
  16.     set the locH of sprite 20 to 347
  17.     set the locV of sprite 20 to 229
  18.   else
  19.     set the locH of sprite 19 to 347
  20.     set the locV of sprite 19 to 221
  21.     set the locH of sprite 20 to 423
  22.     set the locV of sprite 20 to 229
  23.   end if
  24.   cursor([201, 202])
  25. end
  26.  
  27. on main_rtn1
  28.   when mouseDown then LOCATION_SET_RTN1
  29.   name_rtn1()
  30.   shadow_rtn1()
  31.   when mouseUp then S1_SET_RTN
  32.   kansei_chk1()
  33. end
  34.  
  35. on location_set_rtn1
  36.   if (clickOn() >= 19) and (clickOn() <= 20) then
  37.     nothing()
  38.   else
  39.     set gloch to 0
  40.     set glocv to 0
  41.     return 
  42.   end if
  43.   cursor([203, 204])
  44.   if (getAt(gkanseilist, 1) = 0) and (clickOn() = 19) then
  45.     puppetSound("SE01.AIF")
  46.   end if
  47.   if (getAt(gkanseilist, 2) = 0) and (clickOn() = 20) then
  48.     puppetSound("SE01.AIF")
  49.   end if
  50.   set gloch to the locH of sprite clickOn()
  51.   set glocv to the locV of sprite clickOn()
  52. end
  53.  
  54. on shadow_rtn1
  55.   if clickOn() = 19 then
  56.     if sprite 19 intersects 7 then
  57.       set the visible of sprite 7 to 1
  58.     else
  59.       set the visible of sprite 7 to 0
  60.     end if
  61.     if sprite 19 intersects 8 then
  62.       set the visible of sprite 8 to 1
  63.     else
  64.       set the visible of sprite 8 to 0
  65.     end if
  66.   end if
  67.   if clickOn() = 20 then
  68.     if sprite 20 intersects 7 then
  69.       set the visible of sprite 7 to 1
  70.     else
  71.       set the visible of sprite 7 to 0
  72.     end if
  73.     if sprite 20 intersects 8 then
  74.       set the visible of sprite 8 to 1
  75.     else
  76.       set the visible of sprite 8 to 0
  77.     end if
  78.   end if
  79.   updateStage()
  80. end
  81.  
  82. on s1_set_rtn
  83.   if gloch = 0 then
  84.     return 
  85.   end if
  86.   cursor([201, 202])
  87.   set kanseiflg to 0
  88.   if getAt(gkanseilist, 1) = 0 then
  89.     if clickOn() = 19 then
  90.       if (the locH of sprite 19 >= 207) and (the locH of sprite 19 <= 217) then
  91.         if (the locV of sprite 19 >= 53) and (the locV of sprite 19 <= 63) then
  92.           puppetSound("SE02.AIF")
  93.           set the locH of sprite 19 to 212
  94.           set the locV of sprite 19 to 58
  95.           set the moveableSprite of sprite 19 to 0
  96.           set the visible of sprite 14 to 1
  97.           set the visible of sprite 19 to 0
  98.           setAt(gkanseilist, 1, 1)
  99.           set kanseiflg to 1
  100.         end if
  101.       end if
  102.     end if
  103.   end if
  104.   if getAt(gkanseilist, 2) = 0 then
  105.     if clickOn() = 20 then
  106.       if (the locH of sprite 20 >= 95) and (the locH of sprite 20 <= 105) then
  107.         if (the locV of sprite 20 >= 58) and (the locV of sprite 20 <= 68) then
  108.           puppetSound("SE02.AIF")
  109.           set the locH of sprite 20 to 100
  110.           set the locV of sprite 20 to 63
  111.           set the moveableSprite of sprite 20 to 0
  112.           set the visible of sprite 15 to 1
  113.           set the visible of sprite 20 to 0
  114.           setAt(gkanseilist, 2, 1)
  115.           set kanseiflg to 1
  116.         end if
  117.       end if
  118.     end if
  119.   end if
  120.   if kanseiflg = 0 then
  121.     if (getAt(gkanseilist, 1) = 0) and (clickOn() = 19) then
  122.       puppetSound("SE03.AIF")
  123.       set the locH of sprite clickOn() to gloch
  124.       set the locV of sprite clickOn() to glocv
  125.     end if
  126.     if (getAt(gkanseilist, 2) = 0) and (clickOn() = 20) then
  127.       puppetSound("SE03.AIF")
  128.       set the locH of sprite clickOn() to gloch
  129.       set the locV of sprite clickOn() to glocv
  130.     end if
  131.   end if
  132. end
  133.  
  134. on kansei_chk1
  135.   set cnt to 0
  136.   repeat with n = 1 to 2
  137.     if getAt(gkanseilist, n) = 1 then
  138.       set cnt to cnt + 1
  139.     end if
  140.   end repeat
  141.   if cnt = 2 then
  142.     set the visible of sprite 7 to 0
  143.     set the visible of sprite 8 to 0
  144.     set the visible of sprite 12 to 1
  145.     set the visible of sprite 13 to 1
  146.     puppetSprite(19, 0)
  147.     puppetSprite(20, 0)
  148.     go(the frame + 1)
  149.   end if
  150. end
  151.  
  152. on bunki_rtn1
  153.   if the machineType = 256 then
  154.     puppetTransition(26, 4, 6)
  155.   else
  156.     puppetTransition(51, 4, 6)
  157.   end if
  158.   go("S2")
  159. end
  160.  
  161. on name_rtn1
  162.   if clickOn() = 19 then
  163.     set the castNum of sprite 3 to the number of cast 61
  164.   else
  165.     if clickOn() = 20 then
  166.       set the castNum of sprite 3 to the number of cast 62
  167.     else
  168.       if clickOn() = 14 then
  169.         set the castNum of sprite 3 to the number of cast 61
  170.       else
  171.         if clickOn() = 15 then
  172.           set the castNum of sprite 3 to the number of cast 62
  173.         else
  174.           set the castNum of sprite 3 to the number of cast 81
  175.         end if
  176.       end if
  177.     end if
  178.   end if
  179. end
  180.