home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1996 August / WPCAUG96.ISO / makers / power / ue.dir / 00192.ls < prev    next >
Encoding:
Text File  |  1996-06-12  |  8.7 KB  |  333 lines

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