Posted: 10th Jan 2009 02:01
Hokay, I've gotten myself into a bit of a mess. I tried using arrays like the tutorial suggested and this is what I've got:
[href]undefined[/href]
rem User interface array
DIM Adventure$(5,6)
Adventure$(1,1)="You find yourself in the middle of a forest. A path runs north and south. You see smoke rising to the north."
Adventure$(1,2)="What do you do?"
Adventure$(1,3)="1. Follow the path North."
Adventure$(1,4)="2. Follow the path South."
Adventure$(1,5)="3. Walk West into the trees."
Adventure$(1,6)="4. Walk East into the trees."
Adventure$(2,1)="After walking into the trees, you have come to a cliff and must turn back."
Adventure$(2,2)="After walking into the trees, you emerge into a clearing. You think you see a cave entrance in the distance."
Adventure$(2,3)="What do you do?"
Adventure$(2,4)="1. Go towards the cave."
Adventure$(2,5)="2. Go back."
Adventure$(2,6)="You find a silver dagger inside a hollow tree stump. However, the path leads off a cliff and you must turn back."
Adventure$(3,1)="You discover a small cottage. The door is unlocked, and you can't see inside."
Adventure$(3,2)="What do you do?"
Adventure$(3,3)="1. Enter the Cottage."
Adventure$(3,4)="2. Keep following the path north."
Adventure$(3,5)="3. Go back."
Adventure$(4,1)="Inside a crazy old man jumps at you with a knife and cuts your throat!"
Adventure$(4,2)="And so ends your Adventure. Sorry!"
Adventure$(4,3)="Inside you are attacked by an old man wielding a knife. You make short work of him with your dagger."
Adventure$(4,4)="Upon looking around the cottage, you find a torch which is still warm."
Adventure$(4,5)="Having successfully looted the cottage, you exit to the path. What now?"
Adventure$(4,6)="1. Go back."
Adventure$(5,1)="You are inside a cold dark cave. You can't see anything and must turn back."
Adventure$(5,2)="You are inside a cold dark cave. You light your torch and discover only one way; deeper into the cave."
Adventure$(5,3)="1. Go deeper into the cave."
Adventure$(5,4)="2. Go back."
Adventure$(5,5)="Upon venturing deeper into the cave, you come across a large, open chest which contains tons of money."
Adventure$(5,6)="You found the Money! You Win! Yay!"
rem Inventory array
DIM Inventory(1,2)
Inventory(1,1)=0
Inventory(1,2)=0
rem Start of Adventure
AdventureStart:
CLS
PRINT Adventure$(1,1)
PRINT Adventure$(1,2)
PRINT Adventure$(1,3)
PRINT Adventure$(1,4)
PRINT Adventure$(1,5)
PRINT Adventure$(1,6)
INPUT " ",start
rem North selection - cottage
IF start=1
CLS
PRINT Adventure$(3,1)
PRINT Adventure$(3,2)
PRINT Adventure$(3,3)
PRINT Adventure$(3,4)
PRINT Adventure$(3,5)
INPUT " ",cottage
ENDIF
rem Cottage death
IF cottage=1 AND Inventory(1,1)=0
CLS
PRINT Adventure$(4,1)
PRINT Adventure$(4,2)
END
ENDIF
rem cottage loot
IF cottage=1 AND Inventory(1,1)=1
CLS
PRINT Adventure$(4,3)
SLEEP 3000
PRINT Adventure$(4,4)
SLEEP 3000
PRINT Adventure$(4,5)
PRINT Adventure$(4,6)
PRINT Adventure$(3,4)
Inventory(1,2)=1
INPUT " ",loot
ENDIF
rem South selection - dagger
IF start=2 AND Inventory(1,1)=0
CLS
Inventory(1,1)=1
PRINT Adventure$(2,6)
SLEEP 5000
GOTO AdventureStart
ENDIF
IF start=2 AND Inventory(1,1)=1
CLS
PRINT "The stump is empty, the cliff's still there."
SLEEP 3000
GOTO AdventureStart
ENDIF
rem West selection - cliff
IF start=3
CLS
PRINT Adventure$(2,1)
SLEEP 3000
GOTO AdventureStart
ENDIF
rem East selection - cave entrance
CaveEntrance:
IF start=4
CLS
PRINT Adventure$(2,2)
PRINT Adventure$(2,3)
PRINT Adventure$(2,4)
PRINT Adventure$(2,5)
INPUT " ",cave
ENDIF
IF cave=1 AND Inventory(1,2)=0
CLS
PRINT Adventure$(5,1)
SLEEP 3000
GOTO CaveEntrance
ENDIF
IF cave=1 AND Inventory(1,2)=1
CLS
PRINT Adventure$(5,2)
PRINT Adventure$(5,3)
PRINT Adventure$(5,4)
INPUT " ",deeper
ENDIF
IF cave=2 THEN GOTO AdventureStart
IF loot=1 THEN GOTO AdventureStart
HELP!!!