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

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