Advertisement
Guest User

my text based adventure game (by Palestina)

a guest
Apr 23rd, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.80 KB | None | 0 0
  1. import random
  2. import time
  3.  
  4. name = input("What is your name? ")
  5. print("Hello, "+name)
  6. answer = ""
  7. while answer != "yes" and answer != "no":
  8.     answer = input("Do you want to play hide and seek?")
  9.     if answer == "yes":
  10.         while answer != "hide" and answer != "looking":
  11.            
  12.             answer = input("Great, do you want to be the one looking or the one hiding?")
  13.             if answer == "hide":
  14.                 print("Alrigt, I'll be counting to 10!")
  15.  
  16.                 while answer != "under the bed" and answer != "the closet":
  17.  
  18.                     answer = input("(You should probably hide, choose between hiding in the closet or under the bed)")
  19.  
  20.                     if answer == "under the bed":
  21.                         print("You get under the bed and stay hidden for a short while before being found and getting killed.")
  22.                         print("You lost")
  23.                        
  24.                     elif answer == "the closet":
  25.                         print("You tuck yourself in the closet and make yourself comfortable.")
  26.                         time.sleep(2)
  27.                         print("Suddenly, the floor disappears and you begin to fall down aimlessly until you die from your fall.")
  28.                         time.sleep(1)
  29.                         while answer != "w8^AD6Z?v6KAug=@":
  30.                             answer=input("you lost")
  31.  
  32.             elif answer == "looking":
  33.                 print("(She grabs your head and turns it towards the wall)")
  34.                 time.sleep(1)
  35.                 print("Count to 10 now hun")
  36.                 time.sleep(1)
  37.                 print("As she begins running away to hide, you count to 10, when you're done you")
  38.                 print("see a halway with a total of 7 doors, each of which are labeled a number between 1 to 7")
  39.  
  40.                
  41.  
  42.                 while answer not in [1,2,3,4,5,6,7]:
  43.                     answer=int(input('pick a number between 1 and 7'))
  44.  
  45. print({1:"you're dead",
  46.        2:"u ded",
  47.        3:"u ded",
  48.        4:"u ded",
  49.        5:"u ded",
  50.        6:"u ded",
  51.        7:"U WIN MUTHAFUCKA"}.get(answer))
  52.  
  53. elif answer == "no":
  54.     print('Ok, '+name)
  55.     time.sleep(1)
  56.     while answer != "run" and answer != "attack":
  57.         answer = input("(the killer approaches you, do you defend yourself or run away?)")
  58.         if answer == "run":
  59.             print("You run faster than sanic and escape her")
  60.             time.sleep(2)
  61.             print("You survived.")
  62.            
  63.         elif answer == "attack":
  64.             print("You throw your hardest punch against her face")
  65.             time.sleep(2)
  66.             print("She grabs your hand and cuts through it all the way to your head")
  67.             time.sleep(1)
  68.             print("You're dead")
  69.    
  70.  
  71.    
  72. #use a while thingy more often
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement