QB64 Phoenix Edition
Haunted House Text Adventure Game - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3)
+---- Forum: Games (https://qb64phoenix.com/forum/forumdisplay.php?fid=57)
+----- Forum: Donald Foster (https://qb64phoenix.com/forum/forumdisplay.php?fid=58)
+----- Thread: Haunted House Text Adventure Game (/showthread.php?tid=1019)

Pages: 1 2


Haunted House Text Adventure Game - Donald Foster - 10-30-2022

[Image: Haunted_House_1981_Tandy_0000.jp2&id=Hau...2&rotate=0]

Hello All,

This is my remake of the TRS-80 text adventure game. I posted this game on GB64.org site a while back, but I don't know if any of my games got ported here. I did some touchups to the game since then and will continue making updates. I'm posting it here for the Halloween theme.

The game mostly uses two word commands like "GET KEY" or "KILL GHOST". Use N (north), S (south), E (east) and W (west) to maneuver through the house. INVENT will bring up the list of items you are carrying.

If at any point in the game you die, you will need to restart the game.

Donald

Code: (Select All)
_TITLE "TRS-80 MODEL I & III - HAUNTED HOUSE - TEXT ADVENTURE GAME IN QB64"

PAPER = 0: KEYY = 0: KNIFE = 0: ROPE = 0: ARMOUR = 0: CABINET = 0: SCROLL = 0: SWORD = 0: SIGN = 0

GHOST1 = 1: GHOST2 = 1: GHOST3 = 1: GHOST4 = 1: GHOST5 = 0: GHOST6 = 0: GHOST7 = 0: GHOST8 = 0: GHOST11 = 1: GHOST12 = 1: SWORD = 0: SIGN = 0

COLOR 15, 0

PRINT
PRINT "HAUNTED HOUSE is a very simple game. There are no treasures to"
PRINT "find. There are no scores to keep. There is no time limit. You only have"
PRINT "one task - GET OUT OF THE HOUSE ALIVE!!"

PRESSAKEY: A$ = INKEY$: IF A$ = "" GOTO PRESSAKEY

CLS
PRINT
PRINT "Haunted House"
PRINT
PRINT "Generations have passed since the McDaniel family mysteriously"
PRINT "disappeared. It is said that a stranger came to visit on that cold,"
PRINT "Autumn day many years ago, but no one knows for sure."
PRINT
PRINT "Their house has been vacant for decades now. It's two story image is"
PRINT "forlorn and looming, visible only from the narrow, winding road that"
PRINT "distorted by vegetation from the surrounding forest. The"
PRINT "stone wall that encompasses the house is discolor and broken from"
PRINT "years of neglect, it's iron gate rusty and worn by angry seasons. The"
PRINT "windows are boaded - the house is quiet and contented, not"
PRINT "accustomed to visitors. The wind is restless today, blowing fallen"
PRINT "leaves in all directions. As you walk towards the entrance of the house,"
PRINT "the wind grows distant and weak. Suddenly, the calm and silence is"
PRINT "broken by sounds from within the house!"
PRINT
PRINT "Do you have the courage to enter?"

GETYINPUT: A$ = UCASE$(INKEY$): IF A$ <> "Y" GOTO GETYINPUT

CLS: COLOR 2, 0

MESSAGE$ = "HAUNTED HOUSE!!": GOSUB MESSAGE

PRESSANYKEY: A$ = INKEY$: IF A$ = "" THEN GOTO PRESSANYKEY

OUTSIDEOFHOUSE: ' OUTSIDE OF HOUSE
MESSAGE$ = "YOU ARE AT THE OUTSIDE OF THE HOUSE.^THERE IS A CRUMPLED PIECE OF PAPER ON THE GROUND.^THE FRONT DOOR IS CLOSED.": GOSUB MESSAGE
INPUT0: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "PLUGH" OR INPUTT$ = "SAY PLUGH" THEN MESSAGE$ = "YOU MATERIALIZE INSIDE THE DOOR.": GOSUB MESSAGE: GOTO FOYER
IF INPUTT$ = "GET PAPER" THEN PAPER = 1: MESSAGE$ = "OK": GOSUB MESSAGE: GOTO INPUT0
IF INPUTT$ = "READ PAPER" AND PAPER = 1 THEN MESSAGE$ = "IT SAYS, %MAGIC WORD - PLUGH.%": GOSUB MESSAGE: GOTO INPUT0
IF INPUTT$ = "READ PAPER" AND PAPER = 0 THEN MESSAGE$ = "YOU AREN'T CARRYING IT.": GOSUB MESSAGE: GOTO INPUT0
IF INPUTT$ = "OPEN DOOR" THEN MESSAGE$ = "DOOR CAN'T BE OPENED.": GOSUB MESSAGE: GOTO INPUT0
IF INPUTT$ = "DOOR" OR INPUTT$ = "PAPER" OR INPUTT$ = "EXAMINE PAPER" THEN MESSAGE$ = "WHAT SHOULD I DO WITH IT?": GOSUB MESSAGE: GOTO INPUT0
IF INPUTT$ = "LOOK" OR INPUTT$ = "LOOK PAPER" OR INPUTT$ = "N" OR INPUTT$ = "S" OR INPUTT$ = "E" OR INPUTT$ = "W" THEN GOTO OUTSIDEOFHOUSE
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT0
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT0

FOYER: ' FOYER
MESSAGE$ = "YOU ARE AT THE FOYER.": GOSUB MESSAGE
INPUT1: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "PLUGH" OR INPUTT$ = "SAY PLUGH" THEN MESSAGE$ = "SORRY, ONLY ONE PLUGH PER CUSTOMER.": GOSUB MESSAGE: GOTO FOYER
IF INPUTT$ = "DROP PAPER" THEN PAPER = 0: MESSAGE$ = "OK": GOSUB MESSAGE: GOTO FOYER
IF INPUTT$ = "E" THEN GOTO LIVING_ROOM
IF INPUTT$ = "S" THEN GOTO DEN
IF INPUTT$ = "W" THEN GOTO EAST_END_HALL
IF INPUTT$ = "DOOR" OR INPUTT$ = "PAPER" THEN MESSAGE$ = "WHAT SHOULD I DO WITH IT?": GOSUB MESSAGE: GOTO INPUT1
IF INPUTT$ = "LOOK" OR INPUTT$ = "N" THEN GOTO FOYER
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT1
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT1

LIVING_ROOM: ' LIVING ROOM
MESSAGE$ = "YOU ARE AT THE LIVING ROOM.": GOSUB MESSAGE
IF KNIFE = 0 THEN MESSAGE$ = "A KNIFE IS LEVITATING IN THE MIDDLE OF THE ROOM.": GOSUB MESSAGE
IF SCROLL = 0 THEN MESSAGE$ = "THERE IS A MYSTERIOUS SCROLL ON THE GROUND.": GOSUB MESSAGE
INPUT2: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "PLUGH" OR INPUTT$ = "SAY PLUGH" THEN MESSAGE$ = "SORRY, ONLY ONE PLUGH PER CUSTOMER.": GOSUB MESSAGE: GOTO LIVING_ROOM
IF INPUTT$ = "E" THEN GOTO DINING_ROOM
IF INPUTT$ = "W" THEN GOTO FOYER
IF INPUTT$ = "GET SCROLL" THEN SCROLL = 1: MESSAGE$ = "OK": GOSUB MESSAGE: GOTO INPUT2
IF INPUTT$ = "READ SCROLL" AND SCROLL = 0 THEN MESSAGE$ = "YOU AREN'T CARRYING IT.": GOSUB MESSAGE: GOTO INPUT2
IF INPUTT$ = "READ SCROLL" AND SCROLL = 1 THEN MESSAGE$ = "IT SAYS, %THERE IS ESCAPE FROM THE SECOND FLOOR!%": GOSUB MESSAGE: GOTO INPUT2
IF INPUTT$ = "GET KNIFE" AND PAPER = 0 THEN MESSAGE$ = "THE KNIFE FLOATS OUT OF YOUR REACH.": GOSUB MESSAGE: GOTO INPUT2
IF INPUTT$ = "GET KNIFE" AND PAPER = 1 THEN KNIFE = 1: MESSAGE$ = "OK": GOSUB MESSAGE: GOTO INPUT2
IF INPUTT$ = "N" OR INPUTT$ = "S" THEN MESSAGE$ = "SUDDENLY THE KNIFE WHOOSHES DOWN AND SLITS YOUR THROAT! YOU ARE DEAD.": GOSUB MESSAGE: END
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT2
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT2

DINING_ROOM: ' DINING ROOM
MESSAGE$ = "YOU ARE AT THE DINING ROOM.": GOSUB MESSAGE
INPUT3: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "PLUGH" OR INPUTT$ = "SAY PLUGH" THEN MESSAGE$ = "SORRY, ONLY ONE PLUGH PER CUSTOMER.": GOSUB MESSAGE: GOTO DINING_ROOM
IF INPUTT$ = "S" THEN GOTO KITCHEN
IF INPUTT$ = "W" THEN GOTO LIVING_ROOM
IF INPUTT$ = "LOOK" OR INPUTT$ = "N" OR INPUTT$ = "E" THEN GOTO DINING_ROOM
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT3
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT3

KITCHEN: ' KITCHEN
MESSAGE$ = "YOU ARE AT THE KITCHEN.": GOSUB MESSAGE
IF BUCKET = 0 THEN MESSAGE$ = "A BUCKET OF WATER IS ON THE FLOOR.": GOSUB MESSAGE
INPUT4: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "PLUGH" OR INPUTT$ = "SAY PLUGH" THEN MESSAGE$ = "SORRY, ONLY ONE PLUGH PER CUSTOMER.": GOSUB MESSAGE: GOTO KITCHEN
IF INPUTT$ = "N" THEN GOTO DINING_ROOM
IF INPUTT$ = "W" THEN GOTO DEN
IF INPUTT$ = "S" AND KNIFE = 1 THEN MESSAGE$ = "A SUIT OF ARMOUR HERE FLEES WHEN IT SPOTS YOUR KNIFE.": GOSUB MESSAGE: GOTO BREAKFAST_ROOM
IF INPUTT$ = "S" AND KNIFE = 0 THEN MESSAGE$ = "YOU ARE IN THE BREAKFAST ROOM.^AN ANIMATED ARMOUR SUIT THROWS YOU OUT!": GOSUB MESSAGE: GOTO KITCHEN
IF INPUTT$ = "GET BUCKET" THEN BUCKET = 1: MESSAGE$ = "OK": GOSUB MESSAGE: GOTO INPUT4
IF INPUTT$ = "POUR WATER" OR INPUTT$ = "POUR BUCKET" THEN MESSAGE$ = "THE GROUND IS WET. THE BUCKET MAGICALLY REFILLS.": GOSUB MESSAGE: GOTO INPUT4
IF INPUTT$ = "DRINK WATER" AND BUCKET = 0 THEN MESSAGE$ = "YOU AREN'T CARRYING IT.": GOSUB MESSAGE: GOTO INPUT4
IF INPUTT$ = "DRINK WATER" AND BUCKET = 1 THEN MESSAGE$ = "YOU FEEL SICK. IN FACT, YOU JUST DIED! IT WAS POSION.": GOSUB MESSAGE: END
IF INPUTT$ = "LOOK" OR INPUTT$ = "E" THEN GOTO KITCHEN
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT4
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT4

BREAKFAST_ROOM: ' BREAKFAST ROOM
MESSAGE$ = "YOU ARE AT THE BREAKFAST ROOM.": GOSUB MESSAGE
INPUT5: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "PLUGH" OR INPUTT$ = "SAY PLUGH" THEN MESSAGE$ = "SORRY, ONLY ONE PLUGH PER CUSTOMER.": GOSUB MESSAGE: GOTO BREAKFAST_ROOM
IF INPUTT$ = "N" THEN GOTO KITCHEN
IF INPUTT$ = "E" THEN GOTO SERVANTS_QUARTERS1
IF INPUTT$ = "LOOK" OR INPUTT$ = "S" OR INPUTT$ = "W" THEN GOTO BREAKFAST_ROOM
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT5
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT5

SERVANTS_QUARTERS1: ' SERVANTS QUARTERS
MESSAGE$ = "YOU ARE AT THE SERVANTS QUARTERS.^THERE IS A CABINET ON ONE WALL.": GOSUB MESSAGE
INPUT6: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "PLUGH" OR INPUTT$ = "SAY PLUGH" THEN MESSAGE$ = "SORRY, ONLY ONE PLUGH PER CUSTOMER.": GOSUB MESSAGE: GOTO SERVANTS_QUARTERS1
IF INPUTT$ = "N" THEN GOTO SERVANTS_QUARTERS2
IF INPUTT$ = "W" THEN GOTO BREAKFAST_ROOM
IF INPUTT$ = "OPEN CABINET" THEN MESSAGE$ = "IT'S EMPTY.": GOSUB MESSAGE: GOTO INPUT6
IF INPUTT$ = "GET CABINET" THEN MESSAGE$ = "DON'T BE RIDICULOUS!": GOSUB MESSAGE: GOTO INPUT6
IF INPUTT$ = "LOOK" OR INPUTT$ = "S" OR INPUTT$ = "E" THEN GOTO SERVANTS_QUARTERS1
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT6
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT6

SERVANTS_QUARTERS2: ' SERVANTS QUARTERS
MESSAGE$ = "YOU ARE AT THE SERVANTS QUARTERS.^THERE IS A CABINET ON ONE WALL.": GOSUB MESSAGE
INPUT7: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "PLUGH" OR INPUTT$ = "SAY PLUGH" THEN MESSAGE$ = "SORRY, ONLY ONE PLUGH PER CUSTOMER.": GOSUB MESSAGE: GOTO SERVANTS_QUARTERS2
IF INPUTT$ = "S" THEN GOTO SERVANTS_QUARTERS1
IF INPUTT$ = "OPEN CABINET" THEN MESSAGE$ = "THERE IS A KEY IN IT.": GOSUB MESSAGE: GOTO INPUT7
IF INPUTT$ = "GET KEY" THEN KEYY = 1: MESSAGE$ = "OK": GOSUB MESSAGE: GOTO INPUT7
IF INPUTT$ = "LOOK" OR INPUTT$ = "N" OR INPUTT$ = "E" OR INPUTT$ = "W" THEN GOTO SERVANTS_QUARTERS2
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT7
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT7

DEN: ' DEN
MESSAGE$ = "YOU ARE AT THE DEN.": GOSUB MESSAGE
INPUT8: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "PLUGH" OR INPUTT$ = "SAY PLUGH" THEN MESSAGE$ = "SORRY, ONLY ONE PLUGH PER CUSTOMER.": GOSUB MESSAGE: GOTO DEN
IF INPUTT$ = "N" THEN GOTO FOYER
IF INPUTT$ = "E" THEN GOTO KITCHEN
IF INPUTT$ = "LOOK" OR INPUTT$ = "S" OR INPUTT$ = "W" THEN GOTO DEN
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT8
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT8

EAST_END_HALL: ' EAST END OF THE HALL
MESSAGE$ = "YOU ARE AT THE EAST END OF THE HALL.": GOSUB MESSAGE
INPUT9: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "PLUGH" OR INPUTT$ = "SAY PLUGH" THEN MESSAGE$ = "SORRY, ONLY ONE PLUGH PER CUSTOMER.": GOSUB MESSAGE: GOTO EAST_END_HALL
IF INPUTT$ = "N" THEN GOTO GREEN_BEDROOM
IF INPUTT$ = "E" THEN GOTO FOYER
IF INPUTT$ = "W" THEN GOTO WEST_END_HALL
IF INPUTT$ = "LOOK" OR INPUTT$ = "S" THEN GOTO EAST_END_HALL
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT9
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT9

WEST_END_HALL: ' WEST END OF THE HALL
MESSAGE$ = "YOU ARE AT THE WEST END OF THE HALL.^A LOCKED DOOR BARS THE WAY SOUTH.": GOSUB MESSAGE
INPUT10: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "PLUGH" OR INPUTT$ = "SAY PLUGH" THEN MESSAGE$ = "SORRY, ONLY ONE PLUGH PER CUSTOMER.": GOSUB MESSAGE: GOTO WEST_END_HALL
IF INPUTT$ = "N" THEN GOTO BLUE_BEDROOM
IF INPUTT$ = "E" THEN GOTO EAST_END_HALL
IF (INPUTT$ = "S" OR INPUTT$ = "OPEN DOOR") AND KEYY = 1 THEN GOTO MASTER_BEDROOM
IF (INPUTT$ = "S" OR INPUTT$ = "OPEN DOOR") AND KEYY = 0 THEN MESSAGE$ = "YOU'LL NEED A KEY TO GET THROUGH THAT DOOR.": GOSUB MESSAGE: GOTO INPUT10
IF INPUTT$ = "LOOK" OR INPUTT$ = "W" THEN GOTO WEST_END_HALL
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT10
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT10

GREEN_BEDROOM: ' GREEN BEDROOM
MESSAGE$ = "YOU ARE AT THE GREEN BEDROOM. THERE'S A PANEL ON THE WEST WALL.": GOSUB MESSAGE
INPUT11: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "PLUGH" OR INPUTT$ = "SAY PLUGH" THEN MESSAGE$ = "SORRY, ONLY ONE PLUGH PER CUSTOMER.": GOSUB MESSAGE: GOTO GREEN_BEDROOM
IF INPUTT$ = "S" THEN GOTO EAST_END_HALL
IF INPUTT$ = "PANEL" OR INPUTT$ = "OPEN PANEL" OR INPUTT$ = "GO PANEL" THEN GOTO SECRET_PASSAGE
IF INPUTT$ = "LOOK" OR INPUTT$ = "N" OR INPUTT$ = "E" OR INPUTT$ = "W" THEN GOTO GREEN_BEDROOM
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT11
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT11

SECRET_PASSAGE: ' SECRET PASSAGE
MESSAGE$ = "YOU ARE AT THE SECRET PASSAGE.": GOSUB MESSAGE
IF ROPE = 0 THEN MESSAGE$ = "A ROPE IS NEARBY.": GOSUB MESSAGE
INPUT12: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "PLUGH" OR INPUTT$ = "SAY PLUGH" THEN MESSAGE$ = "SORRY, ONLY ONE PLUGH PER CUSTOMER.": GOSUB MESSAGE: GOTO SECRET_PASSAGE
IF INPUTT$ = "E" THEN GOTO GREEN_BEDROOM
IF INPUTT$ = "W" THEN GOTO BLUE_BEDROOM
IF INPUTT$ = "GET ROPE" THEN ROPE = 1: MESSAGE$ = "OK": GOSUB MESSAGE: GOTO INPUT12
IF INPUTT$ = "LOOK" OR INPUTT$ = "N" OR INPUTT$ = "S" THEN GOTO SECRET_PASSAGE
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT12
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT12

BLUE_BEDROOM: ' BLUE BEDROOM
MESSAGE$ = "YOU ARE AT THE BLUE BEDROOM.^THERE'S A PANEL ON THE WEST WALL.": GOSUB MESSAGE
INPUT13: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "PLUGH" OR INPUTT$ = "SAY PLUGH" THEN MESSAGE$ = "SORRY, ONLY ONE PLUGH PER CUSTOMER.": GOSUB MESSAGE: GOTO BLUE_BEDROOM
IF INPUTT$ = "S" THEN GOTO WEST_END_HALL
IF INPUTT$ = "PANEL" OR INPUTT$ = "OPEN PANEL" OR INPUTT$ = "GO PANEL" THEN GOTO SECRET_PASSAGE
IF INPUTT$ = "LOOK" OR INPUTT$ = "N" OR INPUTT$ = "E" OR INPUTT$ = "W" THEN GOTO BLUE_BEDROOM
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT13
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT13

MASTER_BEDROOM: ' MASTER BEDROOM
MESSAGE$ = "YOU ARE IN THE MASTER BEDROOM.^A WALL OF RAGING FIRE BLOCKS THE WAY EAST.": GOSUB MESSAGE
INPUT14: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "PLUGH" OR INPUTT$ = "SAY PLUGH" THEN MESSAGE$ = "SORRY, ONLY ONE PLUGH PER CUSTOMER.": GOSUB MESSAGE: GOTO MASTER_BEDROOM
IF INPUTT$ = "N" THEN GOTO GREEN_BEDROOM
IF INPUTT$ = "E" THEN MESSAGE$ = "ARE YOU JUST GOING TO WALK RIGHT THROUGH THAT RANGING FIRE?": GOSUB MESSAGE: GOTO INPUT14
IF INPUTT$ = "YES" THEN MESSAGE$ = "OK": GOSUB MESSAGE: GOTO LIBRARY
IF INPUTT$ = "NO" THEN MESSAGE$ = "A WISE DECISION.": GOSUB MESSAGE: GOTO INPUT14
IF INPUTT$ = "LOOK" OR INPUTT$ = "W" OR INPUTT$ = "S" THEN GOTO MASTER_BEDROOM
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT14
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT14

LIBRARY: ' LIBRARY
MESSAGE$ = "YOU ARE AT THE LIBRARY. THERE IS A HOLE IN THE CEILING.": GOSUB MESSAGE
INPUT15: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "PLUGH" OR INPUTT$ = "SAY PLUGH" THEN MESSAGE$ = "SORRY, ONLY ONE PLUGH PER CUSTOMER.": GOSUB MESSAGE: GOTO LIBRARY
IF INPUTT$ = "W" THEN GOTO BLUE_BEDROOM
IF INPUTT$ = "DROP ROPE" THEN ROPE = 0: ROPECEILING = 1: MESSAGE$ = "INSTANTLY THE ROPE UNWINDS AND LEVITATES TO THE HOLE IN THE CEILING!": GOSUB MESSAGE: GOTO INPUT15
IF (INPUTT$ = "CLIMB ROPE" OR INPUTT$ = "JUMP ROPE") AND ROPECEILING = 1 THEN MESSAGE$ = "YOU DROP EVERYTHING YOU HAD TO CLIMB THE ROPE. YOU REACH THE SECOND FLOOR.": GOSUB MESSAGE: PAPER = 0: KEYY = 0: KNIFE = 0: ROPE = 0: ARMOUR = 0: CABINET = 0: SCROLL = 0: GOTO DIMLY_ROOM_SWORD
IF INPUTT$ = "LOOK" OR INPUTT$ = "N" OR INPUTT$ = "E" OR INPUTT$ = "S" THEN GOTO LIBRARY
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT15
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT15

DIMLY_ROOM_SWORD: ' DIMLY LIT ROOM WITH SWORD
MESSAGE$ = "YOU ARE IN A DIMLY LIT ROOM. THERE IS A HOLE IN THE FLOOR.": GOSUB MESSAGE
IF SWORD = 0 THEN MESSAGE$ = "THERE IS A MAGIC SWORD ON THE FLOOR.": GOSUB MESSAGE
INPUT16: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "PLUGH" OR INPUTT$ = "SAY PLUGH" THEN MESSAGE$ = "SORRY, ONLY ONE PLUGH PER CUSTOMER.": GOSUB MESSAGE: GOTO DIMLY_ROOM_SWORD
IF INPUTT$ = "E" THEN GOTO DIMLY_ROOM_GHOST1
IF INPUTT$ = "W" THEN GOTO DIMLY_ROOM_GHOST3
IF INPUTT$ = "S" THEN GOTO DIMLY_ROOM_GHOST2
IF INPUTT$ = "GET SWORD" THEN SWORD = 1: MESSAGE$ = "OK": GOSUB MESSAGE: GOTO INPUT16
IF INPUTT$ = "READ SWORD" THEN MESSAGE$ = "AN INCRIPTION READS, %GHOST KILLER.%": GOSUB MESSAGE: GOTO INPUT16
IF INPUTT$ = "DROP SWORD" AND SWORD = 1 THEN SWORD = 0: MESSAGE$ = "OK": GOSUB MESSAGE: GOTO INPUT16
IF INPUTT$ = "DROP SWORD" AND SWORD = 0 THEN MESSAGE$ = "YOU'RE NOT CARRYING IT.": GOSUB MESSAGE: GOTO INPUT16
IF INPUTT$ = "CLIMB ROPE" THEN MESSAGE$ = "YOU FALL THROUGH THE HOLE AND BREAK YOUR NECK! YOU ARE DEAD.": GOSUB MESSAGE: END
IF INPUTT$ = "LOOK" OR INPUTT$ = "N" THEN GOTO DIMLY_ROOM_SWORD
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT16
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT16

DIMLY_ROOM_GHOST1: ' DIMLY LIT ROOM WITH GHOST
MESSAGE$ = "YOU ARE IN A DIMLY LIT ROOM.": GOSUB MESSAGE
IF GHOST1 = 1 THEN MESSAGE$ = "THERE IS A GHOST HERE.": GOSUB MESSAGE
IF GHOST5 = 1 THEN MESSAGE$ = "THE BODY OF A DEAD GHOST IS ON THE FLOOR.": GOSUB MESSAGE
INPUT17: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "KILL GHOST" AND GHOST1 = 1 AND SWORD = 1 THEN GHOST1 = 0: GHOST5 = 1: MESSAGE$ = "YOUR MAGIC SWORD ENABLES YOU TO KILL THE GHOST!": GOSUB MESSAGE: GOTO INPUT17
IF INPUTT$ = "KILL GHOST" AND GHOST1 = 1 AND SWORD = 0 THEN MESSAGE$ = "YOU CAN'T KILL A GHOST WITH YOUR BARE HANDS.": GOSUB MESSAGE: GOTO INPUT17
IF INPUTT$ = "KILL GHOST" AND GHOST5 = 1 THEN MESSAGE$ = "THE POOR THING'S ALREADY DEAD.": GOSUB MESSAGE: GOTO INPUT17
IF INPUTT$ = "KILL SWORD" THEN MESSAGE$ = "OUCH! YOU HURT YOUR HAND.": GOSUB MESSAGE: GOTO INPUT17
IF INPUTT$ = "DROP SWORD" AND SWORD = 1 THEN SWORD = 0: MESSAGE$ = "OK": GOSUB MESSAGE: GOTO INPUT17
IF INPUTT$ = "DROP SWORD" AND SWORD = 0 THEN MESSAGE$ = "YOU'RE NOT CARRYING IT.": GOSUB MESSAGE: GOTO INPUT17
IF INPUTT$ = "W" THEN GOTO DIMLY_ROOM_SWORD
IF (INPUTT$ = "N" OR INPUTT$ = "E" OR INPUTT$ = "S") AND GHOST5 = 1 THEN GOTO DIMLY_ROOM_GHOST1
IF (INPUTT$ = "N" OR INPUTT$ = "E" OR INPUTT$ = "S") AND GHOST1 = 1 THEN MESSAGE$ = "THE GHOST WILL NOT LET YOU PASS!": GOSUB MESSAGE: GOTO INPUT17
IF INPUTT$ = "LOOK" THEN GOTO DIMLY_ROOM_GHOST1
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT17
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT17

DIMLY_ROOM_GHOST2: ' DIMLY LIT ROOM WITH GHOST
MESSAGE$ = "YOU ARE IN A DIMLY LIT ROOM.": GOSUB MESSAGE
IF GHOST2 = 1 THEN MESSAGE$ = "THERE IS A GHOST HERE.": GOSUB MESSAGE
IF GHOST6 = 1 THEN MESSAGE$ = "THE BODY OF A DEAD GHOST IS ON THE FLOOR.": GOSUB MESSAGE
INPUT18: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "KILL GHOST" AND GHOST2 = 1 AND SWORD = 1 THEN GHOST2 = 0: GHOST6 = 1: MESSAGE$ = "YOUR MAGIC SWORD ENABLES YOU TO KILL THE GHOST!": GOSUB MESSAGE: GOTO INPUT18
IF INPUTT$ = "KILL GHOST" AND GHOST2 = 1 AND SWORD = 0 THEN MESSAGE$ = "YOU CAN'T KILL A GHOST WITH YOUR BARE HANDS.": GOSUB MESSAGE: GOTO INPUT18
IF INPUTT$ = "KILL GHOST" AND GHOST6 = 1 THEN MESSAGE$ = "THE POOR THING'S ALREADY DEAD.": GOSUB MESSAGE: GOTO INPUT18
IF INPUTT$ = "KILL SWORD" THEN MESSAGE$ = "OUCH! YOU HURT YOUR HAND.": GOSUB MESSAGE: GOTO INPUT18
IF INPUTT$ = "DROP SWORD" AND SWORD = 1 THEN SWORD = 0: MESSAGE$ = "OK": GOSUB MESSAGE: GOTO INPUT18
IF INPUTT$ = "DROP SWORD" AND SWORD = 0 THEN MESSAGE$ = "YOU'RE NOT CARRYING IT.": GOSUB MESSAGE: GOTO INPUT18
IF INPUTT$ = "N" THEN GOTO DIMLY_ROOM_SWORD
IF (INPUTT$ = "W" OR INPUTT$ = "E" OR INPUTT$ = "S") AND GHOST6 = 1 THEN GOTO DIMLY_ROOM_GHOST2
IF (INPUTT$ = "W" OR INPUTT$ = "E" OR INPUTT$ = "S") AND GHOST2 = 1 THEN MESSAGE$ = "THE GHOST WILL NOT LET YOU PASS!": GOSUB MESSAGE: GOTO INPUT18
IF INPUTT$ = "LOOK" THEN GOTO DIMLY_ROOM_GHOST2
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT18
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT18

DIMLY_ROOM_GHOST3: ' DIMLY LIT ROOM WITH GHOST
MESSAGE$ = "YOU ARE IN A DIMLY LIT ROOM.": GOSUB MESSAGE
IF GHOST3 = 1 THEN MESSAGE$ = "THERE IS A GHOST HERE.": GOSUB MESSAGE
IF GHOST7 = 1 THEN MESSAGE$ = "THE BODY OF A DEAD GHOST IS ON THE FLOOR.": GOSUB MESSAGE
INPUT19: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "KILL GHOST" AND GHOST3 = 1 AND SWORD = 1 THEN GHOST3 = 0: GHOST7 = 1: MESSAGE$ = "YOUR MAGIC SWORD ENABLES YOU TO KILL THE GHOST!": GOSUB MESSAGE: GOTO INPUT19
IF INPUTT$ = "KILL GHOST" AND GHOST3 = 1 AND SWORD = 0 THEN MESSAGE$ = "YOU CAN'T KILL A GHOST WITH YOUR BARE HANDS.": GOSUB MESSAGE: GOTO INPUT19
IF INPUTT$ = "KILL GHOST" AND GHOST7 = 1 THEN MESSAGE$ = "THE POOR THING'S ALREADY DEAD.": GOSUB MESSAGE: GOTO INPUT19
IF INPUTT$ = "KILL SWORD" THEN MESSAGE$ = "OUCH! YOU HURT YOUR HAND.": GOSUB MESSAGE: GOTO INPUT19
IF INPUTT$ = "DROP SWORD" AND SWORD = 1 THEN SWORD = 0: MESSAGE$ = "OK": GOSUB MESSAGE: GOTO INPUT19
IF INPUTT$ = "DROP SWORD" AND SWORD = 0 THEN MESSAGE$ = "YOU'RE NOT CARRYING IT.": GOSUB MESSAGE: GOTO INPUT19
IF INPUTT$ = "E" THEN GOTO DIMLY_ROOM_SWORD
IF INPUTT$ = "W" AND GHOST7 = 1 THEN GOTO DIMLY_ROOM_UNKILL1
IF (INPUTT$ = "N" OR INPUTT$ = "W" OR INPUTT$ = "S") AND GHOST7 = 1 THEN GOTO DIMLY_ROOM_GHOST3
IF (INPUTT$ = "N" OR INPUTT$ = "W" OR INPUTT$ = "S") AND GHOST3 = 1 THEN MESSAGE$ = "THE GHOST WILL NOT LET YOU PASS!": GOSUB MESSAGE: GOTO INPUT19
IF INPUTT$ = "LOOK" THEN GOTO DIMLY_ROOM_GHOST3
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT19
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT19

DIMLY_ROOM_UNKILL1: ' DIMLY LIT ROOM WITH UNKILLABLE GHOST
MESSAGE$ = "YOU ARE IN A DIMLY LIT ROOM.^THERE IS A GHOST HERE.": GOSUB MESSAGE
INPUT20: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "KILL GHOST" AND SWORD = 1 THEN GHOST4 = 0: GHOST8 = 1: MESSAGE$ = "YOUR MAGIC SWORD ENABLES YOU TO KILL THE GHOST!": GOSUB MESSAGE: GOTO INPUT20
IF INPUTT$ = "KILL GHOST" AND SWORD = 0 THEN MESSAGE$ = "YOU CAN'T KILL A GHOST WITH YOUR BARE HANDS.": GOSUB MESSAGE: GOTO INPUT20
IF INPUTT$ = "KILL SWORD" THEN MESSAGE$ = "OUCH! YOU HURT YOUR HAND.": GOSUB MESSAGE: GOTO INPUT20
IF INPUTT$ = "DROP SWORD" AND SWORD = 1 THEN SWORD = 0: MESSAGE$ = "OK": GOSUB MESSAGE: GOTO INPUT20
IF INPUTT$ = "DROP SWORD" AND SWORD = 0 THEN MESSAGE$ = "YOU'RE NOT CARRYING IT.": GOSUB MESSAGE: GOTO INPUT20
IF INPUTT$ = "E" THEN GOTO DIMLY_ROOM_GHOST3
IF INPUTT$ = "N" AND SWORD = 0 AND SOUTH = 1 THEN GOTO DIMLY_ROOM_UNKILL2
IF INPUTT$ = "S" AND SWORD = 0 THEN SOUTH = 1: GOTO DIMLY_ROOM_UNKILL1
IF (INPUTT$ = "N" OR INPUTT$ = "S" OR INPUTT$ = "W") AND SWORD = 1 THEN MESSAGE$ = "THE GHOST WILL NOT LET YOU PASS!": GOSUB MESSAGE: GOTO INPUT20
IF INPUTT$ = "LOOK" THEN GOTO DIMLY_ROOM_UNKILL1
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT20
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT20

DIMLY_ROOM_UNKILL2: ' DIMLY LIT ROOM WITH UNKILLABLE GHOST
MESSAGE$ = "YOU ARE IN A DIMLY LIT ROOM.^THERE IS A GHOST HERE.": GOSUB MESSAGE
INPUT21: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "DROP SWORD" AND SWORD = 0 THEN MESSAGE$ = "YOU'RE NOT CARRYING IT.": GOSUB MESSAGE: GOTO INPUT21
IF INPUTT$ = "KILL SWORD" THEN MESSAGE$ = "OUCH! YOU HURT YOUR HAND.": GOSUB MESSAGE: GOTO INPUT21
IF INPUTT$ = "KILL GHOST" AND SWORD = 0 THEN MESSAGE$ = "YOU CAN'T KILL A GHOST WITH YOUR BARE HANDS.": GOSUB MESSAGE: GOTO INPUT21
IF INPUTT$ = "E" THEN GOTO DIMLY_ROOM_GHOST3
IF INPUTT$ = "W" THEN GOTO DIMLY_ROOM_UNKILL3
IF INPUTT$ = "S" THEN GOTO DIMLY_ROOM_UNKILL1
IF INPUTT$ = "LOOK" OR INPUTT$ = "N" THEN GOTO DIMLY_ROOM_UNKILL2
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT21
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT21

DIMLY_ROOM_UNKILL3: ' DIMLY LIT ROOM WITH UNKILLABLE GHOST
MESSAGE$ = "YOU ARE IN A DIMLY LIT ROOM.^THERE IS A GHOST HERE.": GOSUB MESSAGE
INPUT22: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "DROP SWORD" AND SWORD = 0 THEN MESSAGE$ = "YOU'RE NOT CARRYING IT.": GOSUB MESSAGE: GOTO INPUT22
IF INPUTT$ = "KILL SWORD" THEN MESSAGE$ = "OUCH! YOU HURT YOUR HAND.": GOSUB MESSAGE: GOTO INPUT22
IF INPUTT$ = "KILL GHOST" AND SWORD = 0 THEN MESSAGE$ = "YOU CAN'T KILL A GHOST WITH YOUR BARE HANDS.": GOSUB MESSAGE: GOTO INPUT22
IF INPUTT$ = "E" THEN GOTO DIMLY_ROOM_UNKILL2
IF INPUTT$ = "S" THEN GOTO DIMLY_ROOM_ENDGAME
IF INPUTT$ = "LOOK" OR INPUTT$ = "N" OR INPUTT$ = "W" THEN GOTO DIMLY_ROOM_UNKILL3
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT22
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT22

DIMLY_ROOM_ENDGAME: ' DIMLY LIT ROOM, END OF GAME
MESSAGE$ = "YOU ARE IN A DIMLY LIT ROOM.^THERE IS A RUSTY OLD SIGN LAYING ON THE GROUND.": GOSUB MESSAGE
INPUT23: INPUT ":", INPUTT$: GOSUB CAPITOLS
IF INPUTT$ = "GET" OR INPUTT$ = "READ" OR INPUTT$ = "OPEN" OR INPUTT$ = "DROP" OR INPUTT$ = "POUR" OR INPUTT$ = "DRINK" OR INPUTT$ = "SMASH" THEN GOSUB GETNOUN
IF INPUTT$ = "PAPER" OR INPUTT$ = "KEY" OR INPUTT$ = "KNIFE" OR INPUTT$ = "ROPE" OR INPUTT$ = "ARMOR" OR INPUTT$ = "CABINET" OR INPUTT$ = "SCROLL" OR INPUTT$ = "SWORD" OR INPUTT$ = "SIGN" THEN GOSUB GETVERB
IF INPUTT$ = "GET SIGN" THEN SIGN = 1: MESSAGE$ = "OK": GOSUB MESSAGE: GOTO INPUT23
IF INPUTT$ = "READ SIGN" AND SIGN = 0 THEN MESSAGE$ = "YOU ARE NOT CARRYING IT.": GOTO INPUT23
IF INPUTT$ = "READ SIGN" AND SIGN = 1 THEN READSIGN = 1: MESSAGE$ = "THE SIGN SAYS, %THERE ARE THREE EXITS FROM THIS ROOM. ONLY ONE IS TRUE...^YOU MUST KNOW, BUT NOT BE BURDENED BY THIS CLUE!.%": GOSUB MESSAGE: GOTO INPUT23
IF INPUTT$ = "DROP SIGN" THEN SIGN = 0: MESSAGE$ = "OK": GOSUB MESSAGE: GOTO INPUT23
IF INPUTT$ = "N" THEN GOTO DIMLY_ROOM_UNKILL2
IF INPUTT$ = "E" OR INPUTT$ = "W" OR INPUTT$ = "S" THEN
    IF SIGN = 1 OR READSIGN = 0 THEN
        MESSAGE$ = "YOU FALL THROUGH A TRAP DOOR TO YOUR DEATH!": GOSUB MESSAGE: END
    ELSE MESSAGE$ = "YOU WALK THROUGH A DOOR AND FIND YOURSELF ON A BALCONY.^YOU CLIMB DOWN A TREE AND ESCAPE TO SAFETY!^CONGRATULATIONS! YOU MADE IT!": GOSUB MESSAGE: END
    END IF
END IF
IF INPUTT$ = "LOOK" THEN GOTO DIMLY_ROOM_ENDGAME
IF INPUTT$ = "QUIT" THEN END
IF INPUTT$ = "INVENT" OR INPUTT$ = "I" OR INPUTT$ = "INVENTORY" THEN GOSUB INVENTORY: GOTO INPUT23
MESSAGE$ = "I DON'T UNDERSTAND.": GOSUB MESSAGE: GOTO INPUT23

CAPITOLS:
FOR Z = 1 TO LEN(INPUTT$)
    Y = ASC(MID$(INPUTT$, Z, 1))
    IF Y > 96 AND Y < 123 THEN MID$(INPUTT$, Z, 1) = CHR$(Y - 32)
NEXT
RETURN

MESSAGE:
FOR Z = 1 TO LEN(MESSAGE$)
    CHAR$ = MID$(MESSAGE$, Z, 1)
    IF CHAR$ = "^" THEN PRINT: CHAR$ = ""
    IF CHAR$ = "%" THEN PRINT CHR$(34); ELSE PRINT CHAR$;
    _DELAY .03
NEXT: PRINT
RETURN

INVENTORY:
IF PAPER = 1 THEN MESSAGE$ = "CRUMPLED PAPER": GOSUB MESSAGE
IF KEYY = 1 THEN MESSAGE$ = "KEY": GOSUB MESSAGE
IF KNIFE = 1 THEN MESSAGE$ = "KNIFE": GOSUB MESSAGE
IF ROPE = 1 THEN MESSAGE$ = "ROPE": GOSUB MESSAGE
IF BUCKET = 1 THEN MESSAGE$ = "WATER BUCKET": GOSUB MESSAGE
IF SCROLL = 1 THEN MESSAGE$ = "SCROLL": GOSUB MESSAGE
IF SWORD = 1 THEN MESSAGE$ = "MAGIC SWORD": GOSUB MESSAGE
IF SIGN = 1 THEN MESSAGE$ = "RUSTY SIGN": GOSUB MESSAGE
RETURN

GETNOUN:
VERB$ = INPUTT$
INPUT "WHAT? ", NOUN$
INPUTT$ = VERB$ + " " + NOUN$
RETURN

GETVERB:
NOUN$ = INPUTT$
INPUT "WHAT DO YOU WANT ME TO DO WITH IT? ", VERB$
INPUTT$ = VERB$ + " " + NOUN$
RETURN



RE: Haunted House Text Adventure Game - mnrvovrfc - 10-30-2022

https://qb64forum.alephc.xyz/index.php?board=6.0

I got this program from there, but it requires navigating which sucks. When the user wants to search, it puts on a "captcha". For freck's sake the site is "frozen", it isn't being updated any longer!

You might be able to find your programs there. I wish I could give you better advice.

The copy I have doesn't have the nice introduction that you included here. Big Grin


RE: Haunted House Text Adventure Game - bplus - 10-30-2022

Finally someone puts up a Halloween program (besides me, a rerun) that's worth a thumbs up.

Hi Donald Foster, glad you could find us!

 "If at any point in the game you die, ..." your ghost will be eternally embedded into the programs data files. Moo ha ha!


RE: Haunted House Text Adventure Game - Donald Foster - 10-31-2022

mnrvovrfc,

That introduction comes directly from the instruction sheet provided with the packaging of the game. This game is loaded and stored on cassette tape and think it was originally put out in 1979, before the Model III was released. I remember going into Radio Shack back in 1979 and playing this game, I was 15 then. This was my very first introduction to computers.

Donald


RE: Haunted House Text Adventure Game - Donald Foster - 10-31-2022

Hello All,

Since this was a cassette tape stored game, each time you were killed in this game, you had to rewind the tape and wait for it to load again before starting the game over. We didn't have the internet where people can post easily the game solution. But, in today's time, the solution is available. So, if you really frustrated, and you will, here's a link to the solution and I also used this site as a reference to making this game.

Donald

https://www.figmentfly.com/hauntedhouse/hauntedhouse.html#trs80%20instructions

How far can you get before you have to cheat? Very important, don't skip any steps.


RE: Haunted House Text Adventure Game - mnrvovrfc - 10-31-2022

(10-31-2022, 03:26 AM)Donald Foster Wrote: Since this was a cassette tape stored game, each time you were killed in this game, you had to rewind the tape and wait for it to load again before starting the game over.
If it was a BASIC program then looking for "NEW" or some "POKE" and then rubbing it away would have done something about that! Especially for software that had to be bought I'm not rewinding no darned tape!

I had a Color Computer 2, famous for complaining "?IO ERROR" in repeated attempts to load one program. Yes even from cassettes especially designed for saving programs, not those C-60's sold in bargain stores and not even those Type-1 cartridge-like silly things Maxell did in the 1980's.

Later I bought a Coco3 and its related floppy disk drive. Later I exchanged the drive for a Tandy1000HX which was better, and wound up getting the expansion board to 640KB and an external floppy drive for it. Programming in QuickBASIC on the Tandy1000HX was a far cry from dealing with slow-as-molasses interpreter on Color Computers.


RE: Haunted House Text Adventure Game - Donald Foster - 10-31-2022

mnrvovrfc,

It wasn't written in BASIC, it was written in Machine Language. Also, because of memory size, the game was loaded in 2 halves, downstairs and upstairs data.

Donald


RE: Haunted House Text Adventure Game - Pete - 10-31-2022

I'm pretty sure the game itself is haunted by the poor bastard who died coding it in machine language. Now there's a tortured soul if there ever was one. I have to admit I only made it into the foyer. After that, I copied the code, and hacked in two more commands. 1) Bulldozer. 2) Level.

Q: What should I do with the bulldozer?

A: Level house.

I'm just not all that patient, as my avatar suggests...

Pete


RE: Haunted House Text Adventure Game - mnrvovrfc - 10-31-2022

(10-31-2022, 05:27 AM)Donald Foster Wrote: mnrvovrfc,

It wasn't written in BASIC, it was written in Machine Language. Also, because of memory size, the game was loaded in 2 halves, downstairs and upstairs data.

Donald
So I keep forgetting one of those computers came with only 4KB of RAM which made it insensible to provide it in BASIC! The program code must have taken more memory than the data needed by the game. Quite a lot of code must have been needed to load one module or the other. What a shame it had to erase itself if the player failed in his/her mission.

Donald thank you for answering me.


RE: Haunted House Text Adventure Game - Pete - 10-31-2022

My first computer, 1981 T.I. 99-4A. 4K memory (8 if you used memory expansion, but seriously, what's the point.) and tape cassette for a drive. Thank God for Atari 64!

Pete