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

  1. on mouseDown
  2.   global ans2, true_answer, Rand_Quest, guess, counter, n, oldlevel, x, leveldiff, scored, Rand_Sound, level, highest, qright, qwrong, plost, pwon, pend, notend, inarow, gameover, soundon
  3.   set the visible of sprite 20 to 0
  4.   set the volume of sound 1 to 250
  5.   puppetSound(2, 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 locH of sprite 6 to the locH of sprite 6 + 2
  12.   set the locV of sprite 6 to the locV of sprite 6 + 2
  13.   set the locH of sprite 23 to the locH of sprite 23 + 2
  14.   set the locV of sprite 23 to the locV of sprite 23 + 2
  15.   updateStage()
  16.   startTimer()
  17.   repeat while the timer < 15
  18.     nothing()
  19.   end repeat
  20.   set the locH of sprite 6 to the locH of sprite 6 - 2
  21.   set the locV of sprite 6 to the locV of sprite 6 - 2
  22.   set the locH of sprite 23 to the locH of sprite 23 - 2
  23.   set the locV of sprite 23 to the locV of sprite 23 - 2
  24.   updateStage()
  25.   set the blend of sprite 47 to 60
  26.   set the blend of sprite 37 to 45
  27.   set the blend of sprite 39 to 45
  28.   set Rand_Sound to random(5)
  29.   if true_answer = "2" then
  30.     set inarow to inarow + 1
  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 the visible of sprite 26 to 1
  47.     set the locH of sprite 26 to 433
  48.     set the locV of sprite 26 to 270
  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 qright to qright + 1
  67.     set scored to scored + 1
  68.     set the visible of sprite 20 to 1
  69.   end if
  70.   if true_answer <> "2" then
  71.     set inarow to 0
  72.     set qwrong to qwrong + 1
  73.     if Rand_Sound = 1 then
  74.       puppetSound("bluebit7")
  75.     end if
  76.     if Rand_Sound = 2 then
  77.       puppetSound("bluebit3")
  78.     end if
  79.     if Rand_Sound = 3 then
  80.       puppetSound("bluebit9")
  81.     end if
  82.     if Rand_Sound = 4 then
  83.       puppetSound("blubit11")
  84.     end if
  85.     if Rand_Sound = 5 then
  86.       puppetSound("bluebit6")
  87.     end if
  88.     set the visible of sprite 12 to 1
  89.     set the visible of sprite 26 to 1
  90.     set the locV of sprite 26 to 270
  91.     repeat with n = 257 to 265
  92.       set the castNum of sprite 26 to n
  93.       updateStage()
  94.       startTimer()
  95.       repeat while the timer < 5
  96.         nothing()
  97.       end repeat
  98.     end repeat
  99.     startTimer()
  100.     repeat while the timer < 50
  101.       nothing()
  102.     end repeat
  103.     set oldlevel to level
  104.     set n to random(level - 1)
  105.     set level to level - n
  106.     if gameover = 1 then
  107.       set level to 0
  108.     end if
  109.     set the visible of sprite 21 to 1
  110.   end if
  111.   updateStage()
  112.   startTimer()
  113.   set the blend of sprite 16 to 0
  114.   set the visible of sprite 20 to 0
  115.   updateStage()
  116.   set counter to counter + 1
  117.   if level < 0 then
  118.     set level to 0
  119.   end if
  120.   repeat while soundBusy(1) = 1
  121.   end repeat
  122.   if level > oldlevel then
  123.     puppetSound("ding2")
  124.   else
  125.     if (level < oldlevel) and (oldlevel <> 0) then
  126.       puppetSound("jewharp1")
  127.     end if
  128.   end if
  129.   if the castNum of sprite 12 <> 296 then
  130.     set the castNum of sprite 12 to level + 275
  131.     updateStage()
  132.   end if
  133.   set the visible of sprite 19 to 0
  134.   updateStage()
  135.   if level > highest then
  136.     set highest to level
  137.   end if
  138.   if level = 0 then
  139.     puppetSound("jewharp1")
  140.     set plost to 1
  141.     set notend to 0
  142.     go("end")
  143.     exit
  144.   end if
  145.   if level >= 22 then
  146.     set notend to 0
  147.     set pwon to 1
  148.     go("end")
  149.     exit
  150.   end if
  151.   if (counter = 24) and (level <> 22) then
  152.     set pend to 1
  153.     set notend to 0
  154.     go("end")
  155.     exit
  156.   end if
  157.   set the visible of sprite 26 to 0
  158.   set the visible of sprite 8 to 0
  159.   set the visible of sprite 20 to 1
  160.   updateStage()
  161.   set the visible of sprite 20 to 0
  162.   updateStage()
  163.   set notend to 1
  164.   go("trans")
  165. end
  166.