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

  1. on GETFLOOR
  2.   global FLOOR, GRIDX, GRIDY, GRIDVAL, TELE, L, MAN, DR, BUTGRID, TEMBUTGRID, THEAD
  3.   set THEAD to 0
  4.   set BUTGRID to 0
  5.   repeat with n = 1 to 168
  6.     setAt(GRIDVAL, n, 0)
  7.   end repeat
  8.   set FLOOR to EMPTY
  9.   repeat with n = 1 to 168
  10.     set L to EMPTY
  11.     set L to chars(FLOOR, n, n)
  12.     if L = "N" then
  13.       setAt(GRIDVAL, n, 15)
  14.       set BUTGRID to n
  15.       set TEMBUTGRID to n
  16.       set the locH of sprite 8 to getAt(GRIDX, n)
  17.       set the locV of sprite 8 to getAt(GRIDY, n)
  18.       updateStage()
  19.     end if
  20.     if L = " " then
  21.       setAt(GRIDVAL, n, 0)
  22.     end if
  23.     if L = "F" then
  24.       setAt(GRIDVAL, n, 1)
  25.       set the locH of sprite 10 to getAt(GRIDX, n)
  26.       set the locV of sprite 10 to getAt(GRIDY, n)
  27.       updateStage()
  28.     end if
  29.     if L = "R" then
  30.       setAt(GRIDVAL, n, 5)
  31.       set the locH of sprite 12 to getAt(GRIDX, n)
  32.       set the locV of sprite 12 to getAt(GRIDY, n)
  33.       updateStage()
  34.     end if
  35.     if L = "B" then
  36.       setAt(GRIDVAL, n, 2)
  37.       set the locH of sprite 11 to getAt(GRIDX, n)
  38.       set the locV of sprite 11 to getAt(GRIDY, n)
  39.       updateStage()
  40.     end if
  41.     if L = "M" then
  42.       set MAN to n
  43.       set the locH of sprite 30 to getAt(GRIDX, n)
  44.       set the locV of sprite 30 to getAt(GRIDY, n)
  45.       updateStage()
  46.     end if
  47.     if L = "D" then
  48.       setAt(GRIDVAL, n, 30)
  49.       set TELE to n
  50.       set the locH of sprite 9 to getAt(GRIDX, n)
  51.       set the locV of sprite 9 to getAt(GRIDY, n)
  52.       updateStage()
  53.     end if
  54.   end repeat
  55.   repeat with n = 10 to 12
  56.     set the locH of sprite n to -2000
  57.     set the locV of sprite n to -2000
  58.     updateStage()
  59.   end repeat
  60. end
  61.