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

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