Adilol

Arbek Village Preview

Jul 21st, 2011
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.49 KB | None | 0 0
  1. #include "Library.h"
  2.  
  3. //Village concept
  4. //New quest to be coded in :D
  5.  
  6. void Tavern(PLAYER*);
  7.  
  8. bool ArbekVillage (PLAYER* player)
  9. {
  10.     int choice = 0;
  11.  
  12.     while (choice !=4)
  13.     {
  14.         cout << "You look around at the village\n";
  15.         cout << "It seems to be full of activity\n";
  16.         cout << "You see the village elder looking at you\n";
  17.        
  18.         Wait();
  19.        
  20.         cout << "1: Talk to the elder\n";
  21.         cout << "2: Check status\n";
  22.         cout << "3: Tavern\n";
  23.         cout << "4: Leave\n";
  24.        
  25.         cin >> choice;
  26.         cin.clear();
  27.         cin.ignore(INT_MAX,'\n');
  28.  
  29.         cout << endl;
  30.  
  31.         switch (choice)
  32.         {
  33.         case 1:
  34.             {  
  35.                 cout << "You approach the elder\n";
  36.                 //convo here blah blah w.e
  37.                 //DemonicPath(); <- Little heads up ;D
  38.                 break;
  39.                 }
  40.                 case 2:
  41.                 {
  42.                     DisplayStats(player);
  43.                     break;
  44.                     }
  45.                 case 3:
  46.                 {
  47.                     Tavern();
  48.                     break;
  49.                     }
  50.                 case 4:
  51.                 {
  52.                     cin.get();
  53.                     break;
  54.                     }
  55.                         default: break;
  56.                             }
  57.     }
  58.  
  59.     return true;
  60. }
  61.  
  62. void Tavern(PLAYER* player)
  63.  
  64. cout << "You stand in the tavern, full of people\n";
  65. cout << "A man approaches you, asking if you are here to save Arbek\n";
  66.  
  67. char answer;
  68.     answer = 'm';
  69.  
  70.     while (true)
  71.     {
  72.         cout << "Accept this quest=y/n\n";
  73.         cout << ">";
  74.         cin >> answer;
  75.         cin.ignore(10,'\n');
  76.  
  77.         if (answer == 'y' || answer == 'n')
  78.             break;
  79.             }
  80.            
  81.    
  82.     if (answer == 'y')
  83.     {
  84.    
  85.    
  86.     cout << "You accept the quest\n";
  87.     Wait();
  88.     DemonicQuest();
  89.    
  90.     }
  91.         else
  92.     {  
  93.             cout << "You walk away.\n";
  94.             cin.get();
  95. }
Advertisement
Add Comment
Please, Sign In to add comment