Well, I'm a newb... here's the code. The exe link is: http://www.megaupload.com/?d=ZOPE5O24 Don't cheat when playing it by looking at the source code otherwise you're a newb too
Spoiler:PHP Code:#include <iostream> //For basic stuff
#include <string> //To allow cname and cviln
#include <windows.h> //To allow Sleep and fullscreen
using namespace std;
int main()
{
char fscrn;
cout << "Would you like to go Full Screen for the full CMD RPG Experience? y/n\n";
cin >> fscrn;
if (fscrn == 'y') {
keybd_event(VK_MENU,0x36,0,0);
keybd_event(VK_RETURN,0x1c,0,0);
keybd_event(VK_RETURN,0x1c,KEYEVENTF_KEYUP,0);
keybd_event(VK_MENU,0x36,KEYEVENTF_KEYUP,0);
Sleep(200);
system("CLS");
}
if (fscrn == 'n') {
system("CLS");
}
string cname; //Character Name
string cviln; //Character's Village Name
string day;
string month;
string year;
string blank;
char day1;
char day2;
char day3;
char day4;
char day5;
char day6;
char day7;
char day8;
char day9;
char start;
cout << "Hello, And Welcome to C++ Programmer's RPG Game, to start things off could you please say what you would like your character name to be\n\n";
getline(cin, blank);
getline(cin, cname);
cout << "Alright Then! Now Think Of an Incredible name for your village!\n";
getline(cin, cviln);
cout << "\n" << cviln << " eh?... Nice!!\n\n";
cout << "What Day Would You Like This Game To Occur On? (Please Enter a Number e.g. 9)\n";
getline(cin, day);
cout << "\nWhat Month Would You Like This Game To occur On?\n";
getline(cin, month);
cout << "\nWhat Year Would You Like This Game To occur On?\n";
getline(cin, year);
cout << "\n\nHere's the story... \n On The " << day << "th of " << month << ", in the year " << year << ", in the village of " << cviln << " there lived a man called " << cname << ". He was supposed to be the greatest warrior in the land, born to protect everyone from evil invading his town. Now evil has got together to defeat him... But can they...\n\nAre you ready to start? (y/n)\n";
cin >> start;
if (start == 'y') {
}
if (start == 'n') {
cout << "I'll give you 10 Seconds...";
Sleep(1000);
system("CLS");
cout << "10";
Sleep(1000);
system("CLS");
cout << "9";
Sleep(1000);
system("CLS");
cout << "8";
Sleep(1000);
system("CLS");
cout << "7";
Sleep(1000);
system("CLS");
cout << "6";
Sleep(1000);
system("CLS");
cout << "5";
Sleep(1000);
system("CLS");
cout << "4";
Sleep(1000);
system("CLS");
cout << "3";
Sleep(1000);
system("CLS");
cout << "2";
Sleep(1000);
system("CLS");
cout << "1";
Sleep(1000);
system("CLS");
cout << "0";
Sleep(1000);
system("CLS");
}
cout << "Day One.\nThe Evil Army Have Taken Refuge near a river a days walk away from you. Should you and your army go to attack them while they arn't expecting it? (y/n)\n";
cin >> day1;
if (day1 == 'y') {
cout << "\nYou got to the place they had taken refuge after defeating the troops they had sent in advance to your village you had lost 3 men but you continued to their place of refuge only to be taken by suprise and slaughtered.\n\nYou will need to go back to the beginning and start your adventure again...\n";
system("pause");
system("CLS");
exit(0);
}
if (day1 == 'n') {
cout << "\nYou waited in your hut until you heard the bells ringing to signal attack as the Evil army had sent some troops in advance. Luckily only one person was injured, and luckier, he wasn't a soldier.\n";
system("pause");
system("CLS");
}
cout << "Day Two.\nThe Evil Forces Have Advanced Closer, Yould you like to advance on them or stand your ground? (a/s)\n";
cin >> day2;
if (day2 == 'a') {
cout << "\nYou Advance On The Evil Army, Fighting for you might, and luckily the last remaining soldiers of the Evil Army retreat... but they'll be seen again\n";
system("pause");
system("CLS");
}
if (day2 == 's') {
cout << "\nYou Stand Your ground and get slaughtered.. It was close but you lost.\n";
system("pause");
system("CLS");
exit(0);
}
cout << "Day Three.\nThe Remains of the Evil Army are scattered through the mountains.. Would you like to go you and slaughter them like what they tried to do to your people? (y/n)\n";
cin >> day3;
if (day3 == 'y') {
cout << "You and your army storm into the mountains only to find that their reinforcments had arrived and you got slaughtered\n";
system("pause");
system("CLS");
exit(0);
}
if (day3 == 'n') {
cout << "You stay in your village and live another day\n";
system("pause");
system("CLS");
}
cout << "Day Four.\nYou hear nothing about the Army, go out and look for them? (y/n)\n";
cin >> day4;
if (day4 == 'y') {
cout << "A few hours after you go out to look for them, a storm starts so you go back home\n";
system("pause");
system("CLS");
}
if (day4 == 'n') {
cout << "A few hours a storm starts so you go back to your hut\n";
system("pause");
system("CLS");
}
cout << "Day Five.\nYou are woken up by the sound of the beels being rung - Now time for fighting. you go outside with your sword and fight with an Evil warrior, but then another evil warrior comes up to you behind you, what do you do? (j for jump away, s for spin and attack the other person\n";
cin >> day5;
if (day5 == 'j') {
cout << "you attempt to jump away from being in a two person battle but get a sword to your leg - you are now on the floor for anyone to kill... I guess that's the end of you\n";
system("pause");
system("CLS");
}
if (day5 == 's') {
cout << "While attacking the other Evil warrior you spin, slicing of the other one's head and you resume battle.\n";
system("pause");
system("CLS");
}
cout << "Fighting.\nYou are stil fighting with the same warrior when you see your look out tower is falling down - and it's falling down on you, what do you do? (g for grab the warrior so that he stays where the tower will fall or r for run)";
cin >> day6;
if (day6 == 'g') {
cout << "You grab the warrior and throw him so that he trips and is on the floor where the lookout tower is about to fall down and you run out of the way of it and ocne you're out you are satisfied by the crunch of the warrior's bones.";
system("pause");
system("CLS");
}
if (day6 == 'r') {
cout << "You run from the falling tower, leaving the warrior behind you, and are satisfied by the fact you got out safely. While you're thinking about what it would have been like if you got crushed, you are sliced by another warrior.";
system("pause");
system("CLS");
exit(0);
}
cout << "Fighting again.\nAfter narrowly escaping the falling tower another warrior comes at you, this one looking very strong. What do you do? (e for engage combat or r for run)";
cin >> day7;
if (day7 == 'e') {
cout << "You engage combat with the muscley thing only to be stomped on by a dinosaur that came out of no where";
system("pause");
system("CLS");
exit(0);
}
if (day7 == 'r') {
cout << "You Run for your life... hey! Guess What! He's Chasing You!";
system("pause");
system("CLS");
}
cout << "Fighting again again.\nYou're running and you're getting tired out... what do you do? (k for keep running or r for run back to your other soldiers";
cin >> day8;
if (day8 == 'r') {
cout << "You run to your teammates and kill the ****er";
system("pause");
system("CLS");
}
if (day8 == 'k') {
cout << "You run out of breath and get pummelled";
system("pause");
system("CLS");
exit(0);
}
cout << "You find a moment good to use magic, use it? (y/n)";
cin >> day9;
if (day9 == 'y') {
cout << "Havana Cadavra!\n\nDo you really think that would work? you get pummeled";
system("pause");
system("CLS");
exit(0);
}
if (day9 == 'n') {
cout << "You're smart and don't use magic because MAGIC DOESN'T EXIST! You pwn them all.";
system("pause");
system("CLS");
}
cout << "Congratz, you won the awsomest CMD RPG EVER!!!!!\nWoot!\n\nYou Rock!\n\nDid you cheat?!\n\nThe Next time you click a button... this screen will close\n\nGoodbye!";
system("pause");
return 0;
}

