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

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