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

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