Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <string>
- #include <Windows.h>
- #include <stdio.h>
- #include <mmsystem.h>
- using namespace std;
- void Battle(string mob, int level, int beggining){
- int monsterhp;
- int monsterdamage;
- string Opponent;
- int PlayerHealth;
- int PlayerLevel;
- int BattleChoice;
- int coins;
- string CurrentSword;
- string inventory;
- int SwordDamage;
- string backchoice;
- int exp = 0;
- int maxexp = 100;
- coins = 0;
- if (beggining == 1){
- PlayerHealth = 100;
- PlayerLevel = 1;
- CurrentSword = "NoobSword";
- SwordDamage = 5;
- inventory += "NoobSword";
- }
- if (mob == "Goblin"){
- Opponent = mob;
- monsterdamage = 5 * level;
- monsterhp = 25 * level;
- system("cls");
- }
- if (mob == "Goblin Boss"){
- Opponent = mob;
- monsterdamage = 10 * level;
- monsterdamage = 20 * level;
- monsterhp = 50 * level;
- system("cls");
- }
- while (monsterhp >= 1){
- cout << "Coins: " << coins << " Exp: "<< exp << "/" << maxexp;
- cout << "\n\nFighting: " << mob << " Level: " << level << " Hp: " << monsterhp << endl;
- cout << "____________";
- cout << "\n\n1. Attack";
- cout << "\n2. Block";
- cout << "\n3. Inventory";
- cout << "\n4. quit\n";
- cout << "____________";
- cout << "\nHealth:" << PlayerHealth << "\nLevel:" << PlayerLevel << endl;
- cout << "\n\nSword: " << CurrentSword << "\nDamage: " << SwordDamage << "\n\n> ";
- cin >> BattleChoice;
- if (BattleChoice == 4){
- exit(1);
- }
- else if (BattleChoice == 2) {
- system("cls");
- cout << "The monster tried to attack you but you blocked it";
- Sleep(1500);
- cout << "\n\nPlus 5 coins!\n\n";
- coins += 5;
- Sleep(1500);
- system("cls");
- system("pause");
- }
- else if (BattleChoice == 3){
- system("cls");
- cout << "Inventory:\n\n";
- Sleep(0100);
- cout << inventory << "\n\n\n";
- system("pause");
- system("cls");
- }
- else if (BattleChoice == 1){
- system("cls");
- cout << "You have attacked the monster";
- Sleep(1500);
- monsterhp = monsterhp - SwordDamage;
- cout << "\n\nThe monster has lost " << SwordDamage << " Health, it now has " << monsterhp << " Health";
- Sleep(1500);
- cout << "\n\n+5 Experience!";
- exp += 5;
- Sleep(1500);
- cout << "\n\nThe monster attacked you and you lost " << monsterdamage;
- PlayerHealth = PlayerHealth - monsterdamage;
- Sleep(1500);
- system("cls");
- if (PlayerHealth <=0) {
- cout << "You Have Died";
- Sleep(3000);
- exit(1);
- }
- else if (monsterhp <=0) {
- cout << "You Have Won The Battle!";
- }
- }
- }
- }
- void carvania(){
- int gotoc;
- cout << "\n__________________";
- cout << "\n1. Go to the shop";
- cout << "\n2. Quit";
- cout << "\n__________________";
- cout << "\n\n>";
- cin >> gotoc;
- if (gotoc == 1){
- }
- else{
- exit(1);
- }
- }
- void scene(int sc) {
- string inventory;
- if (sc == 1){
- int coins = 0;
- system("cls");
- int PlayChoice;
- cout << "Coins:"<< coins;
- cout << "\n\nWhere Am I? What am i doing here?";
- Sleep(1000);
- cout << "\n\nChoices:";
- cout << "\n\n1) Standup";
- cout << "\n2) Look Behind you";
- cout << "\n3) look up";
- cout << "\n4) quit\n\n";
- cin >> PlayChoice;
- if (PlayChoice == 1){
- cout << "You Stand up and look around";
- }
- else if (PlayChoice == 2){
- cout << "\n\nYou got attacked by a suspicous creature";
- cout << "\n You Have Died, Try Again";
- Sleep(2000);
- system("cls");
- cout << "\n\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- Sleep(2000);
- exit(1);
- }
- else if (PlayChoice == 3){
- cout << "\n\nYou got attacked by a suspicous creature";
- cout << "\n You Have Died, Try Again";
- Sleep(2000);
- system("cls");
- cout << "\n\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- Sleep(2000);
- exit(1);
- }
- else if (PlayChoice == 4){
- cout << "\n\nQuiting...";
- Sleep(1000);
- exit(1);
- }
- }
- else if (sc == 2){
- system("cls");
- cout << "Y";
- Sleep(0300);
- system("cls");
- cout << "Yo";
- Sleep(0300);
- system("cls");
- cout << "You";
- Sleep(0300);
- system("cls");
- cout << "You l";
- Sleep(0300);
- system("cls");
- cout << "You lo";
- Sleep(0300);
- system("cls");
- cout << "You loo";
- Sleep(0300);
- system("cls");
- cout << "You look";
- Sleep(0300);
- system("cls");
- cout << "You look a";
- Sleep(0300);
- system("cls");
- cout << "You look ar";
- Sleep(0300);
- system("cls");
- cout << "You look aro";
- Sleep(0300);
- system("cls");
- cout << "You look arou";
- Sleep(0300);
- system("cls");
- cout << "You look aroun";
- Sleep(0300);
- system("cls");
- cout << "You look around";
- Sleep(0300);
- system("cls");
- cout << "You look around a";
- Sleep(0300);
- system("cls");
- cout << "You look around an";
- Sleep(0300);
- system("cls");
- cout << "You look around and";
- Sleep(0300);
- system("cls");
- cout << "You look around and r";
- Sleep(0300);
- system("cls");
- cout << "You look around and re";
- Sleep(0300);
- system("cls");
- cout << "You look around and rea";
- Sleep(0300);
- system("cls");
- cout << "You look around and real";
- Sleep(0300);
- system("cls");
- cout << "You look around and realis";
- Sleep(0300);
- system("cls");
- cout << "You look around and realise";
- Sleep(0300);
- system("cls");
- cout << "You look around and realise y";
- Sleep(0300);
- system("cls");
- cout << "You look around and realise yo";
- Sleep(0300);
- system("cls");
- cout << "You look around and realise you";
- Sleep(0300);
- system("cls");
- cout << "You look around and realise your";
- Sleep(0300);
- system("cls");
- cout << "You look around and realise your i";
- Sleep(0300);
- system("cls");
- cout << "You look around and realise your in";
- Sleep(0300);
- system("cls");
- cout << "You look around and realise your in a";
- Sleep(0300);
- system("cls");
- cout << "You look around and realise your in a c";
- Sleep(0300);
- system("cls");
- cout << "You look around and realise your in a ca";
- Sleep(0300);
- system("cls");
- cout << "You look around and realise your in a cav";
- Sleep(0300);
- system("cls");
- cout << "You look around and realise your in a cave";
- Sleep(0300);
- system("cls");
- cout << "You look around and realise your in a cave.";
- Sleep(0300);
- cout << "\n\nChoices:";
- Sleep(0300);
- cout << "\n\n1) Go forward";
- cout << "\n2) Stay";
- cout << "\n3) walk backwards";
- cout << "\n4) quit\n\n";
- int PlayChoice;
- cin >> PlayChoice;
- if (PlayChoice == 1 || 2){
- string CurrentSword;
- int SwordDamage;
- Sleep(1500);
- system("cls");
- cout << "\n\nAn Old Man Approches you...";
- Sleep(1500);
- cout << "\n\nHello? you say";
- Sleep(2500);
- cout << "\n\n Hello... I guess that your new around here...\n My name is Gary! i help with many people...";
- Sleep(1500);
- cout << "\n\n How did i even get here? you asked confused";
- Sleep(2500);
- cout << "\n\n oh.. that happens to everyone, well anyways, heres a sword\n\nSWORD OBTAINED!\n\n its not that good but it does the job\n You Should go now!";
- CurrentSword = "NoobSword";
- SwordDamage = 5;
- inventory += "\n\nNoobSword";
- Sleep(2500);
- cout << "\n\nYou walk away having no idea about whats going on..";
- Sleep(2500);
- cout << "\n\n You look behind you and somehow he wasnt there anymore, Your still really confused but you just go on...\n\n You then walk forward and see that theres two paths.";
- Sleep(2500);
- cout << "\n\n Which path do you go to?\n\n1) left\n\n2) right\n\n";
- cin >> PlayChoice;
- if (PlayChoice == 1 || 2){
- Sleep(0500);
- system("cls");
- cout << "\n\nYou Encounter a goblin";
- Sleep(0500);
- cout << "\n\n You go into battle mode";
- Sleep(1000);
- Battle("Goblin", 1, 1);
- Sleep(1000);
- system("cls");
- }
- } else {
- cout << "\n\nYou got attacked by a suspicous creature";
- cout << "\n You Have Died, Try Again";
- Sleep(2000);
- system("cls");
- cout << "\n\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- cout << "\nGAME OVER";
- Sleep(2000);
- exit(1);
- }
- }
- else if (sc == 3){
- int playchoice3;
- cout << "\nYou are thankful that you survived";
- cout << "\n\n You then walk forward and see a door";
- cout << "\n\nChoices";
- cout << "\n\n1) Walk towards the door\n2) stay\n3) quit\n\n"; // WORKING ON THIS PART DOOOOOOOOOOOOOOD
- cin >> playchoice3;
- if (playchoice3 == 1 || 2){
- cout << "\n\nOut of nowhere the doors open and you see\n a city with all kinds of colors and stores\n\n You then walk in an meet gary, he then says\nOh sorry for talking so fast over there, i was just in a hurry, im sorry i couldnt tell you about this place\n\n";
- Sleep(3000);
- cout << "Then you look angry and relieved so you say,";
- Sleep(3000);
- cout << "\nWhat is this town?";
- Sleep(1000);
- cout << "\n\nThen gary says";
- Sleep(1000);
- cout << "\nOh this is called carvania, Its really populated, and fun things to do, I reccomend you going to a shop, Your sword isnt good enough for all of the monsters ahead of you.\n\n";
- system("pause");
- system("cls");
- }
- else if (playchoice3 == 3{
- exit(1);
- }
- }
- void LoadingScreen(){
- int load = rand() % (2000 + 1 - 0400) + 0400;
- system("cls");
- cout << "\n\nText Adventure: The Cave" << endl;
- cout << "Made By: Daniel C." << endl;
- cout << "\n\n #####################";
- cout << "\n | |";
- cout << "\n #####################";
- Sleep(load);
- system("cls");
- load = rand() % (2000 + 1 - 0400) + 0400;
- cout << "\n\nText Adventure: The Cave" << endl;
- cout << "Made By: Daniel C." << endl;
- cout << "\n\n #####################";
- cout << "\n |- |";
- cout << "\n #####################";
- Sleep(load);
- system("cls");
- load = rand() % (2000 + 1 - 0400) + 0400;
- cout << "\n\nText Adventure: The Cave" << endl;
- cout << "Made By: Daniel C." << endl;
- cout << "\n\n #####################";
- cout << "\n |-- |";
- cout << "\n #####################";
- Sleep(load);
- system("cls");
- load = rand() % (2000 + 1 - 0400) + 0400;
- cout << "\n\nText Adventure: The Cave" << endl;
- cout << "Made By: Daniel C." << endl;
- cout << "\n\n #####################";
- cout << "\n |--- |";
- cout << "\n #####################";
- Sleep(load);
- system("cls");
- load = rand() % (2000 + 1 - 0400) + 0400;
- cout << "\n\nText Adventure: The Cave" << endl;
- cout << "Made By: Daniel C." << endl;
- cout << "\n\n #####################";
- cout << "\n |---- |";
- cout << "\n #####################";
- Sleep(load);
- system("cls");
- load = rand() % (2000 + 1 - 0400) + 0400;
- cout << "\n\nText Adventure: The Cave" << endl;
- cout << "Made By: Daniel C." << endl;
- cout << "\n\n #####################";
- cout << "\n |----- |";
- cout << "\n #####################";
- Sleep(load);
- system("cls");
- load = rand() % (2000 + 1 - 0400) + 0400;
- cout << "\n\nText Adventure: The Cave" << endl;
- cout << "Made By: Daniel C." << endl;
- cout << "\n\n #####################";
- cout << "\n |------ |";
- cout << "\n #####################";
- Sleep(load);
- system("cls");
- load = rand() % (2000 + 1 - 0400) + 0400;
- cout << "\n\nText Adventure: The Cave" << endl;
- cout << "Made By: Daniel C." << endl;
- cout << "\n\n #####################";
- cout << "\n |------- |";
- cout << "\n #####################";
- Sleep(load);
- system("cls");
- load = rand() % (2000 + 1 - 0400) + 0400;
- cout << "\n\nText Adventure: The Cave" << endl;
- cout << "Made By: Daniel C." << endl;
- cout << "\n\n #####################";
- cout << "\n |------- |";
- cout << "\n #####################";
- Sleep(load);
- system("cls");
- load = rand() % (2000 + 1 - 0400) + 0400;
- cout << "\n\nText Adventure: The Cave" << endl;
- cout << "Made By: Daniel C." << endl;
- cout << "\n\n #####################";
- cout << "\n |-------- |";
- cout << "\n #####################";
- Sleep(load);
- system("cls");
- load = rand() % (2000 + 1 - 0400) + 0400;
- cout << "\n\nText Adventure: The Cave" << endl;
- cout << "Made By: Daniel C." << endl;
- cout << "\n\n #####################";
- cout << "\n |----------- |";
- cout << "\n #####################";
- Sleep(load);
- system("cls");
- load = rand() % (2000 + 1 - 0400) + 0400;
- cout << "\n\nText Adventure: The Cave" << endl;
- cout << "Made By: Daniel C." << endl;
- cout << "\n\n #####################";
- cout << "\n |------------ |";
- cout << "\n #####################";
- Sleep(load);
- system("cls"); // HERE DOOOOOOOOOD
- load = rand() % (2000 + 1 - 0400) + 0400;
- cout << "\n\nText Adventure: The Cave" << endl;
- cout << "Made By: Daniel C." << endl;
- cout << "\n\n #####################";
- cout << "\n |------------- |";
- cout << "\n #####################";
- Sleep(load);
- system("cls");
- load = rand() % (2000 + 1 - 0400) + 0400;
- cout << "\n\nText Adventure: The Cave" << endl;
- cout << "Made By: Daniel C." << endl;
- cout << "\n\n #####################";
- cout << "\n |------------- |";
- cout << "\n #####################";
- Sleep(load);
- system("cls");
- load = rand() % (2000 + 1 - 0400) + 0400;
- cout << "\n\nText Adventure: The Cave" << endl;
- cout << "Made By: Daniel C." << endl;
- cout << "\n\n #####################";
- cout << "\n |--------------- |";
- cout << "\n #####################";
- Sleep(load);
- system("cls");
- load = rand() % (2000 + 1 - 0400) + 0400;
- cout << "\n\nText Adventure: The Cave" << endl;
- cout << "Made By: Daniel C." << endl;
- cout << "\n\n #####################";
- cout << "\n |----------------- |";
- cout << "\n #####################";
- Sleep(load);
- system("cls");
- load = rand() % (2000 + 1 - 0400) + 0400;
- cout << "\n\nText Adventure: The Cave" << endl;
- cout << "Made By: Daniel C." << endl;
- cout << "\n\n #####################";
- cout << "\n |-------------------|";
- cout << "\n #####################";
- Sleep(load);
- system("cls");
- cout << "Loaded!";
- }
- void startup(){
- system("cls");
- cout << "LOADING PROGRAM";
- Sleep(0700);
- cout << ".";
- Sleep(0700);
- cout << ".";
- Sleep(0700);
- cout << ".";
- Sleep(0700);
- cout << ".";
- Sleep(0700);
- system("cls");
- cout << "LOADING PROGRAM";
- Sleep(0700);
- cout << ".";
- Sleep(0700);
- cout << ".";
- Sleep(0700);
- cout << ".";
- Sleep(0700);
- cout << ".";
- Sleep(0700);
- system("cls");
- system("cls");
- cout << "LOADING PROGRAM";
- Sleep(0700);
- cout << ".";
- Sleep(0700);
- cout << ".";
- Sleep(0700);
- cout << ".";
- Sleep(0700);
- cout << ".";
- Sleep(0700);
- system("cls");
- cout << "LOADING PROGRAM";
- Sleep(0700);
- cout << ".";
- Sleep(0700);
- cout << ".";
- Sleep(0700);
- cout << ".";
- Sleep(0700);
- cout << ".";
- Sleep(0700);
- system("cls");
- cout << "FINISHED LOADING";
- }
- int main() {
- string choice;
- cout << "Start\nQuit\nplay music\n\n";
- cin >> choice;
- if (choice == "start"){
- startup();
- Sleep(0500);
- LoadingScreen();
- Sleep(0500);
- scene(1);
- Sleep(0500);
- scene(2);
- Sleep(0500);
- system("cls");
- scene(3);
- }
- else if (choice == "quit"){
- exit(1);
- }
- else if (choice == "skip"){
- scene(1);
- Sleep(0500);
- scene(2);
- Sleep(0500);
- scene(3);
- }
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement