Introduction: Simple Adventure Game.
Simple adventure game to play and modify for your own needs. The program was originally written in Pascal and I transcribed it to be a derivative work in QBasic. It certainly could be transcribed again to some other language. There are no graphics in this adventure, but you could certainly add your own. I compiled with Freebasic for both Linux and for MSWindows. You can easily download freebasic and install it on your system to compile the code.
Note: You should be competent enough to compile programs to get this to work. Since every system is different, I can not give instructions for every system. I can only just give you the program source and and let you run with it.
Note: You should be competent enough to compile programs to get this to work. Since every system is different, I can not give instructions for every system. I can only just give you the program source and and let you run with it.
Step 1: What You Need:
A computer that will run Freebasic
Freebasic
Source for the the mini adventure
Freebasic
Source for the the mini adventure
Step 2: Freebasic
You need to download and install freebasic for your system. That site has the instructions for installation:
http://www.freebasic.net/
Note: There maybe some qbasic compiler for the Mac computer, but you will have to look for it.
http://www.freebasic.net/
Note: There maybe some qbasic compiler for the Mac computer, but you will have to look for it.
Step 3: Download and Compile the Code.
1. To compile the code, you will want to download the file to your freebasic directory
2. From the command line issue the command:
fbc -lang qb gamadven.bas
3. After it compiles you can run gamadven and play the simple game. it is all keyboard controlled so there should be no problem playing it.
2. From the command line issue the command:
fbc -lang qb gamadven.bas
3. After it compiles you can run gamadven and play the simple game. it is all keyboard controlled so there should be no problem playing it.
Attachments
Step 4: Final Words.
Though this game might be simple, it contains the framework for you to be able to develop something much more complicated. I just given you some building blocks to play with.
Watch for a web version that can be run on a server soon.
Enjoy!
Watch for a web version that can be run on a server soon.
Enjoy!
Step 5: Bonus 1: a Second Adventure Game.
hh.bas
[code]
REM HOUNTED HOUSE
REM I made this in about 2 or 3 hours just for fun.
REM This is my first REAL IF game.
REM Im only 15 so gimmie sum slak if it sux lol.
FOR s = 1 TO 40 STEP 5
COLOR INT(RND * 15) + 1
PRINT SPACE$(s); " HAUNTED HOUSE ";
NEXT s
'play "L7O1GFGGGBABBBBCO3BBBBDGGGGFGGABCGO4DBBBBGFG"
menu:
CLS
COLOR 4
PRINT " HAUNTED HOUSE - BY GEEK BASIC SOFTWARE"
COLOR 12
PRINT
PRINT "MENU -"
PRINT "1> 'play GAME"
PRINT "2> HELP"
PRINT "0> QUIT"
DO
LET k$ = INKEY$
IF k$ = "1" THEN : GOTO playgame
IF k$ = "2" THEN : GOTO help
IF k$ = "0" THEN : CLS : END
LOOP
help:
CLS
COLOR 4
PRINT "HERE ARE SOME BASIC COMMANDS THAT CAN BE USED IN THE GAME..."
PRINT
COLOR 12
PRINT "LOOK - CHECKS FOR AVAILABLE EXITS"
PRINT "INVENTORY - VIEW ALL OF YOUR ITEMS"
PRINT "NORTH, WEST, SOUTH, AND EAST - MOVES YOU TO AVAILABLE LOCATIONS"
PRINT "EXAMINE (OBJECT) - EXAMINES AN OBJECT"
PRINT "USE (OBJECT) - USE AN OBJECT"
PRINT "TAKE (OBJECT) - TAKE AN OBJECT"
PRINT "UNLOCK (OBJECT) - UNLOCK AN OBJECT"
PRINT "HELP - VIEW THIS SCREEN"
PRINT "PRESS ANY KEY..."
DO
LOOP UNTIL LEN(INKEY$)
GOTO menu
playgame:
LET r = 1
LET gotmainkey = 0
LET gotboxkey1 = 0
LET gotboxkey2 = 0
LET gotcandle = 0
LET gotnote = 0
LET gottp = 0
LET boxopen = 0
CLS
COLOR 4
PRINT "HAUNTED HOUSE"
PRINT
COLOR 12
PRINT "IT IS HALLOWEEN DAY AT MARIPOSA DRIVE."
PRINT "YOUR MOM HAS GROUNDED YOU FOR THE DAY BECAUSE YOU AND YOUR FRIENDS"
PRINT "THREW TOILET PAPER OVER THE NEIGHBORS HOUSE LAST NIGHT..."
PRINT "AFTER YOU SPEND ABOUT HALF OF THE DAY IN YOUR ROOM STARING AT YOUR"
PRINT "SOCKS AND LISTENING TO THE CHILDREN 'play OUTSIDE, YOU DICIDE TO LEAVE"
PRINT "AND GO ON YOUR OWN LITTLE HALLOWEEN ADVENTURE. YOU RMEMBER THE LOCAL"
PRINT "RUMERS ABOUT THE OLD HOUSE ACROSS THE STREET BIENG HAUNTED."
PRINT "YOU THINK IT MIGHT BE FUN TO GO INSIDE AND EXPLORE IT."
PRINT "YOU PICK UP THE PHONE TO INVITE YOUR FRIENDS TO COME, BUT YOU REMEMBER"
PRINT "THAT THEY ARE GROUNDED TO... YOU PUT THE PHONE BACK DOWN, OPEN THE WINDOW,"
PRINT "AND JUMP OUT."
PRINT "PRESS ANY KEY..."
DO
LOOP UNTIL LEN(INKEY$)
CLS
PRINT "YOU RUN ACROSS THE STREET TO THE 'HAUNTED HOUSE' TO SEE THAT THE DOOR"
PRINT "IS SLIGHTLY OPEN, EVEN THOUGH NOBODY LIVES THERE."
PRINT "YOU RUN INSIDE THE HOUSE AND THE DOOR SLAMS BEHIND YOU."
PRINT "YOU TRY TO OPEN THE DOOR, BUT THERE IS A HUGE LOCK PREVENTING YOU"
PRINT "FROM OPENING IT."
PRINT "PRESS ANY KEY..."
DO
LOOP UNTIL LEN(INKEY$)
DO
CLS
GOSUB room
GOSUB parser
LOOP
room:
IF r = 1 THEN : GOSUB r1
IF r = 2 THEN : GOSUB r2
IF r = 3 THEN : GOSUB r3
IF r = 4 THEN : GOSUB r4
IF r = 5 THEN : GOSUB r5
IF r = 6 THEN : GOSUB r6
RETURN
parser:
COLOR 12
LINE INPUT "> "; cmd$
PRINT
COLOR 4
LET cmd$ = LTRIM$(RTRIM$(UCASE$(cmd$)))
IF cmd$ = "END" OR cmd$ = "QUIT" OR cmd$ = "EXIT" OR cmd$ = "Q" OR cmd$ = "QUIT" THEN
GOTO menu
END IF
IF cmd$ = "HELP" THEN
CLS
COLOR 4
PRINT "HERE ARE SOME BASIC COMMANDS THAT CAN BE USED IN THE GAME..."
PRINT
COLOR 12
PRINT "LOOK - CHECKS FOR AVAILABLE EXITS"
PRINT "INVENTORY - VIEW ALL OF YOUR ITEMS"
PRINT "NORTH, WEST, SOUTH, AND EAST - MOVES YOU TO AVAILABLE LOCATIONS"
PRINT "EXAMINE (OBJECT) - EXAMINES AN OBJECT"
PRINT "USE (OBJECT) - USE AN OBJECT"
PRINT "TAKE (OBJECT) - TAKE AN OBJECT"
PRINT "UNLOCK (OBJECT) - UNLOCK AN OBJECT"
PRINT "HELP - VIEW THIS SCREEN"
PRINT "PRESS ANY KEY..."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF cmd$ = "LOOK" OR cmd$ = "LOOK AROUND" OR cmd$ = "L" THEN
IF r = 1 THEN : PRINT "YOU CAN MOVE NORTH AND WEST."
IF r = 2 THEN : PRINT "YOU CAN MOVE NORTH, SOUTH, AND WEST."
IF r = 3 THEN : PRINT "YOU CAN MOVE WEST AND SOUTH."
IF r = 4 THEN : PRINT "YOU CAN MOVE EAST."
IF r = 5 THEN : PRINT "YOU CAN MOVE EAST."
IF r = 6 THEN : PRINT "YOU CAN MOVE EAST."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF cmd$ = "INVENTORY" OR cmd$ = "INV" OR cmd$ = "ITEMS" THEN
PRINT "INVENTORY: "
IF gotmainkey = 1 THEN : PRINT "BRONZE KEY"
IF gotboxkey1 = 1 THEN : PRINT "SMALL KEY"
IF gotboxkey2 = 1 THEN : PRINT "SMALL KEY"
IF gotnote = 1 THEN : PRINT "NOTE"
IF gotcandle = 1 THEN : PRINT "CANDLE"
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF cmd$ = "NORTH" OR cmd$ = "GO NORTH" OR cmd$ = "N" THEN
IF r = 1 THEN : LET r = 2: GOTO moved
IF r = 2 THEN : LET r = 3: GOTO moved
END IF
IF cmd$ = "WEST" OR cmd$ = "GO WEST" OR cmd$ = "W" THEN
IF r = 1 THEN : LET r = 5: GOTO moved
IF r = 2 THEN : LET r = 6: GOTO moved
IF r = 3 THEN : LET r = 4: GOTO moved
IF r = 7 THEN : LET r = 2: GOTO moved
END IF
IF cmd$ = "SOUTH" OR cmd$ = "GO SOUTH" OR cmd$ = "S" THEN
IF r = 2 THEN : LET r = 1: GOTO moved
IF r = 3 THEN : LET r = 2: GOTO moved
END IF
IF cmd$ = "EAST" OR cmd$ = "GO EAST" OR cmd$ = "E" THEN
IF r = 4 THEN : LET r = 3: GOTO moved
IF r = 5 THEN : LET r = 1: GOTO moved
IF r = 6 THEN : LET r = 2: GOTO moved
END IF
IF (cmd$ = "EXAMINE OLD RUG" OR cmd$ = "EXAMINE RUG") AND r = 1 THEN
PRINT "IT IS OLD, STAINED AND WORN OUT."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE HUGE TABLE" OR cmd$ = "EXAMINE TABLE") AND r = 2 THEN
PRINT "IT IS A LARGE GRAND LOOKING HARDWOOD TABLE."
PRINT "IT IS COVERED IN DUST AND HAS CHIPS IN IT."
IF gotnote = 0 THEN : PRINT "THERE IS A SMALL NOTE ON TOP OF IT."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE CHAIR" OR cmd$ = "EXAMINE CHAIRS") AND r = 2 THEN
PRINT "IT MIGHT NOT BE A GOOD IDEA TO SIT ON THE ONES THAT ARE NOT BROKEN"
PRINT "BECAUSE THEY MIGHT BREAK TOO."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE PAINTING") AND r = 2 THEN
PRINT "IT IS A PICTURE OF A MIDEVAL CASTLE."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE SINK") AND r = 3 THEN
PRINT "YOU SEE DRIED OUT SPATTERS OF BLOOD IN THE SINK."
PRINT "YOU ALSO SEE A CANDLE AND SOME MATCHES IN IT."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE COUNTER") AND r = 3 THEN
PRINT "IT IS PLAIN AND IS VERY DUSTY."
PRINT "THERE IS WRITING IN THE DUST."
PRINT "IT SAYS:"
PRINT "'I HAVE BEEN TRAPPED IN THIS HOUSE FOR DAYS NOW, UNABLE TO ESCAPE."
PRINT "THE FRONT DOOR REQUIRES A SPECIAL KEY TO BE OPEN FROM THE INSIDE."
PRINT "IT IS NOT THE SAME AS THE ONE THAT OPENS IT FROM THE FRONT."
PRINT "I WILL NOT LIVE MUCH LONGER, BUT FOR ANYONE WHO FINDS THEMSELF"
PRINT "TRAPPED IN THIS TERRIBLE PLACE, I HAVE JUST MADE AN INTERRESTING DISCOVERY."
PRINT "I AM NOT ONE HUNDRED PERCENT SURE, BUT I THINK...'"
PRINT "THE REST IS SMEARED AWAY."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE BUCKET" OR cmd$ = "EXAMINE SMELLY BUCKET") AND r = 4 THEN
PRINT "IT IS FULL OF GREENISH BROWN SEMIHARD STUFF."
IF gotboxkey2 = 0 THEN : PRINT "THERE IS A SMALL KEY IN IT."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE TOILET PAPER" OR cmd$ = "EXAMINE PAPER") AND gottp = 0 AND r = 4 THEN
PRINT "IT IS VERY OLD LOOKING."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE PLAIN MAT" OR cmd$ = "EXAMINE MAT") AND r = 5 THEN
PRINT "IT LOOKS SLIGHTLY LESS THAN COZY..."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE TORN UP BLANKET" OR cmd$ = "EXAMINE BLANKET") AND r = 5 THEN
PRINT "IT PROBABLY WONT KEEP YOU VERY WARM."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE LARGE JEWLERY BOX" OR cmd$ = "EXAMINE JEWLERY BOX") AND r = 5 THEN
PRINT "IT IS INLAID WITH WHAT LOOKS LIKE MARBLE."
PRINT "THERE ARE TWO SMALL KEY HOLES IN THE MIDDLE."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE ROPE") AND r = 6 THEN
PRINT "IT IS HANGING FROM AN ODD LOOKING DEVICE IN THE ROOF."
PRINT "IT LOOKS LIKE IT MIGHT ACTIVATE SOMETHING IF YOU PULL IT."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE BLOOD") AND r = 6 THEN
PRINT "IT IS DRIED UP BLOOD ON THE FLOOR, WHAT MORE CAN I SAY!?"
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "TAKE NOTE" OR cmd$ = "GET NOTE") AND r = 2 AND gotnote = 0 THEN
PRINT "YOU TAKE THE NOTE."
LET gotnote = 1
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "TAKE PAINTING" OR cmd$ = "GET PAINTING") AND r = 2 AND gotboxkey1 = 0 THEN
PRINT "YOU GRAB THE PAINTING AND A SMALL KEY FALLS OUT FROM THE BACK OF IT."
PRINT "YOU PUT THE PAINTING BACK AND GRAB THE SMALL KEY."
LET gotboxkey1 = 1
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "TAKE CANDLE" OR cmd$ = "GET CANDLE") AND r = 3 AND gotcandle = 0 THEN
PRINT "YOU TAKE THE CANDLE."
LET gotcandle = 1
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "TAKE SMALL KEY" OR cmd$ = "TAKE KEY" OR cmd$ = "GET SMALL KEY" OR cmd$ = "GET KEY") AND r = 4 THEN
PRINT "YOU TAKE THE KEY AND GET NASTY STUFF ALL OVER YOUR HAND..."
LET gotboxkey2 = 1
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "TAKE LARGE BRONZE KEY" OR cmd$ = "TAKE BRONZE KEY" OR cmd$ = "TAKE KEY" OR cmd$ = "GET LARGE BRONZE KEY" OR cmd$ = "GET BRONZE KEY" OR cmd$ = "GET KEY") AND boxopen = 1 AND r = 5 THEN
PRINT "YOU TAKE THE LARGE BRONZE KEY."
LET gotmainkey = 1
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "TAKE ROLL OF TOILET PAPER" OR cmd$ = "TAKE TOILET PAPER" OR cmd$ = "GET ROLL OF TOILET PAPER" OR cmd$ = "GET TOILET PAPER") AND gottp = 0 THEN
PRINT "YOU PICK UP THE TOILET PAPER AND IT COMPLTELY FALLS APART IN YOUR HAND."
LET gottp = 1
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "READ NOTE" OR cmd$ = "USE NOTE") AND gotnote = 1 THEN
PRINT "THE NOTE SAYS:"
PRINT "'BEHIND THE OLD CASTLE LIES HALF OF A TOOL OF YOUR FREEDOM.'"
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "PULL ROPE" OR cmd$ = "USE ROPE") AND r = 6 THEN
GOTO lose
END IF
IF (cmd$ = "UNLOCK JEWLERY BOX" OR cmd$ = "UNLOCK BOX") AND gotboxkey1 = 1 AND gotboxkey2 = 1 AND r = 5 THEN
PRINT "YOU INSERT THE TWO SMALL KEYS IN THE BOX AND IS SPRINGS OPEN"
PRINT "TO REVEAL A LAGRE BRONZE KEY."
LET boxopen = 1
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "UNLOCK FRONT DOOR" OR cmd$ = "UNLOCK DOOR") AND gotmainkey = 1 AND r = 1 THEN
GOTO win
END IF
moved:
RETURN
r1:
COLOR 4
PRINT "YOU ENTER THE ENTRY WAY."
PRINT "YOU SEE AN OLD RUG LEADING TO WHAT APPEARS TO BE THE DINING ROOM."
PRINT "ANOTHER RUG LEADS TO A DIFFERENT ROOM."
PRINT
RETURN
r2:
COLOR 4
PRINT "YOU ENTER THE DINING ROOM."
PRINT "THERE ARE NO WINDOWS IN HERE, BUT THERE IS LIGHT FLOWING IN FROM THE"
PRINT "OTHER ROOM, YOU CAN BARELY SEE ANYTHING."
PRINT "THERE ARE SEVERAL DOORS LEADING TO DIFFERENT LOCATIONS."
PRINT "YOU SEE A TRAP DOOR THAT PROBABLY LEADS DOWN TO THE BASEMENT."
PRINT "THERE IS A HUGE TABLE IN THE MIDDLE OF THE ROOM."
PRINT "MOST OF THE CHAIRS SURROUNDING THE TABLE HAVE BROKEN LEGS."
PRINT "YOU ALSO SEE A PAINTING ON THE WALL."
PRINT
RETURN
r3:
COLOR 4
PRINT "YOU ENTER THE KITCHEN."
PRINT "YOU SEE A DOORWAY WITH THE DOOR MISSING."
PRINT "THERE IS A SINK AND A COUNTER."
PRINT "THERE IS A TON OF DUST ON THE COUNTER."
PRINT
RETURN
r4:
COLOR 4
PRINT "YOU ENTER THE BATHROOM."
PRINT "THERE IS A SMALL OPAQUE WINDOW ON THE WALL."
PRINT "THERE IS A DOOR THAT LEADS BACK TO THE KITCHEN."
PRINT "YOU SEE A BUCKET OF VILE SMELLING STUFF IN THE CORNER."
IF gottp = 0 THEN : PRINT "THERE IS A ROLL OF TOILET PAPER NEXT TO IT."
PRINT
RETURN
r5:
COLOR 4
PRINT "YOU ENTER THE BEDROOM."
PRINT "THERE IS A DOOR THAT LEADS BACK TO THE DINING ROOM."
PRINT "YOU SEE A PLAIN MAT ON THE FLOOR WITH A TORN UP BLANKET."
PRINT "YOU ALSO SEE A LARGE JEWLERY BOX."
PRINT
RETURN
r6:
COLOR 4
PRINT "YOU ENTER THE BASEMENT."
IF gotcandle = 1 THEN
PRINT "YOU LIGHT A CANDLE."
PRINT "YOU SEE A ROPE IN THE CENTER OF THE ROOM."
PRINT "THERE IS ALSO DREID UP BLOOD ON THE FLOOR."
ELSE
PRINT "THERE ARE NO WINDOWS IN HERE AND YOU CANT SEE ANYTHING."
PRINT "TRY TO SEE IF YOU CAN FIND A CANDLE."
PRINT "YOU HEAD BACK UP THE LADDER."
LET r = 2
END IF
PRINT
RETURN
win:
COLOR 14
PRINT "YOU UNLOCK THE DOOR, OPEN IT AND WALK OUTSIDE AND SMELL THE FRESH AIR."
PRINT "THE SUN IS SETTING. IF YOU HAD STAYED IN THERE LONGER, YOU WOULD"
PRINT "BE IN COMPLETE DARKNESS AND PROBABLY HAD TO SPEND THE NIGHT IN THERE!"
PRINT "REALIZING THAT YOU ARE STILL GROUNDED, YOU HEAD BACK HOME BEFORE YOUR"
PRINT "MOM NOTICES THAT YOU WERE GONE..."
PRINT
PRINT "YOU WIN!"
PRINT "PRESS ANY KEY..."
DO
LOOP UNTIL LEN(INKEY$)
GOTO menu
lose:
COLOR 14
PRINT "YOU HEAR SOMETHING UNLOCK FOLLOWD BY A BIG CRASH."
PRINT "YOUR CANDLE BLOWS OUT."
PRINT "A LARGE BLADE SWINGS DOWN FROOM THE CIELING AND DECAPITATES YOU!"
PRINT
PRINT "GAME OVER!"
PRINT "PRESS ANY KEY..."
DO
LOOP UNTIL LEN(INKEY$)
GOTO menu
[/code]
[code]
REM HOUNTED HOUSE
REM I made this in about 2 or 3 hours just for fun.
REM This is my first REAL IF game.
REM Im only 15 so gimmie sum slak if it sux lol.
FOR s = 1 TO 40 STEP 5
COLOR INT(RND * 15) + 1
PRINT SPACE$(s); " HAUNTED HOUSE ";
NEXT s
'play "L7O1GFGGGBABBBBCO3BBBBDGGGGFGGABCGO4DBBBBGFG"
menu:
CLS
COLOR 4
PRINT " HAUNTED HOUSE - BY GEEK BASIC SOFTWARE"
COLOR 12
PRINT "MENU -"
PRINT "1> 'play GAME"
PRINT "2> HELP"
PRINT "0> QUIT"
DO
LET k$ = INKEY$
IF k$ = "1" THEN : GOTO playgame
IF k$ = "2" THEN : GOTO help
IF k$ = "0" THEN : CLS : END
LOOP
help:
CLS
COLOR 4
PRINT "HERE ARE SOME BASIC COMMANDS THAT CAN BE USED IN THE GAME..."
COLOR 12
PRINT "LOOK - CHECKS FOR AVAILABLE EXITS"
PRINT "INVENTORY - VIEW ALL OF YOUR ITEMS"
PRINT "NORTH, WEST, SOUTH, AND EAST - MOVES YOU TO AVAILABLE LOCATIONS"
PRINT "EXAMINE (OBJECT) - EXAMINES AN OBJECT"
PRINT "USE (OBJECT) - USE AN OBJECT"
PRINT "TAKE (OBJECT) - TAKE AN OBJECT"
PRINT "UNLOCK (OBJECT) - UNLOCK AN OBJECT"
PRINT "HELP - VIEW THIS SCREEN"
PRINT "PRESS ANY KEY..."
DO
LOOP UNTIL LEN(INKEY$)
GOTO menu
playgame:
LET r = 1
LET gotmainkey = 0
LET gotboxkey1 = 0
LET gotboxkey2 = 0
LET gotcandle = 0
LET gotnote = 0
LET gottp = 0
LET boxopen = 0
CLS
COLOR 4
PRINT "HAUNTED HOUSE"
COLOR 12
PRINT "IT IS HALLOWEEN DAY AT MARIPOSA DRIVE."
PRINT "YOUR MOM HAS GROUNDED YOU FOR THE DAY BECAUSE YOU AND YOUR FRIENDS"
PRINT "THREW TOILET PAPER OVER THE NEIGHBORS HOUSE LAST NIGHT..."
PRINT "AFTER YOU SPEND ABOUT HALF OF THE DAY IN YOUR ROOM STARING AT YOUR"
PRINT "SOCKS AND LISTENING TO THE CHILDREN 'play OUTSIDE, YOU DICIDE TO LEAVE"
PRINT "AND GO ON YOUR OWN LITTLE HALLOWEEN ADVENTURE. YOU RMEMBER THE LOCAL"
PRINT "RUMERS ABOUT THE OLD HOUSE ACROSS THE STREET BIENG HAUNTED."
PRINT "YOU THINK IT MIGHT BE FUN TO GO INSIDE AND EXPLORE IT."
PRINT "YOU PICK UP THE PHONE TO INVITE YOUR FRIENDS TO COME, BUT YOU REMEMBER"
PRINT "THAT THEY ARE GROUNDED TO... YOU PUT THE PHONE BACK DOWN, OPEN THE WINDOW,"
PRINT "AND JUMP OUT."
PRINT "PRESS ANY KEY..."
DO
LOOP UNTIL LEN(INKEY$)
CLS
PRINT "YOU RUN ACROSS THE STREET TO THE 'HAUNTED HOUSE' TO SEE THAT THE DOOR"
PRINT "IS SLIGHTLY OPEN, EVEN THOUGH NOBODY LIVES THERE."
PRINT "YOU RUN INSIDE THE HOUSE AND THE DOOR SLAMS BEHIND YOU."
PRINT "YOU TRY TO OPEN THE DOOR, BUT THERE IS A HUGE LOCK PREVENTING YOU"
PRINT "FROM OPENING IT."
PRINT "PRESS ANY KEY..."
DO
LOOP UNTIL LEN(INKEY$)
DO
CLS
GOSUB room
GOSUB parser
LOOP
room:
IF r = 1 THEN : GOSUB r1
IF r = 2 THEN : GOSUB r2
IF r = 3 THEN : GOSUB r3
IF r = 4 THEN : GOSUB r4
IF r = 5 THEN : GOSUB r5
IF r = 6 THEN : GOSUB r6
RETURN
parser:
COLOR 12
LINE INPUT "> "; cmd$
COLOR 4
LET cmd$ = LTRIM$(RTRIM$(UCASE$(cmd$)))
IF cmd$ = "END" OR cmd$ = "QUIT" OR cmd$ = "EXIT" OR cmd$ = "Q" OR cmd$ = "QUIT" THEN
GOTO menu
END IF
IF cmd$ = "HELP" THEN
CLS
COLOR 4
PRINT "HERE ARE SOME BASIC COMMANDS THAT CAN BE USED IN THE GAME..."
COLOR 12
PRINT "LOOK - CHECKS FOR AVAILABLE EXITS"
PRINT "INVENTORY - VIEW ALL OF YOUR ITEMS"
PRINT "NORTH, WEST, SOUTH, AND EAST - MOVES YOU TO AVAILABLE LOCATIONS"
PRINT "EXAMINE (OBJECT) - EXAMINES AN OBJECT"
PRINT "USE (OBJECT) - USE AN OBJECT"
PRINT "TAKE (OBJECT) - TAKE AN OBJECT"
PRINT "UNLOCK (OBJECT) - UNLOCK AN OBJECT"
PRINT "HELP - VIEW THIS SCREEN"
PRINT "PRESS ANY KEY..."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF cmd$ = "LOOK" OR cmd$ = "LOOK AROUND" OR cmd$ = "L" THEN
IF r = 1 THEN : PRINT "YOU CAN MOVE NORTH AND WEST."
IF r = 2 THEN : PRINT "YOU CAN MOVE NORTH, SOUTH, AND WEST."
IF r = 3 THEN : PRINT "YOU CAN MOVE WEST AND SOUTH."
IF r = 4 THEN : PRINT "YOU CAN MOVE EAST."
IF r = 5 THEN : PRINT "YOU CAN MOVE EAST."
IF r = 6 THEN : PRINT "YOU CAN MOVE EAST."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF cmd$ = "INVENTORY" OR cmd$ = "INV" OR cmd$ = "ITEMS" THEN
PRINT "INVENTORY: "
IF gotmainkey = 1 THEN : PRINT "BRONZE KEY"
IF gotboxkey1 = 1 THEN : PRINT "SMALL KEY"
IF gotboxkey2 = 1 THEN : PRINT "SMALL KEY"
IF gotnote = 1 THEN : PRINT "NOTE"
IF gotcandle = 1 THEN : PRINT "CANDLE"
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF cmd$ = "NORTH" OR cmd$ = "GO NORTH" OR cmd$ = "N" THEN
IF r = 1 THEN : LET r = 2: GOTO moved
IF r = 2 THEN : LET r = 3: GOTO moved
END IF
IF cmd$ = "WEST" OR cmd$ = "GO WEST" OR cmd$ = "W" THEN
IF r = 1 THEN : LET r = 5: GOTO moved
IF r = 2 THEN : LET r = 6: GOTO moved
IF r = 3 THEN : LET r = 4: GOTO moved
IF r = 7 THEN : LET r = 2: GOTO moved
END IF
IF cmd$ = "SOUTH" OR cmd$ = "GO SOUTH" OR cmd$ = "S" THEN
IF r = 2 THEN : LET r = 1: GOTO moved
IF r = 3 THEN : LET r = 2: GOTO moved
END IF
IF cmd$ = "EAST" OR cmd$ = "GO EAST" OR cmd$ = "E" THEN
IF r = 4 THEN : LET r = 3: GOTO moved
IF r = 5 THEN : LET r = 1: GOTO moved
IF r = 6 THEN : LET r = 2: GOTO moved
END IF
IF (cmd$ = "EXAMINE OLD RUG" OR cmd$ = "EXAMINE RUG") AND r = 1 THEN
PRINT "IT IS OLD, STAINED AND WORN OUT."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE HUGE TABLE" OR cmd$ = "EXAMINE TABLE") AND r = 2 THEN
PRINT "IT IS A LARGE GRAND LOOKING HARDWOOD TABLE."
PRINT "IT IS COVERED IN DUST AND HAS CHIPS IN IT."
IF gotnote = 0 THEN : PRINT "THERE IS A SMALL NOTE ON TOP OF IT."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE CHAIR" OR cmd$ = "EXAMINE CHAIRS") AND r = 2 THEN
PRINT "IT MIGHT NOT BE A GOOD IDEA TO SIT ON THE ONES THAT ARE NOT BROKEN"
PRINT "BECAUSE THEY MIGHT BREAK TOO."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE PAINTING") AND r = 2 THEN
PRINT "IT IS A PICTURE OF A MIDEVAL CASTLE."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE SINK") AND r = 3 THEN
PRINT "YOU SEE DRIED OUT SPATTERS OF BLOOD IN THE SINK."
PRINT "YOU ALSO SEE A CANDLE AND SOME MATCHES IN IT."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE COUNTER") AND r = 3 THEN
PRINT "IT IS PLAIN AND IS VERY DUSTY."
PRINT "THERE IS WRITING IN THE DUST."
PRINT "IT SAYS:"
PRINT "'I HAVE BEEN TRAPPED IN THIS HOUSE FOR DAYS NOW, UNABLE TO ESCAPE."
PRINT "THE FRONT DOOR REQUIRES A SPECIAL KEY TO BE OPEN FROM THE INSIDE."
PRINT "IT IS NOT THE SAME AS THE ONE THAT OPENS IT FROM THE FRONT."
PRINT "I WILL NOT LIVE MUCH LONGER, BUT FOR ANYONE WHO FINDS THEMSELF"
PRINT "TRAPPED IN THIS TERRIBLE PLACE, I HAVE JUST MADE AN INTERRESTING DISCOVERY."
PRINT "I AM NOT ONE HUNDRED PERCENT SURE, BUT I THINK...'"
PRINT "THE REST IS SMEARED AWAY."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE BUCKET" OR cmd$ = "EXAMINE SMELLY BUCKET") AND r = 4 THEN
PRINT "IT IS FULL OF GREENISH BROWN SEMIHARD STUFF."
IF gotboxkey2 = 0 THEN : PRINT "THERE IS A SMALL KEY IN IT."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE TOILET PAPER" OR cmd$ = "EXAMINE PAPER") AND gottp = 0 AND r = 4 THEN
PRINT "IT IS VERY OLD LOOKING."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE PLAIN MAT" OR cmd$ = "EXAMINE MAT") AND r = 5 THEN
PRINT "IT LOOKS SLIGHTLY LESS THAN COZY..."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE TORN UP BLANKET" OR cmd$ = "EXAMINE BLANKET") AND r = 5 THEN
PRINT "IT PROBABLY WONT KEEP YOU VERY WARM."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE LARGE JEWLERY BOX" OR cmd$ = "EXAMINE JEWLERY BOX") AND r = 5 THEN
PRINT "IT IS INLAID WITH WHAT LOOKS LIKE MARBLE."
PRINT "THERE ARE TWO SMALL KEY HOLES IN THE MIDDLE."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE ROPE") AND r = 6 THEN
PRINT "IT IS HANGING FROM AN ODD LOOKING DEVICE IN THE ROOF."
PRINT "IT LOOKS LIKE IT MIGHT ACTIVATE SOMETHING IF YOU PULL IT."
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "EXAMINE BLOOD") AND r = 6 THEN
PRINT "IT IS DRIED UP BLOOD ON THE FLOOR, WHAT MORE CAN I SAY!?"
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "TAKE NOTE" OR cmd$ = "GET NOTE") AND r = 2 AND gotnote = 0 THEN
PRINT "YOU TAKE THE NOTE."
LET gotnote = 1
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "TAKE PAINTING" OR cmd$ = "GET PAINTING") AND r = 2 AND gotboxkey1 = 0 THEN
PRINT "YOU GRAB THE PAINTING AND A SMALL KEY FALLS OUT FROM THE BACK OF IT."
PRINT "YOU PUT THE PAINTING BACK AND GRAB THE SMALL KEY."
LET gotboxkey1 = 1
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "TAKE CANDLE" OR cmd$ = "GET CANDLE") AND r = 3 AND gotcandle = 0 THEN
PRINT "YOU TAKE THE CANDLE."
LET gotcandle = 1
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "TAKE SMALL KEY" OR cmd$ = "TAKE KEY" OR cmd$ = "GET SMALL KEY" OR cmd$ = "GET KEY") AND r = 4 THEN
PRINT "YOU TAKE THE KEY AND GET NASTY STUFF ALL OVER YOUR HAND..."
LET gotboxkey2 = 1
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "TAKE LARGE BRONZE KEY" OR cmd$ = "TAKE BRONZE KEY" OR cmd$ = "TAKE KEY" OR cmd$ = "GET LARGE BRONZE KEY" OR cmd$ = "GET BRONZE KEY" OR cmd$ = "GET KEY") AND boxopen = 1 AND r = 5 THEN
PRINT "YOU TAKE THE LARGE BRONZE KEY."
LET gotmainkey = 1
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "TAKE ROLL OF TOILET PAPER" OR cmd$ = "TAKE TOILET PAPER" OR cmd$ = "GET ROLL OF TOILET PAPER" OR cmd$ = "GET TOILET PAPER") AND gottp = 0 THEN
PRINT "YOU PICK UP THE TOILET PAPER AND IT COMPLTELY FALLS APART IN YOUR HAND."
LET gottp = 1
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "READ NOTE" OR cmd$ = "USE NOTE") AND gotnote = 1 THEN
PRINT "THE NOTE SAYS:"
PRINT "'BEHIND THE OLD CASTLE LIES HALF OF A TOOL OF YOUR FREEDOM.'"
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "PULL ROPE" OR cmd$ = "USE ROPE") AND r = 6 THEN
GOTO lose
END IF
IF (cmd$ = "UNLOCK JEWLERY BOX" OR cmd$ = "UNLOCK BOX") AND gotboxkey1 = 1 AND gotboxkey2 = 1 AND r = 5 THEN
PRINT "YOU INSERT THE TWO SMALL KEYS IN THE BOX AND IS SPRINGS OPEN"
PRINT "TO REVEAL A LAGRE BRONZE KEY."
LET boxopen = 1
DO
LOOP UNTIL LEN(INKEY$)
END IF
IF (cmd$ = "UNLOCK FRONT DOOR" OR cmd$ = "UNLOCK DOOR") AND gotmainkey = 1 AND r = 1 THEN
GOTO win
END IF
moved:
RETURN
r1:
COLOR 4
PRINT "YOU ENTER THE ENTRY WAY."
PRINT "YOU SEE AN OLD RUG LEADING TO WHAT APPEARS TO BE THE DINING ROOM."
PRINT "ANOTHER RUG LEADS TO A DIFFERENT ROOM."
RETURN
r2:
COLOR 4
PRINT "YOU ENTER THE DINING ROOM."
PRINT "THERE ARE NO WINDOWS IN HERE, BUT THERE IS LIGHT FLOWING IN FROM THE"
PRINT "OTHER ROOM, YOU CAN BARELY SEE ANYTHING."
PRINT "THERE ARE SEVERAL DOORS LEADING TO DIFFERENT LOCATIONS."
PRINT "YOU SEE A TRAP DOOR THAT PROBABLY LEADS DOWN TO THE BASEMENT."
PRINT "THERE IS A HUGE TABLE IN THE MIDDLE OF THE ROOM."
PRINT "MOST OF THE CHAIRS SURROUNDING THE TABLE HAVE BROKEN LEGS."
PRINT "YOU ALSO SEE A PAINTING ON THE WALL."
RETURN
r3:
COLOR 4
PRINT "YOU ENTER THE KITCHEN."
PRINT "YOU SEE A DOORWAY WITH THE DOOR MISSING."
PRINT "THERE IS A SINK AND A COUNTER."
PRINT "THERE IS A TON OF DUST ON THE COUNTER."
RETURN
r4:
COLOR 4
PRINT "YOU ENTER THE BATHROOM."
PRINT "THERE IS A SMALL OPAQUE WINDOW ON THE WALL."
PRINT "THERE IS A DOOR THAT LEADS BACK TO THE KITCHEN."
PRINT "YOU SEE A BUCKET OF VILE SMELLING STUFF IN THE CORNER."
IF gottp = 0 THEN : PRINT "THERE IS A ROLL OF TOILET PAPER NEXT TO IT."
RETURN
r5:
COLOR 4
PRINT "YOU ENTER THE BEDROOM."
PRINT "THERE IS A DOOR THAT LEADS BACK TO THE DINING ROOM."
PRINT "YOU SEE A PLAIN MAT ON THE FLOOR WITH A TORN UP BLANKET."
PRINT "YOU ALSO SEE A LARGE JEWLERY BOX."
RETURN
r6:
COLOR 4
PRINT "YOU ENTER THE BASEMENT."
IF gotcandle = 1 THEN
PRINT "YOU LIGHT A CANDLE."
PRINT "YOU SEE A ROPE IN THE CENTER OF THE ROOM."
PRINT "THERE IS ALSO DREID UP BLOOD ON THE FLOOR."
ELSE
PRINT "THERE ARE NO WINDOWS IN HERE AND YOU CANT SEE ANYTHING."
PRINT "TRY TO SEE IF YOU CAN FIND A CANDLE."
PRINT "YOU HEAD BACK UP THE LADDER."
LET r = 2
END IF
RETURN
win:
COLOR 14
PRINT "YOU UNLOCK THE DOOR, OPEN IT AND WALK OUTSIDE AND SMELL THE FRESH AIR."
PRINT "THE SUN IS SETTING. IF YOU HAD STAYED IN THERE LONGER, YOU WOULD"
PRINT "BE IN COMPLETE DARKNESS AND PROBABLY HAD TO SPEND THE NIGHT IN THERE!"
PRINT "REALIZING THAT YOU ARE STILL GROUNDED, YOU HEAD BACK HOME BEFORE YOUR"
PRINT "MOM NOTICES THAT YOU WERE GONE..."
PRINT "YOU WIN!"
PRINT "PRESS ANY KEY..."
DO
LOOP UNTIL LEN(INKEY$)
GOTO menu
lose:
COLOR 14
PRINT "YOU HEAR SOMETHING UNLOCK FOLLOWD BY A BIG CRASH."
PRINT "YOUR CANDLE BLOWS OUT."
PRINT "A LARGE BLADE SWINGS DOWN FROOM THE CIELING AND DECAPITATES YOU!"
PRINT "GAME OVER!"
PRINT "PRESS ANY KEY..."
DO
LOOP UNTIL LEN(INKEY$)
GOTO menu
[/code]
Attachments
Step 6: Bonus 2: Hunt the Wumpus.
The wumpus game for some reason has become real popular lately. People even want to put it on the arduino. If you do not have an arduino you can still play the original game on your linux system. (Requires the "C" development system")
Download the archive.
wumpus-1.4.tar.gz
Extract the archive
$ tar zxvf wumpus-1.4.tar.gz
wumpus-1.4/COPYING
wumpus-1.4/Makefile
wumpus-1.4/README
wumpus-1.4/superhack.c
wumpus-1.4/wumpus.6
wumpus-1.4/wumpus.c
wumpus-1.4/wumpus.spec
wumpus-1.4/wumpus.xml
Change to the directory.
$ cd wumpus-1.4
Get a directory listing to see what is there.
wumpus-1.4]$ ls
COPYING README wumpus.6 wumpus.spec
Makefile superhack.c wumpus.c wumpus.xml
Compile the program.
wumpus-1.4]$ make
cc wumpus.c -o wumpus
cc superhack.c -o superhack
Get a new listing. See that superhack and wumpus are added. The compiled programs.
wumpus-1.4]$ ls
COPYING README superhack.c wumpus.6 wumpus.spec
Makefile superhack wumpus wumpus.c wumpus.xml
Play wumpus.
wumpus-1.4]$ ./wumpus
INSTRUCTIONS (Y-N)
?y
WELCOME TO 'HUNT THE WUMPUS'
THE WUMPUS LIVES IN A CAVE OF 20 ROOMS. EACH ROOM
HAS 3 TUNNELS LEADING TO OTHER ROOMS. (LOOK AT A
DODECAHEDRON TO SEE HOW THIS WORKS-IF YOU DON'T KNOW
WHAT A DODECAHEDRON IS, ASK SOMEONE)
HAZARDS:
BOTTOMLESS PITS - TWO ROOMS HAVE BOTTOMLESS PITS IN THEM
IF YOU GO THERE, YOU FALL INTO THE PIT (& LOSE!)
SUPER BATS - TWO OTHER ROOMS HAVE SUPER BATS. IF YOU
GO THERE, A BAT GRABS YOU AND TAKES YOU TO SOME OTHER
ROOM AT RANDOM. (WHICH MAY BE TROUBLESOME)
TYPE AN E THEN RETURN
?
Eric Raymond did not like the wumpus interface so he make an alternate version called superhack.
wumpus-1.4]$ ./superhack
Hunt the Superhack
You are in room 8. Exits lead to 1, 7, 9. You have 5 pies left.
I smell perfume!
Droids nearby!
Droids nearby!
Throw, move or help [t,m,?]?
Enjoy.
Download the archive.
wumpus-1.4.tar.gz
Extract the archive
$ tar zxvf wumpus-1.4.tar.gz
wumpus-1.4/COPYING
wumpus-1.4/Makefile
wumpus-1.4/README
wumpus-1.4/superhack.c
wumpus-1.4/wumpus.6
wumpus-1.4/wumpus.c
wumpus-1.4/wumpus.spec
wumpus-1.4/wumpus.xml
Change to the directory.
$ cd wumpus-1.4
Get a directory listing to see what is there.
wumpus-1.4]$ ls
COPYING README wumpus.6 wumpus.spec
Makefile superhack.c wumpus.c wumpus.xml
Compile the program.
wumpus-1.4]$ make
cc wumpus.c -o wumpus
cc superhack.c -o superhack
Get a new listing. See that superhack and wumpus are added. The compiled programs.
wumpus-1.4]$ ls
COPYING README superhack.c wumpus.6 wumpus.spec
Makefile superhack wumpus wumpus.c wumpus.xml
Play wumpus.
wumpus-1.4]$ ./wumpus
INSTRUCTIONS (Y-N)
?y
WELCOME TO 'HUNT THE WUMPUS'
THE WUMPUS LIVES IN A CAVE OF 20 ROOMS. EACH ROOM
HAS 3 TUNNELS LEADING TO OTHER ROOMS. (LOOK AT A
DODECAHEDRON TO SEE HOW THIS WORKS-IF YOU DON'T KNOW
WHAT A DODECAHEDRON IS, ASK SOMEONE)
HAZARDS:
BOTTOMLESS PITS - TWO ROOMS HAVE BOTTOMLESS PITS IN THEM
IF YOU GO THERE, YOU FALL INTO THE PIT (& LOSE!)
SUPER BATS - TWO OTHER ROOMS HAVE SUPER BATS. IF YOU
GO THERE, A BAT GRABS YOU AND TAKES YOU TO SOME OTHER
ROOM AT RANDOM. (WHICH MAY BE TROUBLESOME)
TYPE AN E THEN RETURN
?
Eric Raymond did not like the wumpus interface so he make an alternate version called superhack.
wumpus-1.4]$ ./superhack
Hunt the Superhack
You are in room 8. Exits lead to 1, 7, 9. You have 5 pies left.
I smell perfume!
Droids nearby!
Droids nearby!
Throw, move or help [t,m,?]?
Enjoy.
Attachments
Step 7: Aklabeth
Requires Qbasic or equivalent
0 ON ERROR GOTO 4
1 SCREEN 1: VIEW PRINT: CLS : q$ = "": DIM pw(5): DIM c(5): DIM m$(10), ml%(10, 1), mz%(10, 1): DIM w$(5)
4 REM PR# 0: IN# 0
5 REM HIMEM: 49151
7 CLEAR : GOSUB 60000
8 RANDOMIZE ln
9 le = 0
10 SCREEN 1: VIEW PRINT: CLS : PRINT TAB(12); : PRINT " WELCOME TO AKALABETH, WORLD OF DOOM!"
20 DIM dn%(10, 10), te%(20, 20), xx%(10), yy%(10), pe%(10, 3), ld%(10, 5), cd%(10, 3), ft%(10, 5), la%(10, 3)
30 FOR x = 0 TO 20: te%(x, 0) = 1: te%(0, x) = 1: te%(x, 20) = 1: te%(20, x) = 1: NEXT
35 LOCATE 23, 1: PRINT " (PLEASE WAIT)";
40 FOR x = 1 TO 19: FOR y = 1 TO 19: te%(x, y) = INT(RND(1) ^ 5 * 4.5)
41 IF te%(x, y) = 3 AND RND(1) > .5 THEN te%(x, y) = 0
42 NEXT: PRINT "."; : NEXT: SLEEP 2
50 te%(INT(RND(1) * 19 + 1), INT(RND(1) * 19 + 1)) = 5: tx = INT(RND(1) * 19 + 1): ty = INT(RND(1) * 19 + 1): te%(tx, ty) = 3
51 xx%(0) = 139: yy%(0) = 79
52 FOR x = 2 TO 20 STEP 2: xx%(x / 2) = INT(ATN(1 / x) / ATN(1) * 140 + .5): yy%(x / 2) = INT(xx%(x / 2) * 4 / 7)
53 pe%(x / 2, 0) = 139 - xx%(x / 2): pe%(x / 2, 1) = 139 + xx%(x / 2): pe%(x / 2, 2) = 79 - yy%(x / 2): pe%(x / 2, 3) = 79 + yy%(x / 2): NEXT
54 pe%(0, 0) = 0: pe%(0, 1) = 279: pe%(0, 2) = 0: pe%(0, 3) = 159
55 FOR x = 1 TO 10: cd%(x, 0) = 139 - xx%(x) / 3: cd%(x, 1) = 139 + xx%(x) / 3: cd%(x, 2) = 79 - yy%(x) * .7: cd%(x, 3) = 79 + yy%(x): NEXT: PRINT ".";
56 FOR x = 0 TO 9: ld%(x, 0) = (pe%(x, 0) * 2 + pe%(x + 1, 0)) / 3: ld%(x, 1) = (pe%(x, 0) + 2 * pe%(x + 1, 0)) / 3: w = ld%(x, 0) - pe%(x, 0)
57 ld%(x, 2) = pe%(x, 2) + w * 4 / 7: ld%(x, 3) = pe%(x, 2) + 2 * w * 4 / 7: ld%(x, 4) = (pe%(x, 3) * 2 + pe%(x + 1, 3)) / 3: ld%(x, 5) = (pe%(x, 3) + 2 * pe%(x + 1, 3)) / 3
58 ld%(x, 2) = ld%(x, 4) - (ld%(x, 4) - ld%(x, 2)) * .8: ld%(x, 3) = ld%(x, 5) - (ld%(x, 5) - ld%(x, 3)) * .8: IF ld%(x, 3) = ld%(x, 4) THEN ld%(x, 3) = ld%(x, 3) - 1
59 NEXT
60 FOR x = 0 TO 9: ft%(x, 0) = 139 - xx%(x) / 3: ft%(x, 1) = 139 + xx%(x) / 3: ft%(x, 2) = 139 - xx%(x + 1) / 3: ft%(x, 3) = 139 + xx%(x + 1) / 3
61 ft%(x, 4) = 79 + (yy%(x) * 2 + yy%(x + 1)) / 3: ft%(x, 5) = 79 + (yy%(x) + 2 * yy%(x + 1)) / 3: NEXT
62 FOR x = 0 TO 9: la%(x, 0) = (ft%(x, 0) * 2 + ft%(x, 1)) / 3: la%(x, 1) = (ft%(x, 0) + 2 * ft%(x, 1)) / 3: la%(x, 3) = ft%(x, 4): la%(x, 2) = 159 - la%(x, 3): NEXT
68 LOCATE 1, 1
69 LOCATE 1, 1
70 GOSUB 100: GOTO 1000
90 FOR x = 0 TO 9: FOR y = 0 TO 5: PRINT ld%(x, y); " "; : NEXT: PRINT : NEXT: DO: q$ = INKEY$: LOOP WHILE q$ = ""
100 SCREEN 1: VIEW PRINT 1 TO 21: CLS 2: VIEW PRINT 22 TO 25: WINDOW SCREEN (0, 0)-(279, 199): FOR y = -1 TO 1: FOR x = -1 TO 1
105 LINE (138, 75)-(142, 75): LINE (140, 73)-(140, 77)
110 zz = te%(tx + x, ty + y): x1 = 65 + (x + 1) * 50: y1 = (y + 1) * 50
120 IF zz = 2 THEN LINE (x1 + 20, y1 + 20)-(x1 + 30, y1 + 20): LINE -(x1 + 30, y1 + 30): LINE -(x1 + 20, y1 + 30): LINE -(x1 + 20, y1 + 20)
130 IF zz = 3 THEN
LINE (x1 + 10, y1 + 10)-(x1 + 20, y1 + 10): LINE -(x1 + 20, y1 + 40): LINE -(x1 + 10, y1 + 40)
LINE -(x1 + 10, y1 + 30): LINE -(x1 + 40, y1 + 30): LINE -(x1 + 40, y1 + 40): LINE -(x1 + 30, y1 + 40): LINE -(x1 + 30, y1 + 10): LINE -(x1 + 40, y1 + 10)
LINE -(x1 + 40, y1 + 20): LINE -(x1 + 10, y1 + 20): LINE -(x1 + 10, y1 + 10)
END IF
140 IF zz = 4 THEN LINE (x1 + 20, y1 + 20)-(x1 + 30, y1 + 30): LINE (x1 + 20, y1 + 30)-(x1 + 30, y1 + 20)
150 IF zz = 5 THEN
LINE (x1, y1)-(x1 + 50, y1): LINE -(x1 + 50, y1 + 50): LINE -(x1, y1 + 50): LINE -(x1, y1)
LINE (x1 + 10, y1 + 10)-(x1 + 10, y1 + 40): LINE -(x1 + 40, y1 + 40)
LINE -(x1 + 40, y1 + 10): LINE -(x1 + 10, y1 + 10): LINE -(x1 + 40, y1 + 40): LINE (x1 + 10, y1 + 40)-(x1 + 40, y1 + 10)
END IF
160 IF zz = 1 THEN
LINE (x1 + 10, y1 + 50)-(x1 + 10, y1 + 40): LINE -(x1 + 20, y1 + 30): LINE -(x1 + 40, y1 + 30)
LINE -(x1 + 40, y1 + 50): LINE (x1, y1 + 10)-(x1 + 10, y1 + 10): LINE (x1 + 50, y1 + 10)-(x1 + 40, y1 + 10)
LINE (x1, y1 + 40)-(x1 + 10, y1 + 40): LINE (x1 + 40, y1 + 40)-(x1 + 50, y1 + 40)
END IF
170 IF zz = 1 THEN LINE (x1 + 10, y1)-(x1 + 10, y1 + 20): LINE -(x1 + 20, y1 + 20): LINE -(x1 + 20, y1 + 30): LINE -(x1 + 30, y1 + 30): LINE -(x1 + 30, y1 + 10): LINE -(x1 + 40, y1 + 10): LINE -(x1 + 40, y1)
190 NEXT: NEXT: WINDOW: RETURN
200 SCREEN 1: VIEW PRINT 1 TO 21: CLS 2: VIEW PRINT 22 TO 25: WINDOW SCREEN (0, 0)-(279, 199): di = 0: tb = 2
202 ce = dn%(px + dx * di, py + dy * di): le = dn%(px + dx * di + dy, py + dy * di - dx): ri = dn%(px + dx * di - dy, py + dy * di + dx)
204 l1 = pe%(di, 0): r1 = pe%(di, 1): t1 = pe%(di, 2): b1 = pe%(di, 3): l2 = pe%(di + 1, 0): r2 = pe%(di + 1, 1): t2 = pe%(di + 1, 2): b2 = pe%(di + 1, 3)
205 ce = INT(ce): le = INT(le): ri = INT(ri)
206 mc = INT(ce / 10): ce = ce - mc * 10: le = INT((le / 10 - INT(le / 10)) * 10 + .1): ri = INT((ri / 10 - INT(ri / 10)) * 10 + .1)
208 IF di = 0 THEN 216
210 IF ce = 1 OR ce = 3 OR ce = 4 THEN LINE (l1, t1)-(r1, t1): LINE -(r1, b1): LINE -(l1, b1): LINE -(l1, t1)
212 IF ce = 1 OR ce = 3 THEN en = 1: GOTO 260
214 IF ce = 4 THEN LINE (cd%(di, 0), cd%(di, 3))-(cd%(di, 0), cd%(di, 2)): LINE -(cd%(di, 1), cd%(di, 2)): LINE -(cd%(di, 1), cd%(di, 3)): en = 1: GOTO 260
216 IF le = 1 OR le = 3 OR le = 4 THEN LINE (l1, t1)-(l2, t2): LINE (l1, b1)-(l2, b2)
218 IF ri = 1 OR ri = 3 OR ri = 4 THEN LINE (r1, t1)-(r2, t2): LINE (r1, b1)-(r2, b2)
220 IF le = 4 AND di > 0 THEN LINE (ld%(di, 0), ld%(di, 4))-(ld%(di, 0), ld%(di, 2)): LINE -(ld%(di, 1), ld%(di, 3)): LINE -(ld%(di, 1), ld%(di, 5))
222 IF le = 4 AND di = 0 THEN LINE (0, ld%(di, 2) - 3)-(ld%(di, 1), ld%(di, 3)): LINE -(ld%(di, 1), ld%(di, 5))
224 IF ri = 4 AND di > 0 THEN LINE (279 - ld%(di, 0), ld%(di, 4))-(279 - ld%(di, 0), ld%(di, 2)): LINE -(279 - ld%(di, 1), ld%(di, 3)): LINE -(279 - ld%(di, 1), ld%(di, 5))
226 IF ri = 4 AND di = 0 THEN LINE (279, ld%(di, 2) - 3)-(279 - ld%(di, 1), ld%(di, 3)): LINE -(279 - ld%(di, 1), ld%(di, 5))
228 IF le = 3 OR le = 1 OR le = 4 THEN 234
230 IF di <> 0 THEN LINE (l1, t1)-(l1, b1)
232 LINE (l1, t2)-(l2, t2): LINE -(l2, b2): LINE -(l1, b2)
234 IF ri = 3 OR ri = 1 OR ri = 4 THEN 240
236 IF di <> 0 THEN LINE (r1, t1)-(r1, b1)
238 LINE (r1, t2)-(r2, t2): LINE -(r2, b2): LINE -(r1, b2)
240 IF ce = 7 OR ce = 9 THEN LINE (ft%(di, 0), ft%(di, 4))-(ft%(di, 2), ft%(di, 5)): LINE -(ft%(di, 3), ft%(di, 5)): LINE -(ft%(di, 1), ft%(di, 4)): LINE -(ft%(di, 0), ft%(di, 4))
242 IF ce = 8 THEN LINE (ft%(di, 0), 158 - ft%(di, 4))-(ft%(di, 2), 158 - ft%(di, 5)): LINE -(ft%(di, 3), 158 - ft%(di, 5)): LINE -(ft%(di, 1), 158 - ft%(di, 4)): LINE -(ft%(di, 0), 158 - ft%(di, 4))
244 IF ce = 7 OR ce = 8 THEN ba = la%(di, 3): TP = la%(di, 2): LX = la%(di, 0): RX = la%(di, 1): LINE (LX, ba)-(LX, TP): LINE (RX, TP)-(RX, ba)
246 IF ce = 7 OR ce = 8 THEN y1 = (ba * 4 + TP) / 5: Y2 = (ba * 3 + TP * 2) / 5: Y3 = (ba * 2 + TP * 3) / 5: Y4 = (ba + TP * 4) / 5: LINE (LX, y1)-(RX, y1): LINE (LX, Y2)-(RX, Y2): LINE (LX, Y3)-(RX, Y3): LINE (LX, Y4)-(RX, Y4)
248 IF di > 0 AND ce = 5 THEN LINE (139 - 10 / di, pe%(di, 3))-(139 - 10 / di, pe%(di, 3) - 10 / di): LINE -(139 + 10 / di, pe%(di, 3) - 10 / di): LINE -(139 + 10 / di, pe%(di, 3)): LINE -(139 - 10 / di, pe%(di, 3))
249 IF ce = 5 AND di > 0 THEN VIEW PRINT: LOCATE 1, tb: PRINT "CHEST! "; : tb = tb + 8
250 IF di > 0 AND ce = 5 THEN LINE (139 - 10 / di, pe%(di, 3) - 10 / di)-(139 - 5 / di, pe%(di, 3) - 15 / di): LINE -(139 + 15 / di, pe%(di, 3) - 15 / di): LINE -(139 + 15 / di, pe%(di, 3) - 5 / di): LINE -(139 + 10 / di, pe%(di, 3))
252 IF di > 0 AND ce = 5 THEN LINE (139 + 10 / di, pe%(di, 3) - 10 / di)-(139 + 15 / di, pe%(di, 3) - 15 / di)
260 IF mc < 1 THEN 490
265 b = 79 + yy%(di): c = 139
266 IF mc = 8 THEN VIEW PRINT: LOCATE 1, tb: PRINT "CHEST! "; : tb = tb + 8: PRINT : GOTO 269: REM call
267 VIEW PRINT: LOCATE 1, tb: PRINT m$(mc); : tb = tb + LEN(m$(mc)) + 2: PRINT : REM call
269 IF di = 0 THEN 490
270 ON mc GOTO 300, 310, 320, 330, 340, 350, 360, 370, 380, 390
280 GOTO 490
300 LINE (c - 23 / di, b)-(c - 15 / di, b): LINE -(c - 15 / di, b - 15 / di): LINE -(c - 8 / di, b - 30 / di): LINE -(c + 8 / di, b - 30 / di): LINE -(c + 15 / di, b - 15 / di): LINE -(c + 15 / di, b): LINE -(c + 23 / di, b)
301 LINE (c, b - 26 / di)-(c, b - 65 / di): LINE (c - 2 / di + .499, b - 38 / di)-(c + 2 / di + .499, b - 38 / di)
LINE (c - 3 / di + .499, b - 45 / di)-(c + 3 / di + .499, b - 45 / di): LINE (c - 5 / di + .499, b - 53 / di)-(c + 5 / di + .499, b - 53 / di)
302 LINE (c - 23 / di, b - 56 / di)-(c - 30 / di, b - 53 / di): LINE -(c - 23 / di, b - 45 / di): LINE -(c - 23 / di, b - 53 / di): LINE -(c - 8 / di, b - 38 / di)
303 LINE (c - 15 / di, b - 45 / di)-(c - 8 / di, b - 60 / di): LINE -(c + 8 / di, b - 60 / di): LINE -(c + 15 / di, b - 45 / di)
LINE -(c + 15 / di, b - 42 / di): LINE -(c + 15 / di, b - 57 / di): LINE (c + 12 / di, b - 45 / di)-(c + 20 / di, b - 45 / di)
304 LINE (c, b - 75 / di)-(c - 5 / di + .499, b - 80 / di): LINE -(c - 8 / di, b - 75 / di): LINE -(c - 5 / di + .499, b - 65 / di)
LINE -(c + 5 / di + .499, b - 65 / di): LINE -(c + 5 / di + .499, b - 68 / di): LINE -(c - 5 / di + .499, b - 68 / di): LINE -(c - 5 / di + .499, b - 65 / di)
305 LINE -(c + 5 / di + .499, b - 65 / di): LINE -(c + 8 / di, b - 75 / di): LINE -(c + 5 / di + .499, b - 80 / di): LINE -(c - 5 / di + .499, b - 80 / di): PSET (c - 5 / di + .499, b - 72 / di): PSET (c + 5 / di + .499, b - 72 / di)
309 GOTO 490
310 LINE (c, b - 56 / di)-(c, b - 8 / di): LINE -(c + 10 / di, b): LINE -(c + 30 / di, b): LINE -(c + 30 / di, b - 45 / di): LINE -(c + 10 / di, b - 64 / di): LINE -(c, b - 56 / di)
311 LINE -(c - 10 / di, b - 64 / di): LINE -(c - 30 / di, b - 45 / di): LINE -(c - 30 / di, b): LINE -(c - 10 / di, b): LINE -(c, b - 8 / di)
312 LINE (c - 10 / di, b - 64 / di)-(c - 10 / di, b - 75 / di): LINE -(c, b - 83 / di)
LINE -(c + 10 / di, b - 75 / di): LINE -(c, b - 79 / di): LINE -(c - 10 / di, b - 75 / di): LINE -(c, b - 60 / di)
LINE -(c + 10 / di, b - 75 / di): LINE -(c + 10 / di, b - 64 / di)
319 GOTO 490
320 LINE (c + 5 / di, b - 30 / di)-(c, b - 25 / di): LINE -(c - 5 / di, b - 30 / di): LINE -(c - 15 / di, b - 5 / di): LINE -(c - 10 / di, b): LINE -(c + 10 / di, b): LINE -(c + 15 / di, b - 5 / di)
321 LINE -(c + 20 / di, b - 5 / di): LINE -(c + 10 / di, b): LINE -(c + 15 / di, b - 5 / di)
LINE -(c + 5 / di, b - 30 / di): LINE -(c + 10 / di, b - 40 / di): LINE -(c + 3 / di + .499, b - 35 / di)
LINE -(c - 3 / di + .499, b - 35 / di): LINE -(c - 10 / di, b - 40 / di): LINE -(c - 5 / di, b - 30 / di)
322 LINE (c - 5 / di, b - 33 / di)-(c - 3 / di + .499, b - 30 / di): LINE (c + 5 / di, b - 33 / di)-(c + 3 / di + .499, b - 30 / di): LINE (c - 5 / di, b - 20 / di)-(c - 5 / di, b - 15 / di)
323 LINE (c + 5 / di, b - 20 / di)-(c + 5 / di, b - 15 / di): LINE (c - 7 / di, b - 20 / di)-(c - 7 / di, b - 15 / di): LINE (c + 7 / di, b - 20 / di)-(c + 7 / di, b - 15 / di)
329 GOTO 490
330 LINE (c, b)-(c - 15 / di, b): LINE -(c - 8 / di, b - 8 / di): LINE -(c - 8 / di, b - 15 / di): LINE -(c - 15 / di, b - 23 / di): LINE -(c - 15 / di, b - 15 / di): LINE -(c - 23 / di, b - 23 / di)
331 LINE -(c - 23 / di, b - 45 / di): LINE -(c - 15 / di, b - 53 / di): LINE -(c - 8 / di, b - 53 / di): LINE -(c - 15 / di, b - 68 / di): LINE -(c - 8 / di, b - 75 / di): LINE -(c, b - 75 / di)
332 LINE (c, b)-(c + 15 / di, b): LINE -(c + 8 / di, b - 8 / di): LINE -(c + 8 / di, b - 15 / di): LINE -(c + 15 / di, b - 23 / di): LINE -(c + 15 / di, b - 15 / di): LINE -(c + 23 / di, b - 23 / di)
333 LINE -(c + 23 / di, b - 45 / di): LINE -(c + 15 / di, b - 53 / di): LINE -(c + 8 / di, b - 53 / di): LINE -(c + 15 / di, b - 68 / di): LINE -(c + 8 / di, b - 75 / di): LINE -(c, b - 75 / di)
334 LINE (c - 15 / di, b - 68 / di)-(c + 15 / di, b - 68 / di): LINE (c - 8 / di, b - 53 / di)-(c + 8 / di, b - 53 / di): LINE (c - 23 / di, b - 15 / di)-(c + 8 / di, b - 45 / di)
335 LINE (c - 8 / di, b - 68 / di)-(c, b - 60 / di): LINE -(c + 8 / di, b - 68 / di): LINE -(c + 8 / di, b - 60 / di): LINE -(c - 8 / di, b - 60 / di): LINE -(c - 8 / di, b - 68 / di)
336 LINE (c, b - 38 / di)-(c - 8 / di, b - 38 / di): LINE -(c + 8 / di, b - 53 / di): LINE -(c + 8 / di, b - 45 / di): LINE -(c + 15 / di, b - 45 / di): LINE -(c, b - 30 / di): LINE -(c, b - 38 / di)
339 GOTO 490
340 LINE (c - 10 / di, b - 15 / di)-(c - 10 / di, b - 30 / di): LINE -(c - 15 / di, b - 20 / di): LINE -(c - 15 / di, b - 15 / di): LINE -(c - 15 / di, b): LINE -(c + 15 / di, b): LINE -(c + 15 / di, b - 15 / di): LINE -(c - 15 / di, b - 15 / di)
341 LINE (c - 15 / di, b - 10 / di)-(c + 15 / di, b - 10 / di): LINE (c - 15 / di, b - 5 / di)-(c + 15 / di, b - 5 / di)
342 LINE (c, b - 15 / di)-(c - 5 / di, b - 20 / di): LINE -(c - 5 / di, b - 35 / di): LINE -(c + 5 / di, b - 35 / di): LINE -(c + 5 / di, b - 20 / di): LINE -(c + 10 / di, b - 15 / di)
343 LINE (c - 5 / di, b - 20 / di)-(c + 5 / di, b - 20 / di): LINE (c - 5 / di, b - 25 / di)-(c + 5 / di, b - 25 / di): LINE (c - 5 / di, b - 30 / di)-(c + 5 / di, b - 30 / di)
344 LINE (c - 10 / di, b - 35 / di)-(c - 10 / di, b - 40 / di): LINE -(c - 5 / di, b - 45 / di): LINE -(c + 5 / di, b - 45 / di): LINE -(c + 10 / di, b - 40 / di): LINE -(c + 10 / di, b - 35 / di)
345 LINE (c - 10 / di, b - 40 / di)-(c, b - 45 / di): LINE -(c + 10 / di, b - 40 / di)
346 LINE (c - 5 / di, b - 40 / di)-(c + 5 / di, b - 40 / di): LINE -(c + 15 / di, b - 30 / di): LINE -(c, b - 40 / di): LINE -(c - 15 / di, b - 30 / di): LINE -(c - 5 / di + .499, b - 40 / di)
349 GOTO 490
350 LINE (c - 20 / di, 79 - yy%(di))-(c - 20 / di, b - 88 / di): LINE -(c - 10 / di, b - 83 / di): LINE -(c + 10 / di, b - 83 / di): LINE -(c + 20 / di, b - 88 / di): LINE -(c + 20 / di, 79 - yy%(di)): LINE -(c - 20 / di, 79 - yy%(di))
351 LINE (c - 20 / di, b - 88 / di)-(c - 30 / di, b - 83 / di): LINE -(c - 30 / di, b - 78 / di): LINE (c + 20 / di, b - 88 / di)-(c + 30 / di, b - 83 / di): LINE -(c + 40 / di, b - 83 / di)
352 LINE (c - 15 / di, b - 86 / di)-(c - 20 / di, b - 83 / di): LINE -(c - 20 / di, b - 78 / di): LINE -(c - 30 / di, b - 73 / di): LINE -(c - 30 / di, b - 68 / di): LINE -(c - 20 / di, b - 63 / di)
353 LINE (c - 10 / di, b - 83 / di)-(c - 10 / di, b - 58 / di): LINE -(c, b - 50 / di): LINE (c + 10 / di, b - 83 / di)-(c + 10 / di, b - 78 / di): LINE -(c + 20 / di, b - 73 / di): LINE -(c + 20 / di, b - 40 / di)
354 LINE (c + 15 / di, b - 85 / di)-(c + 20 / di, b - 78 / di): LINE -(c + 30 / di, b - 76 / di): LINE -(c + 30 / di, b - 60 / di)
355 LINE (c, b - 83 / di)-(c, b - 73 / di): LINE -(c + 10 / di, b - 68 / di): LINE -(c + 10 / di, b - 63 / di): LINE -(c, b - 58 / di)
359 GOTO 490
360 LINE (c + 5 / di + .499, b - 10 / di)-(c - 5 / di + .499, b - 10 / di): LINE -(c, b - 15 / di): LINE -(c + 10 / di, b - 20 / di): LINE -(c + 5 / di + .499, b - 15 / di): LINE -(c + 5 / di + .499, b - 10 / di)
361 LINE -(c + 7 / di + .499, b - 6 / di): LINE -(c + 5 / di + .499, b - 3 / di): LINE -(c - 5 / di + .499, b - 3 / di): LINE -(c - 7 / di + .499, b - 6 / di): LINE -(c - 5 / di + .499, b - 10 / di)
362 LINE (c + 2 / di + .499, b - 3 / di)-(c + 5 / di + .499, b): LINE -(c + 8 / di, b)
LINE (c - 2 / di + .499, b - 3 / di)-(c - 5 / di + .499, b): LINE -(c - 8 / di, b): PSET (c + 3 / di + .499, b - 8 / di)
PSET (c - 3 / di + .499, b - 8 / di): LINE (c + 3 / di + .499, b - 5 / di)-(c - 3 / di + .499, b - 5 / di)
363 GOTO 490
370 LINE (139 - 10 / di, pe%(di, 3))-(139 - 10 / di, pe%(di, 3) - 10 / di): LINE -(139 + 10 / di, pe%(di, 3) - 10 / di): LINE -(139 + 10 / di, pe%(di, 3)): LINE -(139 - 10 / di, pe%(di, 3))
371 LINE (139 - 10 / di, pe%(di, 3) - 10 / di)-(139 - 5 / di, pe%(di, 3) - 15 / di): LINE -(139 + 15 / di, pe%(di, 3) - 15 / di): LINE -(139 + 15 / di, pe%(di, 3) - 5 / di): LINE -(139 + 10 / di, pe%(di, 3))
372 LINE (139 + 10 / di, pe%(di, 3) - 10 / di)-(139 + 15 / di, pe%(di, 3) - 15 / di)
373 GOTO 490
380 LINE (c - 14 / di, b - 46 / di)-(c - 12 / di, b - 37 / di): LINE -(c - 20 / di, b - 32 / di): LINE -(c - 30 / di, b - 32 / di)
LINE -(c - 22 / di, b - 24 / di): LINE -(c - 40 / di, b - 17 / di): LINE -(c - 40 / di, b - 7 / di): LINE -(c - 38 / di, b - 5 / di)
LINE -(c - 40 / di, b - 3 / di): LINE -(c - 40 / di, b)
381 LINE -(c - 36 / di, b): LINE -(c - 34 / di, b - 2 / di): LINE -(c - 32 / di, b): LINE -(c - 28 / di, b)
LINE -(c - 28 / di, b - 3 / di): LINE -(c - 30 / di, b - 5 / di): LINE -(c - 28 / di, b - 7 / di)
LINE -(c - 28 / di, b - 15 / di): LINE -(c, b - 27 / di)
382 LINE (c + 14 / di, b - 46 / di)-(c + 12 / di, b - 37 / di): LINE -(c + 20 / di, b - 32 / di)
LINE -(c + 30 / di, b - 32 / di): LINE -(c + 22 / di, b - 24 / di): LINE -(c + 40 / di, b - 17 / di)
LINE -(c + 40 / di, b - 7 / di): LINE -(c + 38 / di, b - 5 / di): LINE -(c + 40 / di, b - 3 / di): LINE -(c + 40 / di, b)
383 LINE -(c + 36 / di, b): LINE -(c + 34 / di, b - 2 / di): LINE -(c + 32 / di, b): LINE -(c + 28 / di, b)
LINE -(c + 28 / di, b - 3 / di): LINE -(c + 30 / di, b - 5 / di): LINE -(c + 28 / di, b - 7 / di)
LINE -(c + 28 / di, b - 15 / di): LINE -(c, b - 27 / di)
384 LINE (c + 6 / di, b - 48 / di)-(c + 38 / di, b - 41 / di): LINE -(c + 40 / di, b - 42 / di): LINE -(c + 18 / di, b - 56 / di)
LINE -(c + 12 / di, b - 56 / di): LINE -(c + 10 / di, b - 57 / di): LINE -(c + 8 / di, b - 56 / di): LINE -(c - 8 / di, b - 56 / di)
LINE -(c - 10 / di, b - 58 / di): LINE -(c + 14 / di, b - 58 / di): LINE -(c + 16 / di, b - 59 / di)
385 LINE -(c + 8 / di, b - 63 / di): LINE -(c + 6 / di, b - 63 / di): LINE -(c + 2 / di + .499, b - 70 / di)
LINE -(c + 2 / di + .499, b - 63 / di): LINE -(c - 2 / di + .499, b - 63 / di): LINE -(c - 2 / di + .499, b - 70 / di)
LINE -(c - 6 / di, b - 63 / di): LINE -(c - 8 / di, b - 63 / di): LINE -(c - 16 / di, b - 59 / di): LINE -(c - 14 / di, b - 58 / di)
386 LINE -(c - 10 / di, b - 57 / di): LINE -(c - 12 / di, b - 56 / di): LINE -(c - 18 / di, b - 56 / di): LINE -(c - 36 / di, b - 47 / di)
LINE -(c - 36 / di, b - 39 / di): LINE -(c - 28 / di, b - 41 / di): LINE -(c - 28 / di, b - 46 / di): LINE -(c - 20 / di, b - 50 / di)
LINE -(c - 18 / di, b - 50 / di): LINE -(c - 14 / di, b - 46 / di)
387 GOTO 3087
390 LINE (c + 6 / di, b - 60 / di)-(c + 30 / di, b - 90 / di): LINE -(c + 60 / di, b - 30 / di): LINE -(c + 60 / di, b - 10 / di): LINE -(c + 30 / di, b - 40 / di): LINE -(c + 15 / di, b - 40 / di)
391 LINE (c - 6 / di, b - 60 / di)-(c - 30 / di, b - 90 / di): LINE -(c - 60 / di, b - 30 / di): LINE -(c - 60 / di, b - 10 / di): LINE -(c - 30 / di, b - 40 / di): LINE -(c - 15 / di, b - 40 / di)
392 LINE (c, b - 25 / di)-(c + 6 / di, b - 25 / di): LINE -(c + 10 / di, b - 20 / di): LINE -(c + 12 / di, b - 10 / di): LINE -(c + 10 / di, b - 6 / di)
LINE -(c + 10 / di, b): LINE -(c + 14 / di, b): LINE -(c + 15 / di, b - 5 / di): LINE -(c + 16 / di, b): LINE -(c + 20 / di, b)
393 LINE -(c + 20 / di, b - 6 / di): LINE -(c + 18 / di, b - 10 / di): LINE -(c + 18 / di, b - 20 / di): LINE -(c + 15 / di, b - 30 / di): LINE -(c + 15 / di, b - 45 / di): LINE -(c + 40 / di, b - 60 / di): LINE -(c + 40 / di, b - 70 / di)
394 LINE -(c + 10 / di, b - 55 / di): LINE -(c + 6 / di, b - 60 / di): LINE -(c + 10 / di, b - 74 / di): LINE -(c + 6 / di, b - 80 / di)
LINE -(c + 4 / di + .499, b - 80 / di): LINE -(c + 3 / di + .499, b - 82 / di): LINE -(c + 2 / di + .499, b - 80 / di): LINE -(c, b - 80 / di)
395 LINE (c, b - 25 / di)-(c - 6 / di, b - 25 / di): LINE -(c - 10 / di, b - 20 / di): LINE -(c - 12 / di, b - 10 / di): LINE -(c - 10 / di, b - 6 / di)
LINE -(c - 10 / di, b): LINE -(c - 14 / di, b): LINE -(c - 15 / di, b - 5 / di): LINE -(c - 16 / di, b): LINE -(c - 20 / di, b)
396 LINE -(c - 20 / di, b - 6 / di): LINE -(c - 18 / di, b - 10 / di): LINE -(c - 18 / di, b - 20 / di): LINE -(c - 15 / di, b - 30 / di): LINE -(c - 15 / di, b - 45 / di): LINE -(c - 40 / di, b - 60 / di): LINE -(c - 40 / di, b - 70 / di)
397 LINE -(c - 10 / di, b - 55 / di): LINE -(c - 6 / di, b - 60 / di): LINE -(c - 10 / di, b - 74 / di): LINE -(c - 6 / di, b - 80 / di)
LINE -(c - 4 / di + .499, b - 80 / di): LINE -(c - 3 / di + .499, b - 82 / di): LINE -(c - 2 / di + .499, b - 80 / di): LINE -(c, b - 80 / di)
398 LINE (c - 6 / di, b - 25 / di)-(c, b - 6 / di): LINE -(c + 10 / di, b): LINE -(c + 4 / di + .499, b - 8 / di): LINE -(c + 6 / di, b - 25 / di)
LINE (c - 40 / di, b - 64 / di)-(c - 40 / di, b - 90 / di): LINE -(c - 52 / di, b - 80 / di): LINE -(c - 52 / di, b - 40 / di)
399 LINE (c + 40 / di, b - 86 / di)-(c + 38 / di, b - 92 / di): LINE -(c + 42 / di, b - 92 / di): LINE -(c + 40 / di, b - 86 / di): LINE -(c + 40 / di, b - 50 / di)
400 LINE (c + 4 / di + .499, b - 70 / di)-(c + 6 / di, b - 74 / di): LINE (c - 4 / di + .499, b - 70 / di)-(c - 6 / di, b - 74 / di): LINE (c, b - 64 / di)-(c, b - 60 / di): GOTO 490
490 IF en = 1 THEN en = 0: WINDOW: RETURN
491 di = di + 1: GOTO 202
500 RANDOMIZE -ABS(ln) - tx * 10 - ty * 1000 + in * 31.4
501 FOR x = 1 TO 9: FOR y = 1 TO 9: dn%(x, y) = 0: NEXT: NEXT
510 FOR x = 0 TO 10: dn%(x, 0) = 1: dn%(x, 10) = 1: dn%(0, x) = 1: dn%(10, x) = 1: NEXT
520 FOR x = 2 TO 8 STEP 2: FOR y = 1 TO 9: dn%(x, y) = 1: NEXT: NEXT
530 FOR x = 2 TO 8 STEP 2: FOR y = 1 TO 9 STEP 2
540 IF RND(1) > .95 THEN dn%(x, y) = 2
541 IF RND(1) > .95 THEN dn%(y, x) = 2
542 IF RND(1) > .6 THEN dn%(y, x) = 3
543 IF RND(1) > .6 THEN dn%(x, y) = 3
544 IF RND(1) > .6 THEN dn%(x, y) = 4
545 IF RND(1) > .6 THEN dn%(y, x) = 4
546 IF RND(1) > .97 THEN dn%(y, x) = 9
547 IF RND(1) > .97 THEN dn%(x, y) = 9
548 IF RND(1) > .94 THEN dn%(x, y) = 5
549 IF RND(1) > .94 THEN dn%(y, x) = 5
568 NEXT: NEXT
569 dn%(2, 1) = 0: IF in / 2 = INT(in / 2) THEN dn%(7, 3) = 7: dn%(3, 7) = 8
570 IF in / 2 <> INT(in / 2) THEN dn%(7, 3) = 8: dn%(3, 7) = 7
580 IF in = 1 THEN dn%(1, 1) = 8: dn%(7, 3) = 0
585 GOSUB 2000
590 RETURN
1000 DO: LOOP UNTIL INKEY$ = "": VIEW PRINT 22 TO 25: LOCATE 25, 1: PRINT "COMMAND? "; : LOCATE CSRLIN, 10
1001 x$ = INKEY$: IF x$ = "" THEN 1001
1002 IF ASC(x$) = 0 THEN xq = ASC(MID$(x$, 2)) ELSE xq = 0
1010 REM poke -16368, 0
1030 IF xq = 72 THEN ON SGN(in) + 1 GOTO 1100, 1150
1040 IF xq = 77 THEN ON SGN(in) + 1 GOTO 1200, 1250
1050 IF xq = 75 THEN ON SGN(in) + 1 GOTO 1300, 1350
1060 IF xq = 80 THEN ON SGN(in) + 1 GOTO 1400, 1450
1070 IF x$ = "g" OR x$ = CHR$(13) OR x$ = "e" OR x$ = "k" OR x$ = "d" THEN ON SGN(in) + 1 GOTO 1500, 1550
1080 IF x$ = "a" OR x$ = "u" OR x$ = "c" THEN ON SGN(in) + 1 GOTO 1600, 1650
1081 IF x$ = " " THEN PRINT "PASS": GOTO 1090
1085 IF x$ = "i" OR x$ = "z" OR x$ = "y" THEN 1700
1086 IF x$ = "p" THEN IF pa = 1 THEN pa = 0: PRINT "PAUSE OFF": GOTO 1000
1087 IF x$ = "p" THEN IF pa = 0 THEN pa = 1: PRINT "PAUSE ON": GOTO 1000
1089 PRINT "HUH?": GOTO 1000
1090 pw(0) = pw(0) - 1 + SGN(in) * .9: IF pw(0) < 0 THEN c(0) = 0: PRINT : PRINT "YOU HAVE STARVED!!!!!": GOTO 1093
1091 FOR jj = 0 TO 2: LOCATE 22 + jj, 30: PRINT " "; : NEXT
LOCATE 22, 30: PRINT "FOOD="; LTRIM$(STR$(pw(0))); : LOCATE 23, 30: PRINT "H.P.="; LTRIM$(STR$(c(0)));
LOCATE 24, 30: PRINT "GOLD="; LTRIM$(STR$(c(5))); : LOCATE 24, 1: REM call -868
1092 pw(0) = INT(pw(0) * 10) / 10
1093 IF c(0) <= 0 THEN SLEEP 3: GOTO 6000
1095 IF in > 0 THEN GOSUB 4000: IF c(0) <= 0 THEN 1093
1096 FOR jj = 0 TO 3: LOCATE 22 + jj, 30: PRINT " "; : NEXT: LOCATE 22, 30: PRINT "FOOD="; LTRIM$(STR$(pw(0))); : LOCATE 23, 30: PRINT "H.P.="; LTRIM$(STR$(c(0))); : LOCATE 24, 30: PRINT "GOLD="; LTRIM$(STR$(c(5))); : LOCATE 24, 1
1097 IF in = 0 THEN GOSUB 100: GOTO 1000
1098 IF in > 0 THEN GOSUB 200: GOTO 1000
1100 PRINT "NORTH": IF te%(tx, ty - 1) = 1 THEN PRINT "YOU CAN'T PASS THE MOUNTAINS": GOTO 1090
1110 ty = ty - 1: GOTO 1090
1150 IF dn%(px + dx, py + dy) <> 1 AND dn%(px + dx, py + dy) < 10 THEN px = px + dx: py = py + dy
1155 PRINT "FORWARD"
1160 IF dn%(px, py) = 2 THEN PRINT "AAARRRGGGHHH!!! A TRAP!": c(0) = c(0) - INT(RND(1) * in + 3): MR = 1: in = in + 1: PRINT "FALLING TO LEVEL "; in: SLEEP 2: GOSUB 500: GOTO 1090
1165 z = 0
1170 IF dn%(px, py) = 5 THEN dn%(px, py) = 0: PRINT "GOLD!!!!!": z = INT(RND(1) * 5 * in + in): PRINT z; "-PIECES OF EIGHT": c(5) = c(5) + z
1175 IF z > 0 THEN z = INT(RND(1) * 6): PRINT "AND A "; w$(z): pw(z) = pw(z) + 1: SLEEP 1: GOTO 1090
1190 GOTO 1090
1200 PRINT "EAST": IF te%(tx + 1, ty) = 1 THEN PRINT "YOU CAN'T PASS THE MOUNTAINS": GOTO 1090
1210 tx = tx + 1: GOTO 1090
1250 PRINT "TURN RIGHT"
1255 IF dx <> 0 THEN dy = dx: dx = 0: GOTO 1090
1260 dx = -dy: dy = 0: GOTO 1090
1300 PRINT "WEST": IF te%(tx - 1, ty) = 1 THEN PRINT "YOU CAN'T PASS THE MOUNTAINS": GOTO 1090
1310 tx = tx - 1: GOTO 1090
1350 PRINT "TURN LEFT"
1355 IF dx <> 0 THEN dy = -dx: dx = 0: GOTO 1090
1360 dx = dy: dy = 0: GOTO 1090
1400 PRINT "SOUTH": IF te%(tx, ty + 1) = 1 THEN PRINT "YOU CAN'T PASS THE MOUNTAINS": GOTO 1090
1410 ty = ty + 1: GOTO 1090
1450 PRINT "TURN AROUND": dx = -dx: dy = -dy: GOTO 1090
1500 IF te%(tx, ty) = 3 THEN GOSUB 60080: GOSUB 60200: CLS : GOTO 1090
1510 IF te%(tx, ty) = 4 AND in = 0 THEN PRINT "GO DUNGEON": PRINT "PLEASE WAIT ": SLEEP 1: in = 1: GOSUB 500: dx = 1: dy = 0: px = 1: py = 1: CLS : GOTO 1090
1515 IF te%(tx, ty) = 5 THEN 7000
1520 PRINT "HUH?": GOTO 1000
1550 IF dn%(px, py) <> 7 AND dn%(px, py) <> 9 THEN 1580
1555 PRINT "GO DOWN TO LEVEL "; in + 1
1560 in = in + 1: GOSUB 500: MR = 1: GOTO 1090
1580 IF dn%(px, py) <> 8 THEN PRINT "HUH?": GOTO 1090
1581 IF in = 1 THEN PRINT "LEAVE DUNGEON": in = 0: GOTO 1586
1584 PRINT "GO UP TO LEVEL "; in - 1
1585 in = in - 1: GOSUB 500: MR = 1
1586 IF in = 0 THEN PRINT "THOU HAST GAINED": PRINT lk; " HIT POINTS": SLEEP 2: c(0) = c(0) + lk: lk = 0
1587 CLS : GOTO 1090
1600 GOTO 1090
1650 mn = 0: da = 0: PRINT "ATTACK ": PRINT "WHICH WEAPON "; : DO: q$ = INKEY$: LOOP WHILE q$ = ""
1651 IF q$ = "r" THEN da = 10: PRINT "RAPIER": IF pw(1) < 1 THEN PRINT "NOT OWNED": GOTO 1650
1652 IF q$ = "a" THEN da = 5: PRINT "AXE": IF pw(2) < 1 THEN PRINT "NOT OWNED": GOTO 1650
1653 IF q$ = "s" THEN da = 1: PRINT "SHIELD": IF pw(3) < 1 THEN PRINT "NOT OWNED": GOTO 1650
1654 IF q$ = "b" THEN da = 4: PRINT "BOW": IF pw(4) < 1 THEN PRINT "NOT OWNED": GOTO 1650
1655 IF q$ = "m" THEN PRINT "MAGIC AMULET": GOTO 1680
1656 IF q$ = "b" AND pt$ = "m" THEN PRINT "MAGES CAN'T USE BOWS!": GOTO 1650
1657 IF q$ = "r" AND pt$ = "m" THEN PRINT "MAGES CAN'T USE RAPIERS!": GOTO 1650
1659 IF da = 0 THEN PRINT "HANDS"
1660 IF da = 5 OR da = 4 THEN 1670
1661 mn = dn%(px + dx, py + dy) / 10: mn = INT(mn)
1662 IF mn < 1 OR c(2) - RND(1) * 25 < mn + in THEN PRINT " YOU MISSED": GOTO 1668
1663 PRINT "HIT!!! ": da = (RND(1) * da + c(1) / 5): mz%(mn, 1) = INT(mz%(mn, 1) - da)
1664 PRINT m$(mn); "'S HIT POINTS="; mz%(mn, 1)
1665 IF mz%(mn, 1) < 1 THEN PRINT "THOU HAST KILLED A "; m$(mn): PRINT "THOU SHALT RECEIVE": da = INT(mn + in): PRINT da; " PIECES OF EIGHT"
1666 IF mz%(mn, 1) < 1 THEN c(5) = INT(c(5) + da): dn%(ml%(mn, 0), ml%(mn, 1)) = dn%(ml%(mn, 0), ml%(mn, 1)) - 10 * mn: mz%(mn, 0) = 0
1667 lk = lk + INT(mn * in / 2): IF mn = ta THEN ta = -ta
1668 IF pa = 1 THEN PRINT "-CR- TO CONT. "; : INPUT q$
1669 SLEEP 1: GOTO 1090
1670 IF da = 5 THEN PRINT "TO THROW OR SWING:"; : DO: q$ = INKEY$: LOOP WHILE q$ = "": IF q$ <> "t" THEN PRINT "SWING": GOTO 1661
1671 IF da = 5 THEN PRINT "THROW": pw(2) = pw(2) - 1
1672 FOR y = 1 TO 5: IF px + dx * y < 1 OR px + dx * y > 9 OR py + dy * y > 9 OR py + dy * y < 0 THEN 1662
1673 mn = dn%(px + dx * y, py + dy * y): mn = INT(mn / 10): IF mn > 0 THEN 1662
1674 NEXT: GOTO 1662
1680 IF pw(5) < 1 THEN PRINT "NONE OWNED": GOTO 1650
1681 IF pt$ = "f" THEN q = INT(RND(1) * 4 + 1): GOTO 1685
1682 PRINT "1-LADDER-UP", "2-LADDER-DN": PRINT "3-KILL", "4-BAD??": PRINT "CHOICE "; : DO: q$ = INKEY$: LOOP WHILE q$ = "": q = VAL(q$): PRINT q: IF q < 1 OR q > 4 THEN 1682
1683 IF RND(1) > .75 THEN PRINT "LAST CHARGE ON THIS AMULET!": pw(5) = pw(5) - 1
1685 ON q GOTO 1686, 1690, 1691, 1692
1686 PRINT "LADDER UP": dn%(px, py) = 8: SLEEP 1: GOTO 1090
1690 PRINT "LADDER DOWN": dn%(px, py) = 7: SLEEP 1: GOTO 1090
1691 PRINT "MAGIC ATTACK": da = 10 + in: GOTO 1672
1692 ON INT(RND(1) * 3 + 1) GOTO 1693, 1695, 1697
1693 PRINT "YOU HAVE BEEN TURNED": PRINT "INTO A TOAD!"
1694 FOR z2 = 1 TO 4: c(z2) = 3: NEXT z2: SLEEP 3: GOTO 1090
1695 PRINT "YOU HAVE BEEN TURNED": PRINT "INTO A LIZARD MAN": FOR y = 0 TO 4: c(y) = INT(c(y) * 2.5): NEXT: SLEEP 3: GOTO 1090
1697 PRINT "BACKFIRE": c(0) = c(0) / 2: SLEEP 2: GOTO 1090
1700 GOSUB 60080: LOCATE 1, 1: PRINT "PRESS -CR- TO CONTINUE"; : INPUT q$: SCREEN 1: CLS : GOTO 1090
2000 nm = 0: FOR x = 1 TO 10
2005 mz%(x, 0) = 0: mz%(x, 1) = x + 3 + in
2010 IF x - 2 > in OR RND(1) > .4 THEN 2090
2020 ml%(x, 0) = INT(RND(1) * 9 + 1): ml%(x, 1) = INT(RND(1) * 9 + 1)
2030 IF dn%(ml%(x, 0), ml%(x, 1)) <> 0 THEN 2020
2040 IF ml%(x, 0) = px AND ml%(x, 1) = py THEN 2020
2050 dn%(ml%(x, 0), ml%(x, 1)) = x * 10
2051 mz%(x, 0) = 1
2052 nm = nm + 1
2055 mz%(x, 1) = x * 2 + in * 2 * lp
2090 NEXT: RETURN
3087 LINE (c - 28 / di, b - 41 / di)-(c + 30 / di, b - 55 / di): LINE (c + 28 / di, b - 58 / di)-(c + 22 / di, b - 56 / di): LINE -(c + 22 / di, b - 53 / di)
LINE -(c + 28 / di, b - 52 / di): LINE -(c + 34 / di, b - 54 / di): LINE (c + 20 / di, b - 50 / di)-(c + 26 / di, b - 47 / di)
3088 LINE (c + 10 / di, b - 58 / di)-(c + 10 / di, b - 61 / di): LINE -(c + 4 / di, b - 58 / di): LINE (c - 10 / di, b - 58 / di)-(c - 10 / di, b - 61 / di)
LINE -(c - 4 / di, b - 58 / di): LINE (c + 40 / di, b - 9 / di)-(c + 50 / di, b - 12 / di): LINE -(c + 40 / di, b - 7 / di)
3089 LINE (c - 8 / di, b - 25 / di)-(c + 6 / di, b - 7 / di): LINE -(c + 28 / di, b - 7 / di): LINE -(c + 28 / di, b - 9 / di): LINE -(c + 20 / di, b - 9 / di): LINE -(c + 6 / di, b - 25 / di): GOTO 490
4000 FOR mm = 1 TO 10: IF mz%(mm, 0) = 0 THEN 4999
4010 ra = SQR((px - ml%(mm, 0)) ^ 2 + (py - ml%(mm, 1)) ^ 2)
4011 IF mz%(mm, 1) < in * lp THEN 4030
4020 IF ra < 1.3 THEN 4500
4025 IF mm = 8 AND ra < 3 THEN 4999
4030 x1 = SGN(px - ml%(mm, 0)): y1 = SGN(py - ml%(mm, 1))
4031 IF mz%(mm, 1) < in * lp THEN x1 = -x1: y1 = -y1
4035 IF y1 = 0 THEN 4045
4040 d = dn%(ml%(mm, 0), (ml%(mm, 1) + y1 + .499)): IF d = 1 OR d > 9 OR d = 2 THEN 4045
4042 x1 = 0: GOTO 4050
4045 y1 = 0: IF x1 = 0 THEN 4050
4046 d = dn%((ml%(mm, 0) + x1 + .499), ml%(mm, 1)): IF d = 1 OR d > 9 OR d = 2 THEN x1 = 0: GOTO 4081
4050 dn%(ml%(mm, 0), ml%(mm, 1)) = dn%(ml%(mm, 0), ml%(mm, 1)) - 10 * mm
4055 IF ml%(mm, 0) + x1 = px AND ml%(mm, 1) + y1 = py THEN 4999
4060 ml%(mm, 0) = ml%(mm, 0) + x1: ml%(mm, 1) = ml%(mm, 1) + y1
4080 dn%(ml%(mm, 0), ml%(mm, 1)) = (dn%(ml%(mm, 0), ml%(mm, 1)) + 10 * mm + .499)
4081 IF x1 <> 0 OR y1 <> 0 THEN 4999
4082 IF mz%(mm, 1) < in * lp AND ra < 1.3 THEN 4500
4083 IF mz%(mm, 1) < in * lp THEN mz%(mm, 1) = mz%(mm, 1) + mm + in
4499 GOTO 4999
4500 IF mm = 2 OR mm = 7 THEN 4600
4509 PRINT "YOU ARE BEING ATTACKED": PRINT "BY A "; m$(mm)
4510 IF RND(1) * 20 - SGN(pw(3)) - c(3) + mm + in < 0 THEN PRINT "MISSED": GOTO 4525
4520 PRINT "HIT": c(0) = c(0) - INT(RND(1) * mm + in)
4525 IF pa = 1 THEN PRINT "-CR- TO CONT. "; : INPUT q$
4530 GOTO 4999
4600 IF RND(1) < .5 THEN 4509
4610 IF mm = 7 THEN pw(0) = INT(pw(0) / 2): PRINT "A GREMLIN STOLE SOME FOOD": GOTO 4525
4620 zz = INT(RND(1) * 6): IF pw(zz) < 1 THEN 4620
4630 PRINT "A THIEF STOLE A "; w$(zz): pw(zz) = pw(zz) - 1: GOTO 4525
4999 NEXT: RETURN
6000 VIEW PRINT: CLS : PRINT : PRINT : PRINT " WE MOURN THE PASSING OF"
6005 IF LEN(pn$) > 22 THEN pn$ = ""
6010 IF pn$ = "" THEN pn$ = "THE PEASANT"
6020 pn$ = pn$ + " AND HIS COMPUTER"
6030 PRINT TAB(20 - INT(LEN(pn$) / 2)); : PRINT pn$
6035 PRINT " TO INVOKE A MIRACLE OF RESSURECTION"
6040 PRINT " <HIT ESC KEY>";
6050 DO: LOOP UNTIL INKEY$ = CHR$(27)
6060 GOTO 1
7000 SCREEN 1: VIEW PRINT: CLS
7001 REM
7010 IF pn$ <> "" THEN 7500
7020 PRINT : PRINT : PRINT " WELCOME PEASANT INTO THE HALLS OF": PRINT "THE MIGHTY LORD BRITISH. HEREIN THOU MAYCHOOSE TO DARE BATTLE WITH THE EVIL": PRINT "CREATURES OF THE DEPTHS, FOR GREAT": PRINT "REWARD!"
7030 PRINT : PRINT "WHAT IS THY NAME PEASANT "; : INPUT pn$: pn$ = UCASE$(pn$)
7040 PRINT "DOEST THOU WISH FOR GRAND ADVENTURE ? "; : DO: q$ = INKEY$: LOOP WHILE q$ = ""
IF q$ <> "y" THEN PRINT : PRINT "THEN LEAVE AND BEGONE!": pn$ = "": PRINT : PRINT " PRESS -SPACE- TO CONT."; : DO: q$ = INKEY$: LOOP UNTIL q$ = " ": CLS : GOTO 1090
7045 PRINT
7050 PRINT : PRINT "GOOD! THOU SHALT TRY TO BECOME A ": PRINT "KNIGHT!!!": PRINT : PRINT "THY FIRST TASK IS TO GO INTO THE": PRINT "DUNGEONS AND TO RETURN ONLY AFTER": PRINT "KILLING A(N) "; : ta = INT(c(4) / 3): PRINT m$(ta)
7060 PRINT : PRINT " GO NOW UPON THIS QUEST, AND MAY": PRINT "LADY LUCK BE FAIR UNTO YOU.....": PRINT ".....ALSO I, BRITISH, HAVE INCREASED": PRINT "EACH OF THY ATTRIBUTES BY ONE!"
7070 PRINT : PRINT " PRESS -SPACE- TO CONT."; : DO: q$ = INKEY$: LOOP WHILE q$ = "": FOR x = 0 TO 5: c(x) = c(x) + 1: NEXT: CLS : GOTO 1090
7500 IF ta > 0 THEN PRINT : PRINT : PRINT pn$; " WHY HAST THOU RETURNED?": PRINT "THOU MUST KILL A(N) "; m$(ta)
PRINT "GO NOW AND COMPLETE THY QUEST!": PRINT : PRINT " PRESS -SPACE- TO CONT."; : DO: q$ = INKEY$: LOOP WHILE q$ = "": CLS : GOTO 1090
7510 PRINT : PRINT : PRINT : PRINT "AAHH!!....."; pn$: PRINT : PRINT "THOU HAST ACOMPLISHED THY QUEST!": IF ABS(ta) = 10 THEN 7900
7520 PRINT "UNFORTUNATELY, THIS IS NOT ENOUGH TO": PRINT "BECOME A KNIGHT.": ta = ABS(ta) + 1: PRINT : PRINT "NOW THOU MUST KILL A(N) "; m$(ta)
7530 GOTO 7060
7900 SCREEN 1: VIEW PRINT: CLS : PRINT : PRINT : PRINT : pn$ = "LORD " + pn$: PRINT " "; pn$; ","
7910 PRINT " THOU HAST PROVED THYSELF WORTHY": PRINT "OF KNIGHTHOOD, CONTINUE PLAY IF THOU": PRINT "DOTH WISH, BUT THOU HAST ACOMPLISHED": PRINT "THE MAIN OBJECTIVE OF THIS GAME..."
7920 IF lp = 10 THEN 7950
7930 PRINT : PRINT " NOW MAYBE THOU ART FOOLHEARTY": PRINT "ENOUGH TOTRY DIFFICULTY LEVEL "; lp + 1
7940 GOTO 7070
7950 PRINT : PRINT "...CALL CALIFORNIA PACIFIC COMPUTER": PRINT "AT (415)-569-9126 TO REPORT THIS": PRINT "AMAZING FEAT!"
7990 GOTO 7070
60000 SCREEN 1: VIEW PRINT: CLS : LOCATE 5, 1: INPUT "TYPE THY LUCKY NUMBER....."; q$: ln = VAL(q$)
60005 LOCATE 7, 1: INPUT "LEVEL OF PLAY (1-10)......"; q$: lp = INT(VAL(q$))
60006 IF lp < 1 OR lp > 10 THEN 60005
60010 RANDOMIZE ln
60020 DATA "HIT POINTS.....","STRENGTH.......","DEXTERITY......","STAMINA........","WISDOM.........","GOLD..........."
60025 REM
60030 DIM c$(5): FOR x = 0 TO 5: READ c$(x): NEXT
60040 REM
60041 REM
60042 DATA "SKELETON","THIEF","GIANT RAT","ORC","VIPER","CARRION CRAWLER","GREMLIN","MIMIC","DAEMON","BALROG"
60043 FOR x = 1 TO 10: READ m$(x): NEXT
60050 FOR x = 0 TO 5: c(x) = INT(SQR(RND(1)) * 21 + 4): NEXT x
60060 CLS : LOCATE 8, 1: FOR x = 0 TO 5: PRINT c$(x); c(x): NEXT: PRINT : PRINT "SHALT THOU PLAY WITH THESE QUALITIES?": PRINT TAB(20); : DO: q$ = INKEY$: LOOP WHILE q$ = "": IF q$ <> "y" THEN 60050
60061 LOCATE 15, 1: PRINT : PRINT "AND SHALT THOU BE A FIGHTER OR A MAGE?": PRINT TAB(20); : DO: pt$ = INKEY$: LOOP WHILE pt$ = ""
60062 IF pt$ = "m" OR pt$ = "f" THEN 60070
60063 GOTO 60061
60070 DATA "FOOD","RAPIER","AXE","SHIELD","BOW AND ARROWS","MAGIC AMULET": FOR x = 0 TO 5: READ w$(x): NEXT
60075 GOSUB 60080: GOSUB 60200: RETURN
60080 SCREEN 1: VIEW PRINT: CLS : PRINT : PRINT : PRINT " STAT'S WEAPONS": PRINT : FOR x = 0 TO 5: PRINT c$(x); c(x); TAB(24); "0-"; w$(x): NEXT: LOCATE 1, 1
60081 LOCATE 11, 18: PRINT "Q-QUIT"
60082 REM IF pw(0) > 0 THEN REM CALL 62450
60085 FOR z = 0 TO 5: LOCATE 5 + z, 25 - LEN(STR$(pw(z))): PRINT STR$(pw(z)); : NEXT
60090 LOCATE 17, 5: PRINT "PRICE"; : PRINT TAB(15); : PRINT "DAMAGE"; : PRINT TAB(25); : PRINT "ITEM"
60100 FOR x = 0 TO 5: LOCATE 19 + x, 25: PRINT w$(x); : NEXT
60110 LOCATE 19, 5: PRINT "1 FOR 10"; : PRINT TAB(15); : PRINT "N/A": LOCATE 20, 5: PRINT "8"; : PRINT TAB(15); : PRINT "1-10": LOCATE 21, 5: PRINT "5"; : PRINT TAB(15); : PRINT "1-5"
60120 LOCATE 22, 5: PRINT "6"; : PRINT TAB(15); : PRINT "1": LOCATE 23, 5: PRINT "3"; : PRINT TAB(15); : PRINT "1-4"; : LOCATE 24, 5: PRINT "15"; : PRINT TAB(15); : PRINT "?????"; : LOCATE 1, 1
60130 RETURN
60200 LOCATE 1, 1: PRINT "WELCOME TO THE ADVENTURE SHOP"
60210 LOCATE 13, 1: FOR jj = 0 TO 1: PRINT " ": NEXT
LOCATE 12, 1: PRINT "WHICH ITEM SHALT THOU BUY "; : LOCATE 12, 27: DO: q$ = INKEY$: LOOP WHILE q$ = ""
IF q$ = "q" THEN PRINT : PRINT : PRINT "BYE": SLEEP 1: SCREEN 1: CLS : RETURN
60215 z = -1
60220 IF q$ = "f" THEN PRINT "FOOD": z = 0: p = 1
60221 IF q$ = "r" THEN PRINT "RAPIER": z = 1: p = 8
60222 IF q$ = "a" THEN PRINT "AXE": z = 2: p = 5
60223 IF q$ = "s" THEN PRINT "SHIELD": z = 3: p = 6
60224 IF q$ = "b" THEN PRINT "BOW": z = 4: p = 3
60225 IF q$ = "m" THEN PRINT "AMULET": z = 5: p = 15
60226 IF z = -1 THEN PRINT UCASE$(q$): PRINT "I'M SORRY WE DON'T HAVE THAT.": SLEEP 2: GOTO 60210
60227 IF q$ = "r" AND pt$ = "m" THEN PRINT "I'M SORRY MAGES": PRINT "CAN'T USE THAT!": SLEEP 2: GOTO 60210
60228 IF q$ = "b" AND pt$ = "m" THEN PRINT "I'M SORRY MAGES": PRINT "CAN'T USE THAT!": SLEEP 2: GOTO 60210
60230 IF c(5) - p < 0 THEN PRINT "M'LORD THOU CAN NOT AFFORD THAT ITEM.": SLEEP 2: GOTO 60210
60235 IF z = 0 THEN pw(z) = pw(z) + 9
60236 pw(z) = pw(z) + 1: c(5) = c(5) - p
60237 LOCATE 10, 16: PRINT c(5); " "
60240 LOCATE 5 + z, 25 - LEN(STR$(pw(z))): PRINT pw(z); : LOCATE 14, 1: PRINT
60250 GOTO 60210
0 ON ERROR GOTO 4
1 SCREEN 1: VIEW PRINT: CLS : q$ = "": DIM pw(5): DIM c(5): DIM m$(10), ml%(10, 1), mz%(10, 1): DIM w$(5)
4 REM PR# 0: IN# 0
5 REM HIMEM: 49151
7 CLEAR : GOSUB 60000
8 RANDOMIZE ln
9 le = 0
10 SCREEN 1: VIEW PRINT: CLS : PRINT TAB(12); : PRINT " WELCOME TO AKALABETH, WORLD OF DOOM!"
20 DIM dn%(10, 10), te%(20, 20), xx%(10), yy%(10), pe%(10, 3), ld%(10, 5), cd%(10, 3), ft%(10, 5), la%(10, 3)
30 FOR x = 0 TO 20: te%(x, 0) = 1: te%(0, x) = 1: te%(x, 20) = 1: te%(20, x) = 1: NEXT
35 LOCATE 23, 1: PRINT " (PLEASE WAIT)";
40 FOR x = 1 TO 19: FOR y = 1 TO 19: te%(x, y) = INT(RND(1) ^ 5 * 4.5)
41 IF te%(x, y) = 3 AND RND(1) > .5 THEN te%(x, y) = 0
42 NEXT: PRINT "."; : NEXT: SLEEP 2
50 te%(INT(RND(1) * 19 + 1), INT(RND(1) * 19 + 1)) = 5: tx = INT(RND(1) * 19 + 1): ty = INT(RND(1) * 19 + 1): te%(tx, ty) = 3
51 xx%(0) = 139: yy%(0) = 79
52 FOR x = 2 TO 20 STEP 2: xx%(x / 2) = INT(ATN(1 / x) / ATN(1) * 140 + .5): yy%(x / 2) = INT(xx%(x / 2) * 4 / 7)
53 pe%(x / 2, 0) = 139 - xx%(x / 2): pe%(x / 2, 1) = 139 + xx%(x / 2): pe%(x / 2, 2) = 79 - yy%(x / 2): pe%(x / 2, 3) = 79 + yy%(x / 2): NEXT
54 pe%(0, 0) = 0: pe%(0, 1) = 279: pe%(0, 2) = 0: pe%(0, 3) = 159
55 FOR x = 1 TO 10: cd%(x, 0) = 139 - xx%(x) / 3: cd%(x, 1) = 139 + xx%(x) / 3: cd%(x, 2) = 79 - yy%(x) * .7: cd%(x, 3) = 79 + yy%(x): NEXT: PRINT ".";
56 FOR x = 0 TO 9: ld%(x, 0) = (pe%(x, 0) * 2 + pe%(x + 1, 0)) / 3: ld%(x, 1) = (pe%(x, 0) + 2 * pe%(x + 1, 0)) / 3: w = ld%(x, 0) - pe%(x, 0)
57 ld%(x, 2) = pe%(x, 2) + w * 4 / 7: ld%(x, 3) = pe%(x, 2) + 2 * w * 4 / 7: ld%(x, 4) = (pe%(x, 3) * 2 + pe%(x + 1, 3)) / 3: ld%(x, 5) = (pe%(x, 3) + 2 * pe%(x + 1, 3)) / 3
58 ld%(x, 2) = ld%(x, 4) - (ld%(x, 4) - ld%(x, 2)) * .8: ld%(x, 3) = ld%(x, 5) - (ld%(x, 5) - ld%(x, 3)) * .8: IF ld%(x, 3) = ld%(x, 4) THEN ld%(x, 3) = ld%(x, 3) - 1
59 NEXT
60 FOR x = 0 TO 9: ft%(x, 0) = 139 - xx%(x) / 3: ft%(x, 1) = 139 + xx%(x) / 3: ft%(x, 2) = 139 - xx%(x + 1) / 3: ft%(x, 3) = 139 + xx%(x + 1) / 3
61 ft%(x, 4) = 79 + (yy%(x) * 2 + yy%(x + 1)) / 3: ft%(x, 5) = 79 + (yy%(x) + 2 * yy%(x + 1)) / 3: NEXT
62 FOR x = 0 TO 9: la%(x, 0) = (ft%(x, 0) * 2 + ft%(x, 1)) / 3: la%(x, 1) = (ft%(x, 0) + 2 * ft%(x, 1)) / 3: la%(x, 3) = ft%(x, 4): la%(x, 2) = 159 - la%(x, 3): NEXT
68 LOCATE 1, 1
69 LOCATE 1, 1
70 GOSUB 100: GOTO 1000
90 FOR x = 0 TO 9: FOR y = 0 TO 5: PRINT ld%(x, y); " "; : NEXT: PRINT : NEXT: DO: q$ = INKEY$: LOOP WHILE q$ = ""
100 SCREEN 1: VIEW PRINT 1 TO 21: CLS 2: VIEW PRINT 22 TO 25: WINDOW SCREEN (0, 0)-(279, 199): FOR y = -1 TO 1: FOR x = -1 TO 1
105 LINE (138, 75)-(142, 75): LINE (140, 73)-(140, 77)
110 zz = te%(tx + x, ty + y): x1 = 65 + (x + 1) * 50: y1 = (y + 1) * 50
120 IF zz = 2 THEN LINE (x1 + 20, y1 + 20)-(x1 + 30, y1 + 20): LINE -(x1 + 30, y1 + 30): LINE -(x1 + 20, y1 + 30): LINE -(x1 + 20, y1 + 20)
130 IF zz = 3 THEN
LINE (x1 + 10, y1 + 10)-(x1 + 20, y1 + 10): LINE -(x1 + 20, y1 + 40): LINE -(x1 + 10, y1 + 40)
LINE -(x1 + 10, y1 + 30): LINE -(x1 + 40, y1 + 30): LINE -(x1 + 40, y1 + 40): LINE -(x1 + 30, y1 + 40): LINE -(x1 + 30, y1 + 10): LINE -(x1 + 40, y1 + 10)
LINE -(x1 + 40, y1 + 20): LINE -(x1 + 10, y1 + 20): LINE -(x1 + 10, y1 + 10)
END IF
140 IF zz = 4 THEN LINE (x1 + 20, y1 + 20)-(x1 + 30, y1 + 30): LINE (x1 + 20, y1 + 30)-(x1 + 30, y1 + 20)
150 IF zz = 5 THEN
LINE (x1, y1)-(x1 + 50, y1): LINE -(x1 + 50, y1 + 50): LINE -(x1, y1 + 50): LINE -(x1, y1)
LINE (x1 + 10, y1 + 10)-(x1 + 10, y1 + 40): LINE -(x1 + 40, y1 + 40)
LINE -(x1 + 40, y1 + 10): LINE -(x1 + 10, y1 + 10): LINE -(x1 + 40, y1 + 40): LINE (x1 + 10, y1 + 40)-(x1 + 40, y1 + 10)
END IF
160 IF zz = 1 THEN
LINE (x1 + 10, y1 + 50)-(x1 + 10, y1 + 40): LINE -(x1 + 20, y1 + 30): LINE -(x1 + 40, y1 + 30)
LINE -(x1 + 40, y1 + 50): LINE (x1, y1 + 10)-(x1 + 10, y1 + 10): LINE (x1 + 50, y1 + 10)-(x1 + 40, y1 + 10)
LINE (x1, y1 + 40)-(x1 + 10, y1 + 40): LINE (x1 + 40, y1 + 40)-(x1 + 50, y1 + 40)
END IF
170 IF zz = 1 THEN LINE (x1 + 10, y1)-(x1 + 10, y1 + 20): LINE -(x1 + 20, y1 + 20): LINE -(x1 + 20, y1 + 30): LINE -(x1 + 30, y1 + 30): LINE -(x1 + 30, y1 + 10): LINE -(x1 + 40, y1 + 10): LINE -(x1 + 40, y1)
190 NEXT: NEXT: WINDOW: RETURN
200 SCREEN 1: VIEW PRINT 1 TO 21: CLS 2: VIEW PRINT 22 TO 25: WINDOW SCREEN (0, 0)-(279, 199): di = 0: tb = 2
202 ce = dn%(px + dx * di, py + dy * di): le = dn%(px + dx * di + dy, py + dy * di - dx): ri = dn%(px + dx * di - dy, py + dy * di + dx)
204 l1 = pe%(di, 0): r1 = pe%(di, 1): t1 = pe%(di, 2): b1 = pe%(di, 3): l2 = pe%(di + 1, 0): r2 = pe%(di + 1, 1): t2 = pe%(di + 1, 2): b2 = pe%(di + 1, 3)
205 ce = INT(ce): le = INT(le): ri = INT(ri)
206 mc = INT(ce / 10): ce = ce - mc * 10: le = INT((le / 10 - INT(le / 10)) * 10 + .1): ri = INT((ri / 10 - INT(ri / 10)) * 10 + .1)
208 IF di = 0 THEN 216
210 IF ce = 1 OR ce = 3 OR ce = 4 THEN LINE (l1, t1)-(r1, t1): LINE -(r1, b1): LINE -(l1, b1): LINE -(l1, t1)
212 IF ce = 1 OR ce = 3 THEN en = 1: GOTO 260
214 IF ce = 4 THEN LINE (cd%(di, 0), cd%(di, 3))-(cd%(di, 0), cd%(di, 2)): LINE -(cd%(di, 1), cd%(di, 2)): LINE -(cd%(di, 1), cd%(di, 3)): en = 1: GOTO 260
216 IF le = 1 OR le = 3 OR le = 4 THEN LINE (l1, t1)-(l2, t2): LINE (l1, b1)-(l2, b2)
218 IF ri = 1 OR ri = 3 OR ri = 4 THEN LINE (r1, t1)-(r2, t2): LINE (r1, b1)-(r2, b2)
220 IF le = 4 AND di > 0 THEN LINE (ld%(di, 0), ld%(di, 4))-(ld%(di, 0), ld%(di, 2)): LINE -(ld%(di, 1), ld%(di, 3)): LINE -(ld%(di, 1), ld%(di, 5))
222 IF le = 4 AND di = 0 THEN LINE (0, ld%(di, 2) - 3)-(ld%(di, 1), ld%(di, 3)): LINE -(ld%(di, 1), ld%(di, 5))
224 IF ri = 4 AND di > 0 THEN LINE (279 - ld%(di, 0), ld%(di, 4))-(279 - ld%(di, 0), ld%(di, 2)): LINE -(279 - ld%(di, 1), ld%(di, 3)): LINE -(279 - ld%(di, 1), ld%(di, 5))
226 IF ri = 4 AND di = 0 THEN LINE (279, ld%(di, 2) - 3)-(279 - ld%(di, 1), ld%(di, 3)): LINE -(279 - ld%(di, 1), ld%(di, 5))
228 IF le = 3 OR le = 1 OR le = 4 THEN 234
230 IF di <> 0 THEN LINE (l1, t1)-(l1, b1)
232 LINE (l1, t2)-(l2, t2): LINE -(l2, b2): LINE -(l1, b2)
234 IF ri = 3 OR ri = 1 OR ri = 4 THEN 240
236 IF di <> 0 THEN LINE (r1, t1)-(r1, b1)
238 LINE (r1, t2)-(r2, t2): LINE -(r2, b2): LINE -(r1, b2)
240 IF ce = 7 OR ce = 9 THEN LINE (ft%(di, 0), ft%(di, 4))-(ft%(di, 2), ft%(di, 5)): LINE -(ft%(di, 3), ft%(di, 5)): LINE -(ft%(di, 1), ft%(di, 4)): LINE -(ft%(di, 0), ft%(di, 4))
242 IF ce = 8 THEN LINE (ft%(di, 0), 158 - ft%(di, 4))-(ft%(di, 2), 158 - ft%(di, 5)): LINE -(ft%(di, 3), 158 - ft%(di, 5)): LINE -(ft%(di, 1), 158 - ft%(di, 4)): LINE -(ft%(di, 0), 158 - ft%(di, 4))
244 IF ce = 7 OR ce = 8 THEN ba = la%(di, 3): TP = la%(di, 2): LX = la%(di, 0): RX = la%(di, 1): LINE (LX, ba)-(LX, TP): LINE (RX, TP)-(RX, ba)
246 IF ce = 7 OR ce = 8 THEN y1 = (ba * 4 + TP) / 5: Y2 = (ba * 3 + TP * 2) / 5: Y3 = (ba * 2 + TP * 3) / 5: Y4 = (ba + TP * 4) / 5: LINE (LX, y1)-(RX, y1): LINE (LX, Y2)-(RX, Y2): LINE (LX, Y3)-(RX, Y3): LINE (LX, Y4)-(RX, Y4)
248 IF di > 0 AND ce = 5 THEN LINE (139 - 10 / di, pe%(di, 3))-(139 - 10 / di, pe%(di, 3) - 10 / di): LINE -(139 + 10 / di, pe%(di, 3) - 10 / di): LINE -(139 + 10 / di, pe%(di, 3)): LINE -(139 - 10 / di, pe%(di, 3))
249 IF ce = 5 AND di > 0 THEN VIEW PRINT: LOCATE 1, tb: PRINT "CHEST! "; : tb = tb + 8
250 IF di > 0 AND ce = 5 THEN LINE (139 - 10 / di, pe%(di, 3) - 10 / di)-(139 - 5 / di, pe%(di, 3) - 15 / di): LINE -(139 + 15 / di, pe%(di, 3) - 15 / di): LINE -(139 + 15 / di, pe%(di, 3) - 5 / di): LINE -(139 + 10 / di, pe%(di, 3))
252 IF di > 0 AND ce = 5 THEN LINE (139 + 10 / di, pe%(di, 3) - 10 / di)-(139 + 15 / di, pe%(di, 3) - 15 / di)
260 IF mc < 1 THEN 490
265 b = 79 + yy%(di): c = 139
266 IF mc = 8 THEN VIEW PRINT: LOCATE 1, tb: PRINT "CHEST! "; : tb = tb + 8: PRINT : GOTO 269: REM call
267 VIEW PRINT: LOCATE 1, tb: PRINT m$(mc); : tb = tb + LEN(m$(mc)) + 2: PRINT : REM call
269 IF di = 0 THEN 490
270 ON mc GOTO 300, 310, 320, 330, 340, 350, 360, 370, 380, 390
280 GOTO 490
300 LINE (c - 23 / di, b)-(c - 15 / di, b): LINE -(c - 15 / di, b - 15 / di): LINE -(c - 8 / di, b - 30 / di): LINE -(c + 8 / di, b - 30 / di): LINE -(c + 15 / di, b - 15 / di): LINE -(c + 15 / di, b): LINE -(c + 23 / di, b)
301 LINE (c, b - 26 / di)-(c, b - 65 / di): LINE (c - 2 / di + .499, b - 38 / di)-(c + 2 / di + .499, b - 38 / di)
LINE (c - 3 / di + .499, b - 45 / di)-(c + 3 / di + .499, b - 45 / di): LINE (c - 5 / di + .499, b - 53 / di)-(c + 5 / di + .499, b - 53 / di)
302 LINE (c - 23 / di, b - 56 / di)-(c - 30 / di, b - 53 / di): LINE -(c - 23 / di, b - 45 / di): LINE -(c - 23 / di, b - 53 / di): LINE -(c - 8 / di, b - 38 / di)
303 LINE (c - 15 / di, b - 45 / di)-(c - 8 / di, b - 60 / di): LINE -(c + 8 / di, b - 60 / di): LINE -(c + 15 / di, b - 45 / di)
LINE -(c + 15 / di, b - 42 / di): LINE -(c + 15 / di, b - 57 / di): LINE (c + 12 / di, b - 45 / di)-(c + 20 / di, b - 45 / di)
304 LINE (c, b - 75 / di)-(c - 5 / di + .499, b - 80 / di): LINE -(c - 8 / di, b - 75 / di): LINE -(c - 5 / di + .499, b - 65 / di)
LINE -(c + 5 / di + .499, b - 65 / di): LINE -(c + 5 / di + .499, b - 68 / di): LINE -(c - 5 / di + .499, b - 68 / di): LINE -(c - 5 / di + .499, b - 65 / di)
305 LINE -(c + 5 / di + .499, b - 65 / di): LINE -(c + 8 / di, b - 75 / di): LINE -(c + 5 / di + .499, b - 80 / di): LINE -(c - 5 / di + .499, b - 80 / di): PSET (c - 5 / di + .499, b - 72 / di): PSET (c + 5 / di + .499, b - 72 / di)
309 GOTO 490
310 LINE (c, b - 56 / di)-(c, b - 8 / di): LINE -(c + 10 / di, b): LINE -(c + 30 / di, b): LINE -(c + 30 / di, b - 45 / di): LINE -(c + 10 / di, b - 64 / di): LINE -(c, b - 56 / di)
311 LINE -(c - 10 / di, b - 64 / di): LINE -(c - 30 / di, b - 45 / di): LINE -(c - 30 / di, b): LINE -(c - 10 / di, b): LINE -(c, b - 8 / di)
312 LINE (c - 10 / di, b - 64 / di)-(c - 10 / di, b - 75 / di): LINE -(c, b - 83 / di)
LINE -(c + 10 / di, b - 75 / di): LINE -(c, b - 79 / di): LINE -(c - 10 / di, b - 75 / di): LINE -(c, b - 60 / di)
LINE -(c + 10 / di, b - 75 / di): LINE -(c + 10 / di, b - 64 / di)
319 GOTO 490
320 LINE (c + 5 / di, b - 30 / di)-(c, b - 25 / di): LINE -(c - 5 / di, b - 30 / di): LINE -(c - 15 / di, b - 5 / di): LINE -(c - 10 / di, b): LINE -(c + 10 / di, b): LINE -(c + 15 / di, b - 5 / di)
321 LINE -(c + 20 / di, b - 5 / di): LINE -(c + 10 / di, b): LINE -(c + 15 / di, b - 5 / di)
LINE -(c + 5 / di, b - 30 / di): LINE -(c + 10 / di, b - 40 / di): LINE -(c + 3 / di + .499, b - 35 / di)
LINE -(c - 3 / di + .499, b - 35 / di): LINE -(c - 10 / di, b - 40 / di): LINE -(c - 5 / di, b - 30 / di)
322 LINE (c - 5 / di, b - 33 / di)-(c - 3 / di + .499, b - 30 / di): LINE (c + 5 / di, b - 33 / di)-(c + 3 / di + .499, b - 30 / di): LINE (c - 5 / di, b - 20 / di)-(c - 5 / di, b - 15 / di)
323 LINE (c + 5 / di, b - 20 / di)-(c + 5 / di, b - 15 / di): LINE (c - 7 / di, b - 20 / di)-(c - 7 / di, b - 15 / di): LINE (c + 7 / di, b - 20 / di)-(c + 7 / di, b - 15 / di)
329 GOTO 490
330 LINE (c, b)-(c - 15 / di, b): LINE -(c - 8 / di, b - 8 / di): LINE -(c - 8 / di, b - 15 / di): LINE -(c - 15 / di, b - 23 / di): LINE -(c - 15 / di, b - 15 / di): LINE -(c - 23 / di, b - 23 / di)
331 LINE -(c - 23 / di, b - 45 / di): LINE -(c - 15 / di, b - 53 / di): LINE -(c - 8 / di, b - 53 / di): LINE -(c - 15 / di, b - 68 / di): LINE -(c - 8 / di, b - 75 / di): LINE -(c, b - 75 / di)
332 LINE (c, b)-(c + 15 / di, b): LINE -(c + 8 / di, b - 8 / di): LINE -(c + 8 / di, b - 15 / di): LINE -(c + 15 / di, b - 23 / di): LINE -(c + 15 / di, b - 15 / di): LINE -(c + 23 / di, b - 23 / di)
333 LINE -(c + 23 / di, b - 45 / di): LINE -(c + 15 / di, b - 53 / di): LINE -(c + 8 / di, b - 53 / di): LINE -(c + 15 / di, b - 68 / di): LINE -(c + 8 / di, b - 75 / di): LINE -(c, b - 75 / di)
334 LINE (c - 15 / di, b - 68 / di)-(c + 15 / di, b - 68 / di): LINE (c - 8 / di, b - 53 / di)-(c + 8 / di, b - 53 / di): LINE (c - 23 / di, b - 15 / di)-(c + 8 / di, b - 45 / di)
335 LINE (c - 8 / di, b - 68 / di)-(c, b - 60 / di): LINE -(c + 8 / di, b - 68 / di): LINE -(c + 8 / di, b - 60 / di): LINE -(c - 8 / di, b - 60 / di): LINE -(c - 8 / di, b - 68 / di)
336 LINE (c, b - 38 / di)-(c - 8 / di, b - 38 / di): LINE -(c + 8 / di, b - 53 / di): LINE -(c + 8 / di, b - 45 / di): LINE -(c + 15 / di, b - 45 / di): LINE -(c, b - 30 / di): LINE -(c, b - 38 / di)
339 GOTO 490
340 LINE (c - 10 / di, b - 15 / di)-(c - 10 / di, b - 30 / di): LINE -(c - 15 / di, b - 20 / di): LINE -(c - 15 / di, b - 15 / di): LINE -(c - 15 / di, b): LINE -(c + 15 / di, b): LINE -(c + 15 / di, b - 15 / di): LINE -(c - 15 / di, b - 15 / di)
341 LINE (c - 15 / di, b - 10 / di)-(c + 15 / di, b - 10 / di): LINE (c - 15 / di, b - 5 / di)-(c + 15 / di, b - 5 / di)
342 LINE (c, b - 15 / di)-(c - 5 / di, b - 20 / di): LINE -(c - 5 / di, b - 35 / di): LINE -(c + 5 / di, b - 35 / di): LINE -(c + 5 / di, b - 20 / di): LINE -(c + 10 / di, b - 15 / di)
343 LINE (c - 5 / di, b - 20 / di)-(c + 5 / di, b - 20 / di): LINE (c - 5 / di, b - 25 / di)-(c + 5 / di, b - 25 / di): LINE (c - 5 / di, b - 30 / di)-(c + 5 / di, b - 30 / di)
344 LINE (c - 10 / di, b - 35 / di)-(c - 10 / di, b - 40 / di): LINE -(c - 5 / di, b - 45 / di): LINE -(c + 5 / di, b - 45 / di): LINE -(c + 10 / di, b - 40 / di): LINE -(c + 10 / di, b - 35 / di)
345 LINE (c - 10 / di, b - 40 / di)-(c, b - 45 / di): LINE -(c + 10 / di, b - 40 / di)
346 LINE (c - 5 / di, b - 40 / di)-(c + 5 / di, b - 40 / di): LINE -(c + 15 / di, b - 30 / di): LINE -(c, b - 40 / di): LINE -(c - 15 / di, b - 30 / di): LINE -(c - 5 / di + .499, b - 40 / di)
349 GOTO 490
350 LINE (c - 20 / di, 79 - yy%(di))-(c - 20 / di, b - 88 / di): LINE -(c - 10 / di, b - 83 / di): LINE -(c + 10 / di, b - 83 / di): LINE -(c + 20 / di, b - 88 / di): LINE -(c + 20 / di, 79 - yy%(di)): LINE -(c - 20 / di, 79 - yy%(di))
351 LINE (c - 20 / di, b - 88 / di)-(c - 30 / di, b - 83 / di): LINE -(c - 30 / di, b - 78 / di): LINE (c + 20 / di, b - 88 / di)-(c + 30 / di, b - 83 / di): LINE -(c + 40 / di, b - 83 / di)
352 LINE (c - 15 / di, b - 86 / di)-(c - 20 / di, b - 83 / di): LINE -(c - 20 / di, b - 78 / di): LINE -(c - 30 / di, b - 73 / di): LINE -(c - 30 / di, b - 68 / di): LINE -(c - 20 / di, b - 63 / di)
353 LINE (c - 10 / di, b - 83 / di)-(c - 10 / di, b - 58 / di): LINE -(c, b - 50 / di): LINE (c + 10 / di, b - 83 / di)-(c + 10 / di, b - 78 / di): LINE -(c + 20 / di, b - 73 / di): LINE -(c + 20 / di, b - 40 / di)
354 LINE (c + 15 / di, b - 85 / di)-(c + 20 / di, b - 78 / di): LINE -(c + 30 / di, b - 76 / di): LINE -(c + 30 / di, b - 60 / di)
355 LINE (c, b - 83 / di)-(c, b - 73 / di): LINE -(c + 10 / di, b - 68 / di): LINE -(c + 10 / di, b - 63 / di): LINE -(c, b - 58 / di)
359 GOTO 490
360 LINE (c + 5 / di + .499, b - 10 / di)-(c - 5 / di + .499, b - 10 / di): LINE -(c, b - 15 / di): LINE -(c + 10 / di, b - 20 / di): LINE -(c + 5 / di + .499, b - 15 / di): LINE -(c + 5 / di + .499, b - 10 / di)
361 LINE -(c + 7 / di + .499, b - 6 / di): LINE -(c + 5 / di + .499, b - 3 / di): LINE -(c - 5 / di + .499, b - 3 / di): LINE -(c - 7 / di + .499, b - 6 / di): LINE -(c - 5 / di + .499, b - 10 / di)
362 LINE (c + 2 / di + .499, b - 3 / di)-(c + 5 / di + .499, b): LINE -(c + 8 / di, b)
LINE (c - 2 / di + .499, b - 3 / di)-(c - 5 / di + .499, b): LINE -(c - 8 / di, b): PSET (c + 3 / di + .499, b - 8 / di)
PSET (c - 3 / di + .499, b - 8 / di): LINE (c + 3 / di + .499, b - 5 / di)-(c - 3 / di + .499, b - 5 / di)
363 GOTO 490
370 LINE (139 - 10 / di, pe%(di, 3))-(139 - 10 / di, pe%(di, 3) - 10 / di): LINE -(139 + 10 / di, pe%(di, 3) - 10 / di): LINE -(139 + 10 / di, pe%(di, 3)): LINE -(139 - 10 / di, pe%(di, 3))
371 LINE (139 - 10 / di, pe%(di, 3) - 10 / di)-(139 - 5 / di, pe%(di, 3) - 15 / di): LINE -(139 + 15 / di, pe%(di, 3) - 15 / di): LINE -(139 + 15 / di, pe%(di, 3) - 5 / di): LINE -(139 + 10 / di, pe%(di, 3))
372 LINE (139 + 10 / di, pe%(di, 3) - 10 / di)-(139 + 15 / di, pe%(di, 3) - 15 / di)
373 GOTO 490
380 LINE (c - 14 / di, b - 46 / di)-(c - 12 / di, b - 37 / di): LINE -(c - 20 / di, b - 32 / di): LINE -(c - 30 / di, b - 32 / di)
LINE -(c - 22 / di, b - 24 / di): LINE -(c - 40 / di, b - 17 / di): LINE -(c - 40 / di, b - 7 / di): LINE -(c - 38 / di, b - 5 / di)
LINE -(c - 40 / di, b - 3 / di): LINE -(c - 40 / di, b)
381 LINE -(c - 36 / di, b): LINE -(c - 34 / di, b - 2 / di): LINE -(c - 32 / di, b): LINE -(c - 28 / di, b)
LINE -(c - 28 / di, b - 3 / di): LINE -(c - 30 / di, b - 5 / di): LINE -(c - 28 / di, b - 7 / di)
LINE -(c - 28 / di, b - 15 / di): LINE -(c, b - 27 / di)
382 LINE (c + 14 / di, b - 46 / di)-(c + 12 / di, b - 37 / di): LINE -(c + 20 / di, b - 32 / di)
LINE -(c + 30 / di, b - 32 / di): LINE -(c + 22 / di, b - 24 / di): LINE -(c + 40 / di, b - 17 / di)
LINE -(c + 40 / di, b - 7 / di): LINE -(c + 38 / di, b - 5 / di): LINE -(c + 40 / di, b - 3 / di): LINE -(c + 40 / di, b)
383 LINE -(c + 36 / di, b): LINE -(c + 34 / di, b - 2 / di): LINE -(c + 32 / di, b): LINE -(c + 28 / di, b)
LINE -(c + 28 / di, b - 3 / di): LINE -(c + 30 / di, b - 5 / di): LINE -(c + 28 / di, b - 7 / di)
LINE -(c + 28 / di, b - 15 / di): LINE -(c, b - 27 / di)
384 LINE (c + 6 / di, b - 48 / di)-(c + 38 / di, b - 41 / di): LINE -(c + 40 / di, b - 42 / di): LINE -(c + 18 / di, b - 56 / di)
LINE -(c + 12 / di, b - 56 / di): LINE -(c + 10 / di, b - 57 / di): LINE -(c + 8 / di, b - 56 / di): LINE -(c - 8 / di, b - 56 / di)
LINE -(c - 10 / di, b - 58 / di): LINE -(c + 14 / di, b - 58 / di): LINE -(c + 16 / di, b - 59 / di)
385 LINE -(c + 8 / di, b - 63 / di): LINE -(c + 6 / di, b - 63 / di): LINE -(c + 2 / di + .499, b - 70 / di)
LINE -(c + 2 / di + .499, b - 63 / di): LINE -(c - 2 / di + .499, b - 63 / di): LINE -(c - 2 / di + .499, b - 70 / di)
LINE -(c - 6 / di, b - 63 / di): LINE -(c - 8 / di, b - 63 / di): LINE -(c - 16 / di, b - 59 / di): LINE -(c - 14 / di, b - 58 / di)
386 LINE -(c - 10 / di, b - 57 / di): LINE -(c - 12 / di, b - 56 / di): LINE -(c - 18 / di, b - 56 / di): LINE -(c - 36 / di, b - 47 / di)
LINE -(c - 36 / di, b - 39 / di): LINE -(c - 28 / di, b - 41 / di): LINE -(c - 28 / di, b - 46 / di): LINE -(c - 20 / di, b - 50 / di)
LINE -(c - 18 / di, b - 50 / di): LINE -(c - 14 / di, b - 46 / di)
387 GOTO 3087
390 LINE (c + 6 / di, b - 60 / di)-(c + 30 / di, b - 90 / di): LINE -(c + 60 / di, b - 30 / di): LINE -(c + 60 / di, b - 10 / di): LINE -(c + 30 / di, b - 40 / di): LINE -(c + 15 / di, b - 40 / di)
391 LINE (c - 6 / di, b - 60 / di)-(c - 30 / di, b - 90 / di): LINE -(c - 60 / di, b - 30 / di): LINE -(c - 60 / di, b - 10 / di): LINE -(c - 30 / di, b - 40 / di): LINE -(c - 15 / di, b - 40 / di)
392 LINE (c, b - 25 / di)-(c + 6 / di, b - 25 / di): LINE -(c + 10 / di, b - 20 / di): LINE -(c + 12 / di, b - 10 / di): LINE -(c + 10 / di, b - 6 / di)
LINE -(c + 10 / di, b): LINE -(c + 14 / di, b): LINE -(c + 15 / di, b - 5 / di): LINE -(c + 16 / di, b): LINE -(c + 20 / di, b)
393 LINE -(c + 20 / di, b - 6 / di): LINE -(c + 18 / di, b - 10 / di): LINE -(c + 18 / di, b - 20 / di): LINE -(c + 15 / di, b - 30 / di): LINE -(c + 15 / di, b - 45 / di): LINE -(c + 40 / di, b - 60 / di): LINE -(c + 40 / di, b - 70 / di)
394 LINE -(c + 10 / di, b - 55 / di): LINE -(c + 6 / di, b - 60 / di): LINE -(c + 10 / di, b - 74 / di): LINE -(c + 6 / di, b - 80 / di)
LINE -(c + 4 / di + .499, b - 80 / di): LINE -(c + 3 / di + .499, b - 82 / di): LINE -(c + 2 / di + .499, b - 80 / di): LINE -(c, b - 80 / di)
395 LINE (c, b - 25 / di)-(c - 6 / di, b - 25 / di): LINE -(c - 10 / di, b - 20 / di): LINE -(c - 12 / di, b - 10 / di): LINE -(c - 10 / di, b - 6 / di)
LINE -(c - 10 / di, b): LINE -(c - 14 / di, b): LINE -(c - 15 / di, b - 5 / di): LINE -(c - 16 / di, b): LINE -(c - 20 / di, b)
396 LINE -(c - 20 / di, b - 6 / di): LINE -(c - 18 / di, b - 10 / di): LINE -(c - 18 / di, b - 20 / di): LINE -(c - 15 / di, b - 30 / di): LINE -(c - 15 / di, b - 45 / di): LINE -(c - 40 / di, b - 60 / di): LINE -(c - 40 / di, b - 70 / di)
397 LINE -(c - 10 / di, b - 55 / di): LINE -(c - 6 / di, b - 60 / di): LINE -(c - 10 / di, b - 74 / di): LINE -(c - 6 / di, b - 80 / di)
LINE -(c - 4 / di + .499, b - 80 / di): LINE -(c - 3 / di + .499, b - 82 / di): LINE -(c - 2 / di + .499, b - 80 / di): LINE -(c, b - 80 / di)
398 LINE (c - 6 / di, b - 25 / di)-(c, b - 6 / di): LINE -(c + 10 / di, b): LINE -(c + 4 / di + .499, b - 8 / di): LINE -(c + 6 / di, b - 25 / di)
LINE (c - 40 / di, b - 64 / di)-(c - 40 / di, b - 90 / di): LINE -(c - 52 / di, b - 80 / di): LINE -(c - 52 / di, b - 40 / di)
399 LINE (c + 40 / di, b - 86 / di)-(c + 38 / di, b - 92 / di): LINE -(c + 42 / di, b - 92 / di): LINE -(c + 40 / di, b - 86 / di): LINE -(c + 40 / di, b - 50 / di)
400 LINE (c + 4 / di + .499, b - 70 / di)-(c + 6 / di, b - 74 / di): LINE (c - 4 / di + .499, b - 70 / di)-(c - 6 / di, b - 74 / di): LINE (c, b - 64 / di)-(c, b - 60 / di): GOTO 490
490 IF en = 1 THEN en = 0: WINDOW: RETURN
491 di = di + 1: GOTO 202
500 RANDOMIZE -ABS(ln) - tx * 10 - ty * 1000 + in * 31.4
501 FOR x = 1 TO 9: FOR y = 1 TO 9: dn%(x, y) = 0: NEXT: NEXT
510 FOR x = 0 TO 10: dn%(x, 0) = 1: dn%(x, 10) = 1: dn%(0, x) = 1: dn%(10, x) = 1: NEXT
520 FOR x = 2 TO 8 STEP 2: FOR y = 1 TO 9: dn%(x, y) = 1: NEXT: NEXT
530 FOR x = 2 TO 8 STEP 2: FOR y = 1 TO 9 STEP 2
540 IF RND(1) > .95 THEN dn%(x, y) = 2
541 IF RND(1) > .95 THEN dn%(y, x) = 2
542 IF RND(1) > .6 THEN dn%(y, x) = 3
543 IF RND(1) > .6 THEN dn%(x, y) = 3
544 IF RND(1) > .6 THEN dn%(x, y) = 4
545 IF RND(1) > .6 THEN dn%(y, x) = 4
546 IF RND(1) > .97 THEN dn%(y, x) = 9
547 IF RND(1) > .97 THEN dn%(x, y) = 9
548 IF RND(1) > .94 THEN dn%(x, y) = 5
549 IF RND(1) > .94 THEN dn%(y, x) = 5
568 NEXT: NEXT
569 dn%(2, 1) = 0: IF in / 2 = INT(in / 2) THEN dn%(7, 3) = 7: dn%(3, 7) = 8
570 IF in / 2 <> INT(in / 2) THEN dn%(7, 3) = 8: dn%(3, 7) = 7
580 IF in = 1 THEN dn%(1, 1) = 8: dn%(7, 3) = 0
585 GOSUB 2000
590 RETURN
1000 DO: LOOP UNTIL INKEY$ = "": VIEW PRINT 22 TO 25: LOCATE 25, 1: PRINT "COMMAND? "; : LOCATE CSRLIN, 10
1001 x$ = INKEY$: IF x$ = "" THEN 1001
1002 IF ASC(x$) = 0 THEN xq = ASC(MID$(x$, 2)) ELSE xq = 0
1010 REM poke -16368, 0
1030 IF xq = 72 THEN ON SGN(in) + 1 GOTO 1100, 1150
1040 IF xq = 77 THEN ON SGN(in) + 1 GOTO 1200, 1250
1050 IF xq = 75 THEN ON SGN(in) + 1 GOTO 1300, 1350
1060 IF xq = 80 THEN ON SGN(in) + 1 GOTO 1400, 1450
1070 IF x$ = "g" OR x$ = CHR$(13) OR x$ = "e" OR x$ = "k" OR x$ = "d" THEN ON SGN(in) + 1 GOTO 1500, 1550
1080 IF x$ = "a" OR x$ = "u" OR x$ = "c" THEN ON SGN(in) + 1 GOTO 1600, 1650
1081 IF x$ = " " THEN PRINT "PASS": GOTO 1090
1085 IF x$ = "i" OR x$ = "z" OR x$ = "y" THEN 1700
1086 IF x$ = "p" THEN IF pa = 1 THEN pa = 0: PRINT "PAUSE OFF": GOTO 1000
1087 IF x$ = "p" THEN IF pa = 0 THEN pa = 1: PRINT "PAUSE ON": GOTO 1000
1089 PRINT "HUH?": GOTO 1000
1090 pw(0) = pw(0) - 1 + SGN(in) * .9: IF pw(0) < 0 THEN c(0) = 0: PRINT : PRINT "YOU HAVE STARVED!!!!!": GOTO 1093
1091 FOR jj = 0 TO 2: LOCATE 22 + jj, 30: PRINT " "; : NEXT
LOCATE 22, 30: PRINT "FOOD="; LTRIM$(STR$(pw(0))); : LOCATE 23, 30: PRINT "H.P.="; LTRIM$(STR$(c(0)));
LOCATE 24, 30: PRINT "GOLD="; LTRIM$(STR$(c(5))); : LOCATE 24, 1: REM call -868
1092 pw(0) = INT(pw(0) * 10) / 10
1093 IF c(0) <= 0 THEN SLEEP 3: GOTO 6000
1095 IF in > 0 THEN GOSUB 4000: IF c(0) <= 0 THEN 1093
1096 FOR jj = 0 TO 3: LOCATE 22 + jj, 30: PRINT " "; : NEXT: LOCATE 22, 30: PRINT "FOOD="; LTRIM$(STR$(pw(0))); : LOCATE 23, 30: PRINT "H.P.="; LTRIM$(STR$(c(0))); : LOCATE 24, 30: PRINT "GOLD="; LTRIM$(STR$(c(5))); : LOCATE 24, 1
1097 IF in = 0 THEN GOSUB 100: GOTO 1000
1098 IF in > 0 THEN GOSUB 200: GOTO 1000
1100 PRINT "NORTH": IF te%(tx, ty - 1) = 1 THEN PRINT "YOU CAN'T PASS THE MOUNTAINS": GOTO 1090
1110 ty = ty - 1: GOTO 1090
1150 IF dn%(px + dx, py + dy) <> 1 AND dn%(px + dx, py + dy) < 10 THEN px = px + dx: py = py + dy
1155 PRINT "FORWARD"
1160 IF dn%(px, py) = 2 THEN PRINT "AAARRRGGGHHH!!! A TRAP!": c(0) = c(0) - INT(RND(1) * in + 3): MR = 1: in = in + 1: PRINT "FALLING TO LEVEL "; in: SLEEP 2: GOSUB 500: GOTO 1090
1165 z = 0
1170 IF dn%(px, py) = 5 THEN dn%(px, py) = 0: PRINT "GOLD!!!!!": z = INT(RND(1) * 5 * in + in): PRINT z; "-PIECES OF EIGHT": c(5) = c(5) + z
1175 IF z > 0 THEN z = INT(RND(1) * 6): PRINT "AND A "; w$(z): pw(z) = pw(z) + 1: SLEEP 1: GOTO 1090
1190 GOTO 1090
1200 PRINT "EAST": IF te%(tx + 1, ty) = 1 THEN PRINT "YOU CAN'T PASS THE MOUNTAINS": GOTO 1090
1210 tx = tx + 1: GOTO 1090
1250 PRINT "TURN RIGHT"
1255 IF dx <> 0 THEN dy = dx: dx = 0: GOTO 1090
1260 dx = -dy: dy = 0: GOTO 1090
1300 PRINT "WEST": IF te%(tx - 1, ty) = 1 THEN PRINT "YOU CAN'T PASS THE MOUNTAINS": GOTO 1090
1310 tx = tx - 1: GOTO 1090
1350 PRINT "TURN LEFT"
1355 IF dx <> 0 THEN dy = -dx: dx = 0: GOTO 1090
1360 dx = dy: dy = 0: GOTO 1090
1400 PRINT "SOUTH": IF te%(tx, ty + 1) = 1 THEN PRINT "YOU CAN'T PASS THE MOUNTAINS": GOTO 1090
1410 ty = ty + 1: GOTO 1090
1450 PRINT "TURN AROUND": dx = -dx: dy = -dy: GOTO 1090
1500 IF te%(tx, ty) = 3 THEN GOSUB 60080: GOSUB 60200: CLS : GOTO 1090
1510 IF te%(tx, ty) = 4 AND in = 0 THEN PRINT "GO DUNGEON": PRINT "PLEASE WAIT ": SLEEP 1: in = 1: GOSUB 500: dx = 1: dy = 0: px = 1: py = 1: CLS : GOTO 1090
1515 IF te%(tx, ty) = 5 THEN 7000
1520 PRINT "HUH?": GOTO 1000
1550 IF dn%(px, py) <> 7 AND dn%(px, py) <> 9 THEN 1580
1555 PRINT "GO DOWN TO LEVEL "; in + 1
1560 in = in + 1: GOSUB 500: MR = 1: GOTO 1090
1580 IF dn%(px, py) <> 8 THEN PRINT "HUH?": GOTO 1090
1581 IF in = 1 THEN PRINT "LEAVE DUNGEON": in = 0: GOTO 1586
1584 PRINT "GO UP TO LEVEL "; in - 1
1585 in = in - 1: GOSUB 500: MR = 1
1586 IF in = 0 THEN PRINT "THOU HAST GAINED": PRINT lk; " HIT POINTS": SLEEP 2: c(0) = c(0) + lk: lk = 0
1587 CLS : GOTO 1090
1600 GOTO 1090
1650 mn = 0: da = 0: PRINT "ATTACK ": PRINT "WHICH WEAPON "; : DO: q$ = INKEY$: LOOP WHILE q$ = ""
1651 IF q$ = "r" THEN da = 10: PRINT "RAPIER": IF pw(1) < 1 THEN PRINT "NOT OWNED": GOTO 1650
1652 IF q$ = "a" THEN da = 5: PRINT "AXE": IF pw(2) < 1 THEN PRINT "NOT OWNED": GOTO 1650
1653 IF q$ = "s" THEN da = 1: PRINT "SHIELD": IF pw(3) < 1 THEN PRINT "NOT OWNED": GOTO 1650
1654 IF q$ = "b" THEN da = 4: PRINT "BOW": IF pw(4) < 1 THEN PRINT "NOT OWNED": GOTO 1650
1655 IF q$ = "m" THEN PRINT "MAGIC AMULET": GOTO 1680
1656 IF q$ = "b" AND pt$ = "m" THEN PRINT "MAGES CAN'T USE BOWS!": GOTO 1650
1657 IF q$ = "r" AND pt$ = "m" THEN PRINT "MAGES CAN'T USE RAPIERS!": GOTO 1650
1659 IF da = 0 THEN PRINT "HANDS"
1660 IF da = 5 OR da = 4 THEN 1670
1661 mn = dn%(px + dx, py + dy) / 10: mn = INT(mn)
1662 IF mn < 1 OR c(2) - RND(1) * 25 < mn + in THEN PRINT " YOU MISSED": GOTO 1668
1663 PRINT "HIT!!! ": da = (RND(1) * da + c(1) / 5): mz%(mn, 1) = INT(mz%(mn, 1) - da)
1664 PRINT m$(mn); "'S HIT POINTS="; mz%(mn, 1)
1665 IF mz%(mn, 1) < 1 THEN PRINT "THOU HAST KILLED A "; m$(mn): PRINT "THOU SHALT RECEIVE": da = INT(mn + in): PRINT da; " PIECES OF EIGHT"
1666 IF mz%(mn, 1) < 1 THEN c(5) = INT(c(5) + da): dn%(ml%(mn, 0), ml%(mn, 1)) = dn%(ml%(mn, 0), ml%(mn, 1)) - 10 * mn: mz%(mn, 0) = 0
1667 lk = lk + INT(mn * in / 2): IF mn = ta THEN ta = -ta
1668 IF pa = 1 THEN PRINT "-CR- TO CONT. "; : INPUT q$
1669 SLEEP 1: GOTO 1090
1670 IF da = 5 THEN PRINT "TO THROW OR SWING:"; : DO: q$ = INKEY$: LOOP WHILE q$ = "": IF q$ <> "t" THEN PRINT "SWING": GOTO 1661
1671 IF da = 5 THEN PRINT "THROW": pw(2) = pw(2) - 1
1672 FOR y = 1 TO 5: IF px + dx * y < 1 OR px + dx * y > 9 OR py + dy * y > 9 OR py + dy * y < 0 THEN 1662
1673 mn = dn%(px + dx * y, py + dy * y): mn = INT(mn / 10): IF mn > 0 THEN 1662
1674 NEXT: GOTO 1662
1680 IF pw(5) < 1 THEN PRINT "NONE OWNED": GOTO 1650
1681 IF pt$ = "f" THEN q = INT(RND(1) * 4 + 1): GOTO 1685
1682 PRINT "1-LADDER-UP", "2-LADDER-DN": PRINT "3-KILL", "4-BAD??": PRINT "CHOICE "; : DO: q$ = INKEY$: LOOP WHILE q$ = "": q = VAL(q$): PRINT q: IF q < 1 OR q > 4 THEN 1682
1683 IF RND(1) > .75 THEN PRINT "LAST CHARGE ON THIS AMULET!": pw(5) = pw(5) - 1
1685 ON q GOTO 1686, 1690, 1691, 1692
1686 PRINT "LADDER UP": dn%(px, py) = 8: SLEEP 1: GOTO 1090
1690 PRINT "LADDER DOWN": dn%(px, py) = 7: SLEEP 1: GOTO 1090
1691 PRINT "MAGIC ATTACK": da = 10 + in: GOTO 1672
1692 ON INT(RND(1) * 3 + 1) GOTO 1693, 1695, 1697
1693 PRINT "YOU HAVE BEEN TURNED": PRINT "INTO A TOAD!"
1694 FOR z2 = 1 TO 4: c(z2) = 3: NEXT z2: SLEEP 3: GOTO 1090
1695 PRINT "YOU HAVE BEEN TURNED": PRINT "INTO A LIZARD MAN": FOR y = 0 TO 4: c(y) = INT(c(y) * 2.5): NEXT: SLEEP 3: GOTO 1090
1697 PRINT "BACKFIRE": c(0) = c(0) / 2: SLEEP 2: GOTO 1090
1700 GOSUB 60080: LOCATE 1, 1: PRINT "PRESS -CR- TO CONTINUE"; : INPUT q$: SCREEN 1: CLS : GOTO 1090
2000 nm = 0: FOR x = 1 TO 10
2005 mz%(x, 0) = 0: mz%(x, 1) = x + 3 + in
2010 IF x - 2 > in OR RND(1) > .4 THEN 2090
2020 ml%(x, 0) = INT(RND(1) * 9 + 1): ml%(x, 1) = INT(RND(1) * 9 + 1)
2030 IF dn%(ml%(x, 0), ml%(x, 1)) <> 0 THEN 2020
2040 IF ml%(x, 0) = px AND ml%(x, 1) = py THEN 2020
2050 dn%(ml%(x, 0), ml%(x, 1)) = x * 10
2051 mz%(x, 0) = 1
2052 nm = nm + 1
2055 mz%(x, 1) = x * 2 + in * 2 * lp
2090 NEXT: RETURN
3087 LINE (c - 28 / di, b - 41 / di)-(c + 30 / di, b - 55 / di): LINE (c + 28 / di, b - 58 / di)-(c + 22 / di, b - 56 / di): LINE -(c + 22 / di, b - 53 / di)
LINE -(c + 28 / di, b - 52 / di): LINE -(c + 34 / di, b - 54 / di): LINE (c + 20 / di, b - 50 / di)-(c + 26 / di, b - 47 / di)
3088 LINE (c + 10 / di, b - 58 / di)-(c + 10 / di, b - 61 / di): LINE -(c + 4 / di, b - 58 / di): LINE (c - 10 / di, b - 58 / di)-(c - 10 / di, b - 61 / di)
LINE -(c - 4 / di, b - 58 / di): LINE (c + 40 / di, b - 9 / di)-(c + 50 / di, b - 12 / di): LINE -(c + 40 / di, b - 7 / di)
3089 LINE (c - 8 / di, b - 25 / di)-(c + 6 / di, b - 7 / di): LINE -(c + 28 / di, b - 7 / di): LINE -(c + 28 / di, b - 9 / di): LINE -(c + 20 / di, b - 9 / di): LINE -(c + 6 / di, b - 25 / di): GOTO 490
4000 FOR mm = 1 TO 10: IF mz%(mm, 0) = 0 THEN 4999
4010 ra = SQR((px - ml%(mm, 0)) ^ 2 + (py - ml%(mm, 1)) ^ 2)
4011 IF mz%(mm, 1) < in * lp THEN 4030
4020 IF ra < 1.3 THEN 4500
4025 IF mm = 8 AND ra < 3 THEN 4999
4030 x1 = SGN(px - ml%(mm, 0)): y1 = SGN(py - ml%(mm, 1))
4031 IF mz%(mm, 1) < in * lp THEN x1 = -x1: y1 = -y1
4035 IF y1 = 0 THEN 4045
4040 d = dn%(ml%(mm, 0), (ml%(mm, 1) + y1 + .499)): IF d = 1 OR d > 9 OR d = 2 THEN 4045
4042 x1 = 0: GOTO 4050
4045 y1 = 0: IF x1 = 0 THEN 4050
4046 d = dn%((ml%(mm, 0) + x1 + .499), ml%(mm, 1)): IF d = 1 OR d > 9 OR d = 2 THEN x1 = 0: GOTO 4081
4050 dn%(ml%(mm, 0), ml%(mm, 1)) = dn%(ml%(mm, 0), ml%(mm, 1)) - 10 * mm
4055 IF ml%(mm, 0) + x1 = px AND ml%(mm, 1) + y1 = py THEN 4999
4060 ml%(mm, 0) = ml%(mm, 0) + x1: ml%(mm, 1) = ml%(mm, 1) + y1
4080 dn%(ml%(mm, 0), ml%(mm, 1)) = (dn%(ml%(mm, 0), ml%(mm, 1)) + 10 * mm + .499)
4081 IF x1 <> 0 OR y1 <> 0 THEN 4999
4082 IF mz%(mm, 1) < in * lp AND ra < 1.3 THEN 4500
4083 IF mz%(mm, 1) < in * lp THEN mz%(mm, 1) = mz%(mm, 1) + mm + in
4499 GOTO 4999
4500 IF mm = 2 OR mm = 7 THEN 4600
4509 PRINT "YOU ARE BEING ATTACKED": PRINT "BY A "; m$(mm)
4510 IF RND(1) * 20 - SGN(pw(3)) - c(3) + mm + in < 0 THEN PRINT "MISSED": GOTO 4525
4520 PRINT "HIT": c(0) = c(0) - INT(RND(1) * mm + in)
4525 IF pa = 1 THEN PRINT "-CR- TO CONT. "; : INPUT q$
4530 GOTO 4999
4600 IF RND(1) < .5 THEN 4509
4610 IF mm = 7 THEN pw(0) = INT(pw(0) / 2): PRINT "A GREMLIN STOLE SOME FOOD": GOTO 4525
4620 zz = INT(RND(1) * 6): IF pw(zz) < 1 THEN 4620
4630 PRINT "A THIEF STOLE A "; w$(zz): pw(zz) = pw(zz) - 1: GOTO 4525
4999 NEXT: RETURN
6000 VIEW PRINT: CLS : PRINT : PRINT : PRINT " WE MOURN THE PASSING OF"
6005 IF LEN(pn$) > 22 THEN pn$ = ""
6010 IF pn$ = "" THEN pn$ = "THE PEASANT"
6020 pn$ = pn$ + " AND HIS COMPUTER"
6030 PRINT TAB(20 - INT(LEN(pn$) / 2)); : PRINT pn$
6035 PRINT " TO INVOKE A MIRACLE OF RESSURECTION"
6040 PRINT " <HIT ESC KEY>";
6050 DO: LOOP UNTIL INKEY$ = CHR$(27)
6060 GOTO 1
7000 SCREEN 1: VIEW PRINT: CLS
7001 REM
7010 IF pn$ <> "" THEN 7500
7020 PRINT : PRINT : PRINT " WELCOME PEASANT INTO THE HALLS OF": PRINT "THE MIGHTY LORD BRITISH. HEREIN THOU MAYCHOOSE TO DARE BATTLE WITH THE EVIL": PRINT "CREATURES OF THE DEPTHS, FOR GREAT": PRINT "REWARD!"
7030 PRINT : PRINT "WHAT IS THY NAME PEASANT "; : INPUT pn$: pn$ = UCASE$(pn$)
7040 PRINT "DOEST THOU WISH FOR GRAND ADVENTURE ? "; : DO: q$ = INKEY$: LOOP WHILE q$ = ""
IF q$ <> "y" THEN PRINT : PRINT "THEN LEAVE AND BEGONE!": pn$ = "": PRINT : PRINT " PRESS -SPACE- TO CONT."; : DO: q$ = INKEY$: LOOP UNTIL q$ = " ": CLS : GOTO 1090
7045 PRINT
7050 PRINT : PRINT "GOOD! THOU SHALT TRY TO BECOME A ": PRINT "KNIGHT!!!": PRINT : PRINT "THY FIRST TASK IS TO GO INTO THE": PRINT "DUNGEONS AND TO RETURN ONLY AFTER": PRINT "KILLING A(N) "; : ta = INT(c(4) / 3): PRINT m$(ta)
7060 PRINT : PRINT " GO NOW UPON THIS QUEST, AND MAY": PRINT "LADY LUCK BE FAIR UNTO YOU.....": PRINT ".....ALSO I, BRITISH, HAVE INCREASED": PRINT "EACH OF THY ATTRIBUTES BY ONE!"
7070 PRINT : PRINT " PRESS -SPACE- TO CONT."; : DO: q$ = INKEY$: LOOP WHILE q$ = "": FOR x = 0 TO 5: c(x) = c(x) + 1: NEXT: CLS : GOTO 1090
7500 IF ta > 0 THEN PRINT : PRINT : PRINT pn$; " WHY HAST THOU RETURNED?": PRINT "THOU MUST KILL A(N) "; m$(ta)
PRINT "GO NOW AND COMPLETE THY QUEST!": PRINT : PRINT " PRESS -SPACE- TO CONT."; : DO: q$ = INKEY$: LOOP WHILE q$ = "": CLS : GOTO 1090
7510 PRINT : PRINT : PRINT : PRINT "AAHH!!....."; pn$: PRINT : PRINT "THOU HAST ACOMPLISHED THY QUEST!": IF ABS(ta) = 10 THEN 7900
7520 PRINT "UNFORTUNATELY, THIS IS NOT ENOUGH TO": PRINT "BECOME A KNIGHT.": ta = ABS(ta) + 1: PRINT : PRINT "NOW THOU MUST KILL A(N) "; m$(ta)
7530 GOTO 7060
7900 SCREEN 1: VIEW PRINT: CLS : PRINT : PRINT : PRINT : pn$ = "LORD " + pn$: PRINT " "; pn$; ","
7910 PRINT " THOU HAST PROVED THYSELF WORTHY": PRINT "OF KNIGHTHOOD, CONTINUE PLAY IF THOU": PRINT "DOTH WISH, BUT THOU HAST ACOMPLISHED": PRINT "THE MAIN OBJECTIVE OF THIS GAME..."
7920 IF lp = 10 THEN 7950
7930 PRINT : PRINT " NOW MAYBE THOU ART FOOLHEARTY": PRINT "ENOUGH TOTRY DIFFICULTY LEVEL "; lp + 1
7940 GOTO 7070
7950 PRINT : PRINT "...CALL CALIFORNIA PACIFIC COMPUTER": PRINT "AT (415)-569-9126 TO REPORT THIS": PRINT "AMAZING FEAT!"
7990 GOTO 7070
60000 SCREEN 1: VIEW PRINT: CLS : LOCATE 5, 1: INPUT "TYPE THY LUCKY NUMBER....."; q$: ln = VAL(q$)
60005 LOCATE 7, 1: INPUT "LEVEL OF PLAY (1-10)......"; q$: lp = INT(VAL(q$))
60006 IF lp < 1 OR lp > 10 THEN 60005
60010 RANDOMIZE ln
60020 DATA "HIT POINTS.....","STRENGTH.......","DEXTERITY......","STAMINA........","WISDOM.........","GOLD..........."
60025 REM
60030 DIM c$(5): FOR x = 0 TO 5: READ c$(x): NEXT
60040 REM
60041 REM
60042 DATA "SKELETON","THIEF","GIANT RAT","ORC","VIPER","CARRION CRAWLER","GREMLIN","MIMIC","DAEMON","BALROG"
60043 FOR x = 1 TO 10: READ m$(x): NEXT
60050 FOR x = 0 TO 5: c(x) = INT(SQR(RND(1)) * 21 + 4): NEXT x
60060 CLS : LOCATE 8, 1: FOR x = 0 TO 5: PRINT c$(x); c(x): NEXT: PRINT : PRINT "SHALT THOU PLAY WITH THESE QUALITIES?": PRINT TAB(20); : DO: q$ = INKEY$: LOOP WHILE q$ = "": IF q$ <> "y" THEN 60050
60061 LOCATE 15, 1: PRINT : PRINT "AND SHALT THOU BE A FIGHTER OR A MAGE?": PRINT TAB(20); : DO: pt$ = INKEY$: LOOP WHILE pt$ = ""
60062 IF pt$ = "m" OR pt$ = "f" THEN 60070
60063 GOTO 60061
60070 DATA "FOOD","RAPIER","AXE","SHIELD","BOW AND ARROWS","MAGIC AMULET": FOR x = 0 TO 5: READ w$(x): NEXT
60075 GOSUB 60080: GOSUB 60200: RETURN
60080 SCREEN 1: VIEW PRINT: CLS : PRINT : PRINT : PRINT " STAT'S WEAPONS": PRINT : FOR x = 0 TO 5: PRINT c$(x); c(x); TAB(24); "0-"; w$(x): NEXT: LOCATE 1, 1
60081 LOCATE 11, 18: PRINT "Q-QUIT"
60082 REM IF pw(0) > 0 THEN REM CALL 62450
60085 FOR z = 0 TO 5: LOCATE 5 + z, 25 - LEN(STR$(pw(z))): PRINT STR$(pw(z)); : NEXT
60090 LOCATE 17, 5: PRINT "PRICE"; : PRINT TAB(15); : PRINT "DAMAGE"; : PRINT TAB(25); : PRINT "ITEM"
60100 FOR x = 0 TO 5: LOCATE 19 + x, 25: PRINT w$(x); : NEXT
60110 LOCATE 19, 5: PRINT "1 FOR 10"; : PRINT TAB(15); : PRINT "N/A": LOCATE 20, 5: PRINT "8"; : PRINT TAB(15); : PRINT "1-10": LOCATE 21, 5: PRINT "5"; : PRINT TAB(15); : PRINT "1-5"
60120 LOCATE 22, 5: PRINT "6"; : PRINT TAB(15); : PRINT "1": LOCATE 23, 5: PRINT "3"; : PRINT TAB(15); : PRINT "1-4"; : LOCATE 24, 5: PRINT "15"; : PRINT TAB(15); : PRINT "?????"; : LOCATE 1, 1
60130 RETURN
60200 LOCATE 1, 1: PRINT "WELCOME TO THE ADVENTURE SHOP"
60210 LOCATE 13, 1: FOR jj = 0 TO 1: PRINT " ": NEXT
LOCATE 12, 1: PRINT "WHICH ITEM SHALT THOU BUY "; : LOCATE 12, 27: DO: q$ = INKEY$: LOOP WHILE q$ = ""
IF q$ = "q" THEN PRINT : PRINT : PRINT "BYE": SLEEP 1: SCREEN 1: CLS : RETURN
60215 z = -1
60220 IF q$ = "f" THEN PRINT "FOOD": z = 0: p = 1
60221 IF q$ = "r" THEN PRINT "RAPIER": z = 1: p = 8
60222 IF q$ = "a" THEN PRINT "AXE": z = 2: p = 5
60223 IF q$ = "s" THEN PRINT "SHIELD": z = 3: p = 6
60224 IF q$ = "b" THEN PRINT "BOW": z = 4: p = 3
60225 IF q$ = "m" THEN PRINT "AMULET": z = 5: p = 15
60226 IF z = -1 THEN PRINT UCASE$(q$): PRINT "I'M SORRY WE DON'T HAVE THAT.": SLEEP 2: GOTO 60210
60227 IF q$ = "r" AND pt$ = "m" THEN PRINT "I'M SORRY MAGES": PRINT "CAN'T USE THAT!": SLEEP 2: GOTO 60210
60228 IF q$ = "b" AND pt$ = "m" THEN PRINT "I'M SORRY MAGES": PRINT "CAN'T USE THAT!": SLEEP 2: GOTO 60210
60230 IF c(5) - p < 0 THEN PRINT "M'LORD THOU CAN NOT AFFORD THAT ITEM.": SLEEP 2: GOTO 60210
60235 IF z = 0 THEN pw(z) = pw(z) + 9
60236 pw(z) = pw(z) + 1: c(5) = c(5) - p
60237 LOCATE 10, 16: PRINT c(5); " "
60240 LOCATE 5 + z, 25 - LEN(STR$(pw(z))): PRINT pw(z); : LOCATE 14, 1: PRINT
60250 GOTO 60210