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

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