home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Today (BR) Volume 2 #6 / CDRTV2N6.iso / makers / power / ue.dir / 00192_Script_192 < prev    next >
Text File  |  1996-03-13  |  9KB  |  292 lines

  1. on startMovie
  2.   global PrevFrame,fixpal,startcast,MensFrames,ColorCrsr
  3.   
  4.   puppetSprite 17,TRUE
  5.   set the castNum of sprite 17 to the number of cast string("v"&the soundLevel)
  6.   put EMPTY into PrevFrame
  7.   initMap
  8.   repeat with i=20 to 25
  9.     puppetSprite i,TRUE
  10.   end repeat
  11.   repeat with i=11 to 17
  12.     puppetSprite i,TRUE
  13.   end repeat  
  14.   if the machineType <> 256 then
  15.     openxlib "FixPal.obj"
  16.     set fixpal=FixPalette(mNew, the stageLeft, the stageTop, the stageRight, the stageTop)
  17.     patchpal
  18.     openxlib "ColourM.Obj"
  19.   end if
  20.   put the number of cast "rolet0" into startcast
  21.   put "059,054,104,056,056,098,100,078,030,014,015,017,046,047,048,048" into MensFrames
  22.   put EMPTY into ColorCrsr
  23. end startmovie
  24.  
  25. on patchpal
  26.   global fixpal
  27.   
  28.   fixpal(mPatchIt)
  29. end patchpal
  30.  
  31. on stopmovie
  32.   global fixpal,ColorCrsr
  33.   
  34.   sound stop 1
  35.   sound stop 2
  36.   unLoad
  37.   unLoadCast
  38.   if the machineType <> 256 then
  39.     fixpal(mDispose)
  40.     closexlib "FixPal.obj"
  41.     if objectP(ColorCrsr) then
  42.       colorcrsr(mDispose)
  43.       closexlib "ColourM.Obj"
  44.     end if
  45.   end if
  46. end stopmovie
  47.  
  48. on chooseBack currFrame,theItem
  49.   global PrevFrame,FramesMap,CameFromFile,ToGo
  50.   
  51.   if currFrame = 39 then
  52.     if PrevFrame = 64 then go frame "064"
  53.     else go frame "077"
  54.   else if currFrame = 46 then
  55.     if PrevFrame = 37 then go frame "037"
  56.     else go frame "045"
  57.   else if currFrame = 50 then
  58.     if PrevFrame = 44 then go frame "044"
  59.     else go frame "051"
  60.   else if currFrame = 77 then
  61.     if PrevFrame = 51 then go frame "051"
  62.     else go frame "044"
  63.   else if currFrame = 80 then
  64.     if PrevFrame = 75 then go frame "075"
  65.     else go frame "079"
  66.   else if currFrame = 94 then
  67.     --    put "america" into CameFromFile
  68.     --    put "042" into ToGo
  69.     --    go frame "black"
  70.     --    go frame "fade" of movie "terror.dir"
  71.     DemoOnly 48 , 105 , -130 
  72.   else if currFrame = 98 then
  73.     --    put "america" into CameFromFile
  74.     --    put "002" into ToGo
  75.     --    go frame "black"
  76.     --    go frame "fade" of movie "terror.dir"
  77.     
  78.     DemoOnly 48 , 105 , -130 
  79.   end if
  80. end
  81.  
  82. on hilitDirections
  83.   global FramesMap
  84.   
  85.   put ((the frame) + 2) / 3 into theLine
  86.   
  87.   if the locV of sprite 2 <> 308 then set the locV of sprite 2 to 308
  88.   set the movieTime of sprite 2 to (theLine * 60) - 1
  89.   updateStage
  90.   repeat with i=1 to 6
  91.     if string(item i of line theLine of FramesMap) <> "000" then
  92.       set the castNum of sprite (i + 19) to the number of cast string(char 1 to 2 of the name of cast the castNum of sprite (i + 19)&"H")
  93.     else
  94.       set the castNum of sprite (i + 19) to the number of cast string(char 1 to 2 of the name of cast the castNum of sprite (i + 19)&"E")
  95.     end if
  96.   end repeat
  97.   updateStage
  98. end
  99.  
  100. on rollOvers
  101.   if rollOver(2) then
  102.     check2
  103.   else if rollOver(11) then
  104.     check12
  105.   else if the mouseCast = 119 then
  106.     changeCast 119,13
  107.   else if the mouseCast = 117 then
  108.     changeCast 117,14
  109.   else if the mouseCast = 121 then
  110.     changeCast 121,15
  111.   else if rollOver(16) then
  112.     roll 16
  113.   else if rollOver(27) then
  114.     roll 27
  115.   else
  116.     ReleasCursor
  117.     cursor 0
  118.   end if
  119.   updateStage
  120. end
  121.  
  122. on changeCast theRoll,theSprite
  123.   ReleasCursor
  124.   cursor 0
  125.   if not(the name of cast the castNum of sprite theSprite contains "down") then
  126.     set the castNum of sprite theSprite to (the castNum of sprite theSprite) + 1
  127.     updatestage  
  128.     repeat while the mouseCast = theRoll + 1 and not the mouseDown
  129.     end repeat
  130.     set the castNum of sprite theSprite to (the castNum of sprite theSprite) - 1
  131.   end if 
  132. end
  133.  
  134. on roll theRoll
  135.   ReleasCursor
  136.   cursor 0
  137.   if not(the name of cast the castNum of sprite theRoll contains "down") then
  138.     set the castNum of sprite theRoll to (the castNum of sprite theRoll) + 1
  139.     updatestage  
  140.     repeat while rollover(theRoll) and not the mousedown 
  141.     end repeat
  142.     set the castNum of sprite theRoll to (the castNum of sprite theRoll) - 1
  143.   end if 
  144. end
  145.  
  146. on unRoll theRoll
  147.   if the name of cast the castNum of sprite theRoll contains "down" then
  148.     set the castNum of sprite theRoll to (the castNum of sprite theRoll) - 1
  149.     updateStage
  150.   end if
  151. end
  152.  
  153. on check12
  154.   global startcast,ItemDel
  155.   
  156.   set the castnum of sprite 11 = (the castnum of sprite 11) + 1
  157.   set endcast = startcast + 30
  158.   put the ticks into Stime
  159.   repeat while rollover(11) and not the mousedown
  160.     if the ticks - Stime > 2 then
  161.       if the castNum of sprite 12 < endcast then set the castNum of sprite 12 to (the castNum of sprite 12) + 1
  162.       else set the castNum of sprite 12 to (startcast+1)
  163.       updateStage
  164.       put the ticks into Stime
  165.     end if
  166.   end repeat
  167.   if the mouseDown then
  168.     put the pathName into temp
  169.     set the itemDelimiter to ItemDel
  170.     delete item the number of items of temp of temp
  171.     delete item the number of items of temp of temp
  172.     set the itemDelimiter to ","
  173.     unload
  174.     unloadCast
  175.     
  176.     set the visible of sprite 2 to false
  177.     updateStage
  178.     
  179.     go frame "black"
  180.     go movie string(temp&ItemDel&"random.dir")
  181.   end if
  182.   if the movie <> "random.dir" then
  183.     set the castnum of sprite 11 = (the castnum of sprite 11) - 1
  184.     set the castNum of sprite 12 to startcast
  185.   end if
  186. end
  187.  
  188. on GoDatabase num
  189.   global gMakerNum,ItemDel,MensFrames
  190.   
  191.   put "32,127,78,pool,pool,098,184,149,14,102,115,140,152,148,mount,mount" into temp
  192.   put 1 into i
  193.   repeat while i < the number of items of temp
  194.     if num = item i of MensFrames then
  195.       exit repeat
  196.     else
  197.       put i+1 into i
  198.     end if
  199.   end repeat
  200.   if item i of temp <> "pool" and item i of temp <> "mount" then
  201.     put value(item i of temp) into x
  202.   else if item i of temp = "pool" then
  203.     if the mouseH < 314 then put 45 into x
  204.     else put 63 into x
  205.   else
  206.     if the mouseH > 376 then put 99 into x
  207.     else if the mouseH > 239 then put 132 into x
  208.   end if
  209.   put x into num
  210.   set gMakerNum = num
  211.   sound stop 1
  212.   sound stop 2
  213.   unload
  214.   unloadCast
  215.   puppetSprite 2,FALSE
  216.   set the itemDelimiter to ItemDel
  217.   put item 1 of the pathName into temp
  218.   set the itemDelimiter to ","
  219.   
  220.   set the visible of sprite 2 to false
  221.   updateStage
  222.   
  223.   go frame "black"
  224.   go to frame "database" of movie temp&ItemDel&"DATABASE"&ItemDel&"POWER.DIR"
  225. end
  226.  
  227. on check2
  228.   global FramesMap,MensFrames
  229.   
  230.   put line (((the frame) + 2) / 3)  of FramesMap into temp
  231.   
  232.   
  233.   if inside(point(the mouseH,the mouseV), rect(22, 189, 122, 429)) and string(item 2 of temp) <> "000" then          --left
  234.     MyCursor 254,255
  235.   else  if inside(point(the mouseH,the mouseV), rect(512, 189, 612, 429)) and string(item 1 of temp) <> "000" then   --right
  236.     MyCursor 252,253
  237.   else  if inside(point(the mouseH,the mouseV), rect(122, 229, 512, 379)) and string(item 3 of temp) <> "000" then   --forward
  238.     MyCursor 258,259
  239.   else  if inside(point(the mouseH,the mouseV), rect(122, 229, 512, 379)) and MensFrames contains string(((the frame) + 2) / 3) and string(((the frame) + 2) / 3) <> 9 then   --DataBase
  240.     SetCursor
  241.   else  if inside(point(the mouseH,the mouseV), rect(122, 189, 512, 229)) and string(item 5 of temp) <> "000" then   --up
  242.     MyCursor 250,251
  243.   else  if inside(point(the mouseH,the mouseV), rect(122, 379, 512, 429)) and string(item 4 of temp) <> "000" then   --back
  244.     MyCursor 256,257
  245.   else  if inside(point(the mouseH,the mouseV), rect(122, 379, 512, 429)) and string(item 6 of temp) <> "000" then   --down
  246.     MyCursor 248,249
  247.   else
  248.     ReleasCursor
  249.     cursor 0
  250.   end if
  251. end
  252.  
  253. on MyCursor a,b
  254.   ReleasCursor
  255.   cursor [a,b]
  256. end
  257.  
  258. on SetCursor
  259.   global colorcrsr
  260.   
  261.   if the machineType <> 256 then
  262.     if not objectP(ColorCrsr) then
  263.       set colorcrsr = colorcursor(mNew)
  264.     end if
  265.     colorcrsr(mGetSetCursor,9000)
  266.   else
  267.     cursor [275,276]
  268.   end if
  269. end
  270.  
  271. on ReleasCursor
  272.   global ColorCrsr
  273.   
  274.   if the machineType <> 256 then
  275.     if objectP(ColorCrsr) then
  276.       colorcrsr(mReleaseCursor)
  277.       colorcrsr(mDispose)
  278.       updateStage
  279.       cursor 4
  280.     end if
  281.   end if
  282. end
  283.  
  284. on hiliteBtn theSprite
  285.   if not(the name of cast the castNum of sprite theSprite contains "down") then
  286.     set the castNum of sprite theSprite to (the castNum of sprite theSprite) + 1
  287.     updatestage  
  288.     repeat while the mousedown 
  289.     end repeat
  290.     set the castNum of sprite theSprite to (the castNum of sprite theSprite) - 1
  291.   end if 
  292. end