Kevin321888999

The Basement

Sep 19th, 2022 (edited)
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 7.40 KB | Gaming | 0 0
  1. import java.io.BufferedReader;
  2. import java.io.IOException;
  3. import java.io.InputStreamReader;
  4. import java.util.Scanner;
  5. //This program reads numbers and messages typed in by the user. WHat is the system of previlage
  6.  
  7. public class Main{
  8.     public static void main(String[] args) throws IOException {
  9.         Banner();
  10.  
  11.         BufferedReader BR= new BufferedReader(new InputStreamReader(System.in));
  12.         Scanner SC=new Scanner(System.in);
  13.         System.out.println("Hello there!. What is your name? ");
  14.         String Name= BR.readLine();
  15.         System.out.println("Hello "+Name+"!");
  16.         System.out.println("You wake up in a damp dark basement with nothing but a dirty mattress and you only have a window" +
  17.                 " you must venture this basement to find ways to get out.");
  18.         System.out.println("There are some checkered tiles. You are in a 14ft by 15ft  room with one window and door.\n The window is about the size of a shoe box and it is 20ft off of the ground. " +
  19.                 "You hear multiple foot steps upstairs, what do you do? " + "\nDo you (1) scream and yell for help? or (2) stay silent?");
  20.  
  21.         for(;;){
  22.             int choice=SC.nextInt();
  23.         if(choice==1){
  24.             System.out.println("You dumbass he's not that dumb, " +
  25.                     "the kidnapper already sound proofed the room. Try again.");
  26.         } else{System.out.println("Smart choice, the kidnapper already sound proofed the room.");
  27.             break;}
  28.         }
  29.         System.out.println("You start panicking. " +
  30.                 "What if you never see the light of day ever again?"+ " Just then a man in a joker mask opens the door "
  31.         + "\nHe asks 'Are you hungry?' He then hands out a plate of food."+ "\nDo you (1) take the food or (2) don't trust it and starve for the night? ");
  32.         int choice2=SC.nextInt();
  33.         if(choice2==1){
  34.             System.out.println("He put drugs in the food and you're now knocked out cold.");
  35.         }else{System.out.println("You listened to your gut and accepted the food but when he left didn't actually eat it."+" You went starving for the night.");}
  36.         System.out.println("DAY 2:");
  37.         System.out.println("The light is shining in through the window of the room. You have no idea what day or time it is. "+
  38.                 " \nYou hoped that yesterday was a nightmare and that this was all a dream, but then reality kicks in."+
  39.                 "\nYou look at the door and see that there is a lock with a keypad."+ "\nYou tap on it and it says 'Enter the 5 digit passcode' (do not enter 0 in front");
  40.         int [] tries={1,2,3,4};
  41.         for(int i=0;i<=4;i++){
  42.             int passcode=SC.nextInt();
  43.             if(passcode==93052){System.out.println("The door opens!");
  44.                 break;
  45.         }
  46.             else{
  47.                 for(i = 3; i<=4; i--){
  48.                     System.out.println("Try again. you only get "+tries[i]+" tries left.");
  49.                     int passcode2=SC.nextInt();
  50.                     if (passcode2==93052){System.out.println("The door opens!"); break;}
  51.                     if(i==0){
  52.                         System.out.println("The kidnapper was alerted! Hide!"+" He comes and throws a barrage of punches."+ "\nYou are beaten and you go to sleep on the bed."); break;}
  53.                 }break;
  54.             }
  55.         }
  56.         System.out.println("Day 3\n");
  57.         System.out.println("Its been 2 Days since you have eaten anything. You don't trust the man so you never accepted his food.\n"+
  58.                 "He then comes down with a plate full of flap jacks with syrup. \nDo you take it? (1) Yes, (2) No and starve.");
  59.         int choice3=SC.nextInt();
  60.         if(choice3==1){
  61.             System.out.println("\nYou eat it and it was delicious! Nothing bad happened and you're okay!\n");
  62.         }if(choice3==2){
  63.             System.out.println("\nYou trusted your gut but starved the whole day.");
  64.         }
  65.         System.out.println("20 minutes after the man leaves, you try the keypad again. 'Enter the 5 digit code'(do not include 0 in front) ");
  66.  
  67.         for(int i=0;i<=4;i++){
  68.             int passcode=SC.nextInt();
  69.             if(passcode==93052){System.out.println("The door opens!");
  70.                 break;
  71.             }
  72.             else{
  73.                 for(i = 3; i<=4; i--){
  74.                     System.out.println("Try again. you only get "+tries[i]+" tries left.");
  75.                     int passcode2=SC.nextInt();
  76.                     if (passcode2==93052){System.out.println("The door opens!"); break;}
  77.                     if(i==3){
  78.                         System.out.println("You stop because you only have "+tries[2]+" tries left."); break;}
  79.                 }break;
  80.             }
  81.         }
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.         System.out.println("You take a look around and notice a little journal wedged under the mattress."+
  90.                 "In blood it says 'To whom ever is reading this, my name is Thomas Thurgood Smith. \nI am 14 years old and the son of Metilda and Peter Smith.\n I live on 23 Orange Grove Street, CT, 09970. \nI was captured by a masked man on August 29, 1992 at 3pm. "+
  91.                 "I was out going to get milk from the grocery store when a man said he needed my help lifting something into his truck. \nBeing the helping person I am I decided to help the man."+
  92.                 "He took me behind the store and there was a BIG RED VAN with big boxes infront.\n We got to the van and then he sprayed some chemicals in my face. I then woke up here.\n When I woke the next day, the man had a cake, he said it was his 40th birthday and he wanted to share it with 'someone special'.\n"+
  93.                 "The entry stops there. You flip through other pages but there are no more entries.\n You then decide to look around. "+"Decide to see what you can use to your advantage."+"You find a piece of tile floor that is about the size of your palm."+
  94.                 "\nDo you (1) try throwing the tile piece at the window to try to break it and yell for help? (2) try the keypad lock again.");
  95.         for(;;){
  96.          int choice4=SC.nextInt();
  97.            if(choice4==1){
  98.                System.out.println("You've thrown the rock about 19 times. The glass is too thick.");
  99.            }else{
  100.                System.out.println("You decide to try the key combination again. "+"\n'Enter the 5 digit code: (do not include 0 in front). ");
  101.  
  102.  
  103.                for(int i=0;i<=2;i++){
  104.                    int passcode=SC.nextInt();
  105.                    if(passcode==93052){System.out.println("The door opens!");
  106.                        break;
  107.                    }
  108.                    else{
  109.                        for(i = 1; i<=2; i--){
  110.                            System.out.println("Try again. you only get "+tries[i]+" tries left.");
  111.                            int passcode2=SC.nextInt();
  112.                            if (passcode2==93052){System.out.println("The door opens!"); break;}
  113.                            if(i==1){
  114.                                System.out.println("You only have "+tries[0]+" tries left."+" Hint look back at the note left by Thomas Thurgood."); }
  115.                        }break;}
  116.                }System.out.println("You slowly open the door, but you have a feeling to go back to the journal.");
  117.  
  118.            }
  119.         }
  120.  
  121.     }
  122.     public static void Banner(){
  123.         System.out.println("THE BASEMENT!!"+"WARNING: THIS GAME IS PRETTY GRAPHIC AND CONTAINS DESCRIPTIONS OF KIDNAPPING" );
  124.     }
  125.  
  126. }
Add Comment
Please, Sign In to add comment