home *** CD-ROM | disk | FTP | other *** search
/ Pro One: Netcracker Netscape Navigator / ProOne: Netcracker Netscape Navigator.iso / pc / nc / nct01140.geo / 00028_MC LOGIC.ls < prev    next >
Encoding:
Text File  |  1997-03-19  |  4.6 KB  |  235 lines

  1. on initMC
  2.   set_NumOfTries(0)
  3.   set_showMeSP(41)
  4.   if get_practiceNum() = 1 then
  5.     set_MCScore(3)
  6.     set_rightAns(3)
  7.     UpdateAnsCurs(17, 25, 3)
  8.   else
  9.     if get_practiceNum() = 2 then
  10.       set_MCScore(3)
  11.       set_rightAns(3)
  12.       UpdateAnsCurs(17, 19, 3)
  13.     else
  14.       if get_practiceNum() = 3 then
  15.         set_MCScore(3)
  16.         set_rightAns(2)
  17.         UpdateAnsCurs(17, 25, 3)
  18.       else
  19.         if get_practiceNum() = 4 then
  20.           set_MCScore(3)
  21.           set_rightAns(6)
  22.           UpdateAnsCurs(17, 25, 3)
  23.         else
  24.           if get_practiceNum() = 5 then
  25.             set_MCScore(5)
  26.             set_rightAns(4)
  27.             UpdateAnsCurs(17, 25, 3)
  28.           end if
  29.         end if
  30.       end if
  31.     end if
  32.   end if
  33.   UpdateCursors(get_showMeSP(), 3)
  34. end
  35.  
  36. on updateThisMCScore
  37.   if get_MCScore() > 0 then
  38.     set_MCScore(get_MCScore() + 1 - get_NumOfTries())
  39.   end if
  40.   updateScore(get_MCScore(), get_practiceNum() + 1)
  41. end
  42.  
  43. on pressAns theAns
  44.   sound stop 2
  45.   if get_NumOfTries() < 3 then
  46.     if get_nowPressedAns() <> 0 then
  47.       UpdateCursors(get_nowPressedAns() + 16, 3)
  48.     end if
  49.     UpdateCursors(theAns + 16, 0)
  50.     updateStage()
  51.     set_NumOfTries(get_NumOfTries() + 1)
  52.     do("pressAns" & get_practiceNum() && theAns)
  53.     set_nowPressedAns(theAns)
  54.   end if
  55. end
  56.  
  57. on pressAns1 theAns
  58.   if theAns = get_rightAns() then
  59.     UpdateAnsCurs(17, 25, 0)
  60.     updateThisMCScore()
  61.     go("t3-rightAns")
  62.   else
  63.     if get_NumOfTries() < 3 then
  64.       go("fb1." & item theAns of "1,2,0,4,5,6,7,8,9" & ".1")
  65.     else
  66.       UpdateAnsCurs(17, 25, 0)
  67.       go("fb8.1")
  68.     end if
  69.   end if
  70. end
  71.  
  72. on pressAns2 theAns
  73.   if theAns = get_rightAns() then
  74.     UpdateAnsCurs(17, 19, 0)
  75.     updateThisMCScore()
  76.     go("t5-rightAns")
  77.   else
  78.     if get_NumOfTries() < 3 then
  79.       go("fb" & item theAns of "3,4,0" & ".2")
  80.     else
  81.       UpdateAnsCurs(17, 19, 0)
  82.       go("fb9.2")
  83.     end if
  84.   end if
  85. end
  86.  
  87. on pressAns3 theAns
  88.   if theAns = get_rightAns() then
  89.     UpdateAnsCurs(17, 25, 0)
  90.     updateThisMCScore()
  91.     go("t7-rightAns")
  92.   else
  93.     if get_NumOfTries() < 3 then
  94.       go("fb5." & item theAns of "1,0,3,4,5,6,7,8,9" & ".3")
  95.     else
  96.       UpdateAnsCurs(17, 25, 0)
  97.       go("fb8.3")
  98.     end if
  99.   end if
  100. end
  101.  
  102. on pressAns4 theAns
  103.   if theAns = get_rightAns() then
  104.     UpdateAnsCurs(17, 25, 0)
  105.     updateThisMCScore()
  106.     go("t9-rightAns")
  107.   else
  108.     if get_NumOfTries() < 3 then
  109.       go("fb2." & item theAns of "1,2,3,4,5,0,7,8,9" & ".4")
  110.     else
  111.       UpdateAnsCurs(17, 25, 0)
  112.       go("fb9.4")
  113.     end if
  114.   end if
  115. end
  116.  
  117. on pressAns5 theAns
  118.   if theAns = get_rightAns() then
  119.     UpdateAnsCurs(17, 25, 0)
  120.     updateThisMCScore()
  121.     go("t10-rightAns")
  122.   else
  123.     if get_NumOfTries() < 3 then
  124.       go("fb6." & item theAns of "1,2,3,0,5,6,7,8,9" & ".5")
  125.     else
  126.       UpdateAnsCurs(17, 25, 0)
  127.       go("fb8.5")
  128.     end if
  129.   end if
  130. end
  131.  
  132. on UpdateAnsCurs bottomVal, topVal, whichCurs
  133.   repeat with i = bottomVal to topVal
  134.     UpdateCursors(i, whichCurs)
  135.   end repeat
  136. end
  137.  
  138. on handleShowMe
  139.   set the castNum of sprite get_showMeSP() to cast "SHOWME"
  140.   updateStage()
  141.   sound stop 2
  142.   if get_NumOfTries() = 3 then
  143.     updateScore(0, get_practiceNum() + 1)
  144.   else
  145.     updateScore(99, get_practiceNum() + 1)
  146.   end if
  147.   if get_practiceNum() = 1 then
  148.     go("t3-rightAns")
  149.   else
  150.     if get_practiceNum() = 2 then
  151.       go("t5-rightAns")
  152.     else
  153.       if get_practiceNum() = 3 then
  154.         go("t7-rightAns")
  155.       else
  156.         if get_practiceNum() = 4 then
  157.           go("t9-rightAns")
  158.         else
  159.           if get_practiceNum() = 5 then
  160.             go("t10-rightAns")
  161.           end if
  162.         end if
  163.       end if
  164.     end if
  165.   end if
  166. end
  167.  
  168. on updateScore theScore, taskInChapter
  169.   global scoreOrderList, ScoreByTasksList
  170.   set cellLocInList to getAt(scoreOrderList, integer(Get_CurrentTool()))
  171.   set subList to getAt(ScoreByTasksList, cellLocInList)
  172.   setAt(subList, taskInChapter, theScore)
  173.   setAt(ScoreByTasksList, cellLocInList, subList)
  174. end
  175.  
  176. on set_NumOfTries int
  177.   global NumOfTries
  178.   set NumOfTries to int
  179. end
  180.  
  181. on get_NumOfTries
  182.   global NumOfTries
  183.   return NumOfTries
  184. end
  185.  
  186. on set_rightAns theAns
  187.   global RightAns
  188.   set RightAns to theAns
  189. end
  190.  
  191. on get_rightAns
  192.   global RightAns
  193.   return RightAns
  194. end
  195.  
  196. on set_nowPressedAns int
  197.   global nowPressedAns
  198.   set nowPressedAns to int
  199. end
  200.  
  201. on get_nowPressedAns
  202.   global nowPressedAns
  203.   return nowPressedAns
  204. end
  205.  
  206. on set_showMeSP int
  207.   global showMeSP
  208.   set showMeSP to int
  209. end
  210.  
  211. on get_showMeSP
  212.   global showMeSP
  213.   return showMeSP
  214. end
  215.  
  216. on set_practiceNum int
  217.   global practiceNum
  218.   set practiceNum to int
  219. end
  220.  
  221. on get_practiceNum
  222.   global practiceNum
  223.   return practiceNum
  224. end
  225.  
  226. on set_MCScore int
  227.   global MCScore
  228.   set MCScore to int
  229. end
  230.  
  231. on get_MCScore
  232.   global MCScore
  233.   return MCScore
  234. end
  235.