To many choices in choices

Pages: 12
Here is the main section im having problems with.
from line 72 to 136 is the first time you speak to your father.
from line 137 to 172 is where you have the option to speak to your father after exploring. so if you choose to speak to your father after exploring all the code from 72 to 136 is repeated.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
#include <iostream>
#include <cstdlib>
#include <string>
using namespace std;

int main()
{
    cout <<"------------------------------------------------------------------------" << endl;
    cout <<"|               (WELCOME TO THE QUEST OF TIEOPIA!)                     |" << endl;
    cout <<"------------------------------------------------------------------------" << endl;
    system("pause");
    
   
    
int choice;
bool gameOn = true;
while (gameOn != false){
    cout <<"------------------------------------------------------------------------\n";
    cout << " 1 - Start the game.\n";
    cout << " 2 - Story.\n";
    cout << " 3 - Help.\n";
    cout << " 4 - Exit.\n";
    cout << "Choice : ";
    cin >> choice;
    cout <<"------------------------------------------------------------------------" << endl;
if (choice == 1)
{
    string Cname;
    cout << "game start!\n" << endl;
    
    cout <<"------------------------------------------------------------------------" << endl;
    cout <<"Date:354 AD. Location:Tieopia." << endl;
    cout <<"" << endl;
    cout <<"Since the begining of time, there has been a proficy." << endl;
    cout <<"That a young warrior would rise and defeat the king of Tieopia." << endl;
    cout <<"Many have foulishly thought that they were the warrior that the" << endl;
    cout <<"proficy spoke of. Each one traveld far and fought countless enemies. " << endl;
    cout <<"But in the end they all were unsuccesful... " << endl;
    cout <<"" << endl;
    cout <<"" << endl;
    cout <<"------------------------------------------------------------------------" << endl;
    system("pause"); 
    
    
    cout <<"------------------------------------------------------------------------" << endl;
    cout << "What do you want your characters name to be? ";
    cin >> Cname;
    system("pause");
    cout <<"------------------------------------------------------------------------" << endl;
    cout <<"You are standing in the main room of your hut." << endl;
    cout <<"Infront of you is your mother." << endl;
    int choice;
    cout <<"Choose 1 to talk to your mother. Choose 2 to kill" << endl;
    cout <<"your mother. \nChoice: ";
    cin >>choice;
    if(choice == 1)
      {
    cout <<"------------------------------------------------------------------------" << endl;       
    cout <<"(Your mother) Hi " << Cname << endl; 
    cout <<"You need to speak to your father." << endl;
    cout <<"He is out by the granary." << endl;       
        
      }
    if(choice == 2)
      {
    cout <<"------------------------------------------------------------------------" << endl;          
    cout <<"Good job now your mother is dead and you dont know what to do." << endl;
    system("pause");
    return 0;
      }
    system("pause");
    int choice1;
    cout <<"------------------------------------------------------------------------" << endl;
    cout <<"Now that you have spoken to your mother, you may" << endl;
    cout <<"go see your father or explore the area around your" << endl;
    cout <<"hut." << endl;
    cout <<"Choose 1 to talk to your father" << endl;
    cout <<"Choose 2 to explore the area around your hut." << endl;
    cout <<"Choice: ";
    cin >>choice1;
    if(choice1 == 1)
     {
    cout <<"------------------------------------------------------------------------" << endl;          
    cout <<"(Your father)Hey " << Cname << endl; 
    cout <<"It's about time you woke up." << endl; 
    system ("pause");
    cout <<"------------------------------------------------------------------------" << endl;
    cout <<"I need you to help me." << endl;
    cout <<"Will you?" << endl;
    int choice3;
    cout <<"If you would like to help your father choose: 1" << endl; 
    cout <<"If you would not like to help your father choose 2:" << endl;
    cout <<"Choice: "; 
    cin >>choice3;
    if(choice3 == 1)
         {
    cout <<"------------------------------------------------------------------------" << endl;           
    cout <<"(Your father) Ok good, I need you to go to the wheat field" << endl;
    cout <<"and get some wheat for the horses." << endl;
    int choice4;
    cout <<"Would you like to go to the wheat feild?" << endl;
    cout <<"Choose 1 for yes " << endl;
    cout <<"Choose 2 for no" << endl;
    cin >>choice4;
    if(choice4 == 1)
          {
    cout <<"------------------------------------------------------------------------" << endl;
    cout <<"You go to the wheat feild and get some wheat." << endl;
    cout <<"------------------------------------------------------------------------" << endl;
    cout <<"You return to your father with the wheat." << endl;
    cout <<"(You) Here is the wheat you asked for father." << endl;
    cout <<"(Your father) Thank you, " << Cname  << endl;
    system ("pause");
    cout <<"------------------------------------------------------------------------" << endl;
    cout <<"Tell you what son, since you helped me ill tell you" << endl;
    cout <<"a secret. Dont tell your mother I told you this." << endl;
    cout <<"I know how much you love to explore and discover.." << endl;
    cout <<"Its killing you being here in this town isnt it?" << endl;
    cout <<"I know, I can see it in your eyes." << endl;
    cout <<"But anyway since you helped me ill tell you the password" << endl;
    cout <<"to the gate that leads out of this town." << endl;
    system ("pause");
    cout <<"------------------------------------------------------------------------" << endl;
    cout <<"The password is: perfectcircle." << endl;
    cout <<"Be careful out there son, there is danger around every corner." << endl;
    cout <<"Oh I almost forgot, your older brother wants to talk to you." << endl;
    cout <<"He is in the barn." << endl; 
    system("pause");
    cout <<"------------------------------------------------------------------------" << endl;
    cout <<"Now that you have spoken to your father you may choose" << endl;
    cout <<"to go to the barn where your brother is, or go to the gate." << endl;
    int choice5;
    cout <<"Choose 1 to go to the barn and speak to your brother." << endl;
    cout <<"Choose 2 to go to the gate." << endl;
    cout <<"Choice: ";
    cin >> choice5;
    if (choice5 == 1)
         {
                 
         }//chose to go to the barn and speak to your brother.
     
     
     
          }//chose to go to the wheat feild
    if(choice4 == 2)
          {
          }//chose to not go to the wheat feild
                
         }//chose to help your father
    if(choice3 == 2)
       {
                
       }//chose to not help your father     
     }//chose to speak to your father
    if(choice1 == 2)
     {
    cout <<"------------------------------------------------------------------------" << endl;          
    cout <<"You walk outside your hut." << endl;
    cout <<"To your right is the grannary." << endl;
    cout <<"Where your father is." << endl;
    cout <<"To your left is the barn." << endl;
    cout <<"In front of you is the garden and wheat feild." << endl;
     
    system ("pause");
    int choice2;
    cout <<"------------------------------------------------------------------------" << endl;
    cout <<"Where would you like to go?" << endl;
    cout <<"To go to the granary choose: 1" << endl;
    cout <<"To go to the barn choose: 2" << endl;
    cout <<"to go to the garden & wheat field choose: 3" << endl;
    cout <<"Choice: ";
    cin >>choice2;
Last edited on
Topic archived. No new replies allowed.
Pages: 12