home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1997 September / Personal_Computer_World_Sep_97.iso / Democd3 / oasquiz.dxr / 00219.ls < prev    next >
Encoding:
Text File  |  1997-06-04  |  4.5 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, disable
  3.   if disable = 0 then
  4.     set disable to 1
  5.     set the volume of sound 1 to 250
  6.     set checkcounter to 1
  7.     set the visible of sprite 20 to 0
  8.     puppetSound("click")
  9.     set the visible of sprite 13 to 0
  10.     set the visible of sprite 28 to 0
  11.     set the visible of sprite 29 to 0
  12.     set the visible of sprite 30 to 0
  13.     set the blend of sprite 5 to 90
  14.     set the locH of sprite 5 to the locH of sprite 5 + 2
  15.     set the locV of sprite 5 to the locV of sprite 5 + 2
  16.     set the locH of sprite 22 to the locH of sprite 22 + 2
  17.     set the locV of sprite 22 to the locV of sprite 22 + 2
  18.     updateStage()
  19.     startTimer()
  20.     repeat while the timer < 15
  21.       nothing()
  22.     end repeat
  23.     set the locH of sprite 5 to the locH of sprite 5 - 2
  24.     set the locV of sprite 5 to the locV of sprite 5 - 2
  25.     set the locH of sprite 22 to the locH of sprite 22 - 2
  26.     set the locV of sprite 22 to the locV of sprite 22 - 2
  27.     updateStage()
  28.     set Rand_Sound to random(5)
  29.     if true_answer = "1" then
  30.       if Rand_Sound = 1 then
  31.         puppetSound("funkbit2")
  32.       end if
  33.       if Rand_Sound = 2 then
  34.         puppetSound("funkbit3")
  35.       end if
  36.       if Rand_Sound = 3 then
  37.         puppetSound("funkbit2")
  38.       end if
  39.       if Rand_Sound = 4 then
  40.         puppetSound("rockbit6")
  41.       end if
  42.       if Rand_Sound = 5 then
  43.         puppetSound("rockbit5")
  44.       end if
  45.       set inarow to inarow + 1
  46.       set qright to qright + 1
  47.       set the visible of sprite 26 to 1
  48.       set the locV of sprite 26 to 200
  49.       updateStage()
  50.       repeat with n = 155 to 160
  51.         set the castNum of sprite 26 to n
  52.         updateStage()
  53.         startTimer()
  54.         repeat while the timer < 5
  55.           nothing()
  56.         end repeat
  57.       end repeat
  58.       startTimer()
  59.       repeat while the timer < 50
  60.         nothing()
  61.       end repeat
  62.       set the visible of sprite 8 to 0
  63.       set oldlevel to level
  64.       set level to level + 1
  65.       set leveldiff to oldlevel - level
  66.       set the visible of sprite 20 to 1
  67.     end if
  68.     if true_answer <> "1" then
  69.       set inarow to 0
  70.       set qwrong to qwrong + 1
  71.       if Rand_Sound = 1 then
  72.         puppetSound("bluebit7")
  73.       end if
  74.       if Rand_Sound = 2 then
  75.         puppetSound("bluebit3")
  76.       end if
  77.       if Rand_Sound = 3 then
  78.         puppetSound("bluebit9")
  79.       end if
  80.       if Rand_Sound = 4 then
  81.         puppetSound("blubit11")
  82.       end if
  83.       if Rand_Sound = 5 then
  84.         puppetSound("bluebit6")
  85.       end if
  86.       set the visible of sprite 12 to 1
  87.       set the visible of sprite 26 to 1
  88.       repeat with n = 257 to 265
  89.         set the castNum of sprite 26 to n
  90.         updateStage()
  91.         startTimer()
  92.         repeat while the timer < 5
  93.           nothing()
  94.         end repeat
  95.       end repeat
  96.       set oldlevel to level
  97.       set n to random(level - 1)
  98.       set level to level - n
  99.       if gameover = 1 then
  100.         set level to 0
  101.       end if
  102.       if level < 0 then
  103.         set level to 0
  104.       end if
  105.       set leveldiff to oldlevel - level
  106.       updateStage()
  107.     end if
  108.     startTimer()
  109.     set true_answer to 0
  110.     set the blend of sprite 15 to 0
  111.     set checkcounter to 1
  112.     set counter to counter + 1
  113.     updateStage()
  114.     set Rand_Sound to 10
  115.     repeat while soundBusy(1) = 1
  116.     end repeat
  117.     if level > oldlevel then
  118.       puppetSound("ding2")
  119.     end if
  120.     if level < oldlevel then
  121.       puppetSound("jewharp1")
  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 23 to 0
  152.     set the visible of sprite 24 to 0
  153.     set the visible of sprite 22 to 0
  154.     set the visible of sprite 26 to 0
  155.     set the visible of sprite 8 to 0
  156.     set the visible of sprite 19 to 0
  157.     updateStage()
  158.     startTimer()
  159.     set the visible of sprite 20 to 0
  160.     updateStage()
  161.     set notend to 1
  162.     go("trans")
  163.   end if
  164. end
  165.