This C++ program defines an interactive text-based adventure game with multiple paths and levels. It includes constants for language selection, player name, responses and more. Based on the player's name input, language selection and responses, it directs the gameplay through different scenarios involving adopting a dog, saving a princess and deciding whether to go on an adventure. The program utilizes system commands to clear screens, set colors and pause between inputs.
2. const string RASPUNSNSE = "no";
system("color F1");
cout << "1. For english language type > EN < ." << endl;
cout << "2. Pentru limba romana tasteaza > RO < ." << endl;
cin >> limba;
if(limba == LIMBAROB || limba == LIMBAROS)
goto RO;
else if(limba == LIMBAENB || limba == LIMBAENS)
goto EN;
EN:
system("CLS");
cout << "================================ENGLISH
VERSION=================================" << endl << endl << endl << endl;
system("color f1");
cout << "Hi, this is the v1.0 version of the text-based game named ><Adventure time><." << endl;
cout << "This game will update once a week or two times a week." << endl << endl << endl;
cout << "Becaue this is an interactive game, i want to know your name : ";
cin >> numej;
system("CLS");
if(numej == NUMEDB || numej == NUMEDS)
{
3. cout << "Such a coincidence, Teodor is also my name " << char(zambet) << " . I will be your guide
during the game ."
<< endl << endl;
cout << "Press > Enter < to continue ." << endl << endl;
nivel++;
system("pause");
if(cin.get() == 'n')
{
system("CLS");
}
}
else
{
cout << numej << " is a very beautiful name. My name is Teodor and i will be your guide during the
game ."
<< endl << endl;
cout << "Press > Enter < to continue ." << endl << endl;
nivel = nivel++;
system("pause");
if(cin.get() == 'n')
{
system("CLS");
}
}
cout << numej << ", because you told me your name, you reached level " << nivel << " ." << endl <<
endl;
for(int i = 0; i <= 10; i++)
5. cout << "Hey, in front of you is a little dog, do you want to adopt it ?" << endl << endl;
cin >> raspuns;
cout << endl;
if(raspuns == RASPUNSDBE || raspuns == RASPUNSDSE)
{
cout << "Well done, you adopted a little dog ." << endl << endl;
cout << "Your journey is almost at the final ." << endl << endl;
cout << "Your journey is at the end, you returned at home and you bought for your dog a cage."
<< endl << endl;
cout << "Press > Enter < to continue ." << endl << endl << endl;
nivel++;
system("pause");
system("CLS");
cout << numej << ", because you taked care of that dog, you reached level " << nivel << " ."
<< endl << endl;
for(int i = 0; i <= 10; i++)
{
system("color b1");
system("color c1");
system("color d1");
system("color e1");
system("color f1");
system("color f1");
}
cout << "Press > Enter < to continue .";
6. system("pause");
system("CLS");
}
else
{
cout << "Oh, that little dog is now alone and hungry ." << endl << endl;
cout << "Because it stars to rain, you've returned home ." << endl << endl;
cout << "You are tinking at that little dog |o__o| ." << endl << endl;
cout << "Press > Enter < to continue ." << endl << endl << endl;
system("pause");
system("CLS");
cout << "Sadly, because you don't adopted that little dog, you died because you were sad ." <<
endl << endl;
cout << "Press > Enter < to continue ." << endl << endl << endl;
system("pause");
goto sfarsiten;
}
}
else if(raspuns == RASPUNSNBE || raspuns == RASPUNSNSE)
{
system("CLS");
cout << "It is your choice, but it was a good chance to reach the next level ." << endl << endl;
cout << "Press > Enter < to continue ." << endl << endl << endl;
system("pause");
system("CLS");
}
7. //pausa
//pausa
cout << "You returned at home and you find a suspicious men hwo wants to speak with you ." << endl
<< endl << endl;
cout << "Alex: My name is Alex. I have something very iportant to speak with you !" << endl << endl;
cout << numej << ": What ? What is the problem ?" << endl << endl;
cout << "Alex: I can't belive that you don't know yet !" << endl << endl;
cout << numej << ": What should i know ?" << endl << endl;
cout << "Alex: The princess is in danger ! You should save her !" << endl << endl;
cout << "Press > Enter < to continue ." << endl << endl << endl;
system("pause");
system("CLS");
cout << "Do you want to go to find the princess ?";
cin >> raspuns;
cout << endl << endl;
if(raspuns == RASPUNSDBE || raspuns == RASPUNSDSE)
{
nivel = nivel++;
cout << numej << ", you are an adventurier person, you reached level " << nivel << " ." << endl <<
endl;
for(int i = 0; i <= 10; i++)
{
system("color b1");
system("color c1");
8. system("color d1");
system("color e1");
system("color f1");
system("color f1");
}
cout << "Press > Enter < to continue ." << endl << endl << endl;
system("pause");
system("CLS");
}
else
{
cout << numej << ", you are not an adventurier person, the princess has died ." << endl << endl;
cout << "The princess spirit comes at you to revenge, you died !" << endl << endl;
system("pause");
system("CLS");
goto sfarsiten;
}
cout << "Thanking you, it is mondial peace ." << endl << endl;
cout << "Alex: " << numej << ", do you want to take the airplane to a wonderfull place ?"
<< endl << endl;
cin >> raspuns;
if(raspuns == RASPUNSDBE || raspuns == RASPUNSDSE)
{
cout << endl << endl << "Alex: Then, get this money and buy an airplane ticket !" << endl << endl;
bani = bani + 100;
9. cout << "You gained " << bani << " $" << endl;
cout << "Press > Enter < to continue ." << endl << endl << endl;
system("pause");
system("CLS");
}
else if(raspuns == RASPUNSNBE || raspuns == RASPUNSNSE)
{
cout << endl << endl << "Alex: You don't have an adventurier spirit, i will kill you !" << endl;
for(int i = 10; i >= 0; i--)
{
cout << i << endl;
}
cout << endl << endl << "You died !";
goto sfarsiten;
}
goto sfarsiten;
RO:
system("CLS");
cout << "================================Versiunea
romana================================" << endl << endl << endl << endl;
system("color f1");
cout << "Buna, aceasta este versiunea v1.0 a jocului text-based numit ><Adventure time><." << endl;
10. cout << "Acest joc se va actualiza o data pe saptamana sau se doua ori pe saptamana." << endl << endl
<< endl;
cout << "Avand in vedere ca este un joc interactiv, vreau sa stiu numele tau : ";
cin >> numej;
system("CLS");
if(numej == NUMEDB || numej == NUMEDS)
{
cout << "Ce coincidenta, si pe mine ma cheama tot Teodor " << char(zambet) << " . Eu voi fi ghidul
tau pe parcursul jocului ."
<< endl << endl;
cout << "Apasa > Enter < pentru a continua ." << endl << endl;
nivel = nivel++;
system("pause");
if(cin.get() == 'n')
{
system("CLS");
}
}
else
{
cout << numej << " este un nume foarte frumos. Pe mine ma cheama Teodor si voi fi ghidul tau pe
parcursul jocului."
<< endl << endl;
cout << "Apasa > Enter < pentru a continua ." << endl << endl;
nivel = nivel++;
system("pause");
if(cin.get() == 'n')
11. {
system("CLS");
}
}
cout << numej << ", pentru ca mi-ai spus numele tau, ai ajuns la nivelul " << nivel << " ." << endl <<
endl;
for(int i = 0; i <= 10; i++)
{
system("color b1");
system("color c1");
system("color d1");
system("color e1");
system("color f1");
system("color f1");
}
cout << "Apasa > Enter < pentru a continua ." << endl << endl << endl;
system("pause");
system("CLS");
cout << "Vrei sa pornesti intr-o calatorie ?" << endl;
cin >> raspuns;
if(raspuns == RASPUNSDB || raspuns == RASPUNSDS)
{
system("CLS");
cout << "Atunci, sa mergem !" << endl << endl;
cout << "Apasa > Enter < pentru a continua ." << endl << endl << endl;
system("pause");
12. system("CLS");
cout << "Hei, in fata este un catelus, vrei sa il adopti ?" << endl << endl;
cin >> raspuns;
cout << endl;
if(raspuns == RASPUNSDB || raspuns == RASPUNSDS)
{
cout << "Bravo, ai adoptat un catel ." << endl << endl;
cout << "Calatoria ta este aproape de final ." << endl << endl;
cout << "Calatoria ta a luat sfarsit, te-ai intors acasa si i-ai cumparat cainelui tau o cusca."
<< endl << endl;
cout << "Apasa > Enter < pentru a continua ." << endl << endl << endl;
nivel = nivel++;
system("pause");
system("CLS");
cout << numej << ", pentru ca ai avut grija de acel catel, ai ajuns la nivelul " << nivel << " ."
<< endl << endl;
for(int i = 0; i <= 10; i++)
{
system("color b1");
system("color c1");
system("color d1");
system("color e1");
system("color f1");
system("color f1");
}
13. cout << "Apasa > Enter < pentru a continua ." << endl << endl;
system("pause");
system("CLS");
}
else
{
cout << "Of, saracul catel, a ramas singur si fara mancare ." << endl << endl;
cout << "Din cauza ploii care tocmai s-a pornit, te-ai intors acasa ." << endl << endl;
cout << "Te gandesti la saracul caine din calatorie |o__o| ." << endl << endl;
cout << "Apasa > Enter < pentru a continua ." << endl << endl << endl;
system("pause");
system("CLS");
cout << "Din pacate, din cauza ca nu ai adoptat acel caine, ai murit de tristete ." << endl << endl;
cout << "Apasa > Enter < pentru a continua ." << endl << endl << endl;
system("pause");
system("CLS");
goto sfarsitro;
}
}
else if(raspuns == RASPUNSNB || raspuns == RASPUNSNS)
{
system("CLS");
cout << "Este alegerea ta, dar era o sansa buna de a avansa la nivelul urmator ." << endl << endl;
cout << "Apasa > Enter < pentru a continua ." << endl << endl << endl;
system("pause");
14. system("CLS");
}
cout << "Ai ajuns acasa si ai intalnit un om suspect care a inceput sa vorbeasca cu tine ." << endl <<
endl << endl;
cout << "Alex: Ma cheama Alex, am ceva foarte important de vorbit cu tine !" << endl << endl;
cout << numej << ": Poftim ? Care este problema ?" << endl << endl;
cout << "Alex: Nu pot sa cred ca nu ai aflat inca !" << endl << endl;
cout << numej << ": Ce sa aflu ?" << endl << endl;
cout << "Alex: Printesa este in pericol ! Trebuie sa o salvezi !" << endl << endl;
cout << "Press > Enter < to continue ." << endl << endl << endl;
system("pause");
system("CLS");
cout << "Vrei sa pornesti in cautarea printesei si sa o salvezi ?";
cin >> raspuns;
cout << endl << endl;
if(raspuns == RASPUNSDB || raspuns == RASPUNSDS)
{
nivel = nivel++;
cout << numej << ", esti o persoana aventuriera, ai ajuns la nivelul " << nivel << " ." << endl << endl;
for(int i = 0; i <= 10; i++)
{
system("color b1");
system("color c1");
system("color d1");
system("color e1");
system("color f1");
15. system("color f1");
}
cout << "Apasa > Enter < pentru a continua ." << endl << endl << endl;
system("pause");
system("CLS");
}
else
{
cout << numej << ", nu esti o persoana aventuriera, iar printesa a murit ." << endl << endl;
cout << "Spiritul printesei a venit sa se razbune pe tine, ai murit !" << endl << endl;
system("pause");
system("CLS");
goto sfarsitro;
}
cout << "Datorita curajului tau, este pace la nivel mondial ." << endl << endl;
cout << "Alex: " << numej << ", vrei sa iei avionul catre un taram minunat unde poti avea parte de
multe aventuri ?"
<< endl << endl;
cin >> raspuns;
if(raspuns == RASPUNSDB || raspuns == RASPUNSDS)
{
cout << endl << endl << "Alex: Atunci ia acesti bani si cumpara-ti un bilet de avion !" << endl << endl;
bani = bani++;
cout << "Ai primit " << bani << " RON ." << endl << endl;
cout << "Apasa > Enter < pentru a continua ." << endl << endl << endl;
system("pause");
16. system("CLS");
}
else if(raspuns == RASPUNSNB || raspuns == RASPUNSNS)
{
cout << endl << endl << "Alex: Nu ai deloc un spirit de aventurier . Te voi omori !" << endl;
for(int i = 10; i >= 0; i--)
{
cout << i << endl;
}
cout << endl << endl << "Ai murit !";
goto sfarsitro;
}
cout << "Pana acum te-ai descurcat foarte bine in acest joc.";
goto sfarsitro;
sfarsitro:
system("CLS");
cout << "Ai incheiat versiunea v1.0 a acestui joc. Update-urile vin in curand..." << endl << endl;
goto gata;
sfarsiten:
system("CLS");
cout << "You finished the version v1.0 of the game. The updates are comming soon..." << endl << endl;