home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / n / newsflash / !BBS / BBS / Scripts / Gloop < prev    next >
Encoding:
Text File  |  1996-09-16  |  1.5 KB  |  88 lines

  1. {
  2. | Gloop for NewsFlash
  3. | Original by Ed Ross
  4. | Converted by Chris Davis
  5. |
  6. | NewsFlash does not support arrays so this may prove rather tricky!
  7. | However, we can use the tag file list instead (max 256 entries)..
  8. |
  9. | This game is intended to illustrate the flexibility of NewsFlash
  10.  
  11. REPORT "Gloop"
  12. STD CLL
  13. NL BFG 7
  14. PRINT "This game will clear any queued files" NL
  15. PRINT "Do you wish to continue? (y/N)" GETD option,"NY"
  16. IF option="N" THEN
  17.   END
  18. ENDIF
  19. NL NL
  20. PRINT "Keys are:" NL
  21. PRINT "Left  : Z" NL
  22. PRINT "Right : /" NL
  23. PRINT "Exit  : ESCAPE" NL NL
  24. GOSUB anykey
  25. STD CLS
  26. CLEARTAGS
  27. objects%=10
  28. object%=1
  29. REPEAT
  30.   RND=80
  31.   c%=RND-1
  32.   RND=DLINES
  33.   r%=RND-1
  34.   TAGFILE c% OR (r%*(2^8))
  35.   object%=object%+1
  36. UNTIL object%>objects%
  37. gloop%=40
  38. stop%=FALSE
  39. score%=0
  40. REPEAT
  41.   CLS
  42.   object%=1
  43.   REPEAT
  44.     READTAG 1,objectdat%
  45.     REMOVETAG 1
  46.     c%=objectdat% AND 255
  47.     r%=(objectdat%/(2^8))
  48.     LOCATE c%,r%
  49.     IF r%=DLINES-1 AND c%>=gloop% AND c%<gloop%+4 THEN
  50.       score%=score%+1
  51.       BEEP
  52.     ENDIF
  53.     }*{
  54.     r%=r%+1
  55.     IF r%>=DLINES THEN
  56.       RND=80 c%=RND-1
  57.       TAGFILE c%
  58.     ELSE
  59.       TAGFILE c% OR (r%*(2^8))
  60.     ENDIF
  61.     object%=object%+1
  62.   UNTIL object%>objects%
  63.   k%=1
  64.   REPEAT
  65.     INKEY k
  66.     IF k<>"" THEN
  67.       IF k="Z" gloop%=gloop%-1
  68.       IF k="/" gloop%=gloop%+1
  69.       IF k="" stop%=TRUE
  70.       IF gloop%<0 gloop%=0
  71.       IF gloop%>76 gloop%=76
  72.     ENDIF
  73.     k%=k%+1
  74.   UNTIL k%>8 OR k=""
  75.   LOCATE gloop%,DLINES-1
  76.   BFG 1 
  77.   }===={
  78.   BFG 7
  79.   LOCATE 0,0
  80.   BFG 2 
  81.   PRINT "Score : "+score%
  82.   BFG 7
  83.   WAIT
  84. UNTIL stop%
  85. STD CLS
  86. CLEARTAGS
  87. }
  88.