#!/usr/bin/env python import random import time ## You can score 105 points, 15 for each of: ## Dropping the shovel ## Dropping the book ## Dropping the cheese ## Dropping the chocolate ## Dropping the clementine ## Buying the popcorn ## Buying the taco ## 1. Name either one of the four items you dropped in the bin to start the computer. ## 2. What did you drop in the bin to start the lightup on stage? ## 3. What progamming language did you get by typing on the computer? ## 4. What did you find by digging? ## 5. Name either one of the two items you are going to pay for. ## 6. What is the nearest dollar of the price of the shovel? ## See if you can try your best and earn 105 points ... ## But promise not to cheat by peeking at the metadunnet[0].py code or the ## metadunnet[0].cheat.txt cheat? ## ## You can type 'metax pause' to pause the game, 'metax play' to resume. ## Type 'metax startover' to start over, and you can type 'metax end' to end. ## ## Best directions are north, south, east, and west. ## They can be abbreviated to n, s, e, and w. ## Enter passwords, answer questions, more! ## ## You can possibly jump by typing jump, but jumping is never useful. You ## carelessly drop any items you are holding, and then have to pick them up. And ## please do not jump when there's a deep bin. You will fall in and hit your head ## several times. ## ## When there's a cliff (or another related opening) in a certain direction, be ## careful that you do not go in this direction! You will hit your head if you ## try. ## ## If you want to bury any items, make sure you have a shovel. Do not lose it! ## ## Also, if anything is poisonous, do not walk towards it! Poison kills you. You ## would die if you breathed anything toxic. ## ## You should consider a player with a suitable age, i.e. one that is not so young ## that they'd be careless and fall down right away. Anyone under six years of ## age would be likely to fall off the cliff, or get near the poisonous bushes, ## etc., so save this game for ages 6 and up. ## Note that this game can /especially/ be played by a 12-year-old! ## ## Good luck! oql = ['Name either one of the four items you dropped in the bin to start the computer.','What did you drop in the bin to start the lightup on stage?','What progamming language did you get by typing on the computer?','What did you find by digging?','Name either one of the two items you are going to pay for.','What is the nearest dollar of the price of the shovel?'] sql = [] for i in xrange(6): sql.append(oql[random.randrange(0,oql.__len__())]) oql.remove(sql[sql.__len__()-1]) charset = 'abcdefghijklmnopqrstuvwxyz0123456789' password = '' for i in xrange(random.randrange(4,10)): password = '%s%s' % (password, charset[random.randrange(0,36)]) section = 'dead end' shovel = 'dead end' book = 'building fork' manual = 'inseller' caterpillar = 0 butterfly = 0 percent = 0 cheese = 'under E-W' chocolate = 'snack room' clementine = 'snack room' dollar_2 = 'hall end' dollar_5 = 'gone' popcorn = 'inseller' taco = 'inseller' money = 0.0 movies = 0 points = 0 log = 0 finale = 0 stop = 0 give = 0 print 'Dead end' print 'You are at the dead end of a dirt road. The road goes to the east. In the' print 'distance you see it will eventually get a connected path from the left. You' print 'also see a cliff in the distance. The bushes that surround this road are very' print 'poisonous, and they are dark green.' print 'There is a shovel here.' while True: rep = raw_input(">") reply = rep.lower() best = reply.split() reply = '' for i in xrange(0, best.__len__()): reply = '%s%s' % (reply, best[i]) if i < best.__len__() - 1: reply = '%s ' % (reply) if reply == '': pass elif (reply == 'hint') or (reply == 'hints') or (reply == 'clue') or (reply == 'clues'): print 'You have scored %d out of a possible 105 points.' % (points) print 'Based on your current game level, here are examples of tasks:' print if points == 0: print 'Take the shovel and look at it. Then go to where the ground is soft and dig.' print 'If you find something, look to see what it is. Take this item and look at it.' print 'Then go to the building fork, take the book and look at it, and figure out the' print 'password to enter the building. Then you can go to a snack room to get some' print 'more items. Then you drop four of your items into the bin in the computer' print 'room.' elif points == 15: print 'You have dropped one of your items in the bin in the computer room.' print 'See if you can drop in the rest of the items.' elif points == 30: print 'You have dropped two of your items in the bin in the computer room.' print 'See if you can drop in the other two items.' elif points == 45: print 'You have dropped three of your items in the bin in the computer room.' print 'See if you can drop in the last item.' elif points == 60: print 'Now that you have dropped all four items in the bin, see if you can type on the' print 'computer (which has a login & password based on the person that this computer' print 'is dedicated to), and get a manual out of the prize bin (based on one of the' print 'items in the Vlist directory). Then, by typing Ventry you can go north. Once' print 'you go to the soft room where the ground feels like a matress, you can take a' print "nap if you're tired. Then, go to the stage floor and drop the given item into" print 'the bin.' elif points == 75: print "Now that you're at it, you can go to the popcorn seller and buy popcorn (but" print "first you'll need to find money)." print 'You will have to answer six questions and review them over. In a question' print 'room, you would be prompted to give the answer when you try to go north or' print 'south (each of these sides has a separate keyboard).' print 'Then you will find money.' print '(Once you get popcorn you will be able to watch a movie.)' elif points == 90: print "You're getting close! Now you can go to one of the three movie theatre" print 'sections and watch the movie (if you like this movie). Then you go back at the' print 'restaurant, take the 5-dollar bill, and get a taco that you are able to get.' elif points == 105: print 'The game is almost over now, so do not give up! You are allowed to eat your' print 'cheese taco, and then you can go back to the computer and type finale.' print 'You will have one last question to answer for an extra credit of 15 finale-type' print 'points.' print elif (reply == 'help') or (reply == '?'): print 'Help on Metadunnet Game 0 by Nicholas McConnell' print 'See if you can try your best and earn 105 points ...' print 'But promise not to cheat by peeking at the metadunnet[0].py code or the' print 'metadunnet[0].cheat.txt cheat?' print print "You can type 'metax pause' to pause the game, 'metax play' to resume." print "Type 'metax startover' to start over, and you can type 'metax end' to end." print print 'Best directions are north, south, east, and west.' print 'They can be abbreviated to n, s, e, and w.' print 'Enter passwords, answer questions, more!' print print 'You can possibly jump by typing jump, but jumping is never useful. You' print 'carelessly drop any items you are holding, and then have to pick them up. And' print "please do not jump when there's a deep bin. You will fall in and hit your head" print 'several times.' print print "When there's a cliff (or another related opening) in a certain direction, be" print 'careful that you do not go in this direction! You will hit your head if you' print 'try.' print print 'If you want to bury any items, make sure you have a shovel. Do not lose it!' print print 'Also, if anything is poisonous, do not walk towards it! Poison kills you. You' print 'would die if you breathed anything toxic.' print print 'You should consider a player with a suitable age, i.e. one that is not so young' print "that they'd be careless and fall down right away. Anyone under six years of" print 'age would be likely to fall off the cliff, or get near the poisonous bushes,' print 'etc., so save this game for ages 6 and up.' print 'Note that this game can /especially/ be played by a 12-year-old!' print print 'Good luck!' print elif (reply == 'inventory') or (reply == 'inv'): print 'You currently have:' if shovel == 'inventory': print 'A shovel' if book == 'inventory': print 'A book' if manual == 'inventory': print 'A Vyss-based manual' if cheese == 'inventory': print 'Some swiss cheese' if chocolate == 'inventory': print 'A chocolate bar' if clementine == 'inventory': print 'A clementine' if dollar_2 == 'inventory': print 'A two-dollar bill' if dollar_5 == 'inventory': print 'A five-dollar bill' if popcorn == 'inventory': print 'Some popcorn' if taco == 'inventory': print 'A cheese taco' if (money == 0.25) or (money == 5.25): print 'A quarter' elif money == 0.5: print 'Two quarters' elif reply == 'metax pause': print "Paused. Type 'metax play' to resume." while True: rex = raw_input("") rex = rex.lower() if rex.split() == ['metax', 'play']: print 'Resumed.' print if section == 'dead end': print 'Dead end' print 'You are at the dead end of a dirt road. The road goes to the east. In the' print 'distance you see it will eventually get a connected path from the left. You' print 'also see a cliff in the distance. The bushes that surround this road are very' print 'poisonous, and they are dark green.' elif section == 'E-W': print 'E/W dirt road' print 'There is a soft ground here.' print 'The bushes around here are very poisonous.' elif section == 'building fork': print 'Building Fork' print 'There is a building to the north.' print 'There is a 20-foot-deep cliff off to the east.' print 'The bushes around here are very poisonous.' elif section == 'building hall': print 'Building Hallway' print 'You are in the hallway of a building.' elif section == 'snack room': print 'Snack room' print 'You are in a snack room, but the waiter is unfortunately absent.' elif section == 'computer room': print 'Computer room' print 'You are in a computer room.' if (shovel == 'gone') and (cheese == 'gone') and (chocolate == 'gone') and (book == 'gone'): print 'The lights are flashing in an even pattern.' elif percent == 0: print 'The lights seem motionless.' print 'To start up the fans, you must drop each of these four items into the bin:' print 'shovel, cheese, chocolate, book' else: print 'The computer is %d%s booted up.' % (percent*25, '%') elif section == 'restaurant': print 'Restaurant' print 'You are at a restaurant. Cheese tacos cost $4.75. Chicken tacos cost $6.75.' elif section == 'soft room': print 'Soft room' print 'You are in a soft room. The room is dark. The ground here feels like a' print 'matress.' elif section == 'stage floor': print 'Stage floor' print 'You are on a stage floor. The curtains are open. The audience is to the' print 'south.' if clementine == 'gone': print 'The lights are flashing in an even pattern.' else: print 'The lights seem motionless.' print 'To start up the lights, you must drop a clementine into the bin.' elif section == 'popcorn': print 'Popcorn seller' print 'You are at a popcorn seller. A small popcorn costs $1.75.' if popcorn == 'gone': print 'Sorry, the popcorn seller is closed.' else: print 'The popcorn seller is open.' elif section == 'movie hallway 1': print 'Movie Hallway 1' print 'You are in the movie hallway. Room #1 is to the east.' elif section == 'movie hallway 2': print 'Movie Hallway 2' print 'You are in the movie hallway. Room #2 is to the east.' elif section == 'movie hallway 3': print 'Movie Hallway 3' print 'You are in the movie hallway. Room #3 is to the east.' elif section == 'movie section 1': print 'Movie Section 1' print 'You are in movie section #1.' if movies == 1: print 'The movie is playing Toy Story.' else: print 'The movie is not playing anything.' elif section == 'movie section 2': print 'Movie Section 2' print 'You are in movie section #2.' if movies == 1: print 'The movie is playing 101 Dalmatians.' else: print 'The movie is not playing anything.' elif section == 'movie section 3': print 'Movie Section 3' print 'You are in movie section #3.' if movies == 1: print 'The movie is playing Shrek.' else: print 'The movie is not playing anything.' elif section == 'question room 1': print 'Question room 1' print 'You will be prompted to give the answer when you try to go north or south.' print 'There is a keyboard on each of these sides.' print 'Your question is:' print sql[0] elif section == 'question room 2': print 'Question room 2' print 'You will be prompted to give the answer when you try to go north or south.' print 'There is a keyboard on each of these sides.' print 'Your question is:' print sql[1] elif section == 'question room 3': print 'Question room 3' print 'You will be prompted to give the answer when you try to go north or south.' print 'There is a keyboard on each of these sides.' print 'Your question is:' print sql[2] elif section == 'question room 4': print 'Question room 4' print 'You will be prompted to give the answer when you try to go north or south.' print 'There is a keyboard on each of these sides.' print 'Your question is:' print sql[3] elif section == 'question room 5': print 'Question room 5' print 'You will be prompted to give the answer when you try to go north or south.' print 'There is a keyboard on each of these sides.' print 'Your question is:' print sql[4] elif section == 'question room 6': print 'Question room 6' print 'You will be prompted to give the answer when you try to go north or south.' print 'There is a keyboard on each of these sides.' print 'Your question is:' print sql[5] elif section == 'hall end': print 'End of hallway' print 'You are at the end of the movie hallway. The hallway goes south.' if shovel == section: print 'There is a shovel here.' if book == section: print 'There is a thick book here.' if manual == section: print 'There is a Vyss-type manual here.' if cheese == section: print 'There is some swiss cheese here.' if chocolate == section: print 'There is some chocolate here.' if clementine == section: print 'There is a clementine here.' if dollar_2 == section: print 'There is a 2-dollar bill here.' if dollar_5 == section: print 'There is a 5-dollar bill here.' if popcorn == section: print 'There is some popcorn here.' if taco == section: print 'There is a cheese taco here.' break elif rex.split() == ['metax', 'pause']: print 'The game is currently paused.' elif rex.split() == ['metax', 'startover']: print 'Done.' print oql = ['Name either one of the four items you dropped in the bin to start the computer.','What did you drop in the bin to start the lightup on stage?','What progamming language did you get by typing on the computer?','What did you find by digging?','Name either one of the two items you are going to pay for.','What is the nearest dollar of the price of the shovel?'] sql = [] for i in xrange(6): sql.append(oql[random.randrange(0,oql.__len__())]) oql.remove(sql[sql.__len__()-1]) charset = 'abcdefghijklmnopqrstuvwxyz0123456789' password = '' for i in xrange(random.randrange(4,10)): password = '%s%s' % (password, charset[random.randrange(0,36)]) section = 'dead end' shovel = 'dead end' book = 'building fork' manual = 'inseller' caterpillar = 0 percent = 0 cheese = 'under E-W' chocolate = 'snack room' clementine = 'snack room' dollar_2 = 'hall end' dollar_5 = 'gone' popcorn = 'inseller' taco = 'inseller' money = 0.0 movies = 0 points = 0 log = 0 finale = 0 stop = 0 print 'Dead end' print 'You are at the dead end of a dirt road. The road goes to the east. In the' print 'distance you see it will eventually get a connected path from the left. You' print 'also see a cliff in the distance. The bushes that surround this road are very' print 'poisonous, and they are dark green.' print 'There is a shovel here.' break elif rex.split() == ['metax', 'end']: print print 'You have scored %d out of a possible 105 points.' % (points) while True: raw_input("") elif reply == 'metax play': print 'The game is currently being played.' elif reply == 'metax startover': print 'Done.' print oql = ['Name either one of the four items you dropped in the bin to start the computer.','What did you drop in the bin to start the lightup on stage?','What progamming language did you get by typing on the computer?','What did you find by digging?','Name either one of the two items you are going to pay for.','What is the nearest dollar of the price of the shovel?'] sql = [] for i in xrange(6): sql.append(oql[random.randrange(0,oql.__len__())]) oql.remove(sql[sql.__len__()-1]) charset = 'abcdefghijklmnopqrstuvwxyz0123456789' password = '' for i in xrange(random.randrange(4,10)): password = '%s%s' % (password, charset[random.randrange(0,36)]) section = 'dead end' shovel = 'dead end' book = 'building fork' manual = 'inseller' caterpillar = 0 percent = 0 cheese = 'under E-W' chocolate = 'snack room' clementine = 'snack room' dollar_2 = 'hall end' dollar_5 = 'gone' popcorn = 'inseller' taco = 'inseller' money = 0.0 movies = 0 points = 0 log = 0 finale = 0 stop = 0 print 'Dead end' print 'You are at the dead end of a dirt road. The road goes to the east. In the' print 'distance you see it will eventually get a connected path from the left. You' print 'also see a cliff in the distance. The bushes that surround this road are very' print 'poisonous, and they are dark green.' print 'There is a shovel here.' elif reply == 'metax end': print print 'You have scored %d out of a possible 105 points.' % (points) while True: raw_input("") elif reply == 'look': if section == 'dead end': print 'Dead end' print 'You are at the dead end of a dirt road. The road goes to the east. In the' print 'distance you see it will eventually get a connected path from the left. You' print 'also see a cliff in the distance. The bushes that surround this road are very' print 'poisonous, and they are dark green.' elif section == 'E-W': print 'E/W dirt road' print 'There is a soft ground here.' print 'The bushes around here are very poisonous.' elif section == 'building fork': print 'Building Fork' print 'There is a building to the north.' print 'There is a 20-foot-deep cliff off to the east.' print 'The bushes around here are very poisonous.' elif section == 'building hall': print 'Building Hallway' print 'You are in the hallway of a building.' elif section == 'snack room': print 'Snack room' print 'You are in a snack room, but the waiter is unfortunately absent.' elif section == 'computer room': print 'Computer room' print 'You are in a computer room.' if (shovel == 'gone') and (cheese == 'gone') and (chocolate == 'gone') and (book == 'gone'): print 'The lights are flashing in an even pattern.' elif percent == 0: print 'The lights seem motionless.' print 'To start up the fans, you must drop each of these four items into the bin:' print 'shovel, cheese, chocolate, book' else: print 'The computer is %d%s booted up.' % (percent*25, '%') elif section == 'restaurant': print 'Restaurant' print 'You are at a restaurant. Cheese tacos cost $4.75. Chicken tacos cost $6.75.' elif section == 'soft room': print 'Soft room' print 'You are in a soft room. The room is dark. The ground here feels like a' print 'matress.' elif section == 'stage floor': print 'Stage floor' print 'You are on a stage floor. The curtains are open. The audience is to the' print 'south.' if clementine == 'gone': print 'The lights are flashing in an even pattern.' else: print 'The lights seem motionless.' print 'To start up the lights, you must drop a clementine into the bin.' elif section == 'popcorn': print 'Popcorn seller' print 'You are at a popcorn seller. A small popcorn costs $1.75.' if popcorn == 'gone': print 'Sorry, the popcorn seller is closed.' else: print 'The popcorn seller is open.' elif section == 'movie hallway 1': print 'Movie Hallway 1' print 'You are in the movie hallway. Room #1 is to the east.' elif section == 'movie hallway 2': print 'Movie Hallway 2' print 'You are in the movie hallway. Room #2 is to the east.' elif section == 'movie hallway 3': print 'Movie Hallway 3' print 'You are in the movie hallway. Room #3 is to the east.' elif section == 'movie section 1': print 'Movie Section 1' print 'You are in movie section #1.' if movies == 1: print 'The movie is playing Toy Story.' else: print 'The movie is not playing anything.' elif section == 'movie section 2': print 'Movie Section 2' print 'You are in movie section #2.' if movies == 1: print 'The movie is playing 101 Dalmatians.' else: print 'The movie is not playing anything.' elif section == 'movie section 3': print 'Movie Section 3' print 'You are in movie section #3.' if movies == 1: print 'The movie is playing Shrek.' else: print 'The movie is not playing anything.' elif section == 'question room 1': print 'Question room 1' print 'You will be prompted to give the answer when you try to go north or south.' print 'There is a keyboard on each of these sides.' print 'Your question is:' print sql[0] elif section == 'question room 2': print 'Question room 2' print 'You will be prompted to give the answer when you try to go north or south.' print 'There is a keyboard on each of these sides.' print 'Your question is:' print sql[1] elif section == 'question room 3': print 'Question room 3' print 'You will be prompted to give the answer when you try to go north or south.' print 'There is a keyboard on each of these sides.' print 'Your question is:' print sql[2] elif section == 'question room 4': print 'Question room 4' print 'You will be prompted to give the answer when you try to go north or south.' print 'There is a keyboard on each of these sides.' print 'Your question is:' print sql[3] elif section == 'question room 5': print 'Question room 5' print 'You will be prompted to give the answer when you try to go north or south.' print 'There is a keyboard on each of these sides.' print 'Your question is:' print sql[4] elif section == 'question room 6': print 'Question room 6' print 'You will be prompted to give the answer when you try to go north or south.' print 'There is a keyboard on each of these sides.' print 'Your question is:' print sql[5] elif section == 'hall end': print 'End of hallway' print 'You are at the end of the movie hallway. The hallway goes south.' if shovel == section: print 'There is a shovel here.' if book == section: print 'There is a thick book here.' if manual == section: print 'There is a Vyss-type manual here.' if cheese == section: print 'There is some swiss cheese here.' if chocolate == section: print 'There is some chocolate here.' if clementine == section: print 'There is a clementine here.' if dollar_2 == section: print 'There is a 2-dollar bill here.' if dollar_5 == section: print 'There is a 5-dollar bill here.' if popcorn == section: print 'There is some popcorn here.' if taco == section: print 'There is a cheese taco here.' elif reply == 'look around': if section == 'dead end': print 'East of you is an east-to-west dirt road.' print 'There are toxic bushes around you.' elif section == 'E-W': print 'West of you is a dead end.' print 'East of you is a building fork.' print 'There are toxic bushes around you.' elif section == 'building fork': print 'West of you is an east-to-west dirt road.' print 'East of you is a cliff that is 20 feet deep.' print 'North of you is a building front with a keyboard and machine.' print 'There are toxic bushes around you.' elif section == 'building hall': print 'West of you is a computer room.' print 'East of you is a snack room.' print 'South of you is a building fork.' elif section == 'snack room': print 'West of you is a building hallway.' elif section == 'computer room': if butterfly == 1: print 'West of you is a haunted room.' print 'East of you is a building hallway.' if caterpillar == 1: print 'North of you is a restaurant.' elif section == 'restaurant': if butterfly == 1: print 'West of you is a boxing area.' print 'East of you is a soft room.' print 'South of you is a computer room.' elif section == 'soft room': print 'West of you is a restaurant.' print 'East of you is a stage floor.' elif section == 'stage floor': print 'West of you is a soft room.' print 'East of you is a movie hallway. This door is right next to room #2.' print 'South of you is an audience. The curtain is open.' elif section == 'popcorn': print 'North of you is a movie hallway (next to room #1).' elif section == 'movie hallway 1': print 'East of you is movie section #1.' print 'North of you is the movie hallway (next to room #2).' print 'South of you is a popcorn seller.' elif section == 'movie hallway 2': print 'West of you is a stage floor.' print 'East of you is movie section #2.' print 'North of you is the movie hallway (next to room #3).' print 'South of you is the movie hallway (next to room #1).' elif section == 'movie hallway 3': print 'East of you is movie section #3.' print 'North of you is QUESTION ROOM 1.' print 'South of you is the movie hallway (next to room #2).' elif section == 'movie section 1': print 'West of you is the movie hallway.' elif section == 'movie section 2': print 'West of you is the movie hallway.' elif section == 'movie section 3': print 'West of you is the movie hallway.' elif section == 'question room 1': print 'North of you is QUESTION ROOM 2.' print 'South of you is the movie hallway (next to room #3).' elif section == 'question room 2': print 'North of you is QUESTION ROOM 3.' print 'South of you is QUESTION ROOM 1.' elif section == 'question room 3': print 'North of you is QUESTION ROOM 4.' print 'South of you is QUESTION ROOM 2.' elif section == 'question room 4': print 'North of you is QUESTION ROOM 5.' print 'South of you is QUESTION ROOM 3.' elif section == 'question room 5': print 'North of you is QUESTION ROOM 6.' print 'South of you is QUESTION ROOM 4.' elif section == 'question room 6': print 'North of you is the end of a hallway.' print 'South of you is QUESTION ROOM 5.' elif section == 'hall end': print 'South of you is QUESTION ROOM 6.' elif (reply == 'e') or (reply == 'east') or (reply == 'go e') or (reply == 'go east'): if section == 'dead end': section = 'E-W' print 'E/W dirt road' print 'There is a soft ground here.' print 'The bushes around here are very poisonous.' elif section == 'E-W': section = 'building fork' print 'Building Fork' print 'There is a building to the north.' print 'There is a 20-foot-deep cliff off to the east.' print 'The bushes around here are very poisonous.' elif section == 'building fork': print 'You fall off the cliff and land right on your head.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break elif section == 'building hall': section = 'snack room' print 'Snack room' elif section == 'snack room': print "You can't go that way." elif section == 'computer room': section = 'building hall' print 'Building Hallway' elif section == 'restaurant': section = 'soft room' print 'Soft room' print 'You are in a soft room. The room is dark. The ground here feels like a' print 'matress.' elif section == 'soft room': section = 'stage floor' print 'Stage floor' print 'The curtains are open. The audience is to the south.' elif section == 'stage floor': section = 'movie hallway 2' print 'Movie Hallway 2' elif section == 'popcorn': print "You can't go that way." elif section == 'movie hallway 1': section = 'movie section 1' print 'Movie Section 1' elif section == 'movie hallway 2': section = 'movie section 2' print 'Movie Section 2' elif section == 'movie hallway 3': section = 'movie section 3' print 'Movie Section 3' elif section == 'movie section 1': print "You can't go that way." elif section == 'movie section 2': print "You can't go that way." elif section == 'movie section 3': print "You can't go that way." elif section == 'question room 1': print "You can't go that way." elif section == 'question room 2': print "You can't go that way." elif section == 'question room 3': print "You can't go that way." elif section == 'question room 4': print "You can't go that way." elif section == 'question room 5': print "You can't go that way." elif section == 'question room 6': print "You can't go that way." elif section == 'hall end': print "You can't go that way." if shovel == section: print 'There is a shovel here.' if book == section: print 'There is a thick book here.' if manual == section: print 'There is a Vyss-type manual here.' if cheese == section: print 'There is some swiss cheese here.' if chocolate == section: print 'There is some chocolate here.' if clementine == section: print 'There is a clementine here.' if dollar_2 == section: print 'There is a 2-dollar bill here.' if dollar_5 == section: print 'There is a 5-dollar bill here.' if popcorn == section: print 'There is some popcorn here.' if taco == section: print 'There is a cheese taco here.' elif (reply == 'w') or (reply == 'west') or (reply == 'go w') or (reply == 'go west'): if section == 'dead end': print 'You walk toward toxic bushes and appear to breathe poison.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break elif section == 'E-W': section = 'dead end' print 'Dead end' print 'The bushes around here are very poisonous.' elif section == 'building fork': section = 'E-W' print 'E/W dirt road' print 'There is a soft ground here.' print 'The bushes around here are very poisonous.' elif section == 'building hall': section = 'computer room' print 'Computer room' print 'There is a computer here.' print 'There is a deep bin here.' elif section == 'snack room': section = 'building hall' print 'Building Hallway' elif section == 'computer room': if butterfly == 1: print 'Haunted Room' print 'You are in a haunted room. The ghosts here look very scary. They zoom pass' print 'you with haunted sounds. You try to escape from the ghosts, but you feel the' print 'great pain when they rip your forehead off.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break else: print "You can't go that way." elif section == 'restaurant': if butterfly == 1: print 'Boxing Area' print 'You are in an area where people are boxing. You are just dressed. You try to' print 'escape from the boxers, but you feel the impact and they hit your forehead.' print 'You fall on the ground and whine like crazy!' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break else: print "You can't go that way." elif section == 'soft room': section = 'restaurant' print 'Restaurant' print 'Cheese tacos cost $4.75. Chicken tacos cost $6.75.' elif section == 'stage floor': section = 'soft room' print 'Soft room' print 'You are in a soft room. The room is dark. The ground here feels like a' print 'matress.' elif section == 'popcorn': print "You can't go that way." elif section == 'movie hallway 1': print "You can't go that way." elif section == 'movie hallway 2': section = 'stage floor' print 'Stage floor' print 'The curtains are open. The audience is to the south.' elif section == 'movie hallway 3': print "You can't go that way." elif section == 'movie section 1': section = 'movie hallway 1' print 'Movie Hallway 1' elif section == 'movie section 2': section = 'movie hallway 2' print 'Movie Hallway 2' elif section == 'movie section 3': section = 'movie hallway 3' print 'Movie Hallway 3' elif section == 'question room 1': print "You can't go that way." elif section == 'question room 2': print "You can't go that way." elif section == 'question room 3': print "You can't go that way." elif section == 'question room 4': print "You can't go that way." elif section == 'question room 5': print "You can't go that way." elif section == 'question room 6': print "You can't go that way." elif section == 'hall end': print "You can't go that way." if shovel == section: print 'There is a shovel here.' if book == section: print 'There is a thick book here.' if manual == section: print 'There is a Vyss-type manual here.' if cheese == section: print 'There is some swiss cheese here.' if chocolate == section: print 'There is some chocolate here.' if clementine == section: print 'There is a clementine here.' if dollar_2 == section: print 'There is a 2-dollar bill here.' if dollar_5 == section: print 'There is a 5-dollar bill here.' if popcorn == section: print 'There is some popcorn here.' if taco == section: print 'There is a cheese taco here.' elif (reply == 'n') or (reply == 'north') or (reply == 'go n') or (reply == 'go north'): if section == 'dead end': print 'You walk toward toxic bushes and appear to breathe poison.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break elif section == 'E-W': print 'You walk toward toxic bushes and appear to breathe poison.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break elif section == 'building fork': print 'You must enter a password to enter.' passtype = raw_input("Enter it here: ") if passtype == password: print 'Correct. Door opens.' section = 'building hall' print 'Your location is-' print 'Building Hallway' elif passtype == '': print 'You must enter a password to enter.' else: print 'Sorry, that password is incorrect.' elif section == 'building hall': print "You can't go that way." elif section == 'snack room': print "You can't go that way." elif section == 'computer room': if caterpillar == 1: section = 'restaurant' print 'Restaurant' print 'Cheese tacos cost $4.75. Chicken tacos cost $6.75.' else: print "You can't go that way." elif section == 'restaurant': print "You can't go that way." elif section == 'soft room': print "You can't go that way." elif section == 'stage floor': print "You can't go that way." elif section == 'popcorn': section = 'movie hallway 1' print 'Movie Hallway 1' print 'You are in the movie hallway. Room #1 is to the east.' elif section == 'movie hallway 1': section = 'movie hallway 2' print 'Movie Hallway 2' print 'You are in the movie hallway. Room #2 is to the east.' elif section == 'movie hallway 2': section = 'movie hallway 3' print 'Movie Hallway 3' print 'You are in the movie hallway. Room #3 is to the east.' elif section == 'movie hallway 3': section = 'question room 1' print 'Question room 1' print 'You will be prompted to give the answer when you try to go north or south.' print 'There is a keyboard on each of these sides.' print 'Your question is:' print sql[0] elif section == 'movie section 1': print "You can't go that way." elif section == 'movie section 2': print "You can't go that way." elif section == 'movie section 3': print "You can't go that way." elif section == 'question room 1': print 'You must answer the question to enter.' answer = raw_input("Answer: ") answer = answer.lower() best = answer.split() answer = '' for i in xrange(0, best.__len__()): answer = '%s%s' % (answer, best[i]) if i < best.__len__() - 1: answer = '%s ' % (answer) if sql[0] == 'Name either one of the four items you dropped in the bin to start the computer.': if (answer == 'shovel') or (answer == 'cheese') or (answer == 'book') or (answer == 'chocolate'): print 'Correct. Door opens.' section = 'question room 2' print 'Question room 2' print 'Your question is:' print sql[1] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[0] == 'What did you drop in the bin to start the lightup on stage?': if answer == 'clementine': print 'Correct. Door opens.' section = 'question room 2' print 'Question room 2' print 'Your question is:' print sql[1] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[0] == 'What progamming language did you get by typing on the computer?': if answer == 'vyss': print 'Correct. Door opens.' section = 'question room 2' print 'Question room 2' print 'Your question is:' print sql[1] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[0] == 'What did you find by digging?': if answer == 'cheese': print 'Correct. Door opens.' section = 'question room 2' print 'Question room 2' print 'Your question is:' print sql[1] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[0] == 'Name either one of the two items you are going to pay for.': if (answer == 'popcorn') or (answer == 'cheese taco') or (answer == 'taco'): print 'Correct. Door opens.' section = 'question room 2' print 'Question room 2' print 'Your question is:' print sql[1] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[0] == 'What is the nearest dollar of the price of the shovel?': if answer == '25': print 'Correct. Door opens.' section = 'question room 2' print 'Question room 2' print 'Your question is:' print sql[1] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif section == 'question room 2': print 'You must answer the question to enter.' answer = raw_input("Answer: ") answer = answer.lower() best = answer.split() answer = '' for i in xrange(0, best.__len__()): answer = '%s%s' % (answer, best[i]) if i < best.__len__() - 1: answer = '%s ' % (answer) if sql[1] == 'Name either one of the four items you dropped in the bin to start the computer.': if (answer == 'shovel') or (answer == 'cheese') or (answer == 'book') or (answer == 'chocolate'): print 'Correct. Door opens.' section = 'question room 3' print 'Question room 3' print 'Your question is:' print sql[2] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[1] == 'What did you drop in the bin to start the lightup on stage?': if answer == 'clementine': print 'Correct. Door opens.' section = 'question room 3' print 'Question room 3' print 'Your question is:' print sql[2] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[1] == 'What progamming language did you get by typing on the computer?': if answer == 'vyss': print 'Correct. Door opens.' section = 'question room 3' print 'Question room 3' print 'Your question is:' print sql[2] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[1] == 'What did you find by digging?': if answer == 'cheese': print 'Correct. Door opens.' section = 'question room 3' print 'Question room 3' print 'Your question is:' print sql[2] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[1] == 'Name either one of the two items you are going to pay for.': if (answer == 'popcorn') or (answer == 'cheese taco') or (answer == 'taco'): print 'Correct. Door opens.' section = 'question room 3' print 'Question room 3' print 'Your question is:' print sql[2] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[1] == 'What is the nearest dollar of the price of the shovel?': if answer == '25': print 'Correct. Door opens.' section = 'question room 3' print 'Question room 3' print 'Your question is:' print sql[2] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif section == 'question room 3': print 'You must answer the question to enter.' answer = raw_input("Answer: ") answer = answer.lower() best = answer.split() answer = '' for i in xrange(0, best.__len__()): answer = '%s%s' % (answer, best[i]) if i < best.__len__() - 1: answer = '%s ' % (answer) if sql[2] == 'Name either one of the four items you dropped in the bin to start the computer.': if (answer == 'shovel') or (answer == 'cheese') or (answer == 'book') or (answer == 'chocolate'): print 'Correct. Door opens.' section = 'question room 4' print 'Question room 4' print 'Your question is:' print sql[3] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[2] == 'What did you drop in the bin to start the lightup on stage?': if answer == 'clementine': print 'Correct. Door opens.' section = 'question room 4' print 'Question room 4' print 'Your question is:' print sql[3] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[2] == 'What progamming language did you get by typing on the computer?': if answer == 'vyss': print 'Correct. Door opens.' section = 'question room 4' print 'Question room 4' print 'Your question is:' print sql[3] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[2] == 'What did you find by digging?': if answer == 'cheese': print 'Correct. Door opens.' section = 'question room 4' print 'Question room 4' print 'Your question is:' print sql[3] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[2] == 'Name either one of the two items you are going to pay for.': if (answer == 'popcorn') or (answer == 'cheese taco') or (answer == 'taco'): print 'Correct. Door opens.' section = 'question room 4' print 'Question room 4' print 'Your question is:' print sql[3] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[2] == 'What is the nearest dollar of the price of the shovel?': if answer == '25': print 'Correct. Door opens.' section = 'question room 4' print 'Question room 4' print 'Your question is:' print sql[3] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif section == 'question room 4': print 'You must answer the question to enter.' answer = raw_input("Answer: ") answer = answer.lower() best = answer.split() answer = '' for i in xrange(0, best.__len__()): answer = '%s%s' % (answer, best[i]) if i < best.__len__() - 1: answer = '%s ' % (answer) if sql[3] == 'Name either one of the four items you dropped in the bin to start the computer.': if (answer == 'shovel') or (answer == 'cheese') or (answer == 'book') or (answer == 'chocolate'): print 'Correct. Door opens.' section = 'question room 5' print 'Question room 5' print 'Your question is:' print sql[4] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[3] == 'What did you drop in the bin to start the lightup on stage?': if answer == 'clementine': print 'Correct. Door opens.' section = 'question room 5' print 'Question room 5' print 'Your question is:' print sql[4] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[3] == 'What progamming language did you get by typing on the computer?': if answer == 'vyss': print 'Correct. Door opens.' section = 'question room 5' print 'Question room 5' print 'Your question is:' print sql[4] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[3] == 'What did you find by digging?': if answer == 'cheese': print 'Correct. Door opens.' section = 'question room 5' print 'Question room 5' print 'Your question is:' print sql[4] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[3] == 'Name either one of the two items you are going to pay for.': if (answer == 'popcorn') or (answer == 'cheese taco') or (answer == 'taco'): print 'Correct. Door opens.' section = 'question room 5' print 'Question room 5' print 'Your question is:' print sql[4] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[3] == 'What is the nearest dollar of the price of the shovel?': if answer == '25': print 'Correct. Door opens.' section = 'question room 5' print 'Question room 5' print 'Your question is:' print sql[4] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif section == 'question room 5': print 'You must answer the question to enter.' answer = raw_input("Answer: ") answer = answer.lower() best = answer.split() answer = '' for i in xrange(0, best.__len__()): answer = '%s%s' % (answer, best[i]) if i < best.__len__() - 1: answer = '%s ' % (answer) if sql[4] == 'Name either one of the four items you dropped in the bin to start the computer.': if (answer == 'shovel') or (answer == 'cheese') or (answer == 'book') or (answer == 'chocolate'): print 'Correct. Door opens.' section = 'question room 6' print 'Question room 6' print 'Your question is:' print sql[5] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[4] == 'What did you drop in the bin to start the lightup on stage?': if answer == 'clementine': print 'Correct. Door opens.' section = 'question room 6' print 'Question room 6' print 'Your question is:' print sql[5] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[4] == 'What progamming language did you get by typing on the computer?': if answer == 'vyss': print 'Correct. Door opens.' section = 'question room 6' print 'Question room 6' print 'Your question is:' print sql[5] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[4] == 'What did you find by digging?': if answer == 'cheese': print 'Correct. Door opens.' section = 'question room 6' print 'Question room 6' print 'Your question is:' print sql[5] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[4] == 'Name either one of the two items you are going to pay for.': if (answer == 'popcorn') or (answer == 'cheese taco') or (answer == 'taco'): print 'Correct. Door opens.' section = 'question room 6' print 'Question room 6' print 'Your question is:' print sql[5] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[4] == 'What is the nearest dollar of the price of the shovel?': if answer == '25': print 'Correct. Door opens.' section = 'question room 6' print 'Question room 6' print 'Your question is:' print sql[5] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif section == 'question room 6': print 'You must answer the question to enter.' answer = raw_input("Answer: ") answer = answer.lower() best = answer.split() answer = '' for i in xrange(0, best.__len__()): answer = '%s%s' % (answer, best[i]) if i < best.__len__() - 1: answer = '%s ' % (answer) if sql[5] == 'Name either one of the four items you dropped in the bin to start the computer.': if (answer == 'shovel') or (answer == 'cheese') or (answer == 'book') or (answer == 'chocolate'): section = 'hall end' print 'End of hall' print 'You are at the end of the movie hallway. The hallway goes south.' elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[5] == 'What did you drop in the bin to start the lightup on stage?': if answer == 'clementine': section = 'hall end' print 'End of hall' print 'You are at the end of the movie hallway. The hallway goes south.' elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[5] == 'What progamming language did you get by typing on the computer?': if answer == 'vyss': section = 'hall end' print 'End of hall' print 'You are at the end of the movie hallway. The hallway goes south.' elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[5] == 'What did you find by digging?': if answer == 'cheese': section = 'hall end' print 'End of hall' print 'You are at the end of the movie hallway. The hallway goes south.' elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[5] == 'Name either one of the two items you are going to pay for.': if (answer == 'popcorn') or (answer == 'cheese taco') or (answer == 'taco'): section = 'hall end' print 'End of hall' print 'You are at the end of the movie hallway. The hallway goes south.' elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[5] == 'What is the nearest dollar of the price of the shovel?': if answer == '25': section = 'hall end' print 'End of hall' print 'You are at the end of the movie hallway. The hallway goes south.' elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif section == 'hall end': print "You can't go that way." if shovel == section: print 'There is a shovel here.' if book == section: print 'There is a thick book here.' if manual == section: print 'There is a Vyss-type manual here.' if cheese == section: print 'There is some swiss cheese here.' if chocolate == section: print 'There is some chocolate here.' if clementine == section: print 'There is a clementine here.' if dollar_2 == section: print 'There is a 2-dollar bill here.' if dollar_5 == section: print 'There is a 5-dollar bill here.' if popcorn == section: print 'There is some popcorn here.' if taco == section: print 'There is a cheese taco here.' elif (reply == 's') or (reply == 'south') or (reply == 'go s') or (reply == 'go south'): if section == 'dead end': print 'You walk toward toxic bushes and appear to breathe poison.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break elif section == 'E-W': print 'You walk toward toxic bushes and appear to breathe poison.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break elif section == 'building fork': print 'You walk toward toxic bushes and appear to breathe poison.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break elif section == 'building hall': section = 'building fork' print 'Building Fork' print 'There is a building to the north.' print 'There is a 20-foot-deep cliff off to the east.' print 'The bushes around here are very poisonous.' elif section == 'snack room': print "You can't go that way." elif section == 'computer room': print "You can't go that way." elif section == 'restaurant': section = 'computer room' print 'Computer room' print 'There is a computer here.' print 'There is a deep bin here.' elif section == 'soft room': print "You can't go that way." elif section == 'stage floor': print 'You step off the stage, and notice in the first place that the audience is' print 'empty. But then a man comes to you angry, seeing that you got into the' print 'audience alone. He tells you so by tossing you back, but accidentally bangs' print 'your forehead on one of the seats.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break elif section == 'popcorn': print "You can't go that way." elif section == 'movie hallway 1': section = 'popcorn' print 'Popcorn Seller' print 'A small popcorn costs $1.75.' elif section == 'movie hallway 2': section = 'movie hallway 1' print 'Movie Hallway 1' print 'You are in the movie hallway. Room #1 is to the east.' elif section == 'movie hallway 3': section = 'movie hallway 2' print 'Movie Hallway 2' print 'You are in the movie hallway. Room #2 is to the east.' elif section == 'movie section 1': print "You can't go that way." elif section == 'movie section 2': print "You can't go that way." elif section == 'movie section 3': print "You can't go that way." elif section == 'question room 1': print 'You must answer the question to enter.' answer = raw_input("Answer: ") answer = answer.lower() best = answer.split() answer = '' for i in xrange(0, best.__len__()): answer = '%s%s' % (answer, best[i]) if i < best.__len__() - 1: answer = '%s ' % (answer) if sql[0] == 'Name either one of the four items you dropped in the bin to start the computer.': if (answer == 'shovel') or (answer == 'cheese') or (answer == 'book') or (answer == 'chocolate'): print 'Correct. Door opens.' section = 'movie hallway 3' print 'Movie Hallway 3' print 'You are in the movie hallway. Room #3 is to the east.' elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[0] == 'What did you drop in the bin to start the lightup on stage?': if answer == 'clementine': print 'Correct. Door opens.' section = 'movie hallway 3' print 'Movie Hallway 3' print 'You are in the movie hallway. Room #3 is to the east.' elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[0] == 'What progamming language did you get by typing on the computer?': if answer == 'vyss': print 'Correct. Door opens.' section = 'movie hallway 3' print 'Movie Hallway 3' print 'You are in the movie hallway. Room #3 is to the east.' elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[0] == 'What did you find by digging?': if answer == 'cheese': print 'Correct. Door opens.' section = 'movie hallway 3' print 'Movie Hallway 3' print 'You are in the movie hallway. Room #3 is to the east.' elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[0] == 'Name either one of the two items you are going to pay for.': if (answer == 'popcorn') or (answer == 'cheese taco') or (answer == 'taco'): print 'Correct. Door opens.' section = 'movie hallway 3' print 'Movie Hallway 3' print 'You are in the movie hallway. Room #3 is to the east.' elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[0] == 'What is the nearest dollar of the price of the shovel?': if answer == '25': print 'Correct. Door opens.' section = 'movie hallway 3' print 'Movie Hallway 3' print 'You are in the movie hallway. Room #3 is to the east.' elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif section == 'question room 2': print 'You must answer the question to enter.' answer = raw_input("Answer: ") answer = answer.lower() best = answer.split() answer = '' for i in xrange(0, best.__len__()): answer = '%s%s' % (answer, best[i]) if i < best.__len__() - 1: answer = '%s ' % (answer) if sql[1] == 'Name either one of the four items you dropped in the bin to start the computer.': if (answer == 'shovel') or (answer == 'cheese') or (answer == 'book') or (answer == 'chocolate'): print 'Correct. Door opens.' section = 'question room 1' print 'Question room 1' print 'Your question is:' print sql[0] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[1] == 'What did you drop in the bin to start the lightup on stage?': if answer == 'clementine': print 'Correct. Door opens.' section = 'question room 1' print 'Question room 1' print 'Your question is:' print sql[0] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[1] == 'What progamming language did you get by typing on the computer?': if answer == 'vyss': print 'Correct. Door opens.' section = 'question room 1' print 'Question room 1' print 'Your question is:' print sql[0] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[1] == 'What did you find by digging?': if answer == 'cheese': print 'Correct. Door opens.' section = 'question room 1' print 'Question room 1' print 'Your question is:' print sql[0] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[1] == 'Name either one of the two items you are going to pay for.': if (answer == 'popcorn') or (answer == 'cheese taco') or (answer == 'taco'): print 'Correct. Door opens.' section = 'question room 1' print 'Question room 1' print 'Your question is:' print sql[0] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[1] == 'What is the nearest dollar of the price of the shovel?': if answer == '25': print 'Correct. Door opens.' section = 'question room 1' print 'Question room 1' print 'Your question is:' print sql[0] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif section == 'question room 3': print 'You must answer the question to enter.' answer = raw_input("Answer: ") answer = answer.lower() best = answer.split() answer = '' for i in xrange(0, best.__len__()): answer = '%s%s' % (answer, best[i]) if i < best.__len__() - 1: answer = '%s ' % (answer) if sql[2] == 'Name either one of the four items you dropped in the bin to start the computer.': if (answer == 'shovel') or (answer == 'cheese') or (answer == 'book') or (answer == 'chocolate'): print 'Correct. Door opens.' section = 'question room 2' print 'Question room 2' print 'Your question is:' print sql[1] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[2] == 'What did you drop in the bin to start the lightup on stage?': if answer == 'clementine': print 'Correct. Door opens.' section = 'question room 2' print 'Question room 2' print 'Your question is:' print sql[1] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[2] == 'What progamming language did you get by typing on the computer?': if answer == 'vyss': print 'Correct. Door opens.' section = 'question room 2' print 'Question room 2' print 'Your question is:' print sql[1] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[2] == 'What did you find by digging?': if answer == 'cheese': print 'Correct. Door opens.' section = 'question room 2' print 'Question room 2' print 'Your question is:' print sql[1] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[2] == 'Name either one of the two items you are going to pay for.': if (answer == 'popcorn') or (answer == 'cheese taco') or (answer == 'taco'): print 'Correct. Door opens.' section = 'question room 2' print 'Question room 2' print 'Your question is:' print sql[1] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[2] == 'What is the nearest dollar of the price of the shovel?': if answer == '25': print 'Correct. Door opens.' section = 'question room 2' print 'Question room 2' print 'Your question is:' print sql[1] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif section == 'question room 4': print 'You must answer the question to enter.' answer = raw_input("Answer: ") answer = answer.lower() best = answer.split() answer = '' for i in xrange(0, best.__len__()): answer = '%s%s' % (answer, best[i]) if i < best.__len__() - 1: answer = '%s ' % (answer) if sql[3] == 'Name either one of the four items you dropped in the bin to start the computer.': if (answer == 'shovel') or (answer == 'cheese') or (answer == 'book') or (answer == 'chocolate'): print 'Correct. Door opens.' section = 'question room 3' print 'Question room 3' print 'Your question is:' print sql[2] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[3] == 'What did you drop in the bin to start the lightup on stage?': if answer == 'clementine': print 'Correct. Door opens.' section = 'question room 3' print 'Question room 3' print 'Your question is:' print sql[2] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[3] == 'What progamming language did you get by typing on the computer?': if answer == 'vyss': print 'Correct. Door opens.' section = 'question room 3' print 'Question room 3' print 'Your question is:' print sql[2] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[3] == 'What did you find by digging?': if answer == 'cheese': print 'Correct. Door opens.' section = 'question room 3' print 'Question room 3' print 'Your question is:' print sql[2] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[3] == 'Name either one of the two items you are going to pay for.': if (answer == 'popcorn') or (answer == 'cheese taco') or (answer == 'taco'): print 'Correct. Door opens.' section = 'question room 3' print 'Question room 3' print 'Your question is:' print sql[2] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[3] == 'What is the nearest dollar of the price of the shovel?': if answer == '25': print 'Correct. Door opens.' section = 'question room 3' print 'Question room 3' print 'Your question is:' print sql[2] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif section == 'question room 5': print 'You must answer the question to enter.' answer = raw_input("Answer: ") answer = answer.lower() best = answer.split() answer = '' for i in xrange(0, best.__len__()): answer = '%s%s' % (answer, best[i]) if i < best.__len__() - 1: answer = '%s ' % (answer) if sql[4] == 'Name either one of the four items you dropped in the bin to start the computer.': if (answer == 'shovel') or (answer == 'cheese') or (answer == 'book') or (answer == 'chocolate'): print 'Correct. Door opens.' section = 'question room 4' print 'Question room 4' print 'Your question is:' print sql[3] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[4] == 'What did you drop in the bin to start the lightup on stage?': if answer == 'clementine': print 'Correct. Door opens.' section = 'question room 4' print 'Question room 4' print 'Your question is:' print sql[3] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[4] == 'What progamming language did you get by typing on the computer?': if answer == 'vyss': print 'Correct. Door opens.' section = 'question room 4' print 'Question room 4' print 'Your question is:' print sql[3] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[4] == 'What did you find by digging?': if answer == 'cheese': print 'Correct. Door opens.' section = 'question room 4' print 'Question room 4' print 'Your question is:' print sql[3] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[4] == 'Name either one of the two items you are going to pay for.': if (answer == 'popcorn') or (answer == 'cheese taco') or (answer == 'taco'): print 'Correct. Door opens.' section = 'question room 4' print 'Question room 4' print 'Your question is:' print sql[3] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[4] == 'What is the nearest dollar of the price of the shovel?': if answer == '25': print 'Correct. Door opens.' section = 'question room 4' print 'Question room 4' print 'Your question is:' print sql[3] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif section == 'question room 6': print 'You must answer the question to enter.' answer = raw_input("Answer: ") answer = answer.lower() best = answer.split() answer = '' for i in xrange(0, best.__len__()): answer = '%s%s' % (answer, best[i]) if i < best.__len__() - 1: answer = '%s ' % (answer) if sql[5] == 'Name either one of the four items you dropped in the bin to start the computer.': if (answer == 'shovel') or (answer == 'cheese') or (answer == 'book') or (answer == 'chocolate'): print 'Correct. Door opens.' section = 'question room 5' print 'Question room 5' print 'Your question is:' print sql[4] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[5] == 'What did you drop in the bin to start the lightup on stage?': if answer == 'clementine': print 'Correct. Door opens.' section = 'question room 5' print 'Question room 5' print 'Your question is:' print sql[4] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[5] == 'What progamming language did you get by typing on the computer?': if answer == 'vyss': print 'Correct. Door opens.' section = 'question room 5' print 'Question room 5' print 'Your question is:' print sql[4] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[5] == 'What did you find by digging?': if answer == 'cheese': print 'Correct. Door opens.' section = 'question room 5' print 'Question room 5' print 'Your question is:' print sql[4] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[5] == 'Name either one of the two items you are going to pay for.': if (answer == 'popcorn') or (answer == 'cheese taco') or (answer == 'taco'): print 'Correct. Door opens.' section = 'question room 5' print 'Question room 5' print 'Your question is:' print sql[4] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif sql[5] == 'What is the nearest dollar of the price of the shovel?': if answer == '25': print 'Correct. Door opens.' section = 'question room 5' print 'Question room 5' print 'Your question is:' print sql[4] elif answer == '': print 'You must answer the question to enter.' else: print 'Sorry, that answer is incorrect.' elif section == 'hall end': section = 'question room 6' print 'Question room 6' print 'Your question is:' print sql[5] if shovel == section: print 'There is a shovel here.' if book == section: print 'There is a thick book here.' if manual == section: print 'There is a Vyss-type manual here.' if cheese == section: print 'There is some swiss cheese here.' if chocolate == section: print 'There is some chocolate here.' if clementine == section: print 'There is a clementine here.' if dollar_2 == section: print 'There is a 2-dollar bill here.' if dollar_5 == section: print 'There is a 5-dollar bill here.' if popcorn == section: print 'There is some popcorn here.' if taco == section: print 'There is a cheese taco here.' elif (reply == 'nw') or (reply == 'northwest') or (reply == 'go nw') or (reply == 'go northwest') or (reply == 'ne') or (reply == 'northeast') or (reply == 'go ne') or (reply == 'go northeast') or (reply == 'sw') or (reply == 'southwest') or (reply == 'go sw') or (reply == 'go southwest') or (reply == 'se') or (reply == 'southeast') or (reply == 'go se') or (reply == 'go southeast'): if (section == 'dead end') or (section == 'E-w') or (section == 'building fork'): print 'You walk toward toxic bushes and appear to breathe poison.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break else: print "You can't go that way." elif reply == 'dig': if shovel == 'inventory': if (book == 'under %s' % (section)) or (manual == 'under %s' % (section)) or (cheese == 'under %s' % (section)) or (chocolate == 'under %s' % (section)) or (clementine == 'under %s' % (section)): print 'I think you found something.' if book == 'under %s' % (section): book = section if manual == 'under %s' % (section): manual = section if cheese == 'under %s' % (section): cheese = section if chocolate == 'under %s' % (section): chocolate = section if clementine == 'under %s' % (section): clementine = section else: print "Digging here doesn't get you anything." else: print "You don't have anything to dig with." elif (reply == 'get shovel') or (reply == 'take shovel'): if shovel == section: print 'Taken.' shovel = 'inventory' else: print "I don't see that here." elif (reply == 'look shovel') or (reply == 'look at shovel'): if (shovel == section) or (shovel == 'inventory'): print 'It is a normal shovel with a price tag attached to it reading $24.99.' else: print "I don't see that here." elif (reply == 'drop shovel') or (reply == 'throw shovel'): if shovel == 'inventory': print 'Done.' if section == 'computer room': percent += 1 print 'It falls deep into the bin. The computer boots up by %d%s.' % (percent*25, '%') if percent == 4: print 'The computer is ready for you to use.' points += 15 print 'You have scored %d out of a possible 105 points.' % (points) shovel = 'gone' else: shovel = section else: print "You don't have that." elif reply == 'eat shovel': if shovel == 'inventory': print 'You forcefully shove a shovel down your throat, and start choking.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break else: print "You don't have that." elif reply == 'lick shovel': if (shovel == 'inventory') or (shovel == section): print 'You spread your tongue on a shovel and cut it on a sharp edge.' print 'You start whining.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break else: print "I don't see that here." elif reply == 'bury shovel': if shovel == 'inventory': print "You can't bury a shovel and dig with it at the same time." else: print "You don't have that." elif (reply == 'get book') or (reply == 'take book'): if book == section: print 'Taken.' book = 'inventory' else: print "I don't see that here." elif (reply == 'look book') or (reply == 'look at book'): if (book == section) or (book == 'inventory'): print 'It is a book based on a building that says-' print ' Computer dedicated to: Nicholas McConnell' print ' Building password is: %s' % (password) else: print "I don't see that here." elif (reply == 'drop book') or (reply == 'throw book'): if book == 'inventory': print 'Done.' if section == 'computer room': percent += 1 print 'It falls deep into the bin. The computer boots up by %d%s.' % (percent*25, '%') if percent == 4: print 'The computer is ready for you to use.' points += 15 print 'You have scored %d out of a possible 105 points.' % (points) book = 'gone' else: book = section else: print "You don't have that." elif reply == 'eat book': if book == 'inventory': print 'You forcefully shove a book down your throat, and start choking.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break else: print "You don't have that." elif reply == 'lick book': if (book == 'inventory') or (book == section): print 'You spread your tongue on a book and cut it on a sharp edge.' print 'You start whining.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break else: print "I don't see that here." elif reply == 'bury book': if book == 'inventory': if shovel == 'inventory': print 'Done.' book = 'under %s' % (section) else: print "You don't have anything to dig with." else: print "You don't have that." elif (reply == 'get manual') or (reply == 'take manual'): if manual == section: print 'Taken.' manual = 'inventory' else: print "I don't see that here." elif (reply == 'look manual') or (reply == 'look at manual'): if (manual == section) or (manual == 'inventory'): print 'It is a manual based on Vyss that says-' print " Don't forget to type 'help' if you need help." print " Also, remember these words: 'caterpillar', 'butterfly'" else: print "I don't see that here." elif (reply == 'drop manual') or (reply == 'throw manual'): if manual == 'inventory': print 'Done.' manual = section else: print "You don't have that." elif reply == 'eat manual': if manual == 'inventory': print 'You forcefully shove a manual down your throat, and start choking.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break else: print "You don't have that." elif reply == 'lick manual': if (manual == 'inventory') or(manual == section): print 'You spread your tongue on a manual and cut it on a sharp edge.' print 'You start whining.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break else: print "I don't see that here." elif reply == 'bury manual': if manual == 'inventory': print "You don't have anything to dig with." else: print "You don't have that." elif (reply == 'get cheese') or (reply == 'take cheese'): if cheese == section: print 'Taken.' cheese = 'inventory' else: print "I don't see that here." elif (reply == 'look cheese') or (reply == 'look at cheese'): if (cheese == section) or (cheese == 'inventory'): print 'It is some swiss cheese with holes inside, but it smells funny.' else: print "I don't see that here." elif (reply == 'drop cheese') or (reply == 'throw cheese'): if cheese == 'inventory': print 'Done.' if section == 'computer room': percent += 1 print 'It falls deep into the bin. The computer boots up by %d%s.' % (percent*25, '%') if percent == 4: print 'The computer is ready for you to use.' points += 15 print 'You have scored %d out of a possible 105 points.' % (points) cheese = 'gone' else: cheese = section else: print "You don't have that." elif reply == 'eat cheese': if cheese == 'inventory': print 'That tasted unusual.' cheese = 'eaten' else: print "You don't have that." elif reply == 'lick cheese': if (cheese == 'inventory') or (cheese == section): print 'You get a confusing taste on your tongue.' else: print "I don't see that here." elif reply == 'bury cheese': if cheese == 'inventory': if shovel == 'inventory': print 'Done.' cheese = 'under %s' % (section) else: print "You don't have anything to dig with." else: print "You don't have that." elif (reply == 'get chocolate') or (reply == 'take chocolate'): if chocolate == section: print 'Taken.' chocolate = 'inventory' else: print "I don't see that here." elif (reply == 'look chocolate') or (reply == 'look at chocolate'): if (chocolate == section) or (chocolate == 'inventory'): print "It is a Hershey's chocolate bar." else: print "I don't see that here." elif (reply == 'drop chocolate') or (reply == 'throw chocolate'): if chocolate == 'inventory': print 'Done.' if section == 'computer room': percent += 1 print 'It falls deep into the bin. The computer boots up by %d%s.' % (percent*25, '%') if percent == 4: print 'The computer is ready for you to use.' points += 15 print 'You have scored %d out of a possible 105 points.' % (points) chocolate = 'gone' else: chocolate = section else: print "You don't have that." elif reply == 'eat chocolate': if chocolate == 'inventory': print 'That tasted fine.' chocolate = 'eaten' else: print "You don't have that." elif reply == 'lick chocolate': if (chocolate == 'inventory') or (chocolate == section): print 'You get a nice taste on your tongue.' else: print "I don't see that here." elif reply == 'bury chocolate': if chocolate == 'inventory': if shovel == 'inventory': print 'Done.' chocolate = 'under %s' % (section) else: print "You don't have anything to dig with." else: print "You don't have that." elif (reply == 'get clementine') or (reply == 'take clementine'): if clementine == section: print 'Taken.' clementine = 'inventory' else: print "I don't see that here." elif (reply == 'look clementine') or (reply == 'look at clementine'): if (clementine == section) or (clementine == 'inventory'): print 'It is an orange with very thin skin that is easy to tare off.' else: print "I don't see that here." elif (reply == 'drop clementine') or (reply == 'throw clementine'): if clementine == 'inventory': print 'Done.' if section == 'stage floor': print 'It falls deep into the bin. The stage starts to light up.' points += 15 print 'You have scored %d out of a possible 105 points.' % (points) clementine = 'gone' else: clementine = section else: print "You don't have that." elif reply == 'eat clementine': if clementine == 'inventory': print 'That tasted fine.' clementine = 'eaten' else: print "You don't have that." elif reply == 'lick clementine': if (clementine == 'inventory') or (clementine == section): print 'You get a nice taste on your tongue.' else: print "I don't see that here." elif reply == 'bury clementine': if clementine == 'inventory': if shovel == 'inventory': print 'Done.' clementine = 'under %s' % (section) else: print "You don't have anything to dig with." else: print "You don't have that." elif (reply == 'get 2-dollar') or (reply == 'take 2-dollar') or (reply == 'get 2-dollar bill') or (reply == 'take 2-dollar bill'): if dollar_2 == section: print 'Taken.' dollar_2 = 'inventory' money += 2.0 else: print "I don't see that here." elif (reply == 'look 2-dollar') or (reply == 'look at 2-dollar') or (reply == 'look 2-dollar bill') or (reply == 'look at 2-dollar bill'): if (dollar_2 == section) or (dollar_2 == 'inventory'): print 'I see nothing special about that.' else: print "I don't see that here." elif (reply == 'drop 2-dollar') or (reply == 'throw 2-dollar') or (reply == 'drop 2-dollar bill') or (reply == 'throw 2-dollar bill'): if dollar_2 == 'inventory': print 'Done.' dollar_2 = section money -= 2.0 else: print "You don't have that." elif (reply == 'eat 2-dollar') or (reply == 'eat 2-dollar bill'): if dollar_2 == 'inventory': print 'You forcefully shove a two-dollar bill down your throat, and start choking.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break else: print "You don't have that." elif (reply == 'lick 2-dollar') or (reply == 'lick 2-dollar bill'): if (dollar_2 == 'inventory') or (dollar_2 == section): print 'You spread your tongue on a two-dollar bill and cut it on a sharp edge.' print 'You start whining.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break else: print "I don't see that here." elif (reply == 'bury 2-dollar') or (reply == 'bury 2-dollar bill'): if dollar_2 == 'inventory': print "You don't have anything to dig with." else: print "You don't have that." elif (reply == 'get 5-dollar') or (reply == 'take 5-dollar') or (reply == 'get 5-dollar bill') or (reply == 'take 5-dollar bill'): if dollar_5 == section: print 'Taken.' dollar_5 = 'inventory' money += 5.0 else: print "I don't see that here." elif (reply == 'look 5-dollar') or (reply == 'look at 5-dollar') or (reply == 'look 5-dollar bill') or (reply == 'look at 5-dollar bill'): if (dollar_5 == section) or (dollar_5 == 'inventory'): print 'I see nothing special about that.' else: print "I don't see that here." elif (reply == 'drop 5-dollar') or (reply == 'throw 5-dollar') or (reply == 'drop 5-dollar bill') or (reply == 'throw 5-dollar bill'): if dollar_5 == 'inventory': print 'Done.' dollar_5 = section money -= 5.0 else: print "You don't have that." elif (reply == 'eat 5-dollar') or (reply == 'eat 5-dollar bill'): if dollar_5 == 'inventory': print 'You forcefully shove a five-dollar bill down your throat, and start choking.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break else: print "You don't have that." elif (reply == 'lick 5-dollar') or (reply == 'lick 5-dollar bill'): if (dollar_5 == 'inventory') or (dollar_5 == section): print 'You spread your tongue on a five-dollar bill and cut it on a sharp edge.' print 'You start whining.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break else: print "I don't see that here." elif (reply == 'bury 5-dollar') or (reply == 'bury 5-dollar bill'): if dollar_5 == 'inventory': print "You don't have anything to dig with." else: print "You don't have that." elif reply == 'buy popcorn': if section == 'popcorn': if popcorn == 'gone': print 'The popcorn seller is closed.' else: if popcorn == 'inseller': if money >= 2.0: money = 0.25 dollar_2 = 'gone' popcorn = 'inventory' print 'Done. You lose your two-dollar bill and end up with a quarter.' points += 15 print 'You have scored %d out of a possible 105 points.' % (points) movies = 1 else: print "You don't have enough money to pay for the popcorn." else: print "You don't have enough money to pay for the popcorn." else: print "I don't see anything to get popcorn at." elif reply == 'take popcorn': if popcorn == section: print 'Taken.' popcorn = 'inventory' else: print "I don't see that here." elif reply == 'get popcorn': if popcorn == 'inseller': if section == 'popcorn': if money == 2.0: money = 0.25 dollar_2 = 'gone' popcorn = 'inventory' print 'Done. You lose your two-dollar bill and end up with a quarter.' points += 15 print 'You have scored %d out of a possible 105 points.' % (points) movies = 1 else: print "You don't have enough money to pay for the popcorn." else: print "I don't see that here." else: if popcorn == section: print 'Taken.' popcorn = 'inventory' else: if (popcorn == 'gone') and (section == 'popcorn'): print 'The popcorn seller is closed.' else: print "I don't see that here." elif (reply == 'look popcorn') or (reply == 'look at popcorn'): if (popcorn == section) or (popcorn == 'inventory'): print 'It is butter-flavored. Smells good.' else: print "I don't see that here." elif (reply == 'drop popcorn') or (reply == 'throw popcorn'): if popcorn == 'inventory': print 'Done.' popcorn = section else: print "You don't have that." elif reply == 'eat popcorn': if popcorn == 'inventory': print 'Done.' print 'You must have gotten too hungry to resist the popcorn before the movie!' popcorn = 'eaten' else: print "You don't have that." elif reply == 'lick popcorn': if popcorn == 'inventory': print 'Tastes buttery.' else: print "You don't have that." elif reply == 'bury popcorn': if popcorn == 'inventory': print "You don't have anything to dig with." else: print "You don't have that." elif (reply == 'get taco') or (reply == 'get cheese taco'): if section == 'restaurant': if taco == 'inseller': if money == 5.25: money = 0.5 dollar_5 = 'gone' taco = 'inventory' print "Done. You can't get the chicken taco but you can get the cheese taco." print 'You lose your five-dollar bill and end up with a quarter.' points += 15 print 'You have scored %d out of a possible 105 points.' % (points) else: print "You don't have enough money to pay for the taco." elif taco == section: print 'Taken.' taco = 'inventory' else: print "You don't have enough money to pay for the taco." else: if taco == section: print 'Taken.' taco = 'inventory' else: print "I don't see that here." elif (reply == 'buy taco') or (reply == 'buy cheese taco'): if section == 'restaurant': if taco == 'inseller': if money == 5.25: money = 0.5 dollar_5 = 'gone' taco = 'inventory' print "Done. You can't get the chicken taco but you can get the cheese taco." print 'You lose your five-dollar bill and end up with a quarter.' points += 15 print 'You have scored %d out of a possible 105 points.' % (points) else: print "You don't have enough money to pay for the taco." else: print "You don't have enough money to pay for the taco." else: print 'There is nothing here in which you could buy a taco.' elif (reply == 'take taco') or (reply == 'take cheese taco'): if taco == section: print 'Taken.' taco = 'inventory' else: print "I don't see that here." elif (reply == 'look taco') or (reply == 'look at taco') or (reply == 'look cheese taco') or (reply == 'look at cheese taco'): if (taco == section) or (taco == 'inventory'): print 'It is made from a Mexican tortilla and some tasty cheese.' else: print "I don't see that here." elif (reply == 'drop taco') or (reply == 'throw taco') or (reply == 'drop cheese taco') or (reply == 'throw cheese taco'): if taco == 'inventory': print 'Done.' taco = section else: print "You don't have that." elif (reply == 'eat taco') or (reply == 'eat cheese taco'): if taco == 'inventory': print 'That tasted delicious.' taco = 'eaten' else: print "You don't have that." elif (reply == 'lick taco') or (reply == 'lick cheese taco'): if taco == 'inventory': print 'Tastes the way you like it.' else: print "You don't have that." elif (reply == 'bury taco') or (reply == 'bury cheese taco'): if taco == 'inventory': print "You don't have anything to dig with." else: print "You don't have that." elif (reply == 'get quarter') or (reply == 'take quarter'): print "I don't see that here." elif (reply == 'look quarter') or (reply == 'look at quarter'): if (money == 0.25) or (money == 5.25) or (money == 0.5): print 'I see nothing special about that.' else: print "I don't see that here." elif (reply == 'drop quarter') or (reply == 'throw quarter'): if (money == 0.25) or (money == 5.25) or (money == 0.5): print "You wouldn't do that. You would lose money for no reason." else: print "You don't have that." elif reply == 'eat quarter': if (money == 0.25) or (money == 5.25) or (money == 0.5): print "You wouldn't do that. You would lose money for no reason." else: print "You don't have that." elif reply == 'lick quarter': if (money == 0.25) or (money == 5.25) or (money == 0.5): print 'That shiny metal had a funny taste on the tongue!' else: print "You don't have that." elif reply == 'bury quarter': if (money == 0.25) or (money == 5.25) or (money == 0.5): print "You don't have anything to dig with." else: print "You don't have that." elif (reply == 'watch') or (reply == 'watch movie'): if (section == 'movie section 1') or (section == 'movie section 2') or (section == 'movie section 3'): if movies == 1: if popcorn == 'inventory': print 'Done. The movie is over. You ate your popcorn.' popcorn = 'gone' movies = 0 dollar_5 = 'restaurant' else: print 'You try to watch the movie, but think it is not interesting.' print 'You feel like you really would want to have something more tasty and buttery.' print 'The movie is not over yet.' else: print 'There is currently no movie playing here.' else: print 'I see nothing to watch.' elif (reply == 'get cliff') or (reply == 'take cliff'): if section == 'building fork': print 'You cannot take that.' else: print "I don't see that here." elif (reply == 'look cliff') or (reply == 'look at cliff'): if section == 'building fork': print 'It is 20 feet deep and dangerous to fall down.' else: print "I don't see that here." elif (reply == 'drop cliff') or (reply == 'throw cliff'): print "You don't have that." elif reply == 'eat cliff': print "You don't have that." elif reply == 'lick cliff': if section == 'building fork': print 'You bend down to lick the cliff, but lose your balance.' print 'You fall off the cliff and land on the back of your neck.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break else: print "I don't see that here." elif reply == 'bury cliff': print "You don't have that." elif (reply == 'get stage') or (reply == 'take stage'): if section == 'stage floor': print 'You cannot take that.' else: print "I don't see that here." elif (reply == 'look stage') or (reply == 'look at stage'): if section == 'stage floor': print 'It is wooden but open to the south.' else: print "I don't see that here." elif (reply == 'drop stage') or (reply == 'throw stage'): print "You don't have that." elif reply == 'eat stage': print "You don't have that." elif reply == 'lick stage': if section == 'stage floor': print 'You bend down to lick the stage, but lose your balance.' print 'You fall off the stage and the back of your head lands right on the ground.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break else: print "I don't see that here." elif reply == 'bury stage': print "You don't have that." elif (reply == 'get computer') or (reply == 'take computer'): if section == 'computer room': print 'You cannot take that.' else: print "I don't see that here." elif (reply == 'look computer') or (reply == 'look at computer'): if section == 'computer room': print 'It is special and dedicated to Nicholas McConnell, who does a lot of coding.' else: print "I don't see that here." elif (reply == 'drop computer') or (reply == 'throw computer'): print "You don't have that." elif reply == 'eat computer': print "You don't have that." elif reply == 'lick computer': if section == 'computer room': print 'Done.' else: print "I don't see that here." elif reply == 'bury computer': print "You don't have that." elif (reply == 'get bin') or (reply == 'take bin'): if (section == 'computer room') or (section == 'stage floor'): print 'You cannot take that.' else: print "I don't see that here." elif (reply == 'look bin') or (reply == 'look at bin'): if section == 'computer room': print 'It is very deep and has a vax scanner on the bottom.' elif section == 'stage floor': print 'It is very deep and has a radio scanner on the bottom.' else: print "I don't see that here." elif (reply == 'drop bin') or (reply == 'throw bin'): print "You don't have that." elif reply == 'eat bin': print "You don't have that." elif reply == 'lick bin': if (section == 'computer room') or (section == 'stage floor'): print 'You bend down to lick the bin, but lose your balance.' print 'You fall into the bin head-down and you feel the impact of your head hitting' print 'the ground. The back of your neck hits the side.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break else: print "I don't see that here." elif reply == 'bury bin': print "You don't have that." elif (reply == 'get seller') or (reply == 'take seller'): if (section == 'restaurant') or (section == 'popcorn'): print 'You cannot take that.' else: print "I don't see that here." elif (reply == 'look seller') or (reply == 'look at seller'): if section == 'restaurant': print 'A cheese taco costs $4.75. A chicken taco costs $6.75.' elif section == 'popcorn': print 'A small popcorn costs $1.75.' else: print "I don't see that here." elif (reply == 'drop seller') or (reply == 'throw seller'): print "You don't have that." elif reply == 'eat seller': print "You don't have that." elif reply == 'lick seller': if section == 'popcorn': print 'You spread your tongue on a seller.' print "The cashier gets mad and doesn't like that you licked the countertop." if dollar_2 == 'inventory': dollar_2 = 'gone' money -= 2.0 print 'He steals your two-dollar bill.' if dollar_5 == 'inventory': dollar_5 = 'gone' money -= 5.0 print 'He steals your five-dollar bill.' if popcorn == 'inventory': popcorn = 'gone' print 'He steals your popcorn.' if taco == 'inventory': taco = 'gone' print 'He steals your taco.' elif section == 'restaurant': print 'You spread your tongue on a seller.' print "The waitress gets mad and doesn't like that you licked the countertop." if dollar_2 == 'inventory': dollar_2 = 'gone' money -= 2.0 print 'She steals your two-dollar bill.' if dollar_5 == 'inventory': dollar_5 = 'gone' money -= 5.0 print 'She steals your five-dollar bill.' if popcorn == 'inventory': popcorn = 'gone' print 'She steals your popcorn.' if taco == 'inventory': taco = 'gone' print 'She steals your taco.' else: print "I don't see that here." elif reply == 'bury seller': print "You don't have that." elif (reply == 'get building') or (reply == 'take building'): if section == 'building fork': print 'You cannot take that.' elif (section == 'dead end') or (section == 'E-W'): print "I don't see that here." else: print 'You are in the building!' elif (reply == 'look building') or (reply == 'look at building'): if section == 'building fork': print 'It is a large building with a keyboard and machine which unlocks the doors when' print 'the correct password is entered.' elif (section == 'dead end') or (section == 'E-W'): print "I don't see that here." else: print 'You are in the building!' elif (reply == 'drop building') or (reply == 'throw building'): print "You don't have that." elif reply == 'eat building': print "You don't have that." elif reply == 'lick building': if section == 'building fork': print 'You spread your tongue on a building and scrape it on stone brick.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break elif (section == 'dead end') or (section == 'E-W'): print "I don't see that here." else: print 'You are in the building!' elif reply == 'bury building': print "You don't have that." elif (reply == 'get chicken taco') or (reply == 'buy chicken taco'): print "I don't see that here." elif reply == 'take chicken taco': print "I don't see that here." elif (reply == 'look chicken taco') or (reply == 'look at chicken taco'): print "You don't have that." elif (reply == 'drop chicken taco') or (reply == 'throw chicken taco'): print "You don't have that." elif reply == 'eat chicken taco': print "You don't have that." elif reply == 'lick chicken taco': print "You don't have that." elif reply == 'bury chicken taco': print "You don't have that." elif (reply == 'get bushes') or (reply == 'take bushes'): if (section == 'dead end') or (section == 'E-W') or (section == 'building fork'): print 'You touch toxic bushes and poison spreads around your body.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break else: print "I don't see that here." elif (reply == 'look bushes') or (reply == 'look at bushes'): if (section == 'dead end') or (section == 'E-W') or (section == 'building fork'): print 'They are bushes with a lot of toxic matter around.' else: print "I don't see that here." elif (reply == 'drop bushes') or (reply == 'throw bushes'): print "You don't have that." elif reply == 'eat bushes': print "You don't have that." elif reply == 'lick bushes': if (section == 'dead end') or (section == 'E-W') or (section == 'building fork'): print 'You spread your tongue on a bushes and get a poison disease spread.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break else: print "I don't see that here." elif reply == 'bury bushes': print "You don't have that." elif (reply == 'get bill') or (reply == 'take bill'): print 'You must supply how much money the bill is.' elif (reply == 'look bill') or (reply == 'look at bill'): print 'You must supply how much money the bill is.' elif (reply == 'drop bill') or (reply == 'throw bill'): print 'You must supply how much money the bill is.' elif reply == 'eat bill': print 'You must supply how much money the bill is.' elif reply == 'lick bill': print 'You must supply how much money the bill is.' elif reply == 'bury bill': print 'You must supply how much money the bill is.' elif reply == 'type': if section == 'computer room': if percent == 4: if log == 0: print 'Welcome. We need a login and password.' print while True: login = raw_input("login: ") passw = raw_input("password: ") if (login == 'mcconnell') and (passw == 'nicholas'): print 'Guest login correct.' print print 'Welcome to the programming entry.' print 'Please clean up your directories.' print log += 1 break else: print 'Login incorrect.' print while True: sect = raw_input("$ ") best = sect.split() sect = '' for i in xrange(0, best.__len__()): sect = '%s%s' % (sect, best[i]) if i < best.__len__() - 1: sect = '%s ' % (sect) if sect == 'Vlist': print '467 total (132-138 located) -' print '132 (%s) - get (action)' % (time.asctime()) print '133 (%s) - look (action)' % (time.asctime()) print '134 (%s) - drop (action)' % (time.asctime()) print '135 (%s) - Vyisd.** (item)' % (time.asctime()) print '136 (%s) - VyisdGeo.** (item)' % (time.asctime()) print '137 (%s) - Vyss.** (item)' % (time.asctime()) print '138 (%s) - Vyist.** (item)' % (time.asctime()) elif sect == 'look Vyss.**': if manual == 'inseller': print 'It is a manual with a cover on it reading VYSS.' else: print 'Operation failed.' elif sect == 'get Vyss.**': if manual == 'inseller': print 'Done. A Vyss-based manual falls out of the Prize bin.' manual = 'computer room' else: print 'Operation failed.' elif (sect == 'get Vyisd.**') or (sect == 'look Vyisd.**') or (sect == 'drop Vyisd.**') or (sect == 'get VyisdGeo.**') or (sect == 'look VyisdGeo.**') or (sect == 'drop VyisdGeo.**') or (sect == 'drop Vyss.**') or (sect == 'get Vyist.**') or (sect == 'look Vyist.**') or (sect == 'drop Vyist.**'): print 'Operation failed.' elif (sect == 'Vyisd.**') or (sect == 'VyisdGeo.**') or (sect == 'Vyist.**') or (sect == 'Vyss.**'): print 'You must supply an action.' elif (sect == 'get') or (sect == 'look') or (sect == 'drop'): print 'You must supply an item.' elif (sect == 'help') or (sect == '?'): print 'Type an action and an item. Type Vlist for the list, Ventry to open north.' print 'Vpath to open west, and type finale to end the quest.' elif sect == 'Ventry': cpass = raw_input("password: ") if cpass == 'caterpillar': if caterpillar == 0: print 'You step back from the console. A door opens to the north.' caterpillar = 1 break else: print 'You have overdownloaded the path to the north. The building starts to shake,' print 'tremble, and fall over, and you fall over and land right on your head.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) stop += 1 break else: print 'Password incorrect.' elif sect == 'Vpath': bpass = raw_input("password: ") if bpass == 'butterfly': if butterfly == 0: print 'You step back from the console. A door opens to the west.' butterfly = 1 break else: print 'You have overdownloaded the path to the west. The building starts to shake,' print 'tremble, and fall over, and you fall over and land right on your head.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) stop += 1 break else: print 'Password incorrect.' elif sect == 'finale': if points == 105: print 'You have scored 105 out of a possible 105 points.' print 'Here is the finale.' print 'What programming language name were you able to get a manual out of?' ans = raw_input("Your answer: (15 pt) ") best = ans.split() ans = '' for i in xrange(0, best.__len__()): ans = '%s%s' % (ans, best[i]) if i < best.__len__() - 1: ans = '%s ' % (ans) if ans.lower() == 'vyss': print 'Correct!' print finale += 1 break elif ans.lower() == '': print 'No answer. You have not scored an extra 15 finale points.' else: print 'Sorry, that answer is incorrect.' else: print 'You have scored %d out of a possible 105 points.' % (points) print 'You have not achieved enough points to connect to finale.' elif sect == 'exit': print print 'You step back from the console.' break elif sect == '': pass else: print 'No such saying.' if finale == 1: print 'You have scored 120 out of a possible 120 points in the quest.' print "Congratulations! You have won. It is now someone else's turn to do this." break if stop == 1: break else: print 'You type on the keyboard, but the characters do not even echo.' elif section == 'building fork': print 'You type random stuff on a keyboard, but nothing good happens.' elif (section == 'question room 1') or (section == 'question room 2') or (section == 'question room 3') or (section == 'question room 4') or (section == 'question room 5') or (section == 'question room 6'): print 'You type random stuff on a keyboard, but nothing good happens.' else: print "I don't see a keyboard for you to type on." elif (reply == 'sleep') or (reply == 'lie down'): if section == 'soft room': print 'As soon as you doze off you begin dreaming. You think of your friend giving' print 'you a cookie. Then you give him a tic tac. Then he gives you a piece of' print 'macaroni. But this macaroni gets bigger and you start to be thrown inside a' print 'slide. After this roughness you immediately wake up.' else: print "You try to go to sleep while standing up here, but can't seem to do it." elif (reply == 'take') or (reply == 'get') or (reply == 'buy') or (reply == 'eat') or (reply == 'drop') or (reply == 'throw') or (reply == 'bury') or (reply == 'lick') or (reply == 'look at'): print 'You must supply an object.' elif (reply == 'shovel') or (reply == 'cheese') or (reply == 'book') or (reply == 'manual') or (reply == 'chocolate') or (reply == 'clementine') or (reply == 'popcorn') or (reply == 'taco') or (reply == 'cheese taco') or (reply == 'chicken taco') or (reply == '2-dollar') or (reply == '2-dollar bill') or (reply == '5-dollar') or (reply == '5-dollar bill') or (reply == 'quarter') or (reply == 'cliff') or (reply == 'stage') or (reply == 'computer') or (reply == 'bin') or (reply == 'seller') or (reply == 'building') or (reply == 'bushes'): print 'You must supply an action.' elif reply == 'buy shovel': if shovel == section: print "This object isn't sold now. You cannot /buy/ it." else: print "I don't see that here." elif reply == 'buy book': if book == section: print "This object isn't sold now. You cannot /buy/ it." else: print "I don't see that here." elif reply == 'buy manual': if manual == section: print "This object isn't sold now. You cannot /buy/ it." else: print "I don't see that here." elif reply == 'buy cheese': if cheese == section: print "This object isn't sold now. You cannot /buy/ it." else: print "I don't see that here." elif reply == 'buy chocolate': if chocolate == section: print "This object isn't sold now. You cannot /buy/ it." else: print "I don't see that here." elif reply == 'buy clementine': if clementine == section: print "This object isn't sold now. You cannot /buy/ it." else: print "I don't see that here." elif (reply == 'buy 2-dollar') or (reply == 'buy 2-dollar bill'): if dollar_2 == section: print "This is money! Of course you can't buy it!" else: print "I don't see that here." elif (reply == 'buy 5-dollar') or (reply == 'buy 5-dollar bill'): if dollar_5 == section: print "This is money! Of course you can't buy it!" else: print "I don't see that here." elif reply == 'buy bill': print 'You must supply how much money the bill is.' elif reply == 'buy quarter': print "I don't see that here." elif reply == 'buy cliff': if section == 'building fork': print "You cannot buy this!" else: print "I don't see that here." elif reply == 'buy stage': if section == 'stage floor': print "You cannot buy this!" else: print "I don't see that here." elif reply == 'buy computer': if section == 'computer room': print "You cannot buy this!" else: print "I don't see that here." elif reply == 'buy bin': if (section == 'stage floor') or (section == 'computer room'): print "You cannot buy this!" else: print "I don't see that here." elif reply == 'buy seller': if (section == 'restaurant') or (section == 'popcorn'): print "You cannot buy this!" else: print "I don't see that here." elif reply == 'buy building': if section == 'building fork': print "You definetly can't buy this! It was built." elif (section == 'dead end') or (section == 'E-W'): print "I don't see that here." else: print 'You are in the building!' elif reply == 'buy bushes': if (section == 'dead end') or (section == 'E-W') or (section == 'building fork'): print "You cannot buy this! It was grown." else: print "I don't see that here." elif (reply == 'get all') or (reply == 'take all'): trial = 0 if shovel == section: print 'A shovel: Taken.' shovel = 'inventory' trial += 1 if book == section: print 'A thick book: Taken.' book = 'inventory' trial += 1 if manual == section: print 'A Vyss-type manual: Taken.' manual = 'inventory' trial += 1 if cheese == section: print 'Some swiss cheese: Taken.' cheese = 'inventory' trial += 1 if chocolate == section: print 'Some chocolate: Taken.' chocolate = 'inventory' trial += 1 if clementine == section: print 'A clementine: Taken.' clementine = 'inventory' trial += 1 if dollar_2 == section: print 'A 2-dollar bill: Taken.' dollar_2 = 'inventory' money += 2.0 trial += 1 if dollar_5 == section: print 'A 5-dollar bill: Taken.' dollar_5 = 'inventory' money += 5.0 trial += 1 if popcorn == section: print 'Some popcorn: Taken.' popcorn = 'inventory' trial += 1 if taco == section: print 'A cheese taco: Taken.' taco = 'inventory' trial += 1 if trial == 0: print 'I see nothing here for you to take at the moment.' elif reply == 'jump': if (section == 'computer room') or (section == 'stage floor'): print 'You fall down into a deep bin. The bin is very narrow and you feel the impact' print 'of your head hitting the sides ten times in a row.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break elif section == 'building fork': print 'You jump high and land on the edge of the cliff. With loss of balance, you tip' print 'over and fall down. You land right on your nose and nearly break it.' print print 'You are dead.' print 'You have scored %d out of a possible 105 points.' % (points) break else: print 'Done.' items = 0 if shovel == 'inventory': shovel = section items += 1 if book == 'inventory': book = section items += 1 if manual == 'inventory': manual = section items += 1 if cheese == 'inventory': cheese = section items += 1 if chocolate == 'inventory': chocolate = section items += 1 if clementine == 'inventory': clementine = section items += 1 if dollar_2 == 'inventory': dollar_2 = section items += 1 if dollar_5 == 'inventory': dollar_5 = section items += 1 if popcorn == 'inventory': popcorn = section items += 1 if taco == 'inventory': taco = section items += 1 if items > 0: if items > 1: if items > 2: print 'You are careless and tend to drop all your items.' else: print 'You are careless and tend to drop both your items.' else: print 'You are careless and tend to drop your item.' else: print "I don't understand that." while True: raw_input("")