Advertisement
Guest User

Untitled

a guest
Mar 4th, 2013
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 8.44 KB | None | 0 0
  1. print("Hi!")
  2.  
  3. # ADVENTURE SCRIPT IN PYTHON
  4. # import statments
  5. import time
  6.  
  7. # variable declarance
  8. money = 0
  9. choice1 = 0
  10. vehicle = 0
  11. info = 0
  12. bust = 0
  13. item = 0
  14. bite = False
  15. arm = False
  16. leg1 = False
  17. leg2 = False
  18. victim = 'Weston'
  19.  
  20. #body
  21. print('Welcome to Botswana! You are in Gaborone, the capital of Botswana. '
  22.       'Everyone has a canvas backpack with the following items: '
  23.       'Fold-up Shovel '
  24.       'Empty Canteen '
  25.       'Obama Bobblehead '
  26.       '2 Inch Pocket Knife '
  27.       'Duct Tape '
  28.       'Flashlight '
  29.       'Metal Pot '
  30.       'Roll of Cookie Dough '
  31.       '2-Liter Bottle of Soda '
  32.       'Cotton Balls '
  33.       'Vasaline '
  34.       'Roll of Aluminum Foil '
  35.       'Camera'
  36.       'Map of the Area')
  37.  
  38. time.sleep(3)
  39.  
  40. while bust == 0:
  41.     info = input('You need to choose how much money to start with. Do you want to start with:'
  42.                   'USD $100 (type in USD)'
  43.                   'ZWL $100,000,000,000,000,000,000,000,000,000 (type in ZWL)')
  44.  
  45.     if info == 'USD':
  46.         money = 100
  47.         bust = 1
  48.     elif info == 'ZWL':
  49.         money = 'z'
  50.         bust = 1
  51.     else:
  52.         print('Sorry, invalid answer. Please try again.')
  53.  
  54. bust = 0
  55.  
  56. print("OK! So you're in Botswana. You need to get to Harare, the capital of Zimbabwe."
  57.       "You can either take a free bus, which could potentially be dangerous due to"
  58.       "desert conditions, or pay $100 for a plane flight. Unfortunately, if you chose the"
  59.       "Zimbabwe dollars, those aren't widely accepted, so you'd need to exchange them.")
  60. while bust == 0:
  61.     info == input("What do you want to do? Exchange, Fly, or Drive?")
  62.     if info == 'Exchange' and money == 'z':
  63.         print("You meet a shady dealer. He explains the price of the money crashed a couple years ago."
  64.               "Your money is only worth about a dollar. He takes your money, and gives you a dollar."
  65.               "You can't afford the $100 plane flight, so you're taking the bus.")
  66.         vehicle = 'bus'
  67.         money = 1
  68.         bust = 1
  69.     elif info == 'Fly' and money == 100:
  70.         print("All right! You pay your money, and take the flight!")
  71.         vehicle = 'plane'
  72.         money = 0
  73.         bust = 1
  74.     elif info == 'Drive':
  75.         print("All right! You board the bus!")
  76.         vehicle = 'bus'
  77.         bust = 1
  78.     else:
  79.         print("Sorry! Something was wrong! Your input was wrong, or you didn't have the money."
  80.               "Try again!")
  81.  
  82. bust = 0
  83.  
  84. print("All right. You discover that while you brought some extra items, you can only keep 1.")
  85. print("You get to pick from:"
  86.       "a. Mosquito Netting"
  87.       "b. Ice Chest"
  88.       "c. High Quality Gas Mask"
  89.       "d. Big Bag of Flour"
  90.       "e. Large Tarp"
  91.       "f. Wooden Plank"
  92.       "g. Antivemon")
  93. while bust == 0:
  94.     info = input("Pick a letter!")
  95.     if info == 'a' or 'b' or 'c' or 'd' or 'e' or 'f' or 'g':
  96.         choice1 = info
  97.         bust = 1
  98.     else:
  99.         print("Sorry, your input was invalid. Please try again!")
  100.  
  101. bust = 0
  102.  
  103. if vehicle == 'bus':
  104.     print("You each take seats on the bus and begin driving on a desert road.")
  105.     print("The bus stops to refuel at a small village, and a native is selling stuff. Everything costs $100."
  106.     while bust == 0:
  107.         info = input("You can pick camel fat, river water, wooden bowl, or stone trinket. Or nothing.")
  108.         if info == "camel fat" and money == 100:
  109.             item = 'camel fat'
  110.             bust = 1
  111.         elif info == "river water" and money == 100:
  112.             print("You discover the water's not safe to drink.")
  113.             item = "river water"
  114.             bust = 1
  115.         elif info == "wooden bowl" and money == 100:
  116.             item = "wooden bowl"
  117.             bust = 1
  118.         elif info == "stone trinket" and money == 100:
  119.             print("Cool! The trinket's made of flint!")
  120.             item = "stone trinket":
  121.             bust = 1
  122.         elif info == "nothing":
  123.             bust = 1
  124.         else:
  125.             print("Sorry, your input was invalid or you didn't have enough money. Try again!")
  126.     bust = 0
  127.     while bust == 0:
  128.         info = input("As you are about to reboard the bus, you see an awesome cactus. Will you take a picture? Yes or no?")
  129.         if info == 'yes':
  130.             print("You get bitten by a snake in the process! And it's poisonous!")
  131.             bust = 1
  132.         elif info == 'no':
  133.             print("Bummer, dude")
  134.             bust = 1
  135.         else:
  136.             print("Sorry, your input was invalid. Try again!")
  137.     bust = 0
  138.     while bust == 0:
  139.         info = input("The bus continues and you notice someone's wallet hanging out. Do you steal?")
  140.         if info == 'yes':
  141.             print("He catches you, and breaks your arm.")
  142.             arm = True
  143.             bust = 1
  144.         elif info == 'no':
  145.             bust = 1
  146.         else:
  147.             print("Sorry, your input was invalid. Please try again.")
  148.     bust = 0
  149.     print("Suddenly, a group of Jihad terrorists sorrounds the bus and brings it to a halt."
  150.           "They order everyone off the bus and say that they are taking one of your friends.")
  151.     victim = input("Who do you give up?")
  152.     print("They take your friend and as they drive away, the shoot the gas tank out of the bus."
  153.           "It explodes, leaving only a hollow shell of scrap metal. One of the other travelers"
  154.           "tells you that the terrorists are heading to their nearby base")
  155. else:
  156.     print("You used all of your money")
  157.     while bust == 0:
  158.         info = input("There are 3 parts of the plane with open seat."
  159.                       "Will you sit in the front, back (near the toilet), or the middle?")
  160.         if info == 'front'
  161.             leg1 = True
  162.             leg2 = True
  163.             bust = 1
  164.         elif info == 'middle':
  165.             leg1 = True
  166.             bust = 1
  167.         elif info == 'back':
  168.             bust = 1
  169.         else:
  170.             print("Sorry, your input was invalid. Please try again")
  171.     bust = 0
  172.     print('A quarter of the way into the fight, a passenger screams "Oh lordy! There is a snake on board!"'
  173.     while bust == 0:
  174.         info = input("Do you kill it or hide?")
  175.         if info == 'kill it':
  176.             bite = True
  177.             print("You killed it, but got bit in the process. It appears to be poisonous")
  178.             bust = 1
  179.         elif info == 'hide':
  180.             print("You hide in the front of the plane")
  181.             bust = 1
  182.         else:
  183.             print("Sorry, your input was invalid. Please try again")
  184.     bust = 0
  185.     while bust == 0:
  186.         info = input("A stewardess walks by and offers free water. Do you fill your canteen,"
  187.                       "drink, THROW IT ON THE GROUND, or flirt with the stewardess?")
  188.         if info == 'fill your canteen':
  189.             item = 'full canteen'
  190.             bust = 1
  191.         elif info == 'drink':
  192.             item = 'river water'
  193.             bust = 1
  194.         elif info == 'THROW IT ON THE GROUND':
  195.             print("The stewardess is offended.")
  196.             bust = 1
  197.         elif info == 'flirt with the stewardess':
  198.             print("The stewardess if offended.")
  199.             bust = 1
  200.         else:
  201.             print("Your input was invalid. Please try again.")
  202.     bust = 0
  203.     while bust == 0:
  204.         info = input("A man walks by when his money falls out of his pocket. Do you return it or steal it?")
  205.         if info == 'steal it' or 'steal':
  206.             print("You get away with it. You got $100.")
  207.             money = money + 100
  208.             bust = 1
  209.         elif info == 'return it' or 'return':
  210.             print("The guy thinks you stole it, and breaks your arm.")
  211.             arm = True
  212.             bust = 1
  213.         else:
  214.             print("Your input was invalid. Please try again.")
  215.     bust = 0
  216.     print("A convoy of Jihad terrorists who were in disguise come out and hijack the plane."
  217.           "They crash the plane in the desert.")
  218.     if leg1 == True and leg2 == True:
  219.         print("You were in the front of the plane. You broke both your legs in the crash.")
  220.     elif leg1 = True:
  221.         print("You sat in the middle, so you broke a leg in the crash.")
  222.     else:
  223.         print("You sat in the back, so you escaped with only minor cuts and bruises")
  224.     print("They kidnap one of you, and leave to their nearby hideout.")
  225. print("You currently have $" + money)
  226. print("Also, you hear word that the water around here isn't safe to drink, even if you got it on a plane")
  227. time.sleep(1)
  228. print("Thanks for playing!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement