Hey Guys,
I was just making a program with music running in the background and whenever I tried to run the .exe file of the program, the music wouldn't play.
Extra Info: I'm running Windows 7 and Visual Studio 2010 Express.
Here's my code if you need it...(beware: it is long)
#include <iostream>
#include <string>
#include <time.h>
#include <ctime>
#include <windows.h>
#pragma comment (lib, "Winmm.lib")
using namespace std;
//Training Tests
void TrainingTest1();
void TrainingTest2();
void TrainingTest3();
void TrainingTest4();
void TrainingTest1()
{
int r = rand()%100;
int guess;
int times = 0;
system("cls");
cout << " Your first test is one that uses the mind: " << endl;
cout << endl;
cout << " You will have to Guess the number that I have chosen in under 10 tries." << endl;
cout << endl;
cout << " Guess a number: "<< endl <<endl;
cin >> guess;
cin.get();
cout<<endl;
while (guess !=r)
{
if (guess > r)
{
times ++;
cout << "Too Big!" << endl << "Number Of Guesses: "<< times << endl;
}
else if (guess < r)
{
times ++;
cout << "Too Small!" << endl << "Number Of Guesses: "<< times << endl;
}
cout << "Guess Again." << endl;
cin >> guess;
cin.get();
if (times == 10)
{
system("cls");
cout <<" You have failed...you die now." << endl;
cout << endl;
system("pause");
exit(1);
}
}
cout << "You have passed this test. Move to the Next One."<< endl;
}
void TrainingTest2()
{
system("cls");
string a;
string b;
string c;
string d;
string e;
string f;
string g;
string h;
string i;
string j;
cout << " So what if you beat the first test...you still have 3 more left." << endl;
cout << endl;
cout << " This test will test your wits even more." << endl;
cout << endl;
cout << " This test is a quiz! Yay! Pop Quiz! " << endl;
cout << endl;
cout << " In this quiz there will be 10 True/False Questions." << endl;
cout << endl;
cout << " You just have to answer the questions." << endl;
cout << endl;
cout << " Only If you get all 10 Correct will you pass." << endl;
cout << endl;
cout << " Question One: I am awesome." << endl;
cout << endl << " ";
cin >> a;
cout << endl;
if( a == "false" || a == "False" || a == "F" || a == "f")
{
system("pause");
system("cls");
cout << " Wrong Choice! You lose!" << endl;
cout << endl;
system("pause");
exit(1);
}
else
{
system("pause");
system("cls");
cout << endl;
cout << " Next Question!" << endl;
cout << endl;
cout << " Question Two: Panama hats are made in Panama." << endl;
cout << endl << " ";
cin >> b;
if( b == "true" || b == "True" || b == "T" || b == "t")
{
system("pause");
system("cls");
cout << " Wrong Choice! You lose!" << endl;
cout << endl;
system("pause");
exit(1);
}
else
{
system("pause");
system("cls");
cout << endl;
cout << " Next Question!" << endl;
cout << endl;
cout << " Question Three: The Canary Islands are named after birds." << endl;
cout << endl << " ";
cin >> c;
if( c == "true" || c == "True" || c == "T" || c == "t")
{
system("pause");
system("cls");
cout << " Wrong Choice! You lose!" << endl;
cout << endl;
system("pause");
exit(1);
}
else
{
system("pause");
system("cls");
cout << endl;
cout << " Next Question!" << endl;
cout << endl;
cout << " Question Four: iD Tech Camps are awesome." << endl;
cout << endl << " ";
cin >> d;
if( d == "false" || d == "False" || d == "F" || d == "f")
{
system("pause");
system("cls");
cout << " Wrong Choice! You lose!" << endl;
cout << endl;
system("pause");
exit(1);
}
else
{
system("pause");
system("cls");
cout << endl;
cout << " Next Question!" << endl;
cout << endl;
cout << " Question Five: Call Of Duty: Modern Warfare is better than Black Ops." << endl;
cout << endl << " ";
cin >> e;
if( e == "false" || e == "False" || e == "F" || e == "f")
{
system("pause");
system("cls");
cout << " Wrong Choice! You lose!" << endl;
cout << endl;
system("pause");
exit(1);
}
else
{
system("pause");
system("cls");
cout << endl;
cout << " Next Question!" << endl;
cout << endl;
cout << " Question Six: There are lots of hurricanes in the Carribean." << endl;
cout << endl << " ";
cin >> f;
if( f == "false" || f == "False" || f == "F" || f == "f")
{
cout << " Wrong Choice! You lose!" << endl;
cout << endl;
system("pause");
exit(1);
}
else
{
system("pause");
system("cls");
cout << endl;
cout << " Next Question!" << endl;
cout << endl;
cout << " Question Seven: Everyone likes pie." << endl;
cout << endl << " ";
cin >> g;
if( g == "false" || g == "False" || g == "F" || g == "f")
{
system("pause");
system("cls");
cout << " Wrong Choice! You lose!" << endl;
cout << endl;
system("pause");
exit(1);
}
else
{
system("pause");
system("cls");
cout << endl;
cout << " Next Question!" << endl;
cout << endl;
cout << " Question Eight: The first name of King George the Sixth was George." << endl;
cout << endl << " ";
cin >> h;
if(h == "true" || h == "True" || h == "T" || h == "t")
{
system("pause");
system("cls");
cout << " Wrong Choice! You lose!" << endl;
cout << endl;
system("pause");
exit(1);
}
else
{
system("pause");
system("cls");
cout << endl;
cout << " Next Question!" << endl;
cout << endl;
cout << " You're almost there!" << endl;
cout << endl;
cout << " Question Nine: Catgut comes from cats." << endl;
cout << endl << " ";
cin >> i;
if(i == "true" || i == "True" || i == "T" || i == "t")
{
system("pause");
system("cls");
cout << " Wrong Choice! You lose!" << endl;
cout << endl;
system("pause");
exit(1);
}
else
{
system("pause");
system("cls");
cout << endl;
cout << " Next Question!" << endl;
cout << endl;
cout << " You're almost there!" << endl;
cout << endl;
cout << " Question Ten: The Oktoberfest celebration in Germany begins in October.." << endl;
cout << endl << " ";
cin >> j;
if(j == "true" || j == "True" || j == "T" || j == "t")
{
system("pause");
system("cls");
cout << " Wrong Choice! You lose!" << endl;
cout << endl;
system("pause");
exit(1);
}
else
{
system("pause");
system("cls");
cout << "Good job! You passed the Second Test." << endl;
cout << endl;
}
}
}
}
}
}
}
}
}
}
}
void TrainingTest3()
{
system("cls");
int CharHealth = 100;
int OrcHealth = 75;
int StunSpell = 5;
string Input;
cout << " I bet you think that you're all that...But you're NOT!" << endl;
cout << endl;
cout << " The Third Test Is The Hardest Of Them All. " << endl;
cout << endl;
cout << " You have to fight an Orc...and win." << endl;
cout << endl;
cout << " I will give you one of my spells, and a sword." << endl;
cout << endl;
cout << " *Sword GET!*" << endl;
cout << endl;
cout << " *Stun Spell GET!*" << endl;
cout << endl;
cout << " Well? what are you waiting for? GO!" << endl;
cout << endl;
system("pause");
system("cls");
cout << " As you are walking through the rooms, you see something move from the corner of your eye." << endl;
cout << endl;
cout << " It's the Orc!" << endl;
cout << endl;
cout << " The Orc Attacks!" << endl;
cout << endl;
while(OrcHealth >= 1 && CharHealth >= 1)
{
int HealthDepleter = rand()%30;
cout << " Would you like to use: " << endl;
cout << endl;
cout << " A. The Sword!" << endl;
cout << endl;
cout << " B. The Stun Spell(s)" << endl << " You have " <<StunSpell <<" Stun Spell(s) left!" << endl;
cout << endl << " ";
cin >> Input;
if (Input == "A" || Input == "a")
{
OrcHealth = OrcHealth - HealthDepleter;
CharHealth = CharHealth - HealthDepleter;
system("cls");
cout << " You use the Sword and you attack the Orc with it!" << endl;
cout << endl;
cout << " It does " << HealthDepleter << " damage on the Orc!" << endl;
cout << endl;
cout << " The Orc has " << OrcHealth << " HP left!" << endl;
cout << endl;
cout << " The Orc used it's big club and attacked you!" << endl;
cout << endl;
cout << " It did " << HealthDepleter << " damage on you!" << endl;
cout << endl;
cout << " You have " << CharHealth << " HP left!" << endl;
}
else if (Input == "B" || Input == "b")
{
StunSpell --;
OrcHealth = OrcHealth - HealthDepleter;
if(StunSpell <= 0)
{
system("cls");
CharHealth = CharHealth - HealthDepleter;
cout << " You have no more Stun Spells!! You cannot use them!" << endl;
cout << endl;
cout << " Since you have no more Stun Spells, the Orc attacks you!" << endl;
cout << endl;
cout << " You have " <<CharHealth << " HP left!" << endl;
cout << endl;
cout << " You attack the Orc back with the sword!" << endl;
cout << endl;
cout << " The Orc Has " <<OrcHealth << " HP left!" << endl;
cout << endl;
}
system("cls");
cout << " You use the Stun Spell!" << endl;
cout << endl;
cout << " The Orc cannot attack!" << endl;
cout << endl;
cout << " You use the sword and attack the Orc while it is dazed." << endl;
cout << endl;
cout << " The Orc has " << OrcHealth << " HP left!" << endl;
}
}
if (OrcHealth <= 0)
{
system("cls");
cout << " Good job! You beat the Orc! " << endl;
cout << endl;
cout << " Move on to the Fourth and Final Test!" << endl;
cout << endl;
}
else if (CharHealth <= 0)
{
system("cls");
cout << " You lost..." << endl;
cout << endl;
cout << " You are not worthy." << endl;
cout << endl << endl << endl;
system("pause");
exit(1);
}
}
void TrainingTest4()
{
string Input;
int NumberOfGuesses = 0;
system("cls");
cout << " This is the Final Test. If you pass this, you will become my student." << endl;
cout << endl;
cout << " I warn you though, this test will be hard." << endl;
cout << endl;
cout << " The Hardest Riddle: " << endl;
cout << endl;
cout << " You have 10 Tries to get it correct!" << endl;
cout << endl;
cout << " The word has seven letters. \n\n It preceded God. \n\n It is greater than God.\n\n Is more evil than the devil.\n\n Poor people have it.\n\n Rich people need it.\n\n If you eat it, you will die.\n\n What is it?";
cout << endl << " ";
cin >> Input;
if ( Input == "Nothing" ||Input == "nothing")
{
system("cls");
cout << " Good job, you guessed it correctly!" << endl;
cout << endl;
cout << " You have passed all the tests!" << endl;
cout << endl;
cout << " You are indeed worthy of my teachings." << endl;
cout << endl;
system("pause");
system("cls");
}
else
{
cout << " Wrong answer...guess again." << endl;
cout << " You have used " << NumberOfGuesses << " tries." << endl;
NumberOfGuesses ++ ;
if (NumberOfGuesses == 10)
{
system("cls");
cout << " You have used up your 10 tries... you are not worthy." << endl;
cout << endl;
system("pause");
exit(1);
}
}
}
//Forest Maze
void ForestArea1();
void ForestArea2();
void ForestArea3();
void ForestArea4();
void ForestArea5();
void ForestArea1()
{
string x = "";
while(x != "W" && x != "w" && x != "A" && x != "a" && x != "S" && x != "s" && x != "D" && x != "d")
{
system("cls");
cout << " You are in Forest Area 1!" << endl;
cout << endl;
cout << " You have to get to Forest Area 5!" << endl;
cout << endl;
cout << " Would you like to: " << endl;
cout << endl;
cout << " W. North." << endl;
cout << endl;
cout << " D. East." << endl;
cout << endl;
cout << " S. South." << endl;
cout << endl;
cout << " A. West." << endl;
cout << endl << " ";
cin >> x;
}
if(x == "W" || x == "w")
{
ForestArea3();
}
if(x == "A" || x == "a")
{
ForestArea3();
}
if(x == "S" || x == "s")
{
ForestArea2();
}
if(x == "D" || x == "d")
{
ForestArea4();
}
}
void ForestArea2()
{
string x = "";
while(x != "W" && x != "w" && x != "A" && x != "a" && x != "S" && x != "s" && x != "D" && x != "d")
{
system("cls");
cout << " You are in Forest Area 2!" << endl;
cout << endl;
cout << " You have to get to Forest Area 5!" << endl;
cout << endl;
cout << " Would you like to: " << endl;
cout << endl;
cout << " W. North." << endl;
cout << endl;
cout << " D. East." << endl;
cout << endl;
cout << " S. South." << endl;
cout << endl;
cout << " A. West." << endl;
cout << endl << " ";
cin>>x;
}
if(x == "W" || x == "w")
{
ForestArea4();
}
if(x == "A" || x == "a")
{
ForestArea3();
}
if(x == "S" || x == "s")
{
ForestArea1();
}
if(x == "D" || x == "d")
{
ForestArea1();
}
}
void ForestArea3()
{
string x = "";
while(x != "W" && x != "w" && x != "A" && x != "a" && x != "S" && x != "s" && x != "D" && x != "d")
{
system("cls");
cout << " You are in Forest Area 3!" << endl;
cout << endl;
cout << " You have to get to Forest Area 5!" << endl;
cout << endl;
cout << " Would you like to: " << endl;
cout << endl;
cout << " W. North." << endl;
cout << endl;
cout << " D. East." << endl;
cout << endl;
cout << " S. South." << endl;
cout << endl;
cout << " A. West." << endl;
cout << endl << " ";
cin >> x;
}
if(x == "W" || x == "w")
{
ForestArea4();
}
if(x == "A" || x == "a")
{
ForestArea5();
}
if(x == "S" || x == "s")
{
ForestArea2();
}
if(x == "D" || x == "d")
{
ForestArea1();
}
}
void ForestArea4()
{
string x = "";
while(x != "W" && x != "w" && x != "A" && x != "a" && x != "S" && x != "s" && x != "D" && x != "d")
{
system("cls");
cout << " You are in Forest Area 4!" << endl;
cout << endl;
cout << " You have to get to Forest Area 5!" << endl;
cout << endl;
cout << " Would you like to: " << endl;
cout << endl;
cout << " W. North." << endl;
cout << endl;
cout << " D. East." << endl;
cout << endl;
cout << " S. South." << endl;
cout << endl;
cout << " A. West." << endl;
cout << endl << " ";
cin >> x;
}
if(x == "W" || x == "w")
{
ForestArea5();
}
if(x == "A" || x == "a")
{
ForestArea3();
}
if(x == "S" || x == "s")
{
ForestArea1();
}
if(x == "D" || x == "d")
{
ForestArea2();
}
}
void ForestArea5()
{
system("cls");
cout << " Good Job!! You got out of the Forest Of Life!" << endl;
cout << endl << endl << endl;
}
//Main Characters
class MainCharacter
{
private:
string Name;
public:
MainCharacter()
{
Name = "";
}
void SetName(string NewName)
{
Name = NewName;
}
string GetName()
{
return(Name);
}
};
class Foe
{
private:
string FoeName;
public:
Foe()
{
FoeName = "";
}
void SetName(string NewFoeName)
{
FoeName = NewFoeName;
}
string GetName()
{
return( FoeName);
}
};
class Master
{
private:
string MasterName;
int Age;
public:
Master()
{
int random;
random = rand()%5;
if( random == 0)
{
MasterName = "Grand Master Banzai";
}
if( random == 1)
{
MasterName = "Master of Fire (Nuri)";
}
if( random == 2)
{
MasterName = "Master Of Water (Rio)";
}
if( random == 3)
{
MasterName = "Master Of Air (Zephyros)";
}
if( random == 4)
{
MasterName = "Master Of Earth (Terra)";
}
}
void SetMaster(string NewName)
{
MasterName = NewName;
}
string GetName()
{
return( MasterName);
}
};
//Final Battle
void FinalBattle();
void FinalBattle(Foe ABCD)
{
string Input;
srand((unsigned int)time(0));
int CharHealth = 500;
int FoeHealth = 550;
system("pause");
system("cls");
cout << " You are challenged by Foe " << ABCD.GetName() << "!" << endl;
cout << endl;
while(CharHealth > 0 && FoeHealth > 0)
{
system("pause");
system("cls");
int CharAttackSword = rand()%80;
int FoeAttack = rand()%50;
int CharAttackSpell = rand()%100;
cout << " Would you like to use: " << endl;
cout << endl;
cout << " A. The Sword." << endl;
cout << endl;
cout << " B. Your Wide Array Of Spells." << endl;
cout << endl << " ";
cin >> Input;
if (Input == "A" || Input == "a")
{
system("cls");
FoeHealth = FoeHealth - CharAttackSword;
CharHealth = CharHealth - FoeAttack;
cout << " You use the sword and rush to attack " << ABCD.GetName() << endl;
cout << endl;
cout << " It does " << CharAttackSword << " damage!" << endl;
cout << endl;
cout << " " << ABCD.GetName() << " has " << FoeHealth << " HP left." << endl;
cout << endl;
cout << " Your foe uses his Sword Attack and it does " << FoeAttack << " damage on you." << endl;
cout << endl;
cout << " You have " << CharHealth << " HP left!" << endl;
cout << endl;
}
if (Input == "B" || Input == "b")
{
system("cls");
string InputSpell;
cout << " You use your spells!" << endl;
cout << endl;
cout << " Which spell would you like to use? " << endl;
cout << endl;
cout << " A. Stupefy." << endl;
cout << endl;
cout << " B. Expelliarmus." << endl;
cout << endl;
cout << " C. Avada Kedavra." << endl;
cout << endl;
cout << " D. Confringo." << endl;
cout << endl << " ";
cin >> InputSpell;
if (InputSpell == "A" || InputSpell == "a")
{
FoeHealth = FoeHealth - CharAttackSpell;
CharHealth = CharHealth - FoeAttack;
system("cls");
cout << " You use " << InputSpell << " on " <<ABCD.GetName() << endl;
cout << endl;
cout << " It did " << CharAttackSpell << " damage on " << ABCD.GetName() << endl;
cout << endl;
cout << " " << ABCD.GetName() << " has " << FoeHealth << " HP left!" << endl;
cout << endl;
cout << " Your foe uses his Sword Attack and it does " << FoeAttack << " damage on you." << endl;
cout << endl;
cout << " You have " << CharHealth << " HP left!" << endl;
cout << endl;
}
if (InputSpell == "B" || InputSpell == "b")
{
FoeHealth = FoeHealth - CharAttackSpell;
CharHealth = CharHealth - FoeAttack;
system("cls");
cout << " You use " << InputSpell << " on " <<ABCD.GetName() << endl;
cout << endl;
cout << " It did " << CharAttackSpell << " damage on " << ABCD.GetName() << endl;
cout << endl;
cout << " " << ABCD.GetName() << " has " << FoeHealth << " HP left!" << endl;
cout << endl;
cout << " Your foe uses his Sword Attack and it does " << FoeAttack << " damage on you." << endl;
cout << endl;
cout << " You have " << CharHealth << " HP left!" << endl;
cout << endl;
}
if (InputSpell == "C" || InputSpell == "c")
{
FoeHealth = FoeHealth - CharAttackSpell;
CharHealth = CharHealth - FoeAttack;
system("cls");
cout << " You use " << InputSpell << " on " <<ABCD.GetName() << endl;
cout << endl;
cout << " It did " << CharAttackSpell << " damage on " << ABCD.GetName() << endl;
cout << endl;
cout << " " << ABCD.GetName() << " has " << FoeHealth << " HP left!" << endl;
cout << endl;
cout << " Your foe uses his Sword Attack and it does " << FoeAttack << " damage on you." << endl;
cout << endl;
cout << " You have " << CharHealth << " HP left!" << endl;
cout << endl;
}
if (InputSpell == "D" || InputSpell == "d")
{
FoeHealth = FoeHealth - CharAttackSpell;
CharHealth = CharHealth - FoeAttack;
system("cls");
cout << " You use " << InputSpell << " on " <<ABCD.GetName() << endl;
cout << endl;
cout << " It did " << CharAttackSpell << " damage on " << ABCD.GetName() << endl;
cout << endl;
cout << " " << ABCD.GetName() << " has " << FoeHealth << " HP left!" << endl;
cout << endl;
cout << " Your foe uses his Sword Attack and it does " << FoeAttack << " damage on you." << endl;
cout << endl;
cout << " You have " << CharHealth << " HP left!" << endl;
cout << endl;
}
}
}
if ( FoeHealth <=0)
{
system("cls");
cout << " Awesome job!!" << endl;
cout << endl;
cout << " You have beaten the game!" << endl;
cout << endl;
cout << endl;
system("pause");
system("cls");
cout << endl;
cout<<" Ending Credits:" <<endl;
cout<<" " <<endl;
cout<<" Maker and Coder: Pratik Mehta"<<endl;
cout<<" " <<endl;
cout<<" DeBugger(s):" <<endl;
cout<<endl;
cout<<" Testers: Pratik \n \n George \n \n Andrew \n \n Mittens \n \n Dr. Wiley \n \n Gabe...." <<endl;
cout<<endl;
cout << " Winners:" << endl;
cout<<endl;
cout<<" \tPratik"<<endl;
cout << endl;
cout << " \tGeorge" << endl;
cout << endl;
cout << " \tCarlos" << endl;
cout << endl;
cout << " \tMittens(Muffins)" << endl;
cout<<""<<endl;
}
if (CharHealth <= 0)
{
system("cls");
cout << " Too Bad... You lost..." << endl;
cout << endl;
cout << " Better luck next time!" << endl;
cout << endl;
system("pause");
exit(1);
}
}
//Main Game
int main()
{
PlaySound("RFD",NULL,SND_FILENAME|SND_LOOP|SND_ASYNC);
string InputYourName;
string InputFoeName;
string InputChoice;
string InputChoice2;
srand((unsigned int)time(0));
MainCharacter ABC;
Foe ABCD;
Master A;
Master B;
if (A.GetName()=="Grand Master Banzai")
{
B.SetMaster("Grand Master Banzai");
}
if (A.GetName()=="Master Of Fire (Nuri)")
{
B.SetMaster("Master Of Water (Rio)");
}
if (A.GetName()=="Master Of Air (Zephyros)")
{
B.SetMaster("Master Of Earth (Terra)");
}
if (A.GetName()=="Master Of Water (Rio)")
{
B.SetMaster("Master Of Fire (Nuri)");
}
if (A.GetName()=="Master Of Earth (Terra)")
{
B.SetMaster("Master Of Air (Zephyros)");
}
//Intro
cout << endl;
cout << endl << " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " << endl;
cout << endl << " || Welcome To || " << endl;
cout << endl << " || Outer Kingdoms || " << endl;
cout << endl << " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " << endl;
cout << endl;
cout << " _ __,----'~~~~~~~~~`-----.__" << endl;
cout << " . . `//====- ____,-'~`" << endl;
cout << " -. \_|// . /||\\ `~~~~`---.___./" << endl;
cout << " ______-==. _-~o `\/ ||| \\ _,'`" << endl;
cout << " __,--' ,=='||\=_ ;_,_,/ _-'|- |`\ \\ ,'" << endl;
cout << " _-' ,=' | \\`. '',/~7 /- / || `\. /" << endl;
cout << " .' ,' | \\ \_ '' / /- / || \ /" << endl;
cout << " / _____ / | \\.`-_/ /|- _/ ,|| \ /" << endl;
cout << " ,-' `-|--'~~`--_ \ `==-/ `| \'--===-' _/`" << endl;
cout << " ' `-| /| )-'\~' _,--'''" << endl;
cout << " '-~^\_/ | | `\_ ,^ /\"" << endl;
cout << " / \ \__ \/~ `\__" << endl;
cout << " _,-' _/'\ ,-'~____-'`-/ ``===\"" << endl;
cout << " ((->/' \|||' `. `\. , _||" << endl;
cout << " \_ `\ `~---|__i__i__\--~'_/" << endl;
cout << " __-^-_ `) \-.______________,-~'" << endl;
cout << " ///,-'~`__--^- |-------~~~~^'" << endl;
cout << " ///,--~`-\"" << endl;
//Blinking Screen
system("color F9");
Sleep(500);
system("color 9F");
Sleep(500);
system("color F9");
Sleep(500);
system("color 9F");
Sleep(500);
system("color F9");
Sleep(500);
system("color 9F");
Sleep(500);
system("color F9");
Sleep(500);
system("color 9F");
Sleep(500);
system("pause");
system("cls");
cout << endl << " Please Input Your Character's Name: " << endl << endl << " ";
getline(cin, InputYourName);
cout << endl;
ABC.SetName (InputYourName);
cout << endl << " Please Input Your Foe's Name: " << endl << endl << " ";
getline(cin, InputFoeName);
cout << endl;
ABCD.SetName (InputFoeName);
cout << endl << endl;
cout << " Your name is: " << ABC.GetName() << endl;
cout << endl;
cout << " Your foe's name is: " << ABCD.GetName() << endl;
cout << endl;
cout << " Your Master Is: " << A.GetName() << endl;
cout << endl;
cout << " Your Foe's Master Is: " << B.GetName() << endl;
cout << endl << endl;
system("pause");
system("cls");
//Forest Of Life
cout << " Congrats, and welcome to the world of Outer Kingdom, " << ABC.GetName() << "!" << endl;
cout << endl;
cout << " Your journey begins in the depths of the Forest Of Life." << endl;
cout << endl;
ForestArea1();
//Master's House
system("pause");
system("cls");
cout << " As you are walking out, you see a shadow. \n \n You turn around and see someone following you." << endl;
cout << endl;
cout << " It is " << ABCD.GetName() << endl;
cout << endl;
cout << " Would you like to:" << endl;
cout << endl;
cout << " A. Talk To " <<ABCD.GetName() << " " << endl;
cout << endl;
cout << " B. Walk Away." << endl;
cout << endl << " ";
cin>> InputChoice;
cout << endl << endl << endl;
if (InputChoice == "A" || InputChoice == "a")
{
system("pause");
system("cls");
cout << " You walk over to " << ABCD.GetName() << "." << endl;
cout << endl;
cout << " He uses the techniques that his Master, " <<B.GetName() << " taught him,";
cout << " and kills you." << endl;
cout << endl;
cout << " Game Over" << endl;
cout << endl << endl << endl;
system("pause");
return 0;
}
if (InputChoice == "B" || InputChoice == "b")
{
system("pause");
system("cls");
cout << " You walk away from " <<ABCD.GetName() << " to confront him another day." << endl;
cout << endl;
cout << " As you keep on walking, you find a strange house. " << endl;
cout << endl;
cout << " The door is open, and you walk in." << endl;
cout << endl;
cout << A.GetName() << " sees you coming and he silently comes behind you." << endl;
cout << endl;
cout << A.GetName() << ": If you want to live you will have to pass the tests that I will give you." << endl;
cout << endl;
cout << " Do you accept this challenge?" << endl;
cout << endl << " ";
cin >> InputChoice2;
cout << endl << endl;
if (InputChoice2 == "Yes" || InputChoice2 == "yes")
{
system("pause");
system("cls");
cout << A.GetName() << ": You have made a wise choice, young one. " << endl;
cout << endl;
cout << A.GetName() << ": Your training will start tomorrow." << endl;
cout << endl << endl << endl << endl;
system("pause");
system("cls");
cout << endl;
cout << " ~~~~TOMORROW~~~~" << endl;
cout << endl;
cout << A.GetName() << ": WAKE UP! Your training starts TODAY!" << endl;
cout << endl;
system("pause");
TrainingTest1();
TrainingTest2();
TrainingTest3();
TrainingTest4();
system("pause");
system("cls");
cout << endl << " ~~~~~~~ Many Years Later ~~~~~~~" << endl;
cout << endl;
cout << " You are now an experienced master in the arts of " << A.GetName() << "." << endl;
cout << endl;
cout << " One day...you are walking through the woods where it all began." << endl;
cout << endl;
cout << " Suddenly, your foe, " << ABCD.GetName() <<" walks up to you and challenges you." << endl;
cout << endl;
cout << " This is a battle you cannot refuse." << endl;
cout << endl;
cout << endl;
FinalBattle(ABCD);
}
else
{
system("pause");
system("cls");
cout << " Goodbye! Nice knowin' ya!" << endl;
cout << endl;
cout << endl;
system("pause");
return 0;
}
}
cout << endl << endl << endl;
system("pause");
return 0;
}
(Told you it was long)
So,
Any help is appreciated!
Thanks.