home *** CD-ROM | disk | FTP | other *** search
/ Classic Fond 52 / ClassicFond52.iso / GAMES / DROIDW.RAR / DWCD.GOB / mission_cog_d0_rdroidtalk.cog < prev    next >
Text File  |  1998-11-04  |  12KB  |  349 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        timer
  18.      message        activate
  19.      message        pulse
  20.      message        arrived
  21.      message        user0                    //the launcher is blocked
  22.      message        user1                    //the launcher is clear
  23.      message        user3
  24.      message        user4                    //the countdown is on
  25.      message        user5                    //the countdown is done
  26.      message        pulse     
  27.  
  28.      cog            catapultcog
  29.      
  30.      sector         safesector     
  31.  
  32.      thing        Rdroid
  33.      thing          Edroid                   nolink
  34.      thing          player                   local
  35.      
  36.      int             Met=0                    local
  37.      int             spoken_1=0                local
  38.      int             ConversationActive=0     local
  39.      int             ResponseID              local
  40.      flex             wait_time=1.3             local
  41.      
  42.      thing          ghost1                   nolink
  43.      thing          ghost2                   nolink
  44.      thing          ghost3                   nolink
  45.      vector         curpos                   local
  46.      thing          ghostX                   nolink
  47. end
  48.  
  49.  
  50. code
  51. //activate:
  52. //     call walktolauncher;
  53. //     return;         
  54.  
  55. startup:  
  56.     hastalked=0;
  57.      player=getlocalplayerthing();
  58.      iwanttolaunch=0;              // set to one when want the droid to walk to catapult
  59.      waitingtolaunch=0;
  60.      launcherloaded=0;
  61.      gposX=getthingpos(ghostX);
  62.      gpos0=getthingpos(Rdroid);
  63.      gpos1=getthingpos(ghost1);
  64.      gpos2=getthingpos(ghost2);
  65.      gpos3=getthingpos(ghost3);
  66.      gonkcurframe=0;
  67.      edroidsafe=0;
  68.      countdownON=0;   
  69.      return;
  70.      
  71. user0:
  72.      print("rdroid also says the launcher is loaded");
  73.      launcherloaded=1;
  74.      return;
  75.      
  76. user1:
  77.      launcherloaded=0;
  78.      return;
  79.      
  80. user3:
  81.      print("rdroid realizes that edroid is safe!");
  82.      edroidsafe=1;
  83.      return;
  84.      
  85. user4:
  86.      countdownON=1;
  87.      return;
  88.      
  89. user5:
  90.      countdownON=0;
  91.      return;
  92.      
  93. converse:
  94.      print("gonkcurframe is");
  95.      print(gonkcurframe);   
  96.      if  ( (gonkcurframe==1)||(gonkcurframe==2)||( (gonkcurframe==3)&&(vectorY(getthingpos(Rdroid))>2.13) )  ) return;
  97.      if (getthinghealth(Edroid)<=0) return;
  98.      setthingmass(Rdroid, 0);
  99.      print("health of Rdroid is");
  100.      printflex(getthinghealth(Rdroid));
  101.      if (getthinghealth(Rdroid)<=0) return; 
  102.      dwplayplayerresponse();
  103.      # What response did the player select?
  104.      print("converse");
  105.      ResponseID = dwGetPlayerResponse();
  106.      if (ResponseID == 0 && !ConversationActive) {
  107.                # Response 0 is reserved to indicate that a conversation is starting
  108.                ConversationActive = 1;   
  109.                PlaySong(0,0,0);          
  110.                dwfreezeplayer();      
  111.                ResponseID = 1;
  112.      }
  113.      if (ResponseID == 1) {                 #beginning Node 
  114.           if (vectorY(getthingpos(Rdroid))<2.13) {  
  115.                gonkcurframe=-1;  
  116.                iwanttolaunch=0;
  117.                dwplaycharacterspeech("RDC320", "t1gk022.wav");        # Please get it right!
  118.                dwAddResponse(3000, "EDP200", "t1xx042.wav", 70);      # Whoops, let me adjust again
  119.                dwAddResponse(3100, "EDP205", "t1xx043.wav", 70);      # I'm sure I"ve got it let's go
  120.                dwAddResponse(3200, "EDP005", "t1xx036.wav", 70);      # How much do you weigh?
  121.           }
  122.           else if (edroidsafe==0) {
  123.                if (met==1)  {
  124.                     dwplaycharacterspeech("RDC003", "t6gk005.wav");        # Anything else
  125.                     dwAddResponse(100, "RDP001", "t1xx033.wav", 10);        // What do I do here?
  126.                     dwAddResponse(7, "RDP002", "", 20);        // Goodbye.
  127.                }          
  128.                else if (met==0) {
  129.                     met=1;
  130.                     dwplaycharacterspeech("RDC001", "t1gk002.wav");        # Greets                        
  131.                     dwAddResponse(100, "RDP001", "t1xx033.wav", 10);        // What do I do here?
  132.                     dwAddResponse(7, "RDP002", "", 20);        // Goodbye.
  133.                }
  134.           }
  135.           else if (edroidsafe==1) {
  136.                if (waitingtolaunch==0) {
  137.                     dwplaycharacterspeech("RDC000", "t1gk001.wav");
  138.                     dwAddResponse(1000, "RDP100", "t1xx026.wav", 30);
  139.                     dwAddResponse(1020, "RDP102", "t1xx027.wav", 70);
  140.                }                       
  141.                else if (waitingtolaunch==1) {
  142.                     dwplaycharacterspeech("RDC200", "t1gk017.wav");
  143.                     if ( (countdownON==0)&&(launcherloaded==0) ) dwAddResponse(2000, "RDP200", "t1xx030.wav", 70);
  144.                     dwAddResponse(2020, "RDP202", "t1xx031.wav", 70);
  145.                     dwAddResponse(2040, "RDP204", "t1xx032.wav", 70);
  146.                }
  147.           }
  148.           
  149.      } 
  150.      if (ResponseID == 100)    //            # Security
  151.           {
  152.           dwplaycharacterspeech("RDC005", "t1gk006.wav");         //I'm trying to get across
  153.           
  154.              
  155.           dwAddResponse(110, "RDP010", "t1xx015.wav", 80);         // I assure you it's safe...
  156.           dwAddResponse(120, "RDP012", "t1xx016.wav", 70);      // I don't blame you...
  157.           dwAddResponse(140, "RDP014", "t1xx017.wav", 60);      // You need to calm down.
  158.      }
  159.      if (ResponseID == 110)    //            # Security
  160.           {
  161.           dwplaycharacterspeech("RDC010", "t1gk007.wav");         // Really...?
  162.           
  163.              
  164.           dwAddResponse(200, "RDP020", "t1xx018.wav", 70);         // I'll prove it's safe.
  165.      }
  166.      if (ResponseID == 120)    //            # Security
  167.           {
  168.           dwplaycharacterspeech("RDC012", "t1gk008.wav");         // I'm not scared
  169.           
  170.              
  171.           dwAddResponse(200, "RDP020", "t1xx018.wav", 70);         // I'll prove it's safe.
  172.      }
  173.      if (ResponseID == 140)    //            # Security
  174.           {
  175.           dwplaycharacterspeech("RDC014", "t1gk009.wav");         // I am calm!!
  176.           
  177.              
  178.           dwAddResponse(200, "RDP020", "t1xx018.wav", 70);         // I'll prove it's safe.
  179.      }    
  180.      if (ResponseID == 200) {    //            # Here, I'll prove it's safe.     
  181.           dwplaycharacterspeech("RDC020", "t1gk010.wav");           // No.
  182.           dwAddResponse(300, "RDP030", "t1xx019.wav", 71);       // NO???
  183.           dwAddResponse(320, "RDP032", "t1xx020.wav", 40);       // Um...please?
  184.           dwAddResponse(340, "RDP034", "t1xx021.wav", 70);       //Geez, what are you ...          
  185.      }
  186.      if (ResponseID == 300) {    //            
  187.           dwplaycharacterspeech("RDC030", "t1gk011.wav");           // 
  188.           
  189.           
  190.           dwAddResponse(300, "RDP030", "t1xx019.wav", 72);
  191.           dwAddResponse(320, "RDP032", "t1xx020.wav", 73);
  192.           dwAddResponse(340, "RDP034", "t1xx021.wav", 71);    
  193.      }
  194.      if (ResponseID == 320) {
  195.           dwplaycharacterspeech("RDC020", "t1gk010.wav");
  196.           
  197.           
  198.           dwAddResponse(500, "RDP050", "t1xx023.wav", 72);
  199.      }
  200.      if (ResponseID== 340) {
  201.           dwplaycharacterspeech("RDC034", "t1gk012.wav");
  202.           
  203.           
  204.           dwAddResponse(600, "RDP060", "t1xx024.wav", 40);
  205.           dwAddResponse(7, "RDP062", "t1xx025.wav", 20);
  206.     }
  207.     if (ResponseID == 500) {
  208.           dwplaycharacterspeech("RDC020", "t1gk010.wav");
  209.           
  210.           
  211.           dwAddResponse(600, "RDP060", "t1xx024.wav", 40);      // Maybe if you launched somebody...
  212.           dwAddResponse(7, "RDP062", "t1xx025.wav", 20);
  213.     }
  214.     if (ResponseID == 600)    //            # Security
  215.           {
  216.           dwplayc