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

  1. # d_0 JawaTalk.cog
  2. #    
  3. # A simple communiCog ripped off from Doug
  4. #
  5. # Desc:
  6. #      Sucker Fool I stole it from Matt, I didn't even change
  7. #    The variable GONK.     - Love Ya, Doug
  8. #    
  9. #    Yeah, well I stole it back so bite me.  --Matt
  10. # 12/08/97 DGS    Stole from Matt's GonkTalk
  11. # 12/08/97 MST Stole back from Doug's JawaTalk
  12. #-----------------------------------------------------------------------------
  13.  
  14. symbols
  15.      message        converse
  16.      message       startup    
  17.      message        arrived
  18.      message        user5
  19.      message        user3
  20.      message        user4     
  21.      message        user2
  22.      message        timer
  23.  
  24.      thing          player                   local
  25.      thing          gonk
  26.      
  27.      surface        cheatswitch3             linkid=3
  28.      surface        cheatswitch4             linkid=4
  29.      surface        cheatswitch5             linkid=5   
  30.   
  31.      cog            baffleMcog
  32.      cog            PMNcog
  33.      cog            baffleMixcog
  34.  
  35.      int             Met=0                    local
  36.      int             ConversationActive=0     local
  37.      int             ResponseID              local
  38.      flex             wait_time=1.3             local
  39.      int            global1=0                local
  40.      cog            wackylightcog
  41.      
  42.  
  43.      sound          poweroffwav=nrg02poweroff.wav
  44.      thing          camera
  45.      thing          target
  46. end
  47.  
  48.  
  49. code
  50. startup:  
  51.      setthinglight(gonk, 0.5, 0);
  52.      player=getlocalplayerthing();
  53.      met=0;
  54.      
  55.      cd1=0;
  56.      return;
  57. // met=0 initial condition
  58. // met=1 has talked to supervisor and been given orders
  59. // met=2 has entered generator room but hasn't fixed it yet
  60. // met=3 has fixed generator the first time
  61. // met=4 has talked about crystal, but hasn't moved metal 
  62. // met=5 has moved the metal
  63. // met=6 has not fixed generator 2nd time
  64.  
  65. user5:
  66.      met=5;
  67.      return;
  68.      
  69. user3:
  70.      if ((met==5)||(met==6)) return;
  71.      else if ((met==1)||(met==2)||(met==0)) {
  72.           met=3;
  73.           print("ready to talk!");
  74.      }
  75.      return;
  76.      
  77. user2:
  78.      if ((met==5)||(met==6)) return;
  79.      if (met==0) return;
  80.      met=2;
  81.      return;
  82.      
  83. user4:
  84.      met=4;
  85.      return;
  86.      
  87.  
  88. converse:
  89.      dwplayplayerresponse();
  90.      # What response did the player select?
  91.      print("converse");
  92.      ResponseID = dwGetPlayerResponse();
  93.      
  94.      
  95.      if (ResponseID == 0 && !ConversationActive) {
  96.           # Response 0 is reserved to indicate that a conversation is starting
  97.           ConversationActive = 1;             
  98.           PlaySong(0,0,0);          
  99.           dwfreezeplayer();       
  100.                ResponseID = 1;
  101.      }
  102.      
  103.      if (ResponseID == 1) {                 #beginning Node 
  104. //          sendmessage(baffleMcog, user6);          
  105.           print("met is");
  106.           printint(met);
  107.           if (met==3) {
  108.                dwplaycharacterspeech("SEC000", "m2bd022.wav");               
  109.                dwAddResponse(1000, "SEP100", "m2xx014.wav", 70);          
  110.           }                       
  111.           else if (met==0) {
  112.                dwplaycharacterspeech("SDC000", "m2bd004.wav");
  113.                dwAddResponse(100, "SDP100", "m2xx006.wav", 10);
  114.                dwAddResponse(200, "SDP200", "m2xx007.wav", 70);
  115.                dwAddResponse(220, "SDP220", "m2xx008.wav", 70);
  116.                dwAddResponse(300, "SDP300", "", 20);   
  117.           } 
  118.           else if (met==1) {
  119.                dwplaycharacterspeech("SDC001", "m2bd006.wav");
  120.                 
  121.                 
  122.                dwAddResponse(301, "SDP000", "t1xx014.wav", 60);               
  123.           }      
  124.           else if ((met==2)||(met==6)) {
  125.                dwplaycharacterspeech("SEC001", "m2bd023.wav");                 
  126.                dwcleardialog();
  127.                ConversationActive=0;              
  128.                ShuffleTracks(6,7,8,9);
  129.                dwunfreezeplayer();
  130.           }
  131.  
  132.           else if (met==4) {
  133.                dwplaycharacterspeech("SEC002", "m2bd024.wav");
  134.                 
  135.                  
  136.                dwcleardialog();
  137.                ConversationActive=0;               
  138.                ShuffleTracks(6,7,8,9);
  139.                dwunfreezeplayer();
  140.              }
  141.           else if (met==5) {
  142.                dwplaycharacterspeech("SDC004", "m2bd009.wav");
  143.                 
  144.                 
  145.                dwAddResponse(7001, "SEP700", "m2xx018.wav", 70);
  146.           }
  147.      } 
  148.      else if (ResponseID == 100) {
  149.           dwplaycharacterspeech("SDC100", "m2bd010.wav");         
  150.            
  151.               
  152.           dwAddResponse(102, "SDP001", "m2xx002.wav", 60);         
  153.      }
  154.      else if (ResponseID == 102) {
  155.           dwplaycharacterspeech("SDC102", "m2bd012.wav");         
  156.            
  157.               
  158.           dwAddResponse(104, "SDP002", "m2xx003.wav", 50);         
  159.      }
  160.      else if (ResponseID == 104) {
  161.           dwplaycharacterspeech("SDC104", "m2bd014.wav");         
  162.            
  163.               
  164.           dwAddResponse(200, "SDP400", "m2xx009.wav", 70);         
  165.      }
  166.      else if (ResponseID == 111) {
  167.           dwplaycharacterspeech("SDC004", "m2bd009.wav");
  168.            
  169.            
  170.           dwAddResponse(500, "SDP500", "m2xx010.wav", 71);
  171.           dwAddResponse(600, "SDP600", "m2xx011.wav", 72);
  172.           dwAddResponse(800, "SDP800", "m2xx013.wav", 73);
  173.           dwAddResponse(301, "SDP300", "", 20);
  174.      }
  175.      else if (ResponseID == 120) {
  176.           dwplaycharacterspeech("SDC004", "m2bd009.wav");
  177.           dwAddResponse(100, "SDP100", "m2xx006.wav", 10);
  178.      }    
  179.      else if (ResponseID==200) {
  180.           dwplaycharacterspeech("SDC200", "m2bd015.wav");
  181.           dwAddResponse(500, "SDP500", "m2xx010.wav", 71);
  182.           dwAddResponse(600, "SDP600", "m2xx011.wav", 72);
  183.           dwAddResponse(800, "SDP800", "m2xx013.wav", 73);
  184.      }
  185.      else if (ResponseID==220) {
  186.           dwplaycharacterspeech("SDC220", "m2bd005.wav");
  187.            
  188.            
  189.           dwAddResponse(120, "SDP000", "t1xx014.wav", 50);
  190.      }     
  191.      else if (ResponseID==500) {
  192.           dwplaycharacterspeech("SDC500", "m2bd016.wav" );
  193.            
  194.            
  195.           dwAddResponse(111, "SDP000", "t1xx014.wav", 50);
  196.      }     
  197.      else if (ResponseID==600) {
  198.           dwplaycharacterspeech("SDC600", "m2bd018.wav");
  199.            
  200.            
  201.           dwAddResponse(111, "SDP000", "t1xx014.wav", 50);
  202.      }     
  203.      else if (ResponseID==800) {
  204.           dwplaycharacterspeech("SDC800", "m2bd021.wav");
  205.           dwAddResponse(111, "SDP000", "t1xx014.wav", 50);
  206.      }     
  207.      else if (ResponseID==1000) {
  208.           dwplaycharacterspeech("SEC100", "m2bd025.wav");
  209.           dwAddResponse(1004, "SDP004", "m2xx005.wav", 50);
  210.           dwAddResponse(2000, "SEP500", "m2xx016.wav", 40);
  211.      }
  212.      else if (ResponseID==1004) {
  213.           dwplaycharacterspeech("SEC200", "m2bd026.wav");
  214.           dwAddResponse(2000, "SEP200", "m2xx015.wav", 70);
  215.      }
  216.      else if (ResponseID==2000) {
  217.           dwplaycharacterspeech("SEC300", "m2bd027.wav");
  218.           dwAddResponse(6000, "SEP600", "t1xx014.wav", 60);
  219.      }
  220.      else if (ResponseID==6000) {
  221.           dwdisableEscape();
  222.           call jhcamerafix;
  223.           dwplaycharacterspeech("SEC400", "m2bd028.wav");
  224.           dwAddResponse(6001, "SEP600", "t1xx014.wav", 60);
  225.           dwEnableEscape();
  226.      }
  227.      else if (ResponseID==6001) {
  228.           dwplaycharacterspeech("SEC500", "m2bd029.wav");           
  229.           dwcleardialog();
  230.           conversationactive=0;          
  231.           ShuffleTracks(6,7,8,9);
  232.           met=4;
  233.           dwunfreezeplayer();
  234.           sendmessage(PMNcog, user0);
  235.           call camdisplay2;
  236.      }
  237.      else if (ResponseID==7001) {
  238.           dwplaycharacterspeech("SEC700", "m2bd030.wav");
  239.            
  240.            
  241.           playsoundlocal(poweroffwav, 1.0, 0.0, 0);          
  242.           sendmessage(wackylightcog, user0);
  243.           sendmessage(baffleMixcog, user1);
  244.           sendmessage(baffleMcog, user6);
  245.           dwplaycharacterspeech("SXC700", "m2bd057.wav");
  246.           dwAddResponse(7501