RPREADER.BAS

Announce and discuss the progress of your various programming-related projects...programs, games, websites, tutorials, libraries...anything!

Moderators: Pete, Mods

ansgar
Newbie
Posts: 1
Joined: Tue Nov 03, 2009 11:10 pm

RPREADER.BAS

Postby ansgar » Tue Nov 03, 2009 11:44 pm

I
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' THIS FILE WAS WRITTEN BY ME: ALIYUS RUDH,
' AKA ANSGAR BALDURSON ON NOVEMBER 3, 2009
' REFERENCE ME SHOULD YOU USE THIS PROGRAM,
' WHETHER IN IT'S ENTIRETY, OR IN SIZABLE
' (GTR THAN 200 CHAR COPY + PASTE) PART.
'
' SWEET. THANKS.
'

CLS
curroom$ = "begin"

room:
OPEN "C:\RPREADER\RP" FOR INPUT AS 1
DO
LINE INPUT #1, cmd$ ' "Input past end of file" here means that there is an improperly labeled room or reference to a room
LOOP UNTIL cmd$ = ":" + curroom$

PRINT " ____ " + curroom$ + " ____"
LINE INPUT #1, cmd$
WHILE LEFT$(cmd$, 1) <> "-"
PRINT cmd$
LINE INPUT #1, cmd$
WEND

getinput:
INPUT ">", user$
IF user$ = "quit" THEN GOTO quit

haveinput:
IF "-" + user$ = cmd$ THEN
GOTO goodinput
ELSE
LINE INPUT #1, cmd$
IF LEFT$(cmd$, 1) = ":" THEN
PRINT " Invalid"
PRINT
CLOSE #1
GOTO room
END IF
GOTO haveinput
END IF
goodinput:
PRINT

LINE INPUT #1, cmd$
WHILE LEFT$(cmd$, 1) <> ","
IF LEFT$(cmd$, 1) <> "-" THEN PRINT cmd$
LINE INPUT #1, cmd$
WEND
PRINT

curroom$ = RIGHT$(cmd$, LEN(cmd$) - 1)
CLOSE #1

GOTO room

quit:
PRINT "Are you sure you want to quit?"
INPUT user$
IF user$ = "yes" THEN END
PRINT "Whew! I was afraid you might say 'yes' !"
GOTO getinput

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' END OF READER.BAS
'''''''''''''''''''''''''''START OF SAMPLE FILE: "RP"
:begin
You are standing on a cobble stone path just outside a rusty iron gate
that's bolted to an old brick wall surrounding The House. The crescent
moon above pierces through the clouds, casting erie shadows.

To the north lies the House grounds, and going south would be
admitting defeat.
-open gate
-n
You push the gate forward. It squeals and shudders before allowing you
enough space to squeeze through.
,grounds
-leave
-s
You turn and walk back towards town. You are such a ninny.
,GAME OVER

:grounds
Along the path that snakes through The House's grounds you can see
gnarled plant life. Crooked trees loom overhead, and you smell
something salty.

To the south is a rusted gate, and to the north are stairs to the
door.
-s
You walk south and exit through the rusted gate.
,begin
-n
,patio
-search
,searching lawn

:searching lawn
You abandon the path and wonder through the tall weeds and ugly bushes
around the lawn, searching for something interesting. Soon, the smell
of salt becomes frighteningly pungent, and you think it might be
coming from a wooden trap door at The House's east wall. You hear
something rustle the leaves nearby.

To the west is a trap door, and to the south is the path.
-w
You begin walking forward and a twisted green vine shoots across your
path, and just before you set your left foot down, another vine shakes
free from the underbrush and wraps around your left leg. As you try to
free your leg from the tighy hold of the first plant, another sprouts
from behind and begins wrapping around your waist. Your knees buckle
and you are pulled to the ground, where other vines smoothly wrap
around your struggling body. You let out a muffled wail as smaller
plants cover and cut your face. Slowly, the plants constrict and
suffocate you.

You are dead.
,GAME OVER
-s
,grounds


:patio
You are at the patio
-s
,grounds

:GAME OVER
~~~~~~~~~
-!34@5Vfh%Rd
This should never be read.
,blah
:TRUE END

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Return to “News and Announcements”

Who is online

Users browsing this forum: No registered users and 1 guest