Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include "iostream"
- #include <windows.h>
- using namespace std;
- void inventory();
- int main()
- {
- char mainMenu;
- char userResponce;
- char exit;
- cout << "Payday - TextAdventure" << endl;
- cout << "-----------------------------" << endl;
- cout << "1. Start" << endl;
- cout << "2. Help" << endl;
- cout << "3. Credits" << endl;
- cout << "4. Exit" << endl;
- cout << "(Please type 1,2,3 or 4)" << endl;
- cout << "-----------------------------" << endl;
- cin >> mainMenu;
- if (mainMenu == '1')
- {
- system("CLS");
- cout << "It is a quiet day, you are prepared.." << endl << "You have been planning this for months now," << endl << "You stand outside of the bank ready to make your" << endl << "first choice of which entrance to take." << endl;
- Sleep(150);
- cout << "1. Side door" << endl;
- cout << "2. Front entrance" << endl;
- cout << "3. Roof access" << endl;
- cin >> userResponce;
- if (userResponce == 'i')
- {
- inventory();
- cin >> userResponce;
- }
- else if (userResponce == '1')
- {
- system("CLS");
- cout << "You have chosen to take the side door, " << endl;
- cin >> userResponce;
- if (userResponce == 'i')
- {
- inventory();
- }
- }
- else if (userResponce == '2')
- {
- system("CLS");
- cout << "You have decided to take the agresive aproach and go straight in through" << endl << "front entrance of the bank, however Before you could react you're soon overrun" << endl << "by guards and surrendering" << endl;
- cout << endl;
- cout << endl;
- cout << "Game over :( try again!" << endl;
- cout << "The game will close soon" << endl << endl;
- cout << "Or you can enter E to exit" << endl;
- cin >> exit;
- if (exit == 'e' || 'E')
- {
- return 0;
- }
- Sleep(5000);
- return 0;
- }
- else if (userResponce == '3')
- {
- system("CLS");
- cout << "Without needing to think about it you rush to the right" << endl << "Of the building and climb the ladder up to the roof" << endl;
- cin >> userResponce;
- if (userResponce == 'i')
- {
- inventory();
- }
- }
- }
- if (mainMenu == '2')
- {
- system("CLS");
- cout << "Help Menu" << endl;
- cout << "-----------------" << endl;
- cout << "You can press i at any given time to view the inventory." << endl;
- cout << "This game is a choice driven text-based game your task" << endl << "is to successfully rob the bank and get as much money" << endl << "As possible." << endl;
- cout << "-----------------" << endl;
- }
- if (mainMenu == '3')
- {
- cout << endl;
- cout << endl;
- cout << endl;
- cout << "T";
- Sleep(50);
- cout << "h";
- Sleep(50);
- cout << "i";
- Sleep(50);
- cout << "s";
- Sleep(50);
- cout << " ";
- Sleep(50);
- cout << "G";
- Sleep(50);
- cout << "a";
- Sleep(50);
- cout << "m";
- Sleep(50);
- cout << "e";
- Sleep(50);
- cout << " ";
- Sleep(50);
- cout << "W";
- Sleep(50);
- cout << "a";
- Sleep(50);
- cout << "s";
- Sleep(50);
- cout << " ";
- Sleep(50);
- cout << "P";
- Sleep(50);
- cout << "r";
- Sleep(50);
- cout << "o";
- Sleep(50);
- cout << "g";
- Sleep(50);
- cout << "r";
- Sleep(50);
- cout << "a";
- Sleep(50);
- cout << "m";
- Sleep(50);
- cout << "m";
- Sleep(50);
- cout << "e";
- Sleep(50);
- cout << "d";
- Sleep(50);
- cout << " ";
- Sleep(50);
- cout << "B";
- Sleep(50);
- cout << "y";
- Sleep(50);
- cout << " ";
- Sleep(50);
- cout << "J";
- Sleep(50);
- cout << "o";
- Sleep(50);
- cout << "s";
- Sleep(50);
- cout << "h";
- Sleep(50);
- cout << " ";
- Sleep(50);
- cout << "W";
- Sleep(50);
- cout << "i";
- Sleep(50);
- cout << "d";
- Sleep(50);
- cout << "d";
- Sleep(50);
- cout << "u";
- Sleep(50);
- cout << "p";
- Sleep(50);
- cout << endl;
- }
- if (mainMenu == '4')
- {
- return 0;
- }
- system("pause");
- return 0;
- }
- int ammo = 10;
- void inventory()
- {
- cout << "You have the following items:" << endl;
- cout << endl;
- cout << ". Hammer" << endl << ". Welder" << endl << ". Gun - " << ammo << " " << "bullets" << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement