home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1997 September / Personal_Computer_World_Sep_97.iso / Democd3 / oasquiz.dxr / 00174.ls < prev    next >
Encoding:
Text File  |  1997-06-04  |  4.3 KB  |  165 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 locV of sprite 26 to 200
  47.     updateStage()
  48.     repeat with n = 155 to 160
  49.       set the castNum of sprite 26 to n
  50.       updateStage()
  51.       startTimer()
  52.       repeat while the timer < 5
  53.         nothing()
  54.       end repeat
  55.     end repeat
  56.     startTimer()
  57.     repeat while the timer < 50
  58.       nothing()
  59.     end repeat
  60.     set the visible of sprite 8 to 0
  61.     set oldlevel to level
  62.     set level to level + 1
  63.     set leveldiff to oldlevel - level
  64.     set the visible of sprite 20 to 1
  65.   end if
  66.   if true_answer <> "1" then
  67.     set inarow to 0
  68.     set qwrong to qwrong + 1
  69.     if Rand_Sound = 1 then
  70.       puppetSound("bluebit7")
  71.     end if
  72.     if Rand_Sound = 2 then
  73.       puppetSound("bluebit3")
  74.     end if
  75.     if Rand_Sound = 3 then
  76.       puppetSound("bluebit9")
  77.     end if
  78.     if Rand_Sound = 4 then
  79.       puppetSound("blubit11")
  80.     end if
  81.     if Rand_Sound = 5 then
  82.       puppetSound("bluebit6")
  83.     end if
  84.     set the visible of sprite 26 to 1
  85.     repeat with n = 257 to 265
  86.       set the castNum of sprite 26 to n
  87.       updateStage()
  88.       startTimer()
  89.       repeat while the timer < 5
  90.         nothing()
  91.       end repeat
  92.     end repeat
  93.     set oldlevel to level
  94.     set level to level - random(level - 1)
  95.     if gameover = 1 then
  96.       set level to 0
  97.     end if
  98.     if level < 0 then
  99.       set level to 0
  100.     end if
  101.     set leveldiff to oldlevel - level
  102.     updateStage()
  103.   end if
  104.   startTimer()
  105.   set true_answer to 0
  106.   set the visible of sprite 23 to 1
  107.   set the visible of sprite 24 to 1
  108.   set the blend of sprite 15 to 0
  109.   set checkcounter to 1
  110.   set counter to counter + 1
  111.   updateStage()
  112.   set Rand_Sound to 10
  113.   repeat while soundBusy(1) = 1
  114.   end repeat
  115.   if level > oldlevel then
  116.     puppetSound("rise1")
  117.     if the castNum of sprite 12 <> 296 then
  118.       set the castNum of sprite 12 to the castNum of sprite 12 + 1
  119.       updateStage()
  120.     end if
  121.   else
  122.     if level < oldlevel then
  123.       puppetSound("fall1")
  124.     end if
  125.   end if
  126.   if level > highest then
  127.     set highest to level
  128.   end if
  129.   set the visible of sprite 19 to 0
  130.   set the visible of sprite 22 to 0
  131.   set the visible of sprite 23 to 0
  132.   set the visible of sprite 24 to 0
  133.   updateStage()
  134.   if level = 0 then
  135.     set plost to 1
  136.     puppetSound("fall1")
  137.     set notend to 0
  138.     go("end")
  139.     exit
  140.   end if
  141.   if level = 20 then
  142.     set notend to 0
  143.     set pwon to 1
  144.     go("end")
  145.     exit
  146.   end if
  147.   if (counter = 60) and (level <> 20) then
  148.     set notend to 0
  149.     set pend to 1
  150.     go("end")
  151.     exit
  152.   end if
  153.   set the visible of sprite 23 to 0
  154.   set the visible of sprite 24 to 0
  155.   set the visible of sprite 22 to 0
  156.   set the visible of sprite 8 to 0
  157.   set the visible of sprite 19 to 0
  158.   updateStage()
  159.   startTimer()
  160.   set the visible of sprite 20 to 0
  161.   updateStage()
  162.   set notend to 1
  163.   go("end")
  164. end
  165.