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

  1. on mouseDown
  2.   global ans3, true_answer, Rand_Quest, guess, counter, scored, Rand_Sound, level, oldlevel, x, leveldiff, 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 7 to the locH of sprite 7 + 2
  12.   set the locV of sprite 7 to the locV of sprite 7 + 2
  13.   set the locH of sprite 24 to the locH of sprite 24 + 2
  14.   set the locV of sprite 24 to the locV of sprite 24 + 2
  15.   updateStage()
  16.   startTimer()
  17.   repeat while the timer < 15
  18.     nothing()
  19.   end repeat
  20.   set the locH of sprite 7 to the locH of sprite 7 - 2
  21.   set the locV of sprite 7 to the locV of sprite 7 - 2
  22.   set the locH of sprite 24 to the locH of sprite 24 - 2
  23.   set the locV of sprite 24 to the locV of sprite 24 - 2
  24.   updateStage()
  25.   set the blend of sprite 37 to 45
  26.   set the blend of sprite 38 to 45
  27.   set the blend of sprite 48 to 65
  28.   set Rand_Sound to random(5)
  29.   if true_answer = "3" 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 locH of sprite 26 to 433
  49.     set the locV of sprite 26 to 350
  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 scored to scored + 1
  68.     set the visible of sprite 20 to 1
  69.   end if
  70.   if true_answer <> "3" then
  71.     set inarow to 0
  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 qwrong to qwrong + 1
  89.     set the visible of sprite 26 to 1
  90.     set the locV of sprite 26 to 350
  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.   set the blend of sprite 17 to 55
  112.   updateStage()
  113.   startTimer()
  114.   set the visible of sprite 20 to 0
  115.   set the visible of sprite 21 to 0
  116.   set counter to counter + 1
  117.   set the blend of sprite 17 to 0
  118.   updateStage()
  119.   set the blend of sprite 37 to 0
  120.   set the blend of sprite 38 to 0
  121.   set the blend of sprite 48 to 0
  122.   if level < 0 then
  123.     set level to 0
  124.   end if
  125.   repeat while soundBusy(1) = 1
  126.   end repeat
  127.   if level > oldlevel then
  128.     puppetSound("ding2")
  129.   else
  130.     if (level < oldlevel) and (counter > 0) then
  131.       puppetSound("jewharp1")
  132.     end if
  133.   end if
  134.   if the castNum of sprite 12 <> 296 then
  135.     set the castNum of sprite 12 to level + 275
  136.     updateStage()
  137.   end if
  138.   if level > highest then
  139.     set highest to level
  140.   end if
  141.   updateStage()
  142.   if level = 0 then
  143.     puppetSound("jewharp1")
  144.     set plost to 1
  145.     set notend to 0
  146.     go("end")
  147.     exit
  148.   end if
  149.   if level >= 22 then
  150.     set notend to 0
  151.     set pwon to 1
  152.     go("end")
  153.     exit
  154.   end if
  155.   if (counter = 24) and (level <> 22) then
  156.     set notend to 0
  157.     set pend to 1
  158.     go("end")
  159.     exit
  160.   end if
  161.   set the visible of sprite 26 to 0
  162.   set the visible of sprite 8 to 0
  163.   set the visible of sprite 20 to 1
  164.   updateStage()
  165.   set the visible of sprite 20 to 0
  166.   updateStage()
  167.   set notend to 1
  168.   go("trans")
  169. end
  170.