home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / mac / SiteBldr / NATURE / GET / IMAGES / GAME.DCR / 00001.ls next >
Encoding:
Text File  |  1996-07-01  |  3.7 KB  |  152 lines

  1. global gCards, gState, gOld, gScore, gLily, gBigScreen, gDuck, gDuckSprite, gType, gFrog, gFlag, gEnd, gHits
  2.  
  3. on startMovie
  4.   set gCards to 25
  5.   set gState to 1
  6.   set gScore to 0
  7.   set gLily to 17
  8.   set gDuckSprite to 6
  9.   set gType to 24
  10.   set gFrog to 7
  11.   set gFlag to 0
  12.   set gEnd to 0
  13.   set gHits to 0
  14.   puppetSprite(43, 1)
  15.   set the visible of sprite 43 to 0
  16.   set gDuck to 468
  17.   puppetSprite(gDuckSprite, 1)
  18.   set the locH of sprite gDuckSprite to 468
  19.   set gBigScreen to 4
  20.   MakePuppets()
  21.   MixCards()
  22.   OffBigScreen()
  23. end
  24.  
  25. on MoveDuck
  26.   global gDuck, gDuckSprite, gTemper, gScore
  27.   if gDuck < 468 then
  28.     if gDuck > -40 then
  29.       set gDuck to gDuck - 4 - gTemper
  30.       set the locH of sprite gDuckSprite to gDuck
  31.       updateStage()
  32.     else
  33.       set the locH of sprite gDuckSprite to 468
  34.       if gScore = 8 then
  35.         go("end")
  36.       end if
  37.       updateStage()
  38.     end if
  39.   else
  40.     nothing()
  41.   end if
  42. end
  43.  
  44. on DoTim
  45.   set lAction to 24
  46.   puppetSprite(lAction, 1)
  47.   set the locV of sprite lAction to 50
  48.   set the locH of sprite lAction to 200
  49.   set the castNum of sprite lAction to 40
  50. end
  51.  
  52. on instruction
  53.   global gBigScreen
  54.   set the castNum of sprite (gBigScreen + 1) to 53
  55.   set the visible of sprite (gBigScreen + 1) to 1
  56.   updateStage()
  57. end
  58.  
  59. on MakePuppets
  60.   global gCards, gBigScreen, gFrog, gType
  61.   puppetSprite(gBigScreen, 1)
  62.   puppetSprite(gBigScreen + 1, 1)
  63.   repeat with LTemp = gCards to gCards + 15
  64.     puppetSprite(LTemp, 1)
  65.     set the visible of sprite LTemp to 0
  66.   end repeat
  67.   repeat with LTemp = 8 to 23
  68.     set the visible of sprite LTemp to 1
  69.   end repeat
  70. end
  71.  
  72. on MixCards
  73.   global gCards
  74.   repeat with LTemp = gCards + 15 down to gCards
  75.     set LRandom to random(15) + gCards
  76.     set LHolder to the castNum of sprite LTemp
  77.     set the castNum of sprite LTemp to the castNum of sprite LRandom
  78.     set the castNum of sprite LRandom to LHolder
  79.     updateStage()
  80.   end repeat
  81. end
  82.  
  83. on DoTimer
  84.   startTimer()
  85.   repeat while the timer <> 60
  86.   end repeat
  87. end
  88.  
  89. on EndGame
  90.   global gFrog, gType, gEnd
  91.   set gEnd to 1
  92.   updateStage()
  93. end
  94.  
  95. on Flip
  96.   global gState, gScore, gOld, gCards, gLily, gDuck, gTemper, gBigScreen, gFlag, gFrog, gType
  97.   if gFlag = 0 then
  98.     set gFlag to 1
  99.   end if
  100.   set the visible of sprite (the clickOn + gLily) to 1
  101.   updateStage()
  102.   if gState = 1 then
  103.     set gState to 2
  104.     set gOld to the clickOn
  105.     OffBigScreen()
  106.   else
  107.     if gOld = the clickOn then
  108.       nothing()
  109.     else
  110.       set gState to 1
  111.       if the castNum of sprite (gOld + gLily) = the castNum of sprite (the clickOn + gLily) then
  112.         DoTimer()
  113.         set gScore to gScore + 1
  114.         set the visible of sprite (gOld + gLily) to 0
  115.         set the visible of sprite (the clickOn + gLily) to 0
  116.         set the visible of sprite gOld to 0
  117.         set the visible of sprite the clickOn to 0
  118.         DoBigScreen()
  119.         set gDuck to 466
  120.         set gTemper to 0
  121.         puppetSound("quack")
  122.         updateStage()
  123.         if gScore = 8 then
  124.           set gFlag to 2
  125.           EndGame()
  126.         end if
  127.       else
  128.         DoTimer()
  129.         set the visible of sprite (gOld + gLily) to 0
  130.         set the visible of sprite (the clickOn + gLily) to 0
  131.       end if
  132.     end if
  133.   end if
  134.   put "made it"
  135.   put the castNum of sprite gBigScreen + 1
  136. end
  137.  
  138. on DoBigScreen
  139.   global gBigScreen, gLily, gOld
  140.   set the visible of sprite gBigScreen to 1
  141.   set the visible of sprite (gBigScreen + 1) to 1
  142.   set the castNum of sprite (gBigScreen + 1) to the castNum of sprite (the clickOn + gLily) + 15
  143.   set the castNum of sprite gBigScreen to the castNum of sprite (the clickOn + gLily)
  144.   updateStage()
  145. end
  146.  
  147. on OffBigScreen
  148.   global gBigScreen
  149.   set the visible of sprite gBigScreen to 0
  150.   set the visible of sprite (gBigScreen + 1) to 0
  151. end
  152.