Advertisement
Guest User

Untitled

a guest
Aug 21st, 2012
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.65 KB | None | 0 0
  1. def menu (list, question):
  2.     for entry in list:
  3.         print 1 + list.index(entry),
  4.         print ") " + entry
  5.     return input (question) - 1
  6.    
  7. def sub(v,b):
  8.     while v > 0:
  9.         if keyfound == 0:
  10.             print v, "-", b, "=", v - b
  11.         elif v <= 0:
  12.             break
  13.    
  14. while opt1 == 9: #attesc  
  15.     b = 30
  16.     print "" #dont find teh key
  17.  
  18. while opt2 == 10: #gouge
  19.     b = 40
  20.     print "" #dont find the key
  21.  
  22. while opt3 == 11: #diginto
  23.     b = 55
  24.     print "" #dont find the key
  25.     print ""
  26.  
  27. while opt4 == 12: #eatyour
  28.     b = 65
  29.     print "" #dont find the key
  30.  
  31. while opt5 == 13: #biteoff
  32.     if opt5 == 13:
  33.         break
  34.     else:
  35.         b = 10
  36.     print "You need to find something to do this with"
  37.  
  38. #make less crazy after initial layout
  39. items = ["attempt escape","gouge eyes out","dig into veins","eat your own foot","bite off your finger screaming my precious","door"]
  40. from random import choice
  41. release = choice(items)
  42.  
  43. release = 4
  44. keyfound = 0
  45. loop = 1
  46.  
  47. print "Hello and welcome to the game. You are here for"
  48. print "committing crimes against humanity."
  49. print "Here are your "
  50. print len(items), "options:"
  51. for x in items:
  52.     print x
  53. print "You only have so much blood, choose wisely."
  54. print "The door is locked. Could there be a key somewhere?"
  55.  
  56. while loop == 1:
  57.     if v <= 0:
  58.         restart()
  59.     if keyfound == 1:
  60.         break
  61.     choice = menu(items,"What do you want to do? ")
  62.     if choice == 0:
  63.         if choice == release:
  64.             print "" #find the key
  65.             print ""
  66.             keyfound = 1
  67.         else:
  68.         print "You fail the escape but you find a small"
  69.         print "rusty saw, it may come in handy."
  70.             opt5 = 13
  71.     elif choice == 1:
  72.         if choice == release:
  73.             print ""
  74.             print ""
  75.             keyfound = 1
  76.         else:
  77.             gouge()
  78.     elif choice == 2:
  79.         if choice == release:
  80.             print ""
  81.             print ""
  82.             keyfound = 1
  83.         else:
  84.             diginto()
  85.     elif choice == 3:
  86.         if choice == release:
  87.             print "You found a small key inside the lampshade"
  88.             print ""
  89.             keyfound = 1
  90.         else:
  91.             eatyour()
  92.     elif choice == 4:
  93.         if choice == release:
  94.         and opt5 == 13
  95.         break
  96.             print "You use the saw on your finger and find a key
  97.         print "in the remains. Mmmm, tasty."
  98.            keyfound = 1
  99.        else:
  100.            print "That isn't going to work."
  101.  
  102.  
  103. if v > 0:
  104.    print "Congratulations. Change your ways or next time"
  105.    print "I will kill you myself, slowly and painfully."
  106. elif v <= 0:
  107.    print "Oh dear you have died"
  108.    print "Good bye."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement