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

  1. on mouseDown
  2.   global ans1, true_answer, Rand_Quest, guess, counter, checkcounter, n, level, m, scored, Rand_Sound, oldlevel, leveldiff, vert, x, highest, plost, pwon, qright, qwrong, pend, notend, inarow, gameover, soundon
  3.   set the volume of sound 1 to 250
  4.   set checkcounter to 1
  5.   puppetSound(2, 0)
  6.   set the visible of sprite 20 to 0
  7.   puppetSound("click")
  8.   set the visible of sprite 13 to 0
  9.   set the visible of sprite 28 to 0
  10.   set the visible of sprite 29 to 0
  11.   set the visible of sprite 30 to 0
  12.   set the blend of sprite 5 to 90
  13.   set the locH of sprite 5 to the locH of sprite 5 + 2
  14.   set the locV of sprite 5 to the locV of sprite 5 + 2
  15.   set the locH of sprite 22 to the locH of sprite 22 + 2
  16.   set the locV of sprite 22 to the locV of sprite 22 + 2
  17.   updateStage()
  18.   startTimer()
  19.   repeat while the timer < 15
  20.     nothing()
  21.   end repeat
  22.   set the locH of sprite 5 to the locH of sprite 5 - 2
  23.   set the locV of sprite 5 to the locV of sprite 5 - 2
  24.   set the locH of sprite 22 to the locH of sprite 22 - 2
  25.   set the locV of sprite 22 to the locV of sprite 22 - 2
  26.   updateStage()
  27.   set Rand_Sound to random(5)
  28.   if true_answer = "1" then
  29.     if Rand_Sound = 1 then
  30.       puppetSound("funkbit2")
  31.     end if
  32.     if Rand_Sound = 2 then
  33.       puppetSound("funkbit3")
  34.     end if
  35.     if Rand_Sound = 3 then
  36.       puppetSound("funkbit2")
  37.     end if
  38.     if Rand_Sound = 4 then
  39.       puppetSound("rockbit6")
  40.     end if
  41.     if Rand_Sound = 5 then
  42.       puppetSound("rockbit5")
  43.     end if
  44.     set inarow to inarow + 1
  45.     set qright to qright + 1
  46.     set the visible of sprite 26 to 1
  47.     set the locV of sprite 26 to 200
  48.     updateStage()
  49.     repeat with n = 155 to 160
  50.       set the castNum of sprite 26 to n
  51.       updateStage()
  52.       startTimer()
  53.       repeat while the timer < 5
  54.         nothing()
  55.       end repeat
  56.     end repeat
  57.     startTimer()
  58.     repeat while the timer < 50
  59.       nothing()
  60.     end repeat
  61.     set the visible of sprite 8 to 0
  62.     set oldlevel to level
  63.     set level to level + 1
  64.     set leveldiff to oldlevel - level
  65.     set the visible of sprite 20 to 1
  66.   end if
  67.   if true_answer <> "1" then
  68.     set inarow to 0
  69.     set qwrong to qwrong + 1
  70.     if Rand_Sound = 1 then
  71.       puppetSound("bluebit7")
  72.     end if
  73.     if Rand_Sound = 2 then
  74.       puppetSound("bluebit3")
  75.     end if
  76.     if Rand_Sound = 3 then
  77.       puppetSound("bluebit9")
  78.     end if
  79.     if Rand_Sound = 4 then
  80.       puppetSound("blubit11")
  81.     end if
  82.     if Rand_Sound = 5 then
  83.       puppetSound("bluebit6")
  84.     end if
  85.     set the visible of sprite 12 to 1
  86.     set the visible of sprite 26 to 1
  87.     repeat with n = 257 to 265
  88.       set the castNum of sprite 26 to n
  89.       updateStage()
  90.       startTimer()
  91.       repeat while the timer < 5
  92.         nothing()
  93.       end repeat
  94.     end repeat
  95.     set oldlevel to level
  96.     set n to random(level - 1)
  97.     set level to level - n
  98.     if gameover = 1 then
  99.       set level to 0
  100.     end if
  101.     if level < 0 then
  102.       set level to 0
  103.     end if
  104.     set leveldiff to oldlevel - level
  105.     updateStage()
  106.   end if
  107.   startTimer()
  108.   set true_answer to 0
  109.   set the blend of sprite 15 to 0
  110.   set checkcounter to 1
  111.   set counter to counter + 1
  112.   updateStage()
  113.   set Rand_Sound to 10
  114.   repeat while soundBusy(1) = 1
  115.   end repeat
  116.   if level > oldlevel then
  117.     puppetSound("ding2")
  118.   else
  119.     if level < oldlevel then
  120.       puppetSound("jewharp1")
  121.     end if
  122.   end if
  123.   if the castNum of sprite 12 <> 296 then
  124.     set the castNum of sprite 12 to level + 275
  125.     updateStage()
  126.   end if
  127.   if level > highest then
  128.     set highest to level
  129.   end if
  130.   set the visible of sprite 19 to 0
  131.   updateStage()
  132.   if level = 0 then
  133.     set plost to 1
  134.     puppetSound("jewharp1")
  135.     set notend to 0
  136.     go("end")
  137.     exit
  138.   end if
  139.   if level >= 22 then
  140.     set notend to 0
  141.     set pwon to 1
  142.     go("end")
  143.     exit
  144.   end if
  145.   if (counter = 24) and (level <> 22) then
  146.     set notend to 0
  147.     set pend to 1
  148.     go("end")
  149.     exit
  150.   end if
  151.   set the visible of sprite 26 to 0
  152.   set the visible of sprite 8 to 0
  153.   updateStage()
  154.   startTimer()
  155.   set the visible of sprite 20 to 0
  156.   updateStage()
  157.   set notend to 1
  158.   go("trans")
  159. end
  160.