home *** CD-ROM | disk | FTP | other *** search
/ Classic Fond 52 / ClassicFond52.iso / GAMES / DROIDW.RAR / DWCD.GOB / mission_cog_b0_pulleyjawa.cog < prev    next >
Text File  |  1998-11-04  |  6KB  |  165 lines

  1. # b_0PulleyJawa.cog
  2. #    
  3. # CommuniCog for the Jawa in the Pulley Puzzle.
  4. #
  5. # Desc:
  6. #     Het talks, you know, like a jawa?
  7. #
  8. # 12/23/97 DGS    Created. 
  9. #-----------------------------------------------------------------------------
  10.  
  11. symbols
  12.     message        converse
  13.     message       startup
  14.     message         user1
  15.     message        user2
  16.     message        arrived
  17.  
  18.     thing        Gonk
  19.     thing          player                   local
  20.  
  21.     int        Met=0                            local
  22.     int        Joke=0                            local
  23.     int        spoken_1=0           local
  24.     int        gears=0            local
  25.     int        ConversationActive=0    local
  26.     int         gonkcurframe=0          local
  27.     int        ResponseID            local
  28.     int        bye=0            local
  29.     int        pulley_1_b=25        local
  30.     int        pulley_2_b=26        local
  31.     int        pulley_3_b=27        local
  32.     int        gets=0                local
  33.     flex        wait_time=1.3        local
  34. end
  35.  
  36.  
  37. code
  38. startup:
  39.     hastalked = 0;
  40.     global1 = 0;
  41.     return;
  42.  
  43. user2:
  44.     gets = gets +1;
  45.     print("GETS");
  46.     return;     
  47. converse:
  48.     // What response did the player select?
  49.     ResponseID = dwGetPlayerResponse();
  50.  
  51.     if (ResponseID == 0 && !ConversationActive)
  52.         {
  53.         ConversationActive = 1;   
  54.         playsong(0,0,0);
  55.         dwfreezeplayer();
  56.         ResponseID = 1;
  57.         }
  58.     
  59.     if (ResponseID == 1)                  #beginning Node          
  60.         {
  61.                 //+++++++++++++++++++++++++++++++++++++++++++++++ Greetings setup
  62.         if (met == 0)    // If they haven't met. 
  63.             {
  64.             //dwSetDialogText("PJC0000"); // Jawwa: Hello
  65.             dwplaycharacterspeech("PJC0000","T3JB001.wav");
  66.             met = 2; // Tell him to say "anything else?"
  67.             }
  68.         else if (met == 1)
  69.             {
  70.             //dwSetDialogText("PJC0001"); // Jawa: Hello again
  71.             dwplaycharacterspeech("PJC0001","T7JB002.wav");
  72.             met = 2; // Tell him to say "anything else?" 
  73.             }
  74.         else if (met == 2)
  75.             {
  76.             dwplayplayerresponse();
  77.             //dwSetDialogText("PJC0003"); // Aynthing else?                         
  78.             dwplaycharacterspeech("PJC0003","T3JB004.wav");
  79.             
  80.             }
  81.                 //+++++++++++++++++++++++++++++++++++++++++++++++  END Greetings setup
  82.         if (global1 == 0)    dwAddResponse(100, "PJP0100","T3xx003.wav",71); //droid: Where's the rope that lifts the block?
  83.         if (global0 == 0)     dwAddResponse(400, "PJP0400","T3xx006.wav",72); //droid: Where do I go to lower the hook?
  84.         if (global1 == 2)    
  85.             {
  86.             if (gets <2) dwAddResponse(200, "PJP0200","T3xx004.wav",73); //droid: Where are the other pulleys?
  87.             }
  88.         if (global1 == 1)    dwAddResponse(300, "PJP0300","T3xx005.wav",71); //droid: How do I lift the block? It's too heavy. 
  89.         if (global1 == 2)    dwAddResponse(450, "PJP0450","T3xx007.wav",72); //droid: What do I do now? I lifted the block. 
  90.                             dwAddResponse(500, "PJP0500","T3xx008.wav",20); //droid: Thanks, I need to go. 
  91.         }
  92.  
  93.     if (ResponseID == 100)    //            Where's the rope?
  94.         {
  95.         dwplayplayerresponse();
  96.         //dwSetDialogText("PJC0100"); // Jawa: That's on the roof of this building
  97.         dwplaycharacterspeech("PJC0100","T3JB010.wav");
  98.         dwAddResponse(1,"PJP0002","T3xx002.wav",30); // Droid: Thanks. (send it back to the root node)           
  99.         }
  100.     if (ResponseID == 200)    //            WHere are the other pulleys?
  101.         {
  102.         dwplayplayerresponse();
  103.         //dwSetDialogText("PJC0200"); // Jawa: They're around here somewhere. 
  104.         dwplaycharacterspeech("PJC0200","T3JB011.wav");
  105.         dwAddResponse(1,"PJP0001","T1xx014.wav",30); // Droid: okay. (send it back to the root node)           
  106.         }
  107.     if (ResponseID == 300)    //        The block's too heavy            
  108.         {
  109.         dwplayplayerresponse();
  110.         //dwSetDialogText("PJC0300"); // Jawa: Try other pulleys.  
  111.         dwplaycharacterspeech("PJC0300","T3JB012L.wav");
  112.         dwAddResponse(200, "PJP0200","T3xx004.wav",71); //droid: Where are the other pulleys?
  113.         dwAddResponse(1,   "PJP0002","T3xx002.wav",30); // Droid: Thanks. (send it back to the root node)           
  114.         }
  115.     if (ResponseID == 400)    //            Lower the hook
  116.         {
  117.         dwplayplayerresponse();
  118.         //dwSetDialogText("PJC0400"); // Jawa: That's on the other roof 
  119.         dwplaycharacterspeech("PJC0400","T3JB014.wav");
  120.         dwAddResponse(1,"PJP0002","T3xx002.wav",30); // Droid: Thanks. (send it back to the root node)           
  121.         }
  122.     if (ResponseID == 450)    //            I lifted the block
  123.         {
  124.         dwplayplayerresponse();
  125.         //dwSetDialogText("PJC0450"); // Jawa: That's on the other roof 
  126.         dwplaycharacterspeech("PJC0450","T3JB015.wav");
  127.         dwAddResponse(1,"PJP0002","T3xx002.wav",30); // Droid: Thanks. (send it back to the root node)           
  128.         }
  129.     if (ResponseID == 500)    //            # bye
  130.         {
  131.         dwplayplayerresponse();
  132.         if (global1 != 2)
  133.             {    
  134.             //if (bye == 0) dwSetDialogText("PJC0002"); //first goodbye  
  135.             //if (bye == 1) dwSetDialogText("PJC1000"); //2nd goodbye  
  136.             //if (bye == 2) dwSetDialogText("PJC1001"); //3rd goodbye  
  137.             //if (bye == 3) dwSetDialogText("PJC1002"); //4th goodbye  
  138.             //if (bye == 0) dwSetDialogText("PJC0002"); //first goodbye  
  139.             //if (bye == 0) dwSetDialogText("PJC0002"); //first goodbye  
  140.             if (bye == 0) dwplaycharacterspeech("PJC0002","T3JB003.wav"); //2nd goodbye  
  141.             if (bye == 1) dwplaycharacterspeech("PJC1000","T3JB005.wav"); //3rd goodbye  
  142.             if (bye == 2) dwplaycharacterspeech("PJC1001","T3JB006.wav"); //4th goodbye  
  143.             if (bye == 3) dwplaycharacterspeech("PJC1002","T3JB007.wav"); //5th goodbye  
  144.             if (bye == 4) dwplaycharacterspeech("PJC1003","T3JB008.wav"); //5th goodbye  
  145.             }
  146.         else  dwplaycharacterspeech("PJC1004","T3JB009.wav"); //Complete goodbye  
  147.         bye = bye +1;
  148.         if (bye == 5) bye = 0;
  149.         met = 1;      //Reset the greeting so he'll say "Hello again" instead of "anything else?"
  150.         dwClearDialog();
  151.         ConversationActive = 0;
  152.         ShuffleTracks(2, 3, 4, 5);
  153.         dwunfreezeplayer();
  154.         }
  155.  
  156. gonkhelpsout:
  157. return;
  158.      
  159. arrived:
  160.  
  161. return;
  162. end
  163.  
  164.  
  165.