home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1997 September / Personal_Computer_World_Sep_97.iso / Democd3 / oasquiz.dxr / 00221.ls < prev    next >
Encoding:
Text File  |  1997-06-04  |  4.9 KB  |  176 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, disable
  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("click")
  8.     set the visible of sprite 13 to 0
  9.     set the visible of sprite 28 to 0
  10.     set the visible of sprite 29 to 0
  11.     set the visible of sprite 30 to 0
  12.     set the locH of sprite 7 to the locH of sprite 7 + 2
  13.     set the locV of sprite 7 to the locV of sprite 7 + 2
  14.     set the locH of sprite 24 to the locH of sprite 24 + 2
  15.     set the locV of sprite 24 to the locV of sprite 24 + 2
  16.     updateStage()
  17.     startTimer()
  18.     repeat while the timer < 15
  19.       nothing()
  20.     end repeat
  21.     set the locH of sprite 7 to the locH of sprite 7 - 2
  22.     set the locV of sprite 7 to the locV of sprite 7 - 2
  23.     set the locH of sprite 24 to the locH of sprite 24 - 2
  24.     set the locV of sprite 24 to the locV of sprite 24 - 2
  25.     updateStage()
  26.     set the blend of sprite 37 to 45
  27.     set the blend of sprite 38 to 45
  28.     set the blend of sprite 48 to 65
  29.     set Rand_Sound to random(5)
  30.     if true_answer = "3" 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 locH of sprite 26 to 433
  50.       set the locV of sprite 26 to 350
  51.       updateStage()
  52.       repeat with n = 155 to 160
  53.         set the castNum of sprite 26 to n
  54.         updateStage()
  55.         startTimer()
  56.         repeat while the timer < 5
  57.           nothing()
  58.         end repeat
  59.       end repeat
  60.       startTimer()
  61.       repeat while the timer < 50
  62.         nothing()
  63.       end repeat
  64.       set the visible of sprite 8 to 0
  65.       set oldlevel to level
  66.       set level to level + 1
  67.       set leveldiff to oldlevel - level
  68.       set scored to scored + 1
  69.       set the visible of sprite 20 to 1
  70.     end if
  71.     if true_answer <> "3" then
  72.       set inarow to 0
  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 qwrong to qwrong + 1
  90.       set the visible of sprite 26 to 1
  91.       set the locV of sprite 26 to 350
  92.       repeat with n = 257 to 265
  93.         set the castNum of sprite 26 to n
  94.         updateStage()
  95.         startTimer()
  96.         repeat while the timer < 5
  97.           nothing()
  98.         end repeat
  99.       end repeat
  100.       startTimer()
  101.       repeat while the timer < 50
  102.         nothing()
  103.       end repeat
  104.       set oldlevel to level
  105.       set n to random(level - 1)
  106.       set level to level - n
  107.       if gameover = 1 then
  108.         set level to 0
  109.       end if
  110.       set the visible of sprite 21 to 1
  111.     end if
  112.     set the blend of sprite 17 to 55
  113.     updateStage()
  114.     startTimer()
  115.     set the visible of sprite 20 to 0
  116.     set the visible of sprite 21 to 0
  117.     set counter to counter + 1
  118.     set the blend of sprite 17 to 0
  119.     updateStage()
  120.     set the blend of sprite 37 to 0
  121.     set the blend of sprite 38 to 0
  122.     set the blend of sprite 48 to 0
  123.     if level < 0 then
  124.       set level to 0
  125.     end if
  126.     repeat while soundBusy(1) = 1
  127.     end repeat
  128.     if level > oldlevel then
  129.       puppetSound("ding2")
  130.     end if
  131.     if level < oldlevel then
  132.       puppetSound("jewharp1")
  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.     set the visible of sprite 19 to 0
  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 22 to 0
  163.     set the visible of sprite 23 to 0
  164.     set the visible of sprite 24 to 0
  165.     set the visible of sprite 26 to 0
  166.     set the visible of sprite 8 to 0
  167.     set the visible of sprite 19 to 0
  168.     set the visible of sprite 20 to 1
  169.     updateStage()
  170.     set the visible of sprite 20 to 0
  171.     updateStage()
  172.     set notend to 1
  173.     go("trans")
  174.   end if
  175. end
  176.