Short Text Adventure Example by UFOs other account lol18th Sep 2005 19:21
|
---|
Summary This is a text adventure example for beginers Description Awesome text adventure example for beginners. It is long, but the commands are simple and it is easy to understand (I hope). You do not need to give me credit or anything. I don't care. Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com Print "Really Short Text adventure!!!" Print "This is for complete beginers. If you are advanced then you are wasting your time." Print "Important! If you are thinking about making a text adventure game, make sure you use proper grammer" Print "and stuff because the whole game is text!" Print "Do not put any periods at the end of your commands." Print ":)" suspend for key Lines = 0 key = 0 Forest_trail: cls : lines = 0 Print "FOREST TRAIL" Print "You are on a trail in the forest. Behind you is an unclimbable cliff and to the west and east is" Print "thick vegetation, which is unpassable." Print "The trail continues to the north and there is a large tree with low branches next to you." Lines = Lines + 4 Do Input "-->", input$ lines = lines + 1 input$ = lower$(input$) If input$ = "look" or input$ = "look around" or input$ = "examine surroundings" Print "FOREST TRAIL" Print "You are on a trail in the forest. Behind you is an unclimbable cliff and to the west and east" Print "is thick vegetation, which is unpassable." Print "The trail continues to the north and there is a large tree with low branches next to you." Lines = Lines + 4 endif If input$ = "look at tree" or input$ = "look at large tree" or input$ = "examine tree" or input$ = "examine large tree" Print "The tree is very large and has low branches" lines = lines + 1 Endif If input$ = "look at trail" or input$ = "examine trail" Print "It leads north." lines = lines + 1 endif If input$ = "look at forest" or input$ = "examine forest" or input$ = "e" or input$ = "go east" or input$ = "east" or input$ = "w" or input$ = "west" or input$ = "go west" Print "You cannot go to the west or east because the forest is to thick in those directions." lines = lines + 1 endif If input$ = "look at cliff" or input$ = "examine cliff" or input$ = "s" or input$ = "south" or input$ = "go south" Print "The large cliff to the south blocks the way and is unclimbable" lines = lines + 1 endif If input$ = "n" or input$ = "north" or input$ = "go north" goto Cave_entrance endif if input$ = "climb tree" or input$ = "climb up tree" goto on_top_of_tree endif If lines = 25 lines = 0 cls endif Loop Cave_entrance: cls : lines = 0 Print "CAVE ENTRANCE" Print "You are at an entrance to a cave, but it is blocked by a gate and is locked." Print "You need a key to pass. To the east and west is thick vegetation" Print "which is unpassable. A trail goes south." lines = lines + 4 Do Input "-->", input$ lines = lines + 1 input$ = lower$(input$) If input$ = "look at trail" or input$ = "examine trail" Print "It leads south." lines = lines + 1 endif If input$ = "look" or input$ = "look around" or input$ = "examine surroundings" Print "CAVE ENTRANCE" Print "You are at an entrance to a cave, but it is blocked by a gate and is locked." Print "You need a key to pass. To the east and west is thick vegetation" Print "which is unpassable. A trail goes south." lines = lines + 4 endif If input$ = "look at forest" or input$ = "examine forest" or input$ = "e" or input$ = "go east" or input$ = "east" or input$ = "w" or input$ = "west" or input$ = "go west" Print "You cannot go to the west or east because the forest is to thick in those directions." lines = lines + 1 endif If input$ = "n" or input$ = "north" or input$ = "go north" or input$ = "open gate with key" or input$ = "use key on lock" If key = o Print "You cannot pass because you don't have a key." Lines = Lines + 1 endif If key = 1 Print "You open the gate with the key and enter the cave." Print "You win! You can add on to this game. You don't have to mention me or anything." suspend for key end endif endif If input$ = "s" or input$ = "south" or input$ = "go south" goto Forest_Trail endif If input$ = "look at lock" or input$ = "examine lock" or input$ = "look at gate" or input$ = "examine gate" or input$ = "look at cave" or input$ = "examine cave" Print "The cave entrance is covered with a gate which is locked. You cannot pass without a key." lines = Lines + 1 endif If lines = 25 lines = 0 cls endif Loop On_top_of_tree: cls : lines = 0 Print "ON TOP OF TREE" Print "You are on top of the tree. There is a key hanging on one of the branches." Lines = lines + 2 Do Input "-->", input$ lines = lines + 1 input$ = lower$(input$) If input$ = "look" or input$ = "look around" or input$ = "examine surroundings" Print "ON TOP OF TREE" Print "You are on top of the tree. There is a key hanging on one of the branches." Lines = lines + 2 endif If input$ = "take key" Print "You take the key" key = 1 lines = lines + 1 endif If input$ = "look at tree" Print "You are on the tree." lines = lines + 1 endif If input$ = "climb down" or input$ = "climb down tree" goto forest_trail endif If lines = 25 lines = 0 suspend for key cls endif loop |