home *** CD-ROM | disk | FTP | other *** search
/ תקליטור אוסף נבחרי 95 / Top_95.iso / TOP95 / KIDS / FROGHOP / FROGHOP.EXE / FROGHOP.dxr / 00004_setupboard.ls < prev    next >
Encoding:
Text File  |  1996-11-01  |  1.6 KB  |  65 lines

  1. on setupboard
  2.   global GRIDX, GRIDY, GRIDNUM, grid, move, dr, gridcnt, score, bonuspoints, goodrestore, scorecnt, levelover, blankgrid, fast, specialgrid, aga, LEVEL, flagtime, flycnt, fly, twogrid, twogrid1, ng
  3.   set twogrid to 0
  4.   set twogrid1 to 0
  5.   set fly to 0
  6.   set flycnt to 0
  7.   set flagtime to 0
  8.   set LEVEL to 1
  9.   set aga to 0
  10.   set specialgrid to 0
  11.   set fast to 0
  12.   set blankgrid to 0
  13.   set levelover to 0
  14.   set scorecnt to 0
  15.   set goodrestore to 0
  16.   set score to 0
  17.   set bonuspoints to 0
  18.   set gridcnt to 0
  19.   set grid to 1
  20.   set move to 1
  21.   set dr to 2
  22.   puppetSprite(7, 1)
  23.   showgridcnt()
  24.   repeat with n = 2 to 6
  25.     puppetSprite(n, 1)
  26.     set the castNum of sprite n to 30
  27.     updateStage()
  28.   end repeat
  29.   showscore()
  30.   set GRIDNUM to []
  31.   puppetSprite(40, 1)
  32.   set the locH of sprite 40 to -2000
  33.   set the locV of sprite 40 to -2000
  34.   repeat with n = 15 to 39
  35.     puppetSprite(n, 1)
  36.     set the visible of sprite n to 1
  37.     set num to random(6) + 10
  38.     set U to random(2)
  39.     if (U = 1) and (num < 13) then
  40.       set num to random(6) + 10
  41.     end if
  42.     set the castNum of sprite n to num
  43.     append(GRIDNUM, num)
  44.   end repeat
  45.   set ng to 0
  46.   repeat while ng <> 3
  47.     set num to random(25)
  48.     if getAt(GRIDNUM, num) <> 10 then
  49.       setAt(GRIDNUM, num, 10)
  50.       set ng to ng + 1
  51.       set the castNum of sprite (num + 14) to 10
  52.     end if
  53.   end repeat
  54.   repeat with n = 15 to 39
  55.     set the locH of sprite n to getAt(GRIDX, n - 14)
  56.     set the locV of sprite n to getAt(GRIDY, n - 14)
  57.     updateStage()
  58.   end repeat
  59.   putinfly()
  60.   putinneeded()
  61.   putinbonus()
  62.   putinlevel()
  63.   putinstart()
  64. end
  65.