home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1997 September / Personal_Computer_World_Sep_97.iso / Democd3 / oasquiz.dxr / 00079.ls < prev    next >
Encoding:
Text File  |  1997-06-04  |  3.5 KB  |  140 lines

  1. on mouseDown
  2.   global ans3, true_answer, Rand_Quest, guess, counter, checkcounter, n, level, m, scored, Rand_Sound, oldlevel, leveldiff, vert
  3.   set checkcounter to 1
  4.   set the visible of sprite 20 to 0
  5.   puppetSound("click")
  6.   set the blend of sprite 5 to 100
  7.   updateStage()
  8.   startTimer()
  9.   repeat while the timer < 15
  10.   end repeat
  11.   set the blend of sprite 5 to 65
  12.   updateStage()
  13.   set the blend of sprite 46 to 60
  14.   set the blend of sprite 38 to 45
  15.   set the blend of sprite 39 to 45
  16.   set the visible of sprite 12 to 0
  17.   set the soundEnabled to 1
  18.   puppetSound(0)
  19.   updateStage()
  20.   set the visible of sprite 8 to 1
  21.   set the locV of sprite 8 to 250
  22.   repeat with n = 1 to 100
  23.     set the locH of sprite 8 to n
  24.     updateStage()
  25.   end repeat
  26.   set Rand_Sound to random(5)
  27.   if true_answer = "3" then
  28.     set the castNum of sprite 8 to 173
  29.     updateStage()
  30.     repeat with n = 1 to 50
  31.       set vert to the locV of sprite 8
  32.       set the locV of sprite 8 to vert - n
  33.       startTimer()
  34.       repeat while the timer < 2
  35.         nothing()
  36.       end repeat
  37.       updateStage()
  38.     end repeat
  39.     set the visible of sprite 8 to 0
  40.     set oldlevel to level
  41.     set level to level + 1
  42.     set leveldiff to oldlevel - level
  43.     set the soundEnabled to 1
  44.     if Rand_Sound = 1 then
  45.       puppetSound("yesm")
  46.     end if
  47.     if Rand_Sound = 2 then
  48.       puppetSound("vfexllnt.wav")
  49.     end if
  50.     if Rand_Sound = 3 then
  51.       puppetSound("vfyes.wav")
  52.     end if
  53.     if Rand_Sound = 4 then
  54.       puppetSound("vmcorrct.wav")
  55.     end if
  56.     if Rand_Sound = 5 then
  57.       puppetSound("clapwoop.wav")
  58.     end if
  59.     set scored to scored + 1
  60.     set the visible of sprite 20 to 1
  61.   end if
  62.   if true_answer <> "3" then
  63.     set the castNum of sprite 8 to 174
  64.     updateStage()
  65.     repeat with n = 1 to 50
  66.       set vert to the locV of sprite 8
  67.       set the locV of sprite 8 to vert + n
  68.       startTimer()
  69.       repeat while the timer < 2
  70.         nothing()
  71.       end repeat
  72.       updateStage()
  73.     end repeat
  74.     set oldlevel to level
  75.     set level to level - random(level - 1)
  76.     set leveldiff to oldlevel - level
  77.     set the soundEnabled to 1
  78.     if Rand_Sound = 1 then
  79.       puppetSound("hateitm")
  80.     end if
  81.     if Rand_Sound = 2 then
  82.       puppetSound("shutup.wav")
  83.     end if
  84.     if Rand_Sound = 3 then
  85.       puppetSound("uhoh2.wav")
  86.     end if
  87.     if Rand_Sound = 4 then
  88.       puppetSound("vfdsilly.wav")
  89.     end if
  90.     if Rand_Sound = 5 then
  91.       puppetSound("laughm04.wav")
  92.     end if
  93.     set the visible of sprite 21 to 1
  94.   end if
  95.   set the visible of sprite 4 to 0
  96.   set the visible of sprite 5 to 0
  97.   updateStage()
  98.   startTimer()
  99.   set true_answer to 0
  100.   set the visible of sprite 4 to 1
  101.   set the visible of sprite 5 to 1
  102.   set the visible of sprite 21 to 0
  103.   set the visible of sprite 20 to 0
  104.   set the visible of sprite 6 to 1
  105.   set the visible of sprite 32 to 0
  106.   set the blend of sprite 15 to 0
  107.   set checkcounter to 1
  108.   set counter to counter + 1
  109.   updateStage()
  110.   puppetSound(0)
  111.   set the blend of sprite 38 to 0
  112.   set the blend of sprite 39 to 0
  113.   set the blend of sprite 46 to 0
  114.   if level < 0 then
  115.     set level to 0
  116.   end if
  117.   if level = 0 then
  118.     go("lose")
  119.   end if
  120.   if level = 3 then
  121.     go("win")
  122.   end if
  123.   if level = 0 then
  124.     set the locV of sprite 14 to 300
  125.   else
  126.     set vert to the locV of sprite 14
  127.     repeat with n = 1 to 15
  128.       set the locV of sprite 14 to vert - n
  129.       startTimer()
  130.       repeat while the timer < 3
  131.       end repeat
  132.       updateStage()
  133.     end repeat
  134.   end if
  135.   updateStage()
  136.   go("s")
  137.   set soundEnabled to 0
  138.   set Rand_Sound to 10
  139. end
  140.