home *** CD-ROM | disk | FTP | other *** search
/ Fuji Wa La Te I Ka - Hyakunin Isshu Karuta / KARUTA.bin / wins / karu_gin.dir / 00201_Script_201 < prev    next >
Text File  |  1995-11-13  |  8KB  |  278 lines

  1. on startMovie
  2.   global  yomiNum, yomicount, temotiCT, otetukiCT, karaCT, ¼
  3. aiteCT,yomihuda,incrementH, L,TACHI,fromKARU,gWakuColor
  4.   
  5.   forgetAllWindow
  6.   set yomihuda = []
  7.   set yomicount = 0
  8.   set temotiCT = 0
  9.   set otetukiCT = 0
  10.   set karaCT = 0
  11.   set aiteCT = 0
  12.   set fromKARU = 0
  13.   set gWakuColor = "Ωæ"
  14.   put "Θ╦Θ∙╟°Ωε" && temotiCT into field "Θ╦Θ∙╟°Ωε"
  15.   put "╟«╟â╟¼╟┤Ωε" && otetukiCT into field "╟«╟â╟¼╟┤Ωε"
  16.   put "π█ΘDΩε" && karaCT into field "π█ΘDΩε"
  17.   put "δΣΘ╦Θ∙╟°Ωε" && aiteCT into field "δΣΘ╦Θ∙╟°Ωε"
  18.   updateStage
  19.   global Karuta,gHuda,gHuda2,gMax
  20.   put 25 into gMax
  21.   set  gHuda = []
  22.   set  gHuda2 = []
  23.   set karuta = [1:1,2:2,3:1,4:1,5:1,6:1,7:1,8:3,9:2,10:3,¼
  24.    11:1,12:3,13:1,14:1,15:1,16:1,17:1,18:1,19:2,20:1,¼
  25.    21:3, 22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,¼
  26.    31:1,32:1,33:1,34:1,35:1,36:1,37:1,38:2,39:1,40:1,¼
  27.    41:1,42:1,43:1,44:1,45:1,46:1,47:3,48:1,49:1,50:1,¼
  28.    51:1,52:1,53:2,54:2,55:1,56:2,57:2,58:2,59:2,60:2,¼
  29.    61:2,62:2,63:1,64:1,65:2,66:3,67:2,68:1,69:3,70:3,¼
  30.    71:1,72:2,73:1,74:1,75:1,76:3,77:1,78:1,79:1,80:2,¼
  31.    81:1,82:3,83:1,84:1,85:3,86:3,87:3,88:2,89:2,90:2,¼
  32.    91:1,92:2,93:1,94:1,95:3,96:3,97:1,98:1,99:1,100:1]
  33.   repeat with n = 1 to 100
  34.     add yomihuda, n
  35.   end repeat
  36.   
  37.   set the visible of sprite 46 = 0
  38.   set the visible of sprite 47 = 0
  39.   puppetsprite 46,true
  40.   puppetsprite 47,true
  41.   set W to the width of sprite 46
  42.   set incrementH to W / 7
  43.   set L to the left of sprite 46
  44.   --  set the soundLevel = 2
  45.   set newH = L + incrementH * (the soundLevel )
  46.   set the locH of sprite 47 = newH
  47.   if TACHI = 0 then 
  48.     set the visible of sprite 43 = FALSE
  49.   else
  50.     set the visible of sprite 43 = TRUE
  51.   end if
  52.   
  53. end 
  54.  
  55. on idle
  56.   if rollOver(44) then
  57.     puppetSprite 44,true
  58.     set the castNum of sprite 44 = the number of cast "R_OT,DW"
  59.     updatestage
  60.     set the visible of sprite 46 = 1
  61.     set the visible of sprite 47 = 1
  62.   else
  63.     set the castNum of sprite 44 = the number of cast "R_OT,UP"
  64.     updatestage
  65.     set the visible of sprite 46 = 0
  66.     set the visible of sprite 47 = 0
  67.     puppetSprite 44,false
  68.   end if
  69.   
  70.   
  71. end idle
  72.  
  73. on SelectCard
  74.   global Karuta,gHuda,gMax
  75.   repeat with i = 1 to gMax
  76.     set listct = count(karuta)
  77.     set dtct = random(listct)
  78.     set KamiNum = getPropAt(karuta,dtct)
  79.     add gHuda,KamiNum
  80.     deleteAt karuta,dtct
  81.     if count(gHuda) = gMax then
  82.       exit repeat
  83.     end if
  84.   end repeat
  85. end
  86.  
  87. on SelectCard2
  88.   global Karuta,gHuda2,gMax
  89.   repeat with i = 1 to gMax
  90.     set listct = count(karuta)
  91.     set dtct = random(listct)
  92.     set KamiNum = getPropAt(karuta,dtct)
  93.     add gHuda2,KamiNum
  94.     deleteAt karuta,dtct
  95.     if count(gHuda2) = gMax then
  96.       exit repeat
  97.     end if
  98.   end repeat
  99. end
  100.  
  101. on selectYomihuda
  102.   global yomihuda, yomiNum, yomicount
  103.   set listct = count(yomihuda)
  104.   set dtct = random(listct)
  105.   set KamiNum = getAt(yomihuda,dtct)
  106.   deleteAt yomihuda,dtct
  107.   set yomiNum = KamiNum
  108.   put yomicount + 1 into yomicount
  109.   put yomicount && "±ß±₧" into field "yomiCT"
  110.   put "∞½╟¢ΘD" && yomiNum into field "∞½╟¢ΘD"
  111.   put yomihuda into field "∞½╟¢ΘD╔Σ╔X╔g"
  112. end
  113.  
  114. on selectJihuda
  115.   global gHuda
  116.   repeat with listct = 1 to 25
  117.     set the castNum of sprite listct + 9 = getAt(gHuda, listct)
  118.     wait 3
  119.     updateStage
  120.   end repeat
  121. end
  122.  
  123. on wSUB
  124.   global CPUwindow
  125.   if objectP(CPUwindow) then forget CPUwindow
  126.   set H to the stageLeft + 66
  127.   set V to the stageTop + 50
  128.   set CPUwindowRect to rect(H,V,H+415,V+190)
  129.   set CPUwindow to window "CPU"
  130.   set the windowType of CPUwindow to 2
  131.   set the rect of CPUwindow to CPUwindowRect
  132.   set the fileName of CPUwindow to  "SUB_KARU"
  133.   set the titleVisible of CPUwindow to FALSE
  134.   open CPUwindow
  135. end
  136.  
  137. on stopMovie
  138.   repeat with SP = 10 to 36
  139.     puppetsprite SP, false
  140.     set the type of sprite SP = 1
  141.   end repeat
  142.   set the timeoutScript = "nothing"
  143.   global CPUwindow
  144.   if objectP(CPUwindow) then forget CPUwindow
  145.   initglobal
  146.   global karuta
  147.   set karuta = []
  148.   forgetAllWindow
  149. end
  150.  
  151. on initpuppetOn
  152.   repeat with SP = 10 to 36
  153.     puppetsprite SP, TRUE
  154.     set the type of sprite SP = 1
  155.   end repeat
  156. end
  157.  
  158. on initpuppetOff
  159.   repeat with SP = 10 to 36
  160.     set the type of sprite SP = 1
  161.     puppetsprite SP, false
  162.   end repeat
  163.   puppetsprite 48 , false
  164. end
  165.  
  166. on PushB
  167.   puppetSound "PUSH_SE"
  168.   updatestage
  169.   put item 1 of the name of cast the castNum of sprite clickOn() into cName
  170.   repeat while stilldown()
  171.     if rollover(clickOn()) then
  172.       set the castNum of sprite clickOn() = the number of cast (cName & ",DW")
  173.     else
  174.       set the castNum of sprite clickon() = the Number of cast (cName & ",UP")
  175.     end if
  176.     updatestage
  177.   end repeat
  178.   puppetSound 0
  179.   --  set the castNum of sprite clickon() = the Number of cast (cName & ",UP")
  180.   updatestage 
  181.   if rollover(clickon()) then return TRUE
  182.   return FALSE
  183.   
  184. end
  185.  
  186. on PushB2
  187.   puppetSound "PUSH_SE"
  188.   updatestage
  189.   put item 1 of the name of cast the castNum of sprite clickOn() into cName
  190.   repeat while stilldown()
  191.     if rollover(clickOn()) then
  192.       set the castNum of sprite clickOn() = the number of cast (cName & ",DW")
  193.     else
  194.       set the castNum of sprite clickon() = the Number of cast (cName & ",UP")
  195.     end if
  196.     updatestage
  197.   end repeat
  198.   puppetSound 0
  199.   set the castNum of sprite clickon() = the Number of cast (cName & ",DW")
  200.   updatestage 
  201.   return TRUE
  202. end
  203. on PushB3
  204.   puppetSound "BUTTON08"
  205.   updatestage
  206.   put item 1 of the name of cast the castNum of sprite clickOn() into cName
  207.   repeat while stilldown()
  208.     if rollover(clickOn()) then
  209.       set the castNum of sprite clickOn() = the number of cast (cName & ",DW")
  210.     else
  211.       set the castNum of sprite clickon() = the Number of cast (cName & ",UP")
  212.     end if
  213.     updatestage
  214.   end repeat
  215.   puppetSound 0
  216.   set the castNum of sprite clickon() = the Number of cast (cName & ",DW")
  217.   updatestage 
  218.   return TRUE
  219. end
  220.  
  221. on Initnumber x
  222.   global CUL,sNAME
  223.   if length(String(x)) = 1 then set sNAME = "00"&string(x)
  224.   else if length(String(x)) = 2 then set sNAME = "0"&string(x)
  225.   else if length(String(x)) = 3 then set sNAME = string(x)
  226. end
  227.  
  228. on yomiclear
  229.   set the castNum of sprite 3 = the number of cast ("yomibase")
  230. end
  231. on REturn_M
  232.   go to movie "MENU"
  233. end
  234.  
  235. on Initglobal
  236.   global  yomiNum, yomicount, temotiCT, otetukiCT, karaCT, aiteCT,yomihuda,Hant, Hant2
  237.   global gToriSP, gTriSP2
  238.   set Hant = 1
  239.   set Hant2 = 1
  240.   set gToriSP = 0
  241.   set gToriSP2 = 0
  242.   set yomihuda = []
  243.   set yomicount = 0
  244.   set temotiCT = 0
  245.   set otetukiCT = 0
  246.   set karaCT = 0
  247.   set aiteCT = 0
  248.   --  put "Θ╦Θ∙╟°Ωε" && temotiCT into field "Θ╦Θ∙╟°Ωε"
  249.   --  put "╟«╟â╟¼╟┤Ωε" && otetukiCT into field "╟«╟â╟¼╟┤Ωε"
  250.   --  put "π█ΘDΩε" && karaCT into field "π█ΘDΩε"
  251.   --  put "δΣΘ╦Θ∙╟°Ωε" && aiteCT into field "δΣΘ╦Θ∙╟°Ωε"
  252.   --  updateStage
  253.   global Karuta,gHuda,gHuda2,gMax
  254.   --  put 25 into gMax
  255.   set  gHuda = []
  256.   set  gHuda2 = []
  257.   set karuta = [1:1,2:2,3:1,4:1,5:1,6:1,7:1,8:3,9:2,10:3,¼
  258.    11:1,12:3,13:1,14:1,15:1,16:1,17:1,18:1,19:2,20:1,¼
  259.    21:3, 22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,¼
  260.    31:1,32:1,33:1,34:1,35:1,36:1,37:1,38:2,39:1,40:1,¼
  261.    41:1,42:1,43:1,44:1,45:1,46:1,47:3,48:1,49:1,50:1,¼
  262.    51:1,52:1,53:2,54:2,55:1,56:2,57:2,58:2,59:2,60:2,¼
  263.    61:2,62:2,63:1,64:1,65:2,66:3,67:2,68:1,69:3,70:3,¼
  264.    71:1,72:2,73:1,74:1,75:1,76:3,77:1,78:1,79:1,80:2,¼
  265.    81:1,82:3,83:1,84:1,85:3,86:3,87:3,88:2,89:2,90:2,¼
  266.    91:1,92:2,93:1,94:1,95:3,96:3,97:1,98:1,99:1,100:1]
  267.   repeat with n = 1 to 100
  268.     add yomihuda, n
  269.   end repeat
  270. end
  271.  
  272. on forgetAllWindow
  273.   put count(the windowList) into wCnt
  274.   if wCnt = 0 then exit
  275.   repeat with wNum = wCnt down to 1
  276.     forget window wNum
  277.   end repeat
  278. end