home *** CD-ROM | disk | FTP | other *** search
/ 321 GAMES / 321GAMES.iso / logic / runes / runes.exe / runes.DXR / 00007_WITHBLOCK.ls < prev    next >
Encoding:
Text File  |  1996-07-01  |  5.5 KB  |  218 lines

  1. on WALKRIGHTBLOCK
  2.   global MAN, GRIDX, GRIDY, DT, MANH, MANC, HEAD, BLOCKED, GRIDVAL, DR
  3.   set BLOCKED to 0
  4.   if getAt(GRIDVAL, MAN - 13) <> 0 then
  5.     exit
  6.   end if
  7.   set DT to 5
  8.   set MANX to getAt(GRIDX, MAN)
  9.   set MANY to getAt(GRIDY, MAN)
  10.   puppetSound("FOOTSTP.WAV")
  11.   repeat with n = 1 to 4
  12.     set the castNum of sprite 30 to 36 + n
  13.     set MANX to MANX + 8
  14.     set the locH of sprite 30 to MANX
  15.     set the locH of sprite 11 to MANX
  16.     updateStage()
  17.     COUNTTIME()
  18.   end repeat
  19.   set MAN to MAN + 1
  20.   set the castNum of sprite 30 to 37
  21.   set the locH of sprite 30 to getAt(GRIDX, MAN)
  22.   set the locV of sprite 30 to getAt(GRIDY, MAN)
  23.   set the locH of sprite 11 to getAt(GRIDX, MAN - 14)
  24.   set the locV of sprite 11 to getAt(GRIDY, MAN - 14)
  25.   updateStage()
  26.   set DR to 20
  27. end
  28.  
  29. on WALKLEFTBLOCK
  30.   global MAN, GRIDX, GRIDY, DT, MANH, MANC, HEAD, DR
  31.   set DT to 5
  32.   set MANX to getAt(GRIDX, MAN)
  33.   set MANY to getAt(GRIDY, MAN)
  34.   puppetSound("FOOTSTP.WAV")
  35.   repeat with n = 1 to 4
  36.     set the castNum of sprite 30 to 27 + n
  37.     set MANX to MANX - 8
  38.     set the locH of sprite 30 to MANX
  39.     set the locH of sprite 11 to MANX
  40.     updateStage()
  41.     COUNTTIME()
  42.   end repeat
  43.   set MAN to MAN - 1
  44.   set the castNum of sprite 30 to 28
  45.   set the locH of sprite 30 to getAt(GRIDX, MAN)
  46.   set the locV of sprite 30 to getAt(GRIDY, MAN)
  47.   set the locH of sprite 11 to getAt(GRIDX, MAN - 14)
  48.   set the locV of sprite 11 to getAt(GRIDY, MAN - 14)
  49.   updateStage()
  50.   set DR to 40
  51. end
  52.  
  53. on MANFALLBLOCK
  54.   global GRIDX, GRIDY, MAN, BDOWN, GRIDVAL, TMAN, DT, MANX, MANC, HEAD, BC, bh, DR
  55.   set DT to 1
  56.   set TMAN to MAN
  57.   set BDOWN to 0
  58.   repeat while (getAt(GRIDVAL, TMAN + 14) = 0) or (getAt(GRIDVAL, TMAN + 14) = 15)
  59.     set TMAN to TMAN + 14
  60.     set BDOWN to BDOWN + 1
  61.     if TMAN > 154 then
  62.       exit repeat
  63.     end if
  64.   end repeat
  65.   repeat with n = 1 to BDOWN
  66.     set MANX to getAt(GRIDX, MAN)
  67.     set MANC to getAt(GRIDY, MAN)
  68.     set BC to getAt(GRIDY, MAN - 14)
  69.     repeat with NN = 1 to 4
  70.       set the castNum of sprite 30 to 48
  71.       set the locV of sprite 30 to MANC + 4
  72.       set the locV of sprite 11 to BC + 4
  73.       updateStage()
  74.       COUNTTIME()
  75.       set the castNum of sprite 30 to 47
  76.       set the locV of sprite 30 to MANC + 8
  77.       set the locV of sprite 11 to BC + 8
  78.       updateStage()
  79.       COUNTTIME()
  80.       set BC to BC + 8
  81.       set MANC to MANC + 8
  82.     end repeat
  83.     set MAN to MAN + 14
  84.   end repeat
  85.   puppetSound("MANDOWN.WAV")
  86.   updateStage()
  87. end
  88.  
  89. on DROPRIGHT
  90.   global HEAD, GRIDVAL, GRIDX, GRIDY, bh, DT, MAN, DR
  91.   set DT to 5
  92.   set the castNum of sprite 30 to 51
  93.   updateStage()
  94.   COUNTTIME()
  95.   set the castNum of sprite 30 to 52
  96.   updateStage()
  97.   COUNTTIME()
  98.   set DR to 2
  99.   set DT to 3
  100.   set the locH of sprite 11 to getAt(GRIDX, MAN - 14)
  101.   set the locV of sprite 11 to getAt(GRIDY, MAN - 14)
  102.   set bh to the locH of sprite 11
  103.   if getAt(GRIDVAL, MAN + 1) <> 0 then
  104.     puppetSound("ROCK1.WAV")
  105.   end if
  106.   repeat with n = 1 to 4
  107.     if n = 3 then
  108.       set the castNum of sprite 30 to 51
  109.     end if
  110.     set bh to bh - -8
  111.     set the locH of sprite 11 to bh
  112.     updateStage()
  113.     COUNTTIME()
  114.   end repeat
  115.   set the castNum of sprite 30 to 37
  116.   set the locH of sprite 11 to getAt(GRIDX, MAN - 13)
  117.   updateStage()
  118.   setAt(GRIDVAL, MAN - 13, 2)
  119.   set HEAD to 0
  120.   if getAt(GRIDVAL, MAN + 1) = 0 then
  121.     BLOCKFALL()
  122.   end if
  123.   set the trails of sprite 11 to 1
  124.   updateStage()
  125.   set the locH of sprite 11 to -2000
  126.   set the locV of sprite 11 to -2000
  127. end
  128.  
  129. on DROPLEFT
  130.   global HEAD, GRIDVAL, GRIDX, GRIDY, bh, DT, MAN, DR
  131.   set DT to 5
  132.   set the castNum of sprite 30 to 49
  133.   updateStage()
  134.   COUNTTIME()
  135.   set the castNum of sprite 30 to 50
  136.   updateStage()
  137.   COUNTTIME()
  138.   set DR to 4
  139.   set DT to 3
  140.   set the locH of sprite 11 to getAt(GRIDX, MAN - 14)
  141.   set the locV of sprite 11 to getAt(GRIDY, MAN - 14)
  142.   set bh to the locH of sprite 11
  143.   if getAt(GRIDVAL, MAN - 1) <> 0 then
  144.     puppetSound("ROCK1.WAV")
  145.   end if
  146.   repeat with n = 1 to 4
  147.     if n = 3 then
  148.       set the castNum of sprite 30 to 49
  149.     end if
  150.     set bh to bh - 8
  151.     set the locH of sprite 11 to bh
  152.     updateStage()
  153.     COUNTTIME()
  154.   end repeat
  155.   set the locH of sprite 11 to getAt(GRIDX, MAN - 15)
  156.   set the castNum of sprite 30 to 28
  157.   updateStage()
  158.   setAt(GRIDVAL, MAN - 15, 2)
  159.   set HEAD to 0
  160.   if getAt(GRIDVAL, MAN - 1) = 0 then
  161.     BLOCKFALL()
  162.   end if
  163.   set the trails of sprite 11 to 1
  164.   updateStage()
  165.   set the locH of sprite 11 to -2000
  166.   set the locV of sprite 11 to -2000
  167. end
  168.  
  169. on BLOCKFALL
  170.   global GRIDX, GRIDY, BCNT, BCC, DT, DR, MAN
  171.   set DT to 1
  172.   if DR = 2 then
  173.     set BCC to MAN - 13
  174.   end if
  175.   if DR = 4 then
  176.     set BCC to MAN - 15
  177.   end if
  178.   setAt(GRIDVAL, BCC, 0)
  179.   repeat while getAt(GRIDVAL, BCC + 14) = 0
  180.     repeat with n = 1 to 4
  181.       set the locV of sprite 11 to getAt(GRIDY, BCC) + (n * 8)
  182.       updateStage()
  183.       COUNTTIME()
  184.     end repeat
  185.     set BCC to BCC + 14
  186.     set the locV of sprite 11 to getAt(GRIDY, BCC)
  187.     updateStage()
  188.     if BCC > 154 then
  189.       exit repeat
  190.     end if
  191.   end repeat
  192.   puppetSound("DROPROCK.WAV")
  193.   updateStage()
  194.   setAt(GRIDVAL, BCC, 2)
  195. end
  196.  
  197. on BLOCKFALLALONE
  198.   global GRIDX, GRIDY, DT, BFALL, GRIDVAL
  199.   set DT to 3
  200.   if getAt(GRIDVAL, BFALL + 14) = 1 then
  201.     setAt(GRIDVAL, BFALL + 14, 2)
  202.     exit
  203.   end if
  204.   repeat with n = 1 to 4
  205.     set the locV of sprite 11 to getAt(GRIDY, BFALL) + (n * 8)
  206.     updateStage()
  207.     COUNTTIME()
  208.   end repeat
  209.   set the trails of sprite 11 to 1
  210.   updateStage()
  211.   set the locH of sprite 11 to -2000
  212.   set the locV of sprite 11 to -2000
  213.   puppetSound("DROPROCK.WAV")
  214.   updateStage()
  215.   set BFALL to BFALL + 14
  216.   setAt(GRIDVAL, BFALL, 2)
  217. end
  218.