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

  1. on enterFrame
  2.   global timerate, sound_level, soundon, vox, disable, cheatmode, highest, right, wrong, answered, mouse_pressed, question, skip, answer_string, gQuestionList, queslist1, ans1, ans2, ans3, true_answer, checklist, match, check_counter, val, counter, checkcounter, original, valtimer, pass, passno, clicked, helpon, helptimes, n, paused, timeup, correct1_position, Rand_Quest, diff, backdrop, level
  3.   if the keyCode = 44 then
  4.     set cheatmode to 1
  5.   end if
  6.   puppetSprite(42, 1)
  7.   puppetSprite(43, 1)
  8.   if diff = 1 then
  9.     set the castNum of sprite 42 to 219
  10.     set the castNum of sprite 43 to 306
  11.   end if
  12.   if diff = 2 then
  13.     set the castNum of sprite 42 to 220
  14.     set the castNum of sprite 43 to 307
  15.   end if
  16.   if diff = 3 then
  17.     set the castNum of sprite 42 to 221
  18.     set the castNum of sprite 43 to 308
  19.   end if
  20.   if soundon = 0 then
  21.     set the soundEnabled to 0
  22.   end if
  23.   set sound_level to 0
  24.   set the text of cast 250 to " " & 26
  25.   set the visible of sprite 38 to 0
  26.   puppetTempo(timerate)
  27.   set the visible of sprite 26 to 0
  28.   set the visible of sprite 40 to 0
  29.   set the visible of sprite 36 to 1
  30.   set the visible of sprite 10 to 1
  31.   set the visible of sprite 14 to 1
  32.   set the visible of sprite 17 to 0
  33.   set the visible of sprite 18 to 0
  34.   updateStage()
  35.   set the visible of sprite 8 to 0
  36.   set the visible of sprite 12 to 1
  37.   if level = 0 then
  38.     set the castNum of sprite 12 to 275
  39.   else
  40.     if level = 1 then
  41.       set the castNum of sprite 12 to 276
  42.     else
  43.       if level = 2 then
  44.         set the castNum of sprite 12 to 277
  45.       else
  46.         if level = 3 then
  47.           set the castNum of sprite 12 to 278
  48.         else
  49.           if level = 4 then
  50.             set the castNum of sprite 12 to 279
  51.           else
  52.             if level = 5 then
  53.               set the castNum of sprite 12 to 280
  54.             else
  55.               if level = 6 then
  56.                 set the castNum of sprite 12 to 281
  57.               else
  58.                 if level = 7 then
  59.                   set the castNum of sprite 12 to 282
  60.                 else
  61.                   if level = 8 then
  62.                     set the castNum of sprite 12 to 283
  63.                   else
  64.                     if level = 9 then
  65.                       set the castNum of sprite 12 to 284
  66.                     else
  67.                       if level = 10 then
  68.                         set the castNum of sprite 12 to 285
  69.                       else
  70.                         if level = 11 then
  71.                           set the castNum of sprite 12 to 286
  72.                         else
  73.                           if level = 12 then
  74.                             set the castNum of sprite 12 to 287
  75.                           else
  76.                             if level = 13 then
  77.                               set the castNum of sprite 12 to 288
  78.                             else
  79.                               if level = 14 then
  80.                                 set the castNum of sprite 12 to 289
  81.                               else
  82.                                 if level = 15 then
  83.                                   set the castNum of sprite 12 to 290
  84.                                 else
  85.                                   if level = 16 then
  86.                                     set the castNum of sprite 12 to 291
  87.                                   else
  88.                                     if level = 17 then
  89.                                       set the castNum of sprite 12 to 292
  90.                                     else
  91.                                       if level = 18 then
  92.                                         set the castNum of sprite 12 to 293
  93.                                       else
  94.                                         if level = 19 then
  95.                                           set the castNum of sprite 12 to 294
  96.                                         else
  97.                                           if level = 20 then
  98.                                             set the castNum of sprite 12 to 295
  99.                                           end if
  100.                                         end if
  101.                                       end if
  102.                                     end if
  103.                                   end if
  104.                                 end if
  105.                               end if
  106.                             end if
  107.                           end if
  108.                         end if
  109.                       end if
  110.                     end if
  111.                   end if
  112.                 end if
  113.               end if
  114.             end if
  115.           end if
  116.         end if
  117.       end if
  118.     end if
  119.   end if
  120.   updateStage()
  121.   set correct1_position to 0
  122.   updateStage()
  123.   set the cursor of sprite 22 to [111, 112]
  124.   set the cursor of sprite 23 to [111, 112]
  125.   set the cursor of sprite 24 to [111, 112]
  126.   puppetSound(0)
  127.   set helptimes to 0
  128.   set helpon to 0
  129.   set clicked to 0
  130.   updateStage()
  131.   set helpon to 0
  132.   set match to 1
  133.   if counter >= 0 then
  134.     choose_q()
  135.   end if
  136.   if diff = 1 then
  137.     set question to getAt(queslist1, Rand_Quest)
  138.     set ans1 to getAt(anslist1, (Rand_Quest * 3) - 2)
  139.     set ans2 to getAt(anslist1, (Rand_Quest * 3) - 1)
  140.     set ans3 to getAt(anslist1, Rand_Quest * 3)
  141.     set true_answer to getAt(correct1, Rand_Quest)
  142.     set the text of member "quest" to question
  143.     set the text of cast "answer1" to ans1
  144.     set the text of cast "answer2" to ans2
  145.     set the text of cast "answer3" to ans3
  146.   end if
  147.   if diff = 2 then
  148.     set question to getAt(queslist2, Rand_Quest)
  149.     set ans1 to getAt(anslist2, (Rand_Quest * 3) - 2)
  150.     set ans2 to getAt(anslist2, (Rand_Quest * 3) - 1)
  151.     set ans3 to getAt(anslist2, Rand_Quest * 3)
  152.     set true_answer to getAt(correct2, Rand_Quest)
  153.     set the text of member "quest" to question
  154.     set the text of cast "answer1" to ans1
  155.     set the text of cast "answer2" to ans2
  156.     set the text of cast "answer3" to ans3
  157.   end if
  158.   if diff = 3 then
  159.     set question to getAt(queslist3, Rand_Quest)
  160.     set ans1 to getAt(anslist3, (Rand_Quest * 3) - 2)
  161.     set ans2 to getAt(anslist3, (Rand_Quest * 3) - 1)
  162.     set ans3 to getAt(anslist3, Rand_Quest * 3)
  163.     set true_answer to getAt(correct3, Rand_Quest)
  164.     set the text of member "quest" to question
  165.     set the text of cast "answer1" to ans1
  166.     set the text of cast "answer2" to ans2
  167.     set the text of cast "answer3" to ans3
  168.   end if
  169.   updateStage()
  170.   set answered to 0
  171.   updateStage()
  172.   updateStage()
  173.   set pass to pass + 1
  174. end
  175.  
  176. on exitFrame
  177.   set the visible of sprite 1 to 1
  178.   updateStage()
  179.   set the visible of sprite 38 to 1
  180.   set the visible of sprite 37 to 1
  181.   set the visible of sprite 5 to 1
  182.   set the visible of sprite 6 to 1
  183.   set the visible of sprite 19 to 1
  184.   set the visible of sprite 22 to 1
  185.   set the visible of sprite 23 to 1
  186.   set the visible of sprite 24 to 1
  187.   set n to random(52)
  188.   puppetTransition(28, 2, 1, 0)
  189.   updateStage()
  190. end
  191.