Advertisement
ItsWolfiy

The beginning of my C programmed text based game c:

Feb 2nd, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 8.30 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<windows.h>
  4. int main(){
  5. //Tittle
  6. main_menu:
  7. system("cls");
  8. printf("===========\n Main Menu\n===========\n\n\n");
  9.  
  10. //Main menu
  11.     printf("1. Play\n2. Help\n3. Credits\n4. Quit Game\n\n\n"); //Selection
  12.     int mainmenuchoice;
  13.     scanf("%d", &mainmenuchoice); //Scanning
  14.     //Choices (Conditions)
  15.     if(mainmenuchoice == 1){
  16.         goto First_Frame;
  17.     }
  18.  
  19.     else if(mainmenuchoice == 2){
  20.         goto game_help;
  21.     }
  22.  
  23.     else if(mainmenuchoice == 3){
  24.         goto credits;
  25.     }
  26.  
  27.     else if(mainmenuchoice == 4){
  28.         exit(0);
  29.     }
  30.  
  31.     //Choices
  32.     game_help:
  33.         system("cls");
  34.         printf("To play, you simply will have to choose an action between 1 or 2 (or higher \nsometimes) by typing this number and then confirm with [ENTER].\n\n");
  35.         printf("Press [ENTER] to go back to the main menu.");
  36.         getch();
  37.         goto main_menu;
  38.  
  39.     credits:
  40.         system("cls");
  41.         printf("Game programmed in C by Wolfiy.\n\n1. Youtube\n2. Twitter\n3. Instagram\n\n9. Main Menu\n\n");
  42.         int website;
  43.         scanf("%d", &website);
  44.         if(website == 1){
  45.  
  46.             ShellExecute(NULL, "open", "https://www.YouTube.com/DarkWolfiiy", NULL, NULL, SW_SHOWNORMAL);
  47.             goto credits;
  48.         }
  49.  
  50.         else if(website == 2){
  51.             ShellExecute(NULL, "open", "https://www.Twitter.com/DarkWolfiy", NULL, NULL, SW_SHOWNORMAL);
  52.             goto credits;
  53.         }
  54.  
  55.         else if(website == 3){
  56.             ShellExecute(NULL, "open", "https://Instagram.com/WolfiyEditor", NULL, NULL, SW_SHOWNORMAL);
  57.             goto credits;
  58.         }
  59.  
  60.         else if(website == 9){
  61.             goto main_menu;
  62.         }
  63.         getchar();
  64.  
  65.     //====================================================GAME=================================================================
  66.     //First Frame (1)
  67.     First_Frame:
  68.         system("cls");
  69.         printf("\n\nHey, you, who are you? Why are you here?\n\n\t1. Ah... My head hurt so much... Where am I..?\n\t2. WO-WO-WO-WOW who are YOU? Why did you bring me HERE?\n\n");
  70.         int first_frame_choice;
  71.         scanf("%d", &first_frame_choice);
  72.         if(first_frame_choice == 1){
  73.             goto first_frame_choice_1;
  74.         }
  75.         else if(first_frame_choice == 2){
  76.             goto first_frame_choice_2;
  77.         }
  78.         //first_frame_choice_1
  79.         first_frame_choice_1:
  80.             system("cls");
  81.             printf("\n\nI can't tell it to you. Not now. Not here. Follow me.\n\n");
  82.             goto frame_2_way_1;
  83.  
  84.         //first_frame_choice_2
  85.         first_frame_choice_2:
  86.             system("cls");
  87.             printf("pssssssh be quiet! They are listening!\n\n");
  88.             goto frame_2_way_2;
  89.  
  90.     //Second Frame (2)
  91.     frame_2_way_1:
  92.         printf("\t1. Why..?\n\t2. I want explications, and NOW!\n\n");
  93.         int choice_frame_2_way_1;
  94.         scanf("%d", &choice_frame_2_way_1);
  95.         if(choice_frame_2_way_1 == 1){
  96.             goto answer_frame_2_way_1_1;
  97.         }
  98.         else if(choice_frame_2_way_1 == 2){
  99.             goto answer_frame_2_way_1_2;
  100.         }
  101.  
  102.     frame_2_way_2:
  103.         printf("1. *whispering* What..? Who is listening?\n2. *shouting* LAAAALALAlALALAAAAALALLALLA!!!\n\n");
  104.         int choice_frame_2_way_2;
  105.         scanf("%d", &choice_frame_2_way_2);
  106.         if(choice_frame_2_way_2 == 1){
  107.             goto answer_frame_2_way_2_1;
  108.         }
  109.         else if(choice_frame_2_way_2 == 2){
  110.             goto answer_frame_2_way_2_2;
  111.         }
  112.  
  113.         //Answers
  114.         answer_frame_2_way_1_1:
  115.             system("cls");
  116.             printf("\n\nI can't explain now. Just follow me. I won't hurt you, and if I would, I could \nnot.\n\n");
  117.             goto frame_3_way_1_1;
  118.  
  119.         answer_frame_2_way_1_2:
  120.             system("cls");
  121.             printf("Stop shouting! If they find us, they'll kill us!\n\n");
  122.             goto frame_3_way_1_2;
  123.  
  124.         answer_frame_2_way_2_1:
  125.             system("cls");
  126.             printf("\n\nI can't tell you know, if they find us, we're dead! Just follow me.\n\n");
  127.             goto frame_3_way_2_1;
  128.  
  129.         answer_frame_2_way_2_2:
  130.             system("cls");
  131.             printf("\n\nNooo! Stop! They are ready to kill us if the find you! If you die here, you're \ndead for real!\n\n");
  132.             goto frame_3_way_2_2;
  133.  
  134.     //Third Frame (3)
  135.     frame_3_way_1_1:
  136.         printf("\t1. Ummm... Okay...\n\t2. And why should I trust you?\n\n");
  137.         int choice_frame_3_way_1_1;
  138.         scanf("%d", &choice_frame_3_way_1_1);
  139.         if(choice_frame_3_way_1_1 == 1){
  140.             goto answer_frame_3_way_1_1;
  141.         }
  142.         else if(choice_frame_3_way_1_1 == 2){
  143.             goto answer_frame_3_way_1_1_2;
  144.         }
  145.  
  146.     frame_3_way_1_2:
  147.         printf("\t1. If you say so...\n\t2. But who?!\n\n");
  148.         int choice_frame_3_way_1_2;
  149.         scanf("%d", &choice_frame_3_way_1_2);
  150.         if(choice_frame_3_way_1_2 == 1){
  151.             goto answer_frame_3_way_1_2;
  152.         }
  153.         else if(choice_frame_3_way_1_2 == 2){
  154.             goto answer_frame_3_way_1_2_2;
  155.         }
  156.  
  157.     frame_3_way_2_1:
  158.         printf("\t1. Okay...\n\t2. Mmmh...k...\n\n");
  159.         int choice_frame_3_way_2_1;
  160.         scanf("%d", &choice_frame_3_way_2_1);
  161.         if(choice_frame_3_way_2_1 == 1){
  162.             goto answer_frame_3_way_2_1;
  163.         }
  164.         else if(choice_frame_3_way_2_1 == 2){
  165.             goto answer_frame_3_way_2_1_2;
  166.         }
  167.  
  168.     frame_3_way_2_2:
  169.         printf("\t1. Wow. Couldn't you say it before?\n\t2. What do you mean by %cdead for real%c ? o.O\n\n", 34, 34);
  170.         int choice_frame_3_way_2_2;
  171.         scanf("%d", &choice_frame_3_way_2_2);
  172.         if(choice_frame_3_way_2_2 == 1){
  173.             goto answer_frame_3_way_2_2;
  174.         }
  175.         else if(choice_frame_3_way_2_2 == 2){
  176.             goto answer_frame_3_way_2_2_2;
  177.         }
  178.  
  179.         //Answers
  180.         answer_frame_3_way_1_1:
  181.             system("cls");
  182.             printf("\n\nOkay, so be quiet and keep being close from me. Do NOT make any noise.\n\n");
  183.             goto frame_4_start;
  184.  
  185.         answer_frame_3_way_1_1_2:
  186.             system("cls");
  187.             printf("\n\nBecause i'm the only one that can help you.\n\n");
  188.             goto frame_4_start;
  189.  
  190.         answer_frame_3_way_1_2:
  191.             system("cls");
  192.             printf("\n\nK, follow me, be quiet, keep being close.\n\n");
  193.             goto frame_4_start;
  194.  
  195.         answer_frame_3_way_1_2_2:
  196.             system("cls");
  197.             printf("\n\nFollow me. You'll know everything, but later.\n\n");
  198.             goto frame_4_start;
  199.  
  200.         answer_frame_3_way_2_1:
  201.             system("cls");
  202.             printf("\n\nTrust me, I'll help you.\n\n");
  203.             goto frame_4_start;
  204.  
  205.         answer_frame_3_way_2_1_2:
  206.             system("cls");
  207.             printf("\n\nJust trust me. Without me, you're dead, just follow me.\n\n");
  208.             goto frame_4_start;
  209.  
  210.         answer_frame_3_way_2_2:
  211.             system("cls");
  212.             printf("\n\nYeaaaa sorry, so follow me or um... yea, you see what I mean...\n\n");
  213.             goto frame_4_start;
  214.  
  215.         answer_frame_3_way_2_2_2:
  216.             system("cls");
  217.             printf("\n\nYou'll understand soon. Just follow me.\n\n");
  218.             goto frame_4_start;
  219.  
  220.     //Fourth Frame (4)
  221.     frame_4_start:
  222.         printf("1. Well... okay...");
  223.         int starting;
  224.         scanf("%d", &starting);
  225.         if(starting == 1){
  226.             goto frame_5_explications;
  227.         }
  228.  
  229.     //Fifth Frame (5)
  230.     frame_5_explications:
  231.         printf("   ");
  232.         getchar();
  233.         system("cls");
  234.         printf("\n\n===Later===\n\n\n\n\t\tPress [ENTER] to continue.\n\n");
  235.         getchar();
  236.         system("cls");
  237.         printf("\n\nOkay, so we're finally arrived.\n\n\n\n\t\tPress [ENTER] to continue.\n\n");
  238.         getchar();
  239.         system("cls");
  240.         printf("\n\nJust let me check that we are in security.\n\n\n\n\t\tPress [ENTER] to continue.\n\n");
  241.         getchar();
  242.         system("cls");
  243.         printf("\n\nWell... everything looks okay...\n\n\n\n\t\tPress [ENTER] to continue.\n\n");
  244.         getchar();
  245.         system("cls");
  246.         printf("\n\nJust one more thing and... here we are!\n\n\n\n\t\tPress [ENTER] to continue.\n\n");
  247.  
  248.  
  249.  
  250.         getchar();
  251.         return(0);
  252. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement