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

  1. on RESTOREBOARD
  2.   global FLOOR, GRIDX, GRIDY, GRIDVAL, TELE, L, MAN, startMovie, BUTGRID, TEMBUTGRID, PUZZ, SOLUTIONFLAG, SOLCNT, SOL, TEMPBOARD, HEAD, THEAD, DR
  3.   set GRIDVAL to []
  4.   repeat with n = 10 to 12
  5.     set the locH of sprite n to -2000
  6.     set the locV of sprite n to -2000
  7.     updateStage()
  8.   end repeat
  9.   set the trails of sprite 10 to 1
  10.   set the trails of sprite 11 to 1
  11.   set the trails of sprite 12 to 1
  12.   set the locH of sprite 8 to -2000
  13.   set the locV of sprite 8 to -2000
  14.   updateStage()
  15.   repeat with n = 1 to 168
  16.     if getAt(TEMPBOARD, n) > 1 then
  17.       set the locH of sprite 40 to getAt(GRIDX, n)
  18.       set the locV of sprite 40 to getAt(GRIDY, n)
  19.       updateStage()
  20.       set the locH of sprite 40 to -2000
  21.       set the locV of sprite 40 to -2000
  22.       updateStage()
  23.     end if
  24.     if getAt(TEMPBOARD, n) = 15 then
  25.       setAt(GRIDVAL, n, 15)
  26.       set BUTGRID to n
  27.       set TEMBUTGRID to n
  28.       set the locH of sprite 8 to getAt(GRIDX, n)
  29.       set the locV of sprite 8 to getAt(GRIDY, n)
  30.       updateStage()
  31.     end if
  32.     if getAt(TEMPBOARD, n) = 0 then
  33.       setAt(GRIDVAL, n, 0)
  34.     end if
  35.     if getAt(TEMPBOARD, n) = 1 then
  36.       setAt(GRIDVAL, n, 1)
  37.     end if
  38.     if getAt(TEMPBOARD, n) = 5 then
  39.       setAt(GRIDVAL, n, 5)
  40.       set the locH of sprite 12 to getAt(GRIDX, n)
  41.       set the locV of sprite 12 to getAt(GRIDY, n)
  42.       updateStage()
  43.     end if
  44.     if getAt(TEMPBOARD, n) = 2 then
  45.       setAt(GRIDVAL, n, 2)
  46.       set the locH of sprite 11 to getAt(GRIDX, n)
  47.       set the locV of sprite 11 to getAt(GRIDY, n)
  48.       updateStage()
  49.     end if
  50.     if getAt(TEMPBOARD, n) = 100 then
  51.       setAt(GRIDVAL, n, 0)
  52.       set MAN to n
  53.       set the locH of sprite 30 to getAt(GRIDX, n)
  54.       set the locV of sprite 30 to getAt(GRIDY, n)
  55.       updateStage()
  56.     end if
  57.     if getAt(TEMPBOARD, n) = 30 then
  58.       setAt(GRIDVAL, n, 30)
  59.       set TELE to n
  60.       set the locH of sprite 9 to getAt(GRIDX, n)
  61.       set the locV of sprite 9 to getAt(GRIDY, n)
  62.       updateStage()
  63.     end if
  64.   end repeat
  65.   repeat with n = 10 to 12
  66.     set the locH of sprite n to -2000
  67.     set the locV of sprite n to -2000
  68.     updateStage()
  69.   end repeat
  70.   set TEMPBOARD to []
  71.   repeat with n = 1 to 168
  72.     setAt(TEMPBOARD, n, getAt(GRIDVAL, n))
  73.   end repeat
  74.   setAt(TEMPBOARD, MAN, 100)
  75.   set the locH of sprite 30 to getAt(GRIDX, MAN)
  76.   set the locV of sprite 30 to getAt(GRIDY, MAN)
  77.   updateStage()
  78.   if HEAD = 1 then
  79.     set the locH of sprite 11 to getAt(GRIDX, MAN - 14)
  80.     set the locV of sprite 11 to getAt(GRIDY, MAN - 14)
  81.     updateStage()
  82.   end if
  83.   set the trails of sprite 10 to 0
  84.   set the trails of sprite 11 to 0
  85.   set the trails of sprite 12 to 0
  86.   updateStage()
  87. end
  88.