home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1997 September / Personal_Computer_World_Sep_97.iso / Democd3 / oasquiz.dxr / 00164.ls < prev    next >
Encoding:
Text File  |  1997-06-04  |  4.3 KB  |  166 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.   set the visible of sprite 20 to 0
  6.   puppetSound("click")
  7.   set the visible of sprite 13 to 0
  8.   set the visible of sprite 28 to 0
  9.   set the visible of sprite 29 to 0
  10.   set the visible of sprite 30 to 0
  11.   set the blend of sprite 5 to 90
  12.   set the locH of sprite 5 to the locH of sprite 5 + 2
  13.   set the locV of sprite 5 to the locV of sprite 5 + 2
  14.   set the locH of sprite 22 to the locH of sprite 22 + 2
  15.   set the locV of sprite 22 to the locV of sprite 22 + 2
  16.   updateStage()
  17.   startTimer()
  18.   repeat while the timer < 15
  19.     nothing()
  20.   end repeat
  21.   set the locH of sprite 5 to the locH of sprite 5 - 2
  22.   set the locV of sprite 5 to the locV of sprite 5 - 2
  23.   set the locH of sprite 22 to the locH of sprite 22 - 2
  24.   set the locV of sprite 22 to the locV of sprite 22 - 2
  25.   updateStage()
  26.   set Rand_Sound to random(5)
  27.   if true_answer = "1" then
  28.     if Rand_Sound = 1 then
  29.       puppetSound("funkbit2")
  30.     end if
  31.     if Rand_Sound = 2 then
  32.       puppetSound("funkbit3")
  33.     end if
  34.     if Rand_Sound = 3 then
  35.       puppetSound("funkbit2")
  36.     end if
  37.     if Rand_Sound = 4 then
  38.       puppetSound("rockbit6")
  39.     end if
  40.     if Rand_Sound = 5 then
  41.       puppetSound("rockbit5")
  42.     end if
  43.     set inarow to inarow + 1
  44.     set qright to qright + 1
  45.     set the visible of sprite 26 to 1
  46.     set the locH of sprite 26 to 433
  47.     set the locV of sprite 26 to 199
  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 26 to 1
  86.     repeat with n = 257 to 265
  87.       set the castNum of sprite 26 to n
  88.       updateStage()
  89.       startTimer()
  90.       repeat while the timer < 5
  91.         nothing()
  92.       end repeat
  93.     end repeat
  94.     set oldlevel to level
  95.     set level to level - random(level - 1)
  96.     if gameover = 1 then
  97.       set level to 0
  98.     end if
  99.     if level < 0 then
  100.       set level to 0
  101.     end if
  102.     set leveldiff to oldlevel - level
  103.     updateStage()
  104.   end if
  105.   startTimer()
  106.   set true_answer to 0
  107.   set the visible of sprite 23 to 1
  108.   set the visible of sprite 24 to 1
  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("rise1")
  118.     if the castNum of sprite 12 <> 296 then
  119.       set the castNum of sprite 12 to the castNum of sprite 12 + 1
  120.       updateStage()
  121.     end if
  122.   else
  123.     if level < oldlevel then
  124.       puppetSound("fall1")
  125.     end if
  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.   set the visible of sprite 22 to 0
  132.   set the visible of sprite 23 to 0
  133.   set the visible of sprite 24 to 0
  134.   updateStage()
  135.   if level = 0 then
  136.     set plost to 1
  137.     puppetSound("fall1")
  138.     set notend to 0
  139.     go("end")
  140.     exit
  141.   end if
  142.   if level = 20 then
  143.     set notend to 0
  144.     set pwon to 1
  145.     go("end")
  146.     exit
  147.   end if
  148.   if (counter = 60) and (level <> 20) then
  149.     set notend to 0
  150.     set pend to 1
  151.     go("end")
  152.     exit
  153.   end if
  154.   set the visible of sprite 23 to 0
  155.   set the visible of sprite 24 to 0
  156.   set the visible of sprite 22 to 0
  157.   set the visible of sprite 8 to 0
  158.   set the visible of sprite 19 to 0
  159.   updateStage()
  160.   startTimer()
  161.   set the visible of sprite 20 to 0
  162.   updateStage()
  163.   set notend to 1
  164.   go("end")
  165. end
  166.