home *** CD-ROM | disk | FTP | other *** search
/ Fuji Wa La Te I Ka - Hyakunin Isshu Karuta / KARUTA.bin / wins / csinke6.dir / 00029_Script_29 < prev    next >
Text File  |  1995-11-13  |  3KB  |  115 lines

  1. on mekuriC1
  2.   global gShinkei,gMax, SP, hajime,tugi,hajimeC,clicksprite1¼
  3. ,gHazure,clicksprite2,randomSP1,hazureC,puppetCheck,gOKMax¼
  4. ,Kioku,sameHajimePos,sametugiPos,hajimePos,tugiPos
  5.   
  6.   if gHazure = 1 then
  7.     set the castNum of sprite clicksprite1 = 100
  8.     set the castNum of sprite clicksprite2 = 100
  9.     puppetSprite clickSprite1, FALSE
  10.     puppetSprite clickSprite2, FALSE
  11.     set the visible of sprite 34 = 0
  12.     set the castNum of sprite 33 = 300
  13.     puppetSprite 33, FALSE
  14.     PuppetSound "turnover"
  15.     updateStage
  16.     set gHazure = 0
  17.     PuppetSound 0
  18.   end if
  19.   
  20.   if not( clicksprite1 = 0 ) then
  21.     put value(string(gShinkei)) into  Shinkei2
  22.     set hajimePos = getPos(Shinkei2,hajime)
  23.     setAt Shinkei2,clicksprite1 - 1,0
  24.     set sameHajimePos = getPos(Shinkei2,hajime)
  25.     set tugiPos = getPos(Shinkei2,tugi)
  26.     setAt Shinkei2,clicksprite2 - 1,0
  27.     set sametugiPos = getPos(Shinkei2,tugi)
  28.   else
  29.     nothing
  30.   end if
  31.   
  32.   set puppetCheck = []
  33.   repeat with i = 2 to gMax + 1
  34.     if the puppet of sprite i = FALSE then
  35.       add puppetCheck , i
  36.     end if
  37.   end repeat
  38.   
  39.   if getOne(Kioku,sameHajimePos) <> 0 then
  40.     set randomSP1 = sameHajimePos + 1
  41.     deleteOne(Kioku,sameHajimePos)
  42.     deleteOne(Kioku,hajime)
  43.   else
  44.     if getOne(Kioku,sametugiPos) <> 0 then
  45.       set randomSP1 = sametugiPos + 1
  46.       deleteOne(Kioku,sametugiPos)
  47.       deleteOne(Kioku,tugi)
  48.     else
  49.       set gOKMax = count (puppetCheck)
  50.       set dtct = random (gOKMax)
  51.       set randomSP1 = getAt (puppetCheck,dtct)
  52.     end if
  53.   end if
  54.   
  55.   if randomSP1 = clicksprite1 or randomSP1 = clicksprite2 then exit
  56.   
  57.   HandUp
  58.   PuppetSound "MEKURI"
  59.   puppetSprite randomSP1, TRUE
  60.   puppetSprite 33, TRUE
  61.   set hajimeC = getAt ( gShinkei , randomSP1 - 1 )
  62.   
  63.   set the castNum of sprite randomSP1 = hajimeC + 100
  64.   set the locV of sprite 33 = 264
  65.   set the locH of sprite 33 = 112
  66.   set the castNum of sprite 33 = hajimeC + 300
  67.   updateStage
  68.   if hajimeC = 102 then Sound playfile 2,"\S_SINKEI\EMA_AIFF"
  69.   wait 5
  70.   go to frame"levelC2"
  71. --  PuppetSound 0
  72. end
  73.  
  74. on mekuriC2
  75.   global gShinkei,randomSP1,randomSP2,tugiC,puppetCheck,gOKMax,hajimeC¼
  76. ,hajime,tugi,clicksprite1,clicksprite2,Kioku
  77.   
  78.   if hajimeC <> 102 then
  79.     if hajimeC = hajime then
  80.       set randomSP2 = clicksprite1
  81.     else
  82.       if hajimeC = tugi then
  83.         set randomSP2 = clicksprite2
  84.       else
  85.         set dtct = random (gOKMax)
  86.         set randomSP2 = getAt (puppetCheck,dtct)
  87.       end if
  88.     end if
  89.   else
  90.     set dtct = random (gOKMax)
  91.     set randomSP2 = getAt (puppetCheck,dtct)
  92.   end if
  93.   
  94.   if randomSP2 = randomSP1 or randomSP2 = 0 then exit
  95.   if the puppet of sprite randomSP2 = FALSE then
  96.     puppetSprite randomSP2, TRUE
  97.     set the visible of sprite 34 = 1
  98.     set the castNum of sprite 34 = 300
  99.     
  100.     HandUp
  101.     PuppetSound "MEKURI"
  102.     set tugiC = getAt ( gShinkei , randomSP2 - 1 )
  103.     set the castNum of sprite randomSP2 = tugiC + 100
  104.     set the locV of sprite 34 = 248
  105.     set the locH of sprite 34 = 90
  106.     set the castNum of sprite 34  = tugiC + 300
  107.     updateStage
  108.     go to the frame + 1
  109.   else
  110.     nothing
  111.   end if
  112.   wait 30
  113. end
  114.  
  115.