Get your own free workspace
View
 

rpg

Page history last edited by dunksnjordans@... 3 years, 11 months ago

#include

using namespace std;

 

char name20;

int help;

void villagestakeout(void);

void weapon(void);

 

int main(void)

{

cout << "Please enter your name, great warrior!" << endl << endl << endl;

cin >> name;

 

cout << "You are on a great quest " << name << endl << endl << endl;

 

cout << "There is a small village in trouble. Should we help them? " << endl << endl << endl;

 

cout << "(Enter 1 for yes, 2 for no)" << endl;

cin >> help;

 

if(help == 1)

{

villagestakeout();

}

else

{

cout << " You suck " << name << "! You are no fun at all!" << endl ;

system ("pause");

}

return 0;

 

}

 

 

void villagestakeout(void)

{

int goblinanswer;

 

cout << "We go to check out the village" << endl << endl << endl;

cout <<"There are crazy goblins are attacking" << endl;

cout <<" Should we help?" << endl << endl << endl;

cout <<" (Enter 1 for yes, 2 for no)" << endl << endl << endl;

 

cin >> goblinanswer;

 

if(goblinanswer==1)

{

cout << "You go towards the city. You realize you have no weapon. What kind of weapon would you like?" << endl;

 

}

else

{

cout << "You suck. The goblins kill everybody in the village. They come after you. You die." << endl << endl << endl;

system ("pause");

}

 

void weapon(void);

{

 

int weapon;

cout <<" You notice a bow and a sword laying on the ground. You go to pick one up." << endl << endl;

cout << " Choose 1 for the Bow or 2 for the Sword" ;

 

cin >> weapon;

 

 

if (weapon==1)

{

cout << "You grab a bow. You start to pwn the goblins one by one. They die. YOU WIN!" << endl << endl;

system("pause");

}

else

{

cout << " you pick up a sword off the floor. You go into the city. Thousands of goblins mob you. You die." << endl << endl << endl << endl;

cout << " GAME OVER\a";

system("pause");

}

}

}

Comments (0)

You don't have permission to comment on this page.