home *** CD-ROM | disk | FTP | other *** search
/ The World of Don & Mike / DMCDROM.iso / gamedata / class.dir / 00001_MovieScript.ls next >
Encoding:
Text File  |  1995-12-12  |  8.9 KB  |  330 lines

  1. on startMovie
  2.   global masterList, roomList, visibleList, pvCount, GavinCounter, ondeckObject
  3.   duplicate(cast ondeckObject, cast 176)
  4.   set the keyDownScript to "keyWatch"
  5.   if getaProp(masterList, #boomBox) = 2 then
  6.     duplicate(cast "boomBox", cast 299)
  7.   end if
  8. end
  9.  
  10. on exitRoom
  11.   global roomList, masterList, ondeckObject
  12.   set ondeckObject to the name of cast 176
  13.   set listCounter to count(roomList)
  14.   repeat with x = 1 to listCounter
  15.     set the visible of sprite (19 + x) to 1
  16.   end repeat
  17.   unLoad()
  18. end
  19.  
  20. on keyWatch
  21.   global forward, left, right
  22.   if the keyCode = 126 then
  23.     if forward = EMPTY then
  24.       randomRude()
  25.     else
  26.       go(forward)
  27.     end if
  28.   end if
  29.   if the keyCode = 123 then
  30.     puppetTransition(12, 4, 40)
  31.     go(left)
  32.   end if
  33.   if the keyCode = 124 then
  34.     puppetTransition(11, 4, 40)
  35.     go(right)
  36.   end if
  37. end
  38.  
  39. on initRoom
  40.   global roomList, masterList
  41.   set listCounter to count(roomList)
  42.   repeat with x = 1 to listCounter
  43.     set whichItem to getAt(roomList, x)
  44.     if getProp(masterList, whichItem) > 0 then
  45.       set the visible of sprite (29 + x) to 0
  46.     end if
  47.   end repeat
  48. end
  49.  
  50. on enterBriefcase
  51.   global masterList, visibleList
  52.   set whichItem to count(masterList)
  53.   repeat with x = 1 to whichItem
  54.     set whichChannel to 1 + x
  55.     set whatPiece to getPropAt(masterList, x)
  56.     if getaProp(masterList, whatPiece) <> 1 then
  57.       if the visible of sprite whichChannel = 1 then
  58.         append(visibleList, whichChannel)
  59.         set the visible of sprite whichChannel to 0
  60.       end if
  61.       next repeat
  62.     end if
  63.     set the visible of sprite whichChannel to 1
  64.   end repeat
  65. end
  66.  
  67. on exitBriefcase
  68.   global visibleList
  69.   repeat with x = 1 to count(visibleList)
  70.     set the visible of sprite getAt(visibleList, x) to 1
  71.   end repeat
  72. end
  73.  
  74. on initGAVIN
  75.   global masterList, visibleListPV
  76.   set visibleListPV to []
  77.   if getProp(masterList, #TOclue) < 2 then
  78.     set the visible of sprite 7 to 0
  79.   else
  80.     set the visible of sprite 7 to 1
  81.   end if
  82.   if getProp(masterList, #M1clue) < 2 then
  83.     set the visible of sprite 8 to 0
  84.   else
  85.     set the visible of sprite 8 to 1
  86.   end if
  87.   if getProp(masterList, #M2clue) < 2 then
  88.     set the visible of sprite 9 to 0
  89.   else
  90.     set the visible of sprite 9 to 1
  91.   end if
  92.   if getProp(masterList, #Gclue) < 2 then
  93.     set the visible of sprite 10 to 0
  94.   else
  95.     set the visible of sprite 10 to 1
  96.   end if
  97.   if getProp(masterList, #AVclue) < 2 then
  98.     set the visible of sprite 11 to 0
  99.   else
  100.     set the visible of sprite 11 to 1
  101.   end if
  102.   if getProp(masterList, #ONclue) < 2 then
  103.     set the visible of sprite 12 to 0
  104.   else
  105.     set the visible of sprite 12 to 1
  106.   end if
  107.   if getProp(masterList, #Eclue) < 2 then
  108.     set the visible of sprite 13 to 0
  109.   else
  110.     set the visible of sprite 13 to 1
  111.   end if
  112. end
  113.  
  114. on foreButton
  115.   set the castNum of sprite the clickOn to the number of cast "fore lit"
  116.   updateStage()
  117.   repeat while the mouseDown
  118.     nothing()
  119.   end repeat
  120.   set the castNum of sprite the clickOn to the number of cast "fore arrow"
  121.   updateStage()
  122. end
  123.  
  124. on rightButton
  125.   set the castNum of sprite the clickOn to the number of cast "right lit"
  126.   updateStage()
  127.   repeat while the mouseDown
  128.     nothing()
  129.   end repeat
  130.   set the castNum of sprite the clickOn to the number of cast "right arrow"
  131.   updateStage()
  132. end
  133.  
  134. on leftButton
  135.   set the castNum of sprite the clickOn to the number of cast "left lit"
  136.   updateStage()
  137.   repeat while the mouseDown
  138.     nothing()
  139.   end repeat
  140.   set the castNum of sprite the clickOn to the number of cast "left arrow"
  141.   updateStage()
  142. end
  143.  
  144. on followMouse
  145.   if the name of cast 176 <> "mask" then
  146.     repeat while the mouseDown
  147.       set the locV of sprite 47 to the mouseV
  148.       set the locH of sprite 47 to the mouseH
  149.       updateStage()
  150.     end repeat
  151.   end if
  152. end
  153.  
  154. on grabIcon whichIcon, whatChannel, whatProp
  155.   global dragProp
  156.   set dragProp to whatProp
  157.   set the visible of sprite whatChannel to 0
  158.   set the visible of sprite 48 to 0
  159.   duplicate(cast whichIcon, cast 300)
  160.   set the locV of sprite 48 to the mouseV
  161.   set the locH of sprite 48 to the mouseH
  162.   updateStage()
  163.   set the visible of sprite 48 to 1
  164.   repeat while the mouseDown
  165.     set the locV of sprite 48 to the mouseV
  166.     set the locH of sprite 48 to the mouseH
  167.     updateStage()
  168.   end repeat
  169. end
  170.  
  171. on checkTool whichReward
  172.   global ToolList, MatchList, frameList, masterList, tapeList, tapeFileList, tapeFlagList, seperator
  173.   set trueMatch to 0
  174.   if sprite 47 intersects 45 and (the name of cast 299 = "boomBox") then
  175.     repeat with x = 1 to count(tapeList)
  176.       if the name of cast 176 = getAt(tapeList, x) then
  177.         set tapeMatch to 1
  178.         exit repeat
  179.       end if
  180.     end repeat
  181.     if tapeMatch = 1 then
  182.       set the locV of sprite 47 to 420
  183.       set the locH of sprite 47 to 258
  184.       duplicate(cast "mask", cast 176)
  185.       updateStage()
  186.       sound playFile 2, the pathName & "sounds" & seperator & getAt(tapeFileList, x)
  187.       repeat while soundBusy(2)
  188.         nothing()
  189.       end repeat
  190.       duplicate(cast getAt(tapeList, x), cast 176)
  191.       updateStage()
  192.       setAt(tapeFlagList, x, 1)
  193.     else
  194.       set the locV of sprite 47 to 420
  195.       set the locH of sprite 47 to 258
  196.       updateStage()
  197.       randomRude()
  198.     end if
  199.   else
  200.     repeat with x = 1 to count(ToolList)
  201.       set whichSprite to getAt(MatchList, x)
  202.       set whichTool to getAt(ToolList, x)
  203.       set whichIcon to the name of cast 176
  204.       if sprite 47 intersects whichSprite and (whichIcon = whichTool) then
  205.         set trueMatch to 1
  206.         setProp(masterList, getAt(frameList, x), 2)
  207.         set the visible of sprite whichSprite to 1
  208.         set the visible of sprite 47 to 0
  209.         set the locV of sprite 47 to 420
  210.         set the locH of sprite 47 to 258
  211.         duplicate(cast "mask", cast 176)
  212.         set the visible of sprite 47 to 1
  213.         updateStage()
  214.         randomWooHoo()
  215.         judgeGavin()
  216.         exit repeat
  217.       end if
  218.     end repeat
  219.     if trueMatch = 0 then
  220.       set the locV of sprite 47 to 420
  221.       set the locH of sprite 47 to 258
  222.       updateStage()
  223.       randomRude()
  224.     end if
  225.   end if
  226. end
  227.  
  228. on dropIcon
  229.   global masterList, dragProp, tapeList, tapeFileList, tapeFlagList, seperator
  230.   if sprite 48 intersects 45 and (the name of cast 299 = "boomBox") then
  231.     set tapeMatch to 0
  232.     repeat with x = 1 to count(tapeList)
  233.       if the name of cast 300 = getAt(tapeList, x) then
  234.         set tapeMatch to 1
  235.         exit repeat
  236.       end if
  237.     end repeat
  238.     if tapeMatch = 1 then
  239.       set the locV of sprite 48 to 441
  240.       set the locH of sprite 48 to 17
  241.       duplicate(cast "mask2", cast 300)
  242.       updateStage()
  243.       sound playFile 2, the pathName & "sounds" & seperator & getAt(tapeFileList, x)
  244.       repeat while soundBusy(2)
  245.         nothing()
  246.       end repeat
  247.       duplicate(cast getAt(tapeList, x), cast 176)
  248.       updateStage()
  249.       setAt(tapeFlagList, x, 1)
  250.       setaProp(masterList, dragProp, 1)
  251.     else
  252.       set the visible of sprite 48 to 0
  253.       set the visible of sprite the clickOn to 1
  254.       duplicate(cast "mask2", cast 300)
  255.       set the locV of sprite 48 to 441
  256.       set the locH of sprite 48 to 17
  257.       updateStage()
  258.       set the visible of sprite 48 to 1
  259.       randomRude()
  260.     end if
  261.   else
  262.     if sprite 48 intersects 46 then
  263.       set the visible of sprite 48 to 0
  264.       duplicate(cast "mask2", cast 300)
  265.       set the locV of sprite 48 to 441
  266.       set the locH of sprite 48 to 17
  267.       updateStage()
  268.       set the visible of sprite 48 to 1
  269.       setaProp(masterList, dragProp, 1)
  270.       randomWooHoo()
  271.     else
  272.       set the visible of sprite 48 to 0
  273.       set the visible of sprite the clickOn to 1
  274.       duplicate(cast "mask2", cast 300)
  275.       set the locV of sprite 48 to 441
  276.       set the locH of sprite 48 to 17
  277.       updateStage()
  278.       set the visible of sprite 48 to 1
  279.       randomRude()
  280.     end if
  281.   end if
  282. end
  283.  
  284. on randomRude
  285.   global rude1, rude2, rude3, rude4, rude5, rude6, rude7, rude8, rude9, rude10, rude11, rude12, rude13, rude14, rude15, rude16, rude17, rude18, rudeList
  286.   if soundBusy(2) then
  287.     nothing()
  288.   else
  289.     sound playFile 2, getAt(rudeList, random(18))
  290.   end if
  291. end
  292.  
  293. on randomWooHoo
  294.   global woohoo1, woohoo2, woohoo3, woohoo4, woohoo5, woohoo6, woohoo7, woohoo8, woohoo9, wooHooList
  295.   if soundBusy(2) then
  296.     nothing()
  297.   else
  298.     sound playFile 2, getAt(wooHooList, random(8))
  299.   end if
  300. end
  301.  
  302. on judgeGavin
  303.   global masterList
  304.   set GavinCounter to 0
  305.   if getaProp(masterList, #TOclue) = 2 then
  306.     set GavinCounter to GavinCounter + 1
  307.   end if
  308.   if getaProp(masterList, #M1clue) = 2 then
  309.     set GavinCounter to GavinCounter + 1
  310.   end if
  311.   if getaProp(masterList, #M2clue) = 2 then
  312.     set GavinCounter to GavinCounter + 1
  313.   end if
  314.   if getaProp(masterList, #Gclue) = 2 then
  315.     set GavinCounter to GavinCounter + 1
  316.   end if
  317.   if getaProp(masterList, #AVclue) = 2 then
  318.     set GavinCounter to GavinCounter + 1
  319.   end if
  320.   if getaProp(masterList, #ONclue) = 2 then
  321.     set GavinCounter to GavinCounter + 1
  322.   end if
  323.   if getaProp(masterList, #Eclue) = 2 then
  324.     set GavinCounter to GavinCounter + 1
  325.   end if
  326.   if GavinCounter = 7 then
  327.     go("tapeGive")
  328.   end if
  329. end
  330.