Advertisement
Guest User

WestWood M02 Scripts

a guest
Jun 28th, 2012
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 128.60 KB | None | 0 0
  1. class M02_Objective_Controller : public ScriptImpClass
  2. {
  3.     void Created(GameObject *obj);
  4.     void Custom(GameObject *obj,int type,int param,GameObject *sender);
  5.     void Timer_Expired(GameObject *obj, int number);
  6.     void M02_Objective_Controller_Manage_HUD_Info(GameObject *obj, int type);
  7.     int RocketDropInterval;
  8.     int MinigunnerDropInterval;
  9.     int Trigger09Sec;
  10.     bool DroppedRockets;
  11. };
  12.  
  13. void M02_Objective_Controller::Created(GameObject *obj)
  14. {
  15.     Commands->Reveal_Encyclopedia_Character(37);
  16.     Commands->Reveal_Encyclopedia_Character(4);
  17.     Commands->Reveal_Encyclopedia_Character(10);
  18.     Commands->Reveal_Encyclopedia_Character(8);
  19.     Commands->Set_Background_Music("02-Packing Iron.mp3");
  20.     GameObject *MCT = Find_Object(1111116);
  21.     if (MCT)
  22.         Commands->Set_Animation_Frame(MCT, "MCT_NOD.MCT_NOD", 0);
  23.     RocketDropInterval = 0;
  24.     MinigunnerDropInterval = 0;
  25.     DroppedRockets = 0;
  26.     Trigger09Sec = 3;
  27.     Commands->Enable_Hibernation(obj, false);
  28.     Commands->Set_HUD_Help_Text(7665, Vector3(0.196000,0.882000,0.196000));
  29.     Commands->Add_Objective(201, 1, 0, 6222, 0, 6043);
  30.     Commands->Set_Objective_HUD_Info_Position(201, 50, "POG_M08_1_04.tga", 7384);
  31.     Commands->Add_Objective(223, 3, 3, 6201, 0, 6013);
  32.     Commands->Add_Objective(222, 3, 3, 6202, 0, 6014);
  33.     Commands->Start_Timer(obj, this, 2, 201);
  34. }
  35.  
  36. void M02_Objective_Controller::Custom(GameObject *obj,int type,int param,GameObject *sender)
  37. {
  38.     if(type > 199)
  39.     {
  40.         if(param == 0)
  41.         {
  42.             M02_Objective_Controller_Manage_HUD_Info(obj, type);
  43.             Commands->Start_Timer(obj, this, 2, type);
  44.         }
  45.         else if(param == 1)
  46.         {
  47.             Commands->Set_HUD_Help_Text(7667, Vector3(0.196000, 0.882000, 0.196000));
  48.             Commands->Set_Objective_Status(type, 1);
  49.             Commands->Start_Timer(obj, this, 2, type + 200);
  50.         }
  51.         else if(param == 2)
  52.             Commands->Set_Objective_Status(type, 2);
  53.         else if(param == 3)
  54.         {
  55.             Trigger09Sec--;
  56.             if(!Trigger09Sec)
  57.             {
  58.                 Commands->Set_HUD_Help_Text(7667, Vector3(0.196000, 0.882000, 0.196000));
  59.                 Commands->Set_Objective_Status(213, 1);
  60.                 Commands->Stop_All_Conversations();
  61.                 int M02_SECONDARY_09_FINISH_ID = Commands->Create_Conversation("M02_SECONDARY_09_FINISH", 100, 300, true);
  62.                 Commands->Join_Conversation(0, M02_SECONDARY_09_FINISH_ID, 1, true, true);
  63.                 GameObject *UnknownObj = UnknownFunction();
  64.                 Vector3 Pos = Commands->Get_Position(UnkownObj?);
  65.                 GameObject *Star = Commands->Get_A_Star(Pos);
  66.                 Commands->Join_Conversation(Star, M02_SECONDARY_09_FINISH_ID, true, false, false);
  67.                 Commands->Start_Conversation(M02_SECONDARY_09_FINISH_ID, 0);
  68.             }
  69.         }
  70.         else
  71.         {
  72.             if(type == 1000)
  73.             {
  74.                 if(param == 1000)
  75.                 {
  76.                     RocketDropInterval++;
  77.                     if(RocketDropInterval > 1 )
  78.                     {
  79.                         RocketDropInterval = 0;
  80.                         GameObject *CinObject = Commands->Create_Object("Invisible_Object", Vector3(-0.418750, -0.178906, -0.112891));
  81.                         if(CinObject)
  82.                         {
  83.                             Commands->Set_Facing(CinObject, 70.5);
  84.                             Commands->Attach_Script(CinObject, "Test_Cinematic", "X2I_GDI_Drop02_Rocket.txt");
  85.                         }
  86.                         if (!DroppedRockets)
  87.                         {
  88.                             DroppedRockets = true;
  89.                             Commands->Stop_All_Conversations();
  90.                             int M02_MORE_ROCKET_SOLDIERS_ID = Commands->Create_Conversation("M02_MORE_ROCKET_SOLDIERS", 100, 300, 1);
  91.                             Commands->Join_Conversation(0, M02_MORE_ROCKET_SOLDIERS, true, true, true);
  92.                             GameObject *UnknownObj = UnknownFunction();
  93.                             Vector3 Pos = Commands->Get_Position(UnkownObj?);
  94.                             GameObject *Star = Commands->Get_A_Star(Pos);
  95.                             Commands->Join_Conversation(Star, M02_MORE_ROCKET_SOLDIERS, true, false, false);
  96.                             Commands->Start_Conversation(M02_MORE_ROCKET_SOLDIERS_ID, 0);
  97.                         }
  98.                     }
  99.                 }
  100.                 else if(param == 1001)
  101.                 {
  102.                     MinigunnerDropInterval++;
  103.                     if(MinigunnerDropInterval > 2)
  104.                     {
  105.                         MinigunnerDropInterval = 0;
  106.                         GameObject *CinObject = Commands->Create_Object("Invisible_Object", Vector3(819.380005, 884.049988, 24.500000));
  107.                         if(CinObject)
  108.                         {
  109.                             Commands->Set_Facing(CinObject, 110);
  110.                             Commands->Attach_Script(CinObject, "Test_Cinematic", "X2I_GDI_Drop03_Minigunner.txt");
  111.                         }
  112.                     }
  113.                 }
  114.                 else if(param == 1002)
  115.                 {
  116.                     v29 = Commands->Get_Position(Unknown);
  117.                     GameObject *Star = Commands->Get_A_Star(v29?);
  118.                     Commands->Give_Powerup(Star, "Level_01_Keycard", false);
  119.                 }
  120.             }
  121.         }
  122.     }
  123. }
  124.  
  125. void M02_Objective_Controller::Timer_Expired(GameObject *obj, int number)
  126. {
  127.     Commands->Stop_All_Conversations();
  128.     int ConversationID = 0;
  129.     if(number > 403)
  130.     {
  131.         switch(number)
  132.         {
  133.             case 404:
  134.                 ConversationID = Commands->Create_Conversation("M02_SECONDARY_01_FINISH", 100, 300, true);
  135.                 break;
  136.             case 406:
  137.                 ConversationID = Commands->Create_Conversation("M02_SECONDARY_02_FINISH", 100, 300, true);
  138.                 break;
  139.             case 407:
  140.                 ConversationID = Commands->Create_Conversation("M02_SECONDARY_03_FINISH", 100, 300, true);
  141.                 break;
  142.             case 408:
  143.                 ConversationID = Commands->Create_Conversation("M02_SECONDARY_04_FINISH", 100, 300, true);
  144.                 break;
  145.             case 409:
  146.                 ConversationID = Commands->Create_Conversation("M02_SECONDARY_05_FINISH", 100, 300, true);
  147.                 break;
  148.             case 410:
  149.                 ConversationID = Commands->Create_Conversation("M02_SECONDARY_06_FINISH", 100, 300, true);
  150.                 break;
  151.             case 411:
  152.                 ConversationID = Commands->Create_Conversation("M02_SECONDARY_07_FINISH", 100, 300, true);
  153.                 Commands->Start_Timer(obj, this, 5, 11); // Makes no sense.. there is no trigger to do anything at number 11.
  154.                 break;
  155.             case 412:
  156.                 ConversationID = Commands->Create_Conversation("M02_SECONDARY_08_FINISH", 100, 300, true);
  157.                 break;
  158.             case 414:
  159.                 ConversationID = Commands->Create_Conversation("M02_SECONDARY_10_FINISH", 100, 300, true);
  160.                 break;
  161.             case 416:
  162.                 ConversationID = Commands->Create_Conversation("M02_SECONDARY_12_FINISH", 100, 300, true);
  163.                 break;
  164.             case 417:
  165.                 ConversationID = Commands->Create_Conversation("M02_SECONDARY_13_FINISH", 100, 300, true);
  166.                 break;
  167.             default:
  168.                 return;
  169.         }
  170.     }
  171.     else
  172.     {
  173.         if(number == 403)
  174.             ConversationID = Commands->Create_Conversation("M02_PRIMARY_03_FINISH", 100, 300, true);
  175.         else
  176.         {
  177.             //number -= 10; Probably not here, but the code that showed up indicated -= 10.
  178.             if(number > 403)
  179.             {
  180.                 switch(number)
  181.                 {
  182.                     case 10:
  183.                         ConversationID = Commands->Create_Conversation("M02_PRIMARY_04_REMIND", 100, 300, true);
  184.                         break;
  185.                     case 201:
  186.                         ConversationID = Commands->Create_Conversation("M02_PRIMARY_01_START", 100, 300, true);
  187.                         break;
  188.                     case 204:
  189.                         ConversationID = Commands->Create_Conversation("M02_SECONDARY_01_START", 100, 300, true);
  190.                         break;
  191.                     case 205:
  192.                         ConversationID = Commands->Create_Conversation("M02_PRIMARY_04_START", 100, 300, true);
  193.                         Commands->Start_Timer(obj, this, 120, 10);
  194.                         break;
  195.                     case 206:
  196.                         ConversationID = Commands->Create_Conversation("M02_SECONDARY_02_START", 100, 300, true);
  197.                         break;
  198.                     case 208:
  199.                         ConversationID = Commands->Create_Conversation("M02_SECONDARY_04_START", 100, 300, true);
  200.                         break;
  201.                     case 210:
  202.                         ConversationID = Commands->Create_Conversation("MX2DSGN_DSGN0004", 100, 300, true);
  203.                         break;
  204.                     case 211:
  205.                         ConversationID = Commands->Create_Conversation("M02_SECONDARY_07_START", 100, 300, true);
  206.                         break;
  207.                     case 212:
  208.                         ConversationID = Commands->Create_Conversation("M02_SECONDARY_08_START", 100, 300, true);
  209.                         break;
  210.                     case 214:
  211.                         ConversationID = Commands->Create_Conversation("M02_SECONDARY_10_START", 100, 300, true);
  212.                         break;
  213.                     case 218:
  214.                         ConversationID = Commands->Create_Conversation("M02_SECONDARY_14_START", 100, 300, true);
  215.                         break;
  216.                     default:
  217.                         return;
  218.                 }
  219.             }
  220.         }
  221.     }
  222.     if (ConversationID)
  223.     {
  224.         Commands->Join_Conversation(0, ConversationID, true, true, true);
  225.         GameObject *UnknownObj = UnknownFunction();
  226.         Vector3 Pos = Commands->Get_Position(UnknownObj);
  227.         GameObject *Star = Commands->Get_A_Star(Pos);
  228.         Commands->Join_Conversation(Star, ConversationID, true, false, false);
  229.         Commands->Start_Conversation(ConversationID, 0);
  230.     }
  231. }
  232.  
  233. void M02_Objective_Controller::M02_Objective_Controller_Manage_HUD_Info(GameObject *obj, int type)
  234. {
  235.     switch(type)
  236.     {
  237.         case 202:
  238.             Commands->Set_HUD_Help_Text(7665, Vector3(0.196000, 0.882000, 0.196000));
  239.             Commands->Add_Objective(type, 2, 0, 6223, 0, 6044);
  240.             Commands->Set_Objective_Radar_Blip(type, Unkown);
  241.             Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M07_2_05.tga", 7377);
  242.             return;
  243.         case 203:
  244.             Commands->Set_HUD_Help_Text(7665, Vector3(0.196000, 0.882000, 0.196000));
  245.             Commands->Add_Objective(type, 1, 0, 6224, 0, 6045);
  246.             Commands->Set_Objective_Radar_Blip(type, Unkown);
  247.             Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_1_03.tga", 7376);
  248.             return;
  249.         case 204:
  250.             Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
  251.             Commands->Add_Objective(type, 2, 0, 6275, 0, 6142);
  252.             Commands->Set_Objective_Radar_Blip(type, Unkown);
  253.             Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_01.tga", 7376);
  254.             return;
  255.         case 205:
  256.             Commands->Set_HUD_Help_Text(7665, Vector3(0.196000, 0.882000, 0.196000));
  257.             Commands->Add_Objective(type, 1, 0, 6225, 0, 6046);
  258.             Commands->Set_Objective_Radar_Blip(type, Unkown);
  259.             Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_1_04.tga", 7373);
  260.             return;
  261.         case 206:
  262.             Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
  263.             Commands->Add_Objective(type, 2, 0, 6276, 0, 6143);
  264.             Commands->Set_Objective_Radar_Blip(type, Unkown);
  265.             Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_02.tga", 7376);
  266.             return;
  267.         case 207:
  268.             Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
  269.             Commands->Add_Objective(type, 0, 6277, 0, 6144);
  270.             Commands->Set_Objective_Radar_Blip(type, Unkown);
  271.             Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_03.tga", 7378);
  272.             return;
  273.         case 208:
  274.             Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
  275.             Commands->Add_Objective(type, 2, 0, 6279, 0, 6146);
  276.             Commands->Set_Objective_Radar_Blip(type, Unkown);
  277.             Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_06.tga", 7378);
  278.             return;
  279.         case 209:
  280.             Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
  281.             Commands->Add_Objective(type, 2, 0, 6278, 0, 6145);
  282.             Commands->Set_Objective_Radar_Blip(type, Unkown);
  283.             Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_05.tga", 7378);
  284.             return;
  285.         case 210:
  286.             Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
  287.             Commands->Add_Objective(type, 2, 0, 6280, 0, 6147);
  288.             Commands->Set_Objective_Radar_Blip(type, Unkown);
  289.             Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_04.tga", 7378);
  290.             return;
  291.         case 211:
  292.             Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
  293.             Commands->Add_Objective(type, 2, 0, 6281, 0, 6148);
  294.             Commands->Set_Objective_Radar_Blip(type, Unkown);
  295.             Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_07.tga", 7378);
  296.             return;
  297.         case 212:
  298.             Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
  299.             Commands->Add_Objective(type, 2, 0, 6282, 0, 6149);
  300.             Commands->Set_Objective_Radar_Blip(type, Unkown);
  301.             Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_08.tga", 7376);
  302.             return;
  303.         case 213:
  304.             Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
  305.             Commands->Add_Objective(type, 2, 0, 6283, 0, 6150);
  306.             Commands->Set_Objective_Radar_Blip(type, Unkown);
  307.             Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_09.tga", 7376);
  308.             return;
  309.         case 214:
  310.             Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
  311.             Commands->Add_Objective(type, 2, 0, 6284, 0, 6151);
  312.             Commands->Set_Objective_Radar_Blip(type, Unkown);
  313.             Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_10.tga", 7376);
  314.             return;
  315.         case 215:
  316.             Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
  317.             Commands->Add_Objective(type, 2, 0, 6285, 0, 6152);
  318.             Commands->Set_Objective_Radar_Blip(type, Unkown);
  319.             Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_11.tga", 7376);
  320.             return;
  321.         case 216:
  322.             Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
  323.             Commands->Add_Objective(type, 2, 0, 6286, 0, 6153);
  324.             Commands->Set_Objective_Radar_Blip(type, Unkown);
  325.             Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_12.tga", 7376);
  326.             return;
  327.         case 217:
  328.             Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
  329.             Commands->Add_Objective(type, 2, 0, 6287, 0, 6154);
  330.             Commands->Set_Objective_Radar_Blip(type, Unkown);
  331.             Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_13.tga", 7376);
  332.             return;
  333.         case 218:
  334.             Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
  335.             Commands->Add_Objective(type, 2, 0, 6288, 0, 6155);
  336.             Commands->Set_Objective_Radar_Blip(type, Unkown);
  337.             Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_14.tga", 7376);
  338.             return;
  339.         case 219:
  340.             Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
  341.             Commands->Add_Objective(type, 2, 0, 6289, 0, 6156);
  342.             Commands->Set_Objective_Radar_Blip(type, Unkown);
  343.             Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_14.tga", 7376);
  344.             return;
  345.         case 220:
  346.             Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
  347.             Commands->Add_Objective(type, 2, 0, 6290, 0, 6157);
  348.             Commands->Set_Objective_Radar_Blip(type, Unkown);
  349.             Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_14.tga", 7376);
  350.             return;
  351.         case 221:
  352.             Commands->Set_HUD_Help_Text(7666, Vector3(0.196000, 0.882000, 0.196000));
  353.             Commands->Add_Objective(type, 2, 0, 6291, 0, 6158);
  354.             Commands->Set_Objective_Radar_Blip(type, Unkown);
  355.             Commands->Set_Objective_HUD_Info_Position(type, 66, "POG_M02_2_15.tga", 7371);
  356.             return;
  357.         default:
  358.             return;
  359.     }
  360. }
  361.  
  362. class M02_Objective_Zone : public ScriptImpClass
  363. {
  364.     void Register_Auto_Save_Variables();
  365.     void Created(GameObject *obj);
  366.     void Entered(GameObject *obj,GameObject *enterer);
  367.     void Timer_Expired(GameObject *obj,int number);
  368.     void Custom(GameObject *obj,int type,int param,GameObject *sender);
  369.     void unknown(int a1);
  370.     int Unknown1; // Seriously this script is so badass big i was too lazy to identify these but Unknown2 is probably MendozaID
  371.     int Unknown2;
  372.     int Unknown3;
  373.     int Unknown4;
  374. };
  375.  
  376. void M02_Objective_Zone::Register_Auto_Save_Variables()
  377. {
  378.     Auto_Save_Variable(&Unknown4, 1, 1);
  379.     Auto_Save_Variable(&Unknown2, 4, 2);
  380.     Auto_Save_Variable(&Unknown3, 1, 3);
  381.     Auto_Save_Variable(&Unknown1, 1, 4);
  382. }
  383.  
  384. void M02_Objective_Zone::Created(GameObject *obj)
  385. {
  386.     Unknown1 = 0;
  387.     Unknown2 = 0;
  388.     Unknown3 = 0;
  389.     Unknown4 = 0;
  390. }
  391.  
  392. void M02_Objective_Zone::Entered(GameObject *obj,GameObject *enterer)
  393. {
  394.     GameObject *SearchObj = Commands->Find_Object(1111112);
  395.     if(!SearchObj)
  396.         return;
  397.     int ObjID = Commands->Get_ID(obj);
  398.     int DestroyObjID = 0;
  399.     if(ObjID > 400551)
  400.     {
  401.         if(ObjID > 401114)
  402.         {
  403.             if(ObjID > 401982)
  404.             {
  405.                 switch(ObjID)
  406.                 {
  407.                     case 405118:
  408.                         Commands->Destroy_Object(obj);
  409.                         return;
  410.                     case 405116:
  411.                         Commands->Stop_All_Conversations();
  412.                         int M02_OBELISK_APPROACH = Commands->Create_Conversation("M02_OBELISK_APPROACH", 100, 300, true);
  413.                         Commands->Join_Conversation(0, M02_OBELISK_APPROACH, true, true, true);
  414.                         Vector3 Pos = Commands->Get_Position(obj);
  415.                         GameObject *Star = Commands->Get_A_Star(Pos);
  416.                         Commands->Join_Conversation(Star, M02_OBELISK_APPROACH, true, false, false);
  417.                         Commands->Start_Conversation(M02_OBELISK_APPROACH, 0);
  418.                         break;
  419.                     case 405117:
  420.                         Commands->Stop_All_Conversations();
  421.                         int M02_PRIMARY_02_REMIND = Commands->Create_Conversation("M02_PRIMARY_02_REMIND", 100, 300, true);
  422.                         Commands->Join_Conversation(0, M02_PRIMARY_02_REMIND, true, true, true);
  423.                         Vector3 Pos = Commands->Get_Position(obj);
  424.                         GameObject *Star = Commands->Get_A_Star(Pos);
  425.                         Commands->Join_Conversation(Star, M02_PRIMARY_02_REMIND, true, false, false);
  426.                         Commands->Start_Conversation(M02_PRIMARY_02_REMIND, 0);
  427.                         break;
  428.                     case 405119:
  429.                         Commands->Stop_All_Conversations();
  430.                         int M02_SECONDARY_03_START = Commands->Create_Conversation("M02_SECONDARY_03_START", 100, 300, 1);
  431.                         Commands->Join_Conversation(0, M02_SECONDARY_03_START, true, true, true);
  432.                         Vector3 Pos = Commands->Get_Position(obj);
  433.                         GameObject *Star = Commands->Get_A_Star(Pos);
  434.                         Commands->Join_Conversation(Star, M02_SECONDARY_03_START, true, false, false);
  435.                         Commands->Start_Conversation(M02_SECONDARY_03_START, 0);
  436.                         break;
  437.                     case 405120:
  438.                         GameObject *Mammy = Commands->Create_Object("GDI_Mammoth_Tank_Player", Vector3(570.059998, 261.470001, -0.080078));
  439.                         if(Mammy)
  440.                         {
  441.                             Commands->Set_Facing(Mammy, 45.000000);
  442.                             Commands->Attach_Script(Mammy, "M02_Player_Vehicle", "2");
  443.                         }
  444.                         break;
  445.                     case 405122:
  446.                         Commands->Stop_All_Conversations();
  447.                         int M02_SECONDARY_11_START = Commands->Create_Conversation("M02_SECONDARY_11_START", 100, 300, 1);
  448.                         Commands->Join_Conversation(0, M02_SECONDARY_11_START, true, true, true);
  449.                         Vector3 Pos = Commands->Get_Position(obj);
  450.                         GameObject *Star = Commands->Get_A_Star(Pos);
  451.                         Commands->Join_Conversation(Star, M02_SECONDARY_11_START, true, false, false);
  452.                         Commands->Start_Conversation(M02_SECONDARY_11_START, 0);
  453.                         break;
  454.                     default:
  455.                         return;
  456.                 }
  457.             Commands->Destroy_Object(obj);
  458.             return;
  459.         }
  460.         if(ObjID == 401982)
  461.         {
  462.             Commands->Stop_All_Conversations();
  463.             int M02_SECONDARY_13_START = Commands->Create_Conversation("M02_SECONDARY_13_START", 100, 300, 1);
  464.             Commands->Join_Conversation(0, M02_SECONDARY_13_START, true, true, true);
  465.             Vector3 Pos = Commands->Get_Position(obj);
  466.             GameObject *Star = Commands->Get_A_Star(Pos);
  467.             Commands->Join_Conversation(Star, M02_SECONDARY_13_START, true, false, false);
  468.             Commands->Start_Conversation(M02_SECONDARY_13_START, 0);
  469.             GameObject *Jet = Commands->Create_Object("Nod_Jet", Vector3(929.909973, 1132.339966, 70.500000));
  470.             if(Jet)
  471.                 Commands->Attach_Script(Jet, "M02_Nod_Jet", "");
  472.             Commands->Destroy_Object(obj);
  473.             return;
  474.         }
  475.         ObjID -= 401123;
  476.         switch(ObjID)
  477.         {
  478.             case 0:
  479.                 GameObject *SearchObj1 = Commands->Find_Object(401124);
  480.                 Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  481.                 GameObject *SearchObj2 = Commands->Find_Object(401125);
  482.                 Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  483.                 GameObject *SearchObj3 = Commands->Find_Object(401126);
  484.                 Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  485.                 GameObject *SearchObj4 = Commands->Find_Object(401127);
  486.                 Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  487.                 GameObject *SearchObj5 = Commands->Find_Object(401128);
  488.                 Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  489.                 GameObject *SearchObj6 = Commands->Find_Object(401129);
  490.                 Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  491.                 Commands->Destroy_Object(obj);
  492.                 return;
  493.             case 7:
  494.                 GameObject *SearchObj_02 = Commands->Find_Object(1157690);
  495.                 if(SearchObj_02)
  496.                 {
  497.                     if(Commands->Get_Health(SearchObj_02) != 0.0)
  498.                     {
  499.                         Commands->Stop_All_Conversations();
  500.                         int M02_SECONDARY_01_GUIDE = Commands->Create_Conversation("M02_SECONDARY_01_GUIDE", 100, 300, 1);
  501.                         Commands->Join_Conversation(0, M02_SECONDARY_01_GUIDE, true, true, true);
  502.                         Vector3 Pos = Commands->Get_Position(obj);
  503.                         GameObject *Star = Commands->Get_A_Star(Pos);
  504.                         Commands->Join_Conversation(Star, M02_SECONDARY_01_GUIDE, true, false, false);
  505.                         Commands->Start_Conversation(M02_SECONDARY_01_GUIDE, 0);
  506.                     }
  507.                 }
  508.                 GameObject *SearchObj1 = Commands->Find_Object(401132);
  509.                 Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  510.                 GameObject *SearchObj2 = Commands->Find_Object(401133);
  511.                 Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  512.                 GameObject *SearchObj3 = Commands->Find_Object(401134);
  513.                 Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  514.                 GameObject *SearchObj4 = Commands->Find_Object(401135);
  515.                 Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  516.                 GameObject *SearchObj5 = Commands->Find_Object(401136);
  517.                 Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  518.                 GameObject *SearchObj6 = Commands->Find_Object(401137);
  519.                 Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  520.                 GameObject *SearchObj7 = Commands->Find_Object(401138);
  521.                 Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  522.                 GameObject *SearchObj8 = Commands->Find_Object(401139);
  523.                 Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  524.                 DestroyObjID = 401131;
  525.                 break;
  526.             case 8:
  527.                 GameObject *SearchObj_02 = Commands->Find_Object(1157690);
  528.                 if(SearchObj_02)
  529.                 {
  530.                     if(Commands->Get_Health(SearchObj_02) != 0.0)
  531.                     {
  532.                         Commands->Stop_All_Conversations();
  533.                         int M02_SECONDARY_01_GUIDE = Commands->Create_Conversation("M02_SECONDARY_01_GUIDE", 100, 300, 1);
  534.                         Commands->Join_Conversation(0, M02_SECONDARY_01_GUIDE, true, true, true);
  535.                         Vector3 Pos = Commands->Get_Position(obj);
  536.                         GameObject *Star = Commands->Get_A_Star(Pos);
  537.                         Commands->Join_Conversation(Star, M02_SECONDARY_01_GUIDE, true, false, false);
  538.                         Commands->Start_Conversation(M02_SECONDARY_01_GUIDE, 0);
  539.                     }
  540.                 }
  541.                 GameObject *SearchObj1 = Commands->Find_Object(401132);
  542.                 Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  543.                 GameObject *SearchObj2 = Commands->Find_Object(401133);
  544.                 Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  545.                 GameObject *SearchObj3 = Commands->Find_Object(401134);
  546.                 Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  547.                 GameObject *SearchObj4 = Commands->Find_Object(401135);
  548.                 Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  549.                 GameObject *SearchObj5 = Commands->Find_Object(401136);
  550.                 Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  551.                 GameObject *SearchObj6 = Commands->Find_Object(401137);
  552.                 Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  553.                 GameObject *SearchObj7 = Commands->Find_Object(401138);
  554.                 Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  555.                 GameObject *SearchObj8 = Commands->Find_Object(401139);
  556.                 Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  557.                 DestroyObjID = 401130;
  558.                 break;
  559.             case 63:
  560.                 GameObject *SearchObj_02 = Commands->Find_Object(474463);
  561.                 if(SearchObj_02)
  562.                 {
  563.                     GameObject *Apache = Commands->Create_Object("Nod_Apache", Vector3(1300.897949, 657.716980, 67.363998));
  564.                     if(Apache)
  565.                     {
  566.                         Commands->Set_Facing(Apache, 0);
  567.                         Commands->Attach_Script(Apache, "M02_Nod_Apache", "15");
  568.                     }
  569.                 }
  570.                 Commands->Stop_All_Conversations();
  571.                 int M02_SECONDARY_14_GUIDE = Commands->Create_Conversation("M02_SECONDARY_14_GUIDE", 100, 300, 1);
  572.                 Commands->Join_Conversation(0, M02_SECONDARY_14_GUIDE, true, true, true);
  573.                 Vector3 Pos = Commands->Get_Position(obj);
  574.                 GameObject *Star = Commands->Get_A_Star(Pos);
  575.                 Commands->Join_Conversation(Star, M02_SECONDARY_14_GUIDE, true, false, false);
  576.                 Commands->Start_Conversation(M02_SECONDARY_14_GUIDE, 0);
  577.                 DestroyObjID = 401187;
  578.                 break;
  579.             case 64:
  580.                 GameObject *SearchObj_02 = Commands->Find_Object(474463);
  581.                 if(SearchObj_02)
  582.                 {
  583.                     GameObject *Apache = Commands->Create_Object("Nod_Apache", Vector3(1300.897949, 657.716980, 67.363998));
  584.                     if(Apache)
  585.                     {
  586.                         Commands->Set_Facing(Apache, 0);
  587.                         Commands->Attach_Script(Apache, "M02_Nod_Apache", "15");
  588.                     }
  589.                 }
  590.                 Commands->Stop_All_Conversations();
  591.                 int M02_SECONDARY_14_GUIDE = Commands->Create_Conversation("M02_SECONDARY_14_GUIDE", 100, 300, 1);
  592.                 Commands->Join_Conversation(0, M02_SECONDARY_14_GUIDE, true, true, true);
  593.                 Vector3 Pos = Commands->Get_Position(obj);
  594.                 GameObject *Star = Commands->Get_A_Star(Pos);
  595.                 Commands->Join_Conversation(Star, M02_SECONDARY_14_GUIDE, true, false, false);
  596.                 Commands->Start_Conversation(M02_SECONDARY_14_GUIDE, 0);
  597.                 DestroyObjID = 401186;
  598.                 break;
  599.             case 73:
  600.                 Commands->Send_Custom_Event(obj, SearchObj, 105, 11, 0);
  601.                 Commands->Send_Custom_Event(obj, SearchObj, 104, 14, 0);
  602.                 Vector3 Pos = Commands->Get_Position(obj);
  603.                 Commands->Create_Logical_Sound(obj, 1061, Pos, 1000.000000);
  604.                 GameObject *SearchObj1 = Commands->Find_Object(401071);
  605.                 Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  606.                 GameObject *SearchObj2 = Commands->Find_Object(401072);
  607.                 Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  608.                 GameObject *SearchObj3 = Commands->Find_Object(401073);
  609.                 Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  610.                 GameObject *SearchObj4 = Commands->Find_Object(401074);
  611.                 Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  612.                 GameObject *SearchObj5 = Commands->Find_Object(401075);
  613.                 Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  614.                 GameObject *SearchObj6 = Commands->Find_Object(401076);
  615.                 Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  616.                 GameObject *SearchObj7 = Commands->Find_Object(401077);
  617.                 Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  618.                 GameObject *SearchObj8 = Commands->Find_Object(401078);
  619.                 Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  620.                 GameObject *SearchObj9 = Commands->Find_Object(401192);
  621.                 Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
  622.                 GameObject *SearchObj10 = Commands->Find_Object(401193);
  623.                 Commands->Send_Custom_Event(obj, SearchObj10, 0, 0, 0);
  624.                 GameObject *SearchObj11 = Commands->Find_Object(401194);
  625.                 Commands->Send_Custom_Event(obj, SearchObj11, 0, 0, 0);
  626.                 GameObject *SearchObj12 = Commands->Find_Object(401195);
  627.                 Commands->Send_Custom_Event(obj, SearchObj12, 0, 0, 0);
  628.                 DestroyObjID = 401070;
  629.                 break;
  630.             default:
  631.                 return;
  632.         }
  633.     }
  634.     else
  635.     {
  636.         if(ObjID == 401114)
  637.         {
  638.             GameObject *SearchObj1 = Commands->Find_Object(401115);
  639.             Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  640.             GameObject *SearchObj2 = Commands->Find_Object(401116);
  641.             Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  642.             GameObject *SearchObj3 = Commands->Find_Object(401117);
  643.             Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  644.             GameObject *SearchObj4 = Commands->Find_Object(401118);
  645.             Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  646.             GameObject *SearchObj5 = Commands->Find_Object(401119);
  647.             Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  648.             GameObject *SearchObj6 = Commands->Find_Object(401120);
  649.             Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  650.             GameObject *SearchObj7 = Commands->Find_Object(401121);
  651.             Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  652.             GameObject *SearchObj8 = Commands->Find_Object(401122);
  653.             Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  654.             DestroyObjID = 401113;
  655.         }
  656.         else
  657.         {
  658.             ObjID -= 400989;
  659.             switch(ObjID)
  660.             {
  661.                 case 0:
  662.                     Commands->Destroy_Object(obj);
  663.                     return;
  664.                 case 1:
  665.                     GameObject *CinObj = Commands->Create_Object("Invisible_Object", Vector3(0,0,0));
  666.                     Commands->Attach_Script(CinObj, "Test_Cinematic", "X2E_C130Drop.txt");
  667.                     Commands->Destroy_Object(obj);
  668.                     return;
  669.                 case 2:
  670.                     GameObject *CinObj = Commands->Create_Object("Invisible_Object", Vector3(0,0,0));
  671.                     Commands->Attach_Script(CinObj, "Test_Cinematic", "X2F_OrcaSam.txt");
  672.                     Commands->Destroy_Object(obj);
  673.                     return;
  674.                 case 3:
  675.                     GameObject *CinObj = Commands->Create_Object("Invisible_Object", Vector3(0,0,0));
  676.                     Commands->Attach_Script(CinObj, "Test_Cinematic", "X2G_AirCrash.txt");
  677.                     Commands->Destroy_Object(obj);
  678.                     return;
  679.                 case 12:
  680.                     GameObject *CinObj = Commands->Create_Object("Invisible_Object", Vector3(0,0,0));
  681.                     Commands->Attach_Script(CinObj, "Test_Cinematic", "X2H_ApacheSpray.txt");
  682.                     Commands->Destroy_Object(obj);
  683.                     return;
  684.                 case 40:
  685.                     GameObject *CinObj = Commands->Create_Object("Invisible_Object", Vector3(0,0,0));
  686.                     Commands->Attach_Script(CinObj, "Test_Cinematic", "X2D_MTank_Slip.txt");
  687.                     Commands->Destroy_Object(obj);
  688.                     return;
  689.                 case 65:
  690.                     Commands->Send_Custom_Event(obj, SearchObj, 114, 8, 0);
  691.             LABEL_107:
  692.                     Commands->Send_Custom_Event(obj, SearchObj, 102, 8, 0);
  693.                     Commands->Destroy_Object(obj);
  694.                     return;
  695.                 case 77:
  696.                     GameObject *SearchObj1 = Commands->Find_Object(400200);
  697.                     Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  698.                     GameObject *SearchObj2 = Commands->Find_Object(401067);
  699.                     Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  700.                     GameObject *SearchObj3 = Commands->Find_Object(401068);
  701.                     Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  702.                     GameObject *SearchObj4 = Commands->Find_Object(401069);
  703.                     Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  704.                     GameObject *SearchObj5 = Commands->Find_Object(1153845);
  705.                     Commands->Send_Custom_Event(obj, SearchObj5, 1, 0, 0);
  706.                     Commands->Destroy_Object(obj);
  707.                     return;
  708.                 case 81:
  709.                     Commands->Send_Custom_Event(obj, SearchObj, 105, 11, 0);
  710.                     Commands->Send_Custom_Event(obj, SearchObj, 104, 14, 0);
  711.                     Vector3 Pos = Commands->Get_Position(&v712, a3);
  712.                     Commands->Create_Logical_Sound(obj, 1061, v374, 1000.000000);
  713.                     GameObject *SearchObj1 = Commands->Find_Object(401071);
  714.                     Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  715.                     GameObject *SearchObj2 = Commands->Find_Object(401072);
  716.                     Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  717.                     GameObject *SearchObj3 = Commands->Find_Object(401073);
  718.                     Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  719.                     GameObject *SearchObj4 = Commands->Find_Object(401074);
  720.                     Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  721.                     GameObject *SearchObj5 = Commands->Find_Object(401075);
  722.                     Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  723.                     GameObject *SearchObj6 = Commands->Find_Object(401076);
  724.                     Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  725.                     GameObject *SearchObj7 = Commands->Find_Object(401077);
  726.                     Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  727.                     GameObject *SearchObj8 = Commands->Find_Object(401078);
  728.                     Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  729.                     GameObject *SearchObj9 = Commands->Find_Object(401192);
  730.                     Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
  731.                     GameObject *SearchObj10 = Commands->Find_Object(401193);
  732.                     Commands->Send_Custom_Event(obj, SearchObj10, 0, 0, 0);
  733.                     GameObject *SearchObj11 = Commands->Find_Object(401194);
  734.                     Commands->Send_Custom_Event(obj, SearchObj11, 0, 0, 0);
  735.                     GameObject *SearchObj12 = Commands->Find_Object(401195);
  736.                     Commands->Send_Custom_Event(obj, SearchObj12, 0, 0, 0);
  737.                     DestroyObjID = 401196;
  738.                     break;
  739.                 case 90:
  740.                     Commands->Send_Custom_Event(obj, SearchObj, 105, 14, 0);
  741.                     Commands->Send_Custom_Event(a3, v6, 104, 15, 0);
  742.                     Vector3 Pos = Commands->Get_Position(obj);
  743.                     Commands->Create_Logical_Sound(obj, 1064, &Pos, 1000.000000);
  744.                     Send_Custom_Event(obj, SearchObj, 218, 0, 0);
  745.                     Send_Custom_Event(obj, SearchObj, 219, 0, 0);
  746.                     Send_Custom_Event(obj, SearchObj, 220, 0, 0);
  747.                     GameObject *SearchObj1 = Commands->Find_Object(401089);
  748.                     Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  749.                     GameObject *SearchObj2 = Commands->Find_Object(401087);
  750.                     Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  751.                     GameObject *SearchObj3 = Commands->Find_Object(401086);
  752.                     Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  753.                     GameObject *SearchObj4 = Commands->Find_Object(401088);
  754.                     Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  755.                     GameObject *SearchObj5 = Commands->Find_Object(401085);
  756.                     Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  757.                     GameObject *SearchObj6 = Commands->Find_Object(401090);
  758.                     Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  759.                     GameObject *SearchObj7 = Commands->Find_Object(401091);
  760.                     Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  761.                     GameObject *SearchObj8 = Commands->Find_Object(401092);
  762.                     Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  763.                     GameObject *SearchObj9 = Commands->Find_Object(401094);
  764.                     Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
  765.                     GameObject *SearchObj10 = Commands->Find_Object(401095);
  766.                     Commands->Send_Custom_Event(obj, SearchObj10, 0, 0, 0);
  767.                     GameObject *SearchObj11 = Commands->Find_Object(401096);
  768.                     Commands->Send_Custom_Event(obj, SearchObj11, 0, 0, 0);
  769.                     GameObject *SearchObj12 = Commands->Find_Object(401097);
  770.                     Commands->Send_Custom_Event(obj, SearchObj12, 0, 0, 0);
  771.                     GameObject *SearchObj13 = Commands->Find_Object(401189);
  772.                     Commands->Send_Custom_Event(obj, SearchObj13, 0, 0, 0);
  773.                     GameObject *SearchObj14 = Commands->Find_Object(401190);
  774.                     Commands->Send_Custom_Event(obj, SearchObj14, 0, 0, 0);
  775.                     GameObject *SearchObj15 = Commands->Find_Object(401191);
  776.                     Commands->Send_Custom_Event(obj, SearchObj15, 0, 0, 0);
  777.                     DestroyObjID = 401080;
  778.                     break;
  779.                 case 91:
  780.                     Commands->Send_Custom_Event(obj, SearchObj, 105, 14, 0);
  781.                     Commands->Send_Custom_Event(obj, SearchObj, 104, 15, 0);
  782.                     Vector3 Pos = Commands->Get_Position(obj);
  783.                     Commands->Create_Logical_Sound(obj, 1064, Pos, 1000.000000);
  784.                     Commands->Send_Custom_Event(obj, SearchObj, 218, 0, 0);
  785.                     Commands->Send_Custom_Event(obj, SearchObj, 219, 0, 0);
  786.                     Commands->Send_Custom_Event(obj, SearchObj, 220, 0, 0);
  787.                     GameObject *SearchObj1 = Commands->Find_Object(401089);
  788.                     Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  789.                     GameObject *SearchObj2 = Commands->Find_Object(401087);
  790.                     Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  791.                     GameObject *SearchObj3 = Commands->Find_Object(401086);
  792.                     Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  793.                     GameObject *SearchObj4 = Commands->Find_Object(401088);
  794.                     Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  795.                     GameObject *SearchObj5 = Commands->Find_Object(401085);
  796.                     Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  797.                     GameObject *SearchObj6 = Commands->Find_Object(401090);
  798.                     Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  799.                     GameObject *SearchObj7 = Commands->Find_Object(401091);
  800.                     Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  801.                     GameObject *SearchObj8 = Commands->Find_Object(401092);
  802.                     Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  803.                     GameObject *SearchObj9 = Commands->Find_Object(401094);
  804.                     Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
  805.                     GameObject *SearchObj10 = Commands->Find_Object(401095);
  806.                     Commands->Send_Custom_Event(obj, SearchObj10, 0, 0, 0);
  807.                     GameObject *SearchObj11 = Commands->Find_Object(401096);
  808.                     Commands->Send_Custom_Event(obj, SearchObj11, 0, 0, 0);
  809.                     GameObject *SearchObj12 = Commands->Find_Object(401097);
  810.                     Commands->Send_Custom_Event(obj, SearchObj12, 0, 0, 0);
  811.                     GameObject *SearchObj13 = Commands->Find_Object(401189);
  812.                     Commands->Send_Custom_Event(obj, SearchObj13, 0, 0, 0);
  813.                     GameObject *SearchObj14 = Commands->Find_Object(401190);
  814.                     Commands->Send_Custom_Event(obj, SearchObj14, 0, 0, 0);
  815.                     GameObject *SearchObj15 = Commands->Find_Object(401191);
  816.                     Commands->Send_Custom_Event(obj, SearchObj15, 0, 0, 0);
  817.                     DestroyObjID = 401079;
  818.                     break;
  819.                 case 112:
  820.                     Commands->Send_Custom_Event(obj, SearchObj, 204, 0, 0);
  821.                     Vector3 Pos = Commands->Get_Position(obj);
  822.                     Commands->Create_Logical_Sound(obj, 1065, Pos, 1000.000000);
  823.                     GameObject *SearchObj1 = Commands->Find_Object(401103);
  824.                     Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  825.                     GameObject *SearchObj2 = Commands->Find_Object(401104);
  826.                     Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  827.                     GameObject *SearchObj3 = Commands->Find_Object(401105);
  828.                     Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  829.                     GameObject *SearchObj4 = Commands->Find_Object(401106);
  830.                     Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  831.                     GameObject *SearchObj5 = Commands->Find_Object(401107);
  832.                     Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  833.                     GameObject *SearchObj6 = Commands->Find_Object(401108);
  834.                     Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  835.                     GameObject *SearchObj7 = Commands->Find_Object(401109);
  836.                     Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  837.                     GameObject *SearchObj8 = Commands->Find_Object(401110);
  838.                     Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  839.                     GameObject *SearchObj9 = Commands->Find_Object(401112);
  840.                     Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
  841.                     DestroyObjID = 401102;
  842.                     break;
  843.                 case 113:
  844.                     Commands->Send_Custom_Event(obj, SearchObj, 204, 0, 0);
  845.                     Vector3 Pos = Commands->Get_Position(obj);
  846.                     Commands->Create_Logical_Sound(obj, 1065, Pos, 1000.000000);
  847.                     GameObject *SearchObj1 = Commands->Find_Object(401103);
  848.                     Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  849.                     GameObject *SearchObj2 = Commands->Find_Object(401104);
  850.                     Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  851.                     GameObject *SearchObj3 = Commands->Find_Object(401105);
  852.                     Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  853.                     GameObject *SearchObj4 = Commands->Find_Object(401106);
  854.                     Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  855.                     GameObject *SearchObj5 = Commands->Find_Object(401107);
  856.                     Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  857.                     GameObject *SearchObj6 = Commands->Find_Object(401108);
  858.                     Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  859.                     GameObject *SearchObj7 = Commands->Find_Object(401109);
  860.                     Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  861.                     GameObject *SearchObj8 = Commands->Find_Object(401110);
  862.                     Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  863.                     GameObject *SearchObj9 = Commands->Find_Object(401112);
  864.                     Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
  865.                     DestroyObjID = 401101;
  866.                     break;
  867.                 case 124:
  868.                     GameObject *SearchObj1 = Commands->Find_Object(401115);
  869.                     Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  870.                     GameObject *SearchObj2 = Commands->Find_Object(401116);
  871.                     Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  872.                     GameObject *SearchObj3 = Commands->Find_Object(401117);
  873.                     Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  874.                     GameObject *SearchObj4 = Commands->Find_Object(401118);
  875.                     Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  876.                     GameObject *SearchObj5 = Commands->Find_Object(401119);
  877.                     Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  878.                     GameObject *SearchObj6 = Commands->Find_Object(401120);
  879.                     Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  880.                     GameObject *SearchObj7 = Commands->Find_Object(401121);
  881.                     Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  882.                     GameObject *SearchObj8 = Commands->Find_Object(401122);
  883.                     Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  884.                     DestroyObjID = 401114;
  885.                     break;
  886.                 default:
  887.                     return;
  888.                 }
  889.             }
  890.         }
  891.         GameObject *SearchObj_02 = Commands->Find_Object(DestroyObjID);
  892.         if(SearchObj_02)
  893.             Commands->Destroy_Object(SearchObj_02);
  894.         Commands->Destroy_Object(obj);
  895.         return;
  896.     }
  897.     if(ObjID == 400551)
  898.     {
  899.         GameObject *SearchObj_02 = Commands->Find_Object(474463);
  900.         if(SearchObj_02)
  901.         {
  902.             if(Commands->Get_Building_Power(SearchObj_02) && Commands->Get_Health(SearchObj_02) > 0.0)
  903.             {
  904.                 GameObject *Apache = Commands->Create_Object("Nod_Apache", Vector3(610.030029, 1036.349976, -0.260125));
  905.                 if(Apache)
  906.                 {
  907.                     Commands->Set_Facing(Apache, 0);
  908.                     Commands->Attach_Script(Apache, "M02_Nod_Apache", "24");
  909.                 }
  910.             }
  911.         }
  912.         Commands->Destroy_Object(obj);
  913.         return;
  914.     }
  915.     if(ObjID > 400197)
  916.     {
  917.         if(ObjID > 400271)
  918.         {
  919.             ObjID -= 400272;
  920.             switch(ObjID)
  921.             {
  922.                 case 0:
  923.                     Commands->Send_Custom_Event(obj, SearchObj, 105, 8, 0);
  924.                     Commands->Send_Custom_Event(obj, SearchObj, 104, 10, 0);
  925.                     Vector3 Pos = Commands->Get_Position(obj);
  926.                     Commands->Create_Logical_Sound(obj, 1058, Pos, 1000.000000);
  927.                     GameObject *SearchObj1 = Commands->Find_Object(400213);
  928.                     Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  929.                     GameObject *SearchObj2 = Commands->Find_Object(400984);
  930.                     Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  931.                     GameObject *SearchObj3 = Commands->Find_Object(401054);
  932.                     Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  933.                     GameObject *SearchObj4 = Commands->Find_Object(401055);
  934.                     Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  935.                     GameObject *SearchObj5 = Commands->Find_Object(401056);
  936.                     Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  937.                     GameObject *SearchObj6 = Commands->Find_Object(401057);
  938.                     Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  939.                     Commands->Destroy_Object(obj);
  940.                     return;
  941.                 case 1:
  942.                     Commands->Send_Custom_Event(obj, SearchObj, 105, 10, 0);
  943.                     Commands->Send_Custom_Event(obj, SearchObj, 104, 11, 0);
  944.                     Commands->Send_Custom_Event(obj, SearchObj, 114, 11, 0);
  945.                     Commands->Send_Custom_Event(obj, SearchObj, 102, 11, 0);
  946.                     GameObject *SearchObj1 = Commands->Find_Object(400276);
  947.                     Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  948.                     GameObject *SearchObj2 = Commands->Find_Object(400199);
  949.                     Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  950.                     GameObject *SearchObj3 = Commands->Find_Object(401065);
  951.                     Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  952.                     GameObject *SearchObj4 = Commands->Find_Object(401058);
  953.                     Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  954.                     GameObject *SearchObj5 = Commands->Find_Object(401059);
  955.                     Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  956.                     GameObject *SearchObj6 = Commands->Find_Object(401060);
  957.                     Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  958.                     GameObject *SearchObj7 = Commands->Find_Object(401061);
  959.                     Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  960.                     GameObject *SearchObj8 = Commands->Find_Object(401063);
  961.                     Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  962.                     GameObject *SearchObj9 = Commands->Find_Object(401064);
  963.                     Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
  964.                 LABEL_77:
  965.                     Commands->Create_Logical_Sound(obj, 1060, Commands->Get_Position(obj), 1000.000000);
  966.                     Commands->Destroy_Object(obj);
  967.                     return;
  968.                 case 2:
  969.                     GameObject *SearchObj_02 = Commands->Find_Object(1153846);
  970.                     if(SearchObj_02)
  971.                     {
  972.                         bool DidSendCustoms = false;
  973.                         if(Commands->Get_Health(SearchObj_02) <= 0.0)
  974.                         {
  975.                             Commands->Send_Custom_Event(obj, SearchObj, 105, 11, 0);
  976.                             Commands->Create_Logical_Sound(obj, 1061, Commands->Get_Position(obj), 1000.000000);
  977.                             Commands->Send_Custom_Event(obj, SearchObj, 114, 10, 0);
  978.                             Commands->Send_Custom_Event(obj, SearchObj, 102, 10, 0);
  979.                             DidSendCustoms = true;
  980.                         }
  981.                         Commands->Send_Custom_Event(obj, SearchObj_02, 1, 0, 0);
  982.                         if(DidSendCustoms)
  983.                         {
  984.                             Commands->Destroy_Object(obj);
  985.                             return;
  986.                         }
  987.                     }
  988.                     return;
  989.                 default:
  990.                     return;
  991.                 case 44:
  992.                     Commands->Send_Custom_Event(obj, SearchObj, 105, 0, 0);
  993.                     Vector3 Pos = Commands->Get_Position(obj);
  994.                     Commands->Create_Logical_Sound(obj, 1050, Pos, 1000.000000);
  995.                     GameObject *SearchObj1 = Commands->Find_Object(400317);
  996.                     Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  997.                     GameObject *SearchObj2 = Commands->Find_Object(400318);
  998.                     Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  999.                     GameObject *SearchObj3 = Commands->Find_Object(400319);
  1000.                     Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  1001.                     Commands->Destroy_Object(obj);
  1002.                     return;
  1003.                 case 229:
  1004.                     GameObject *SearchObj1 = Commands->Find_Object(400503);
  1005.                     Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  1006.                     GameObject *SearchObj2 = Commands->Find_Object(400504);
  1007.                     Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  1008.                     GameObject *SearchObj3 = Commands->Find_Object(400505);
  1009.                     Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  1010.                     GameObject *SearchObj4 = Commands->Find_Object(400506);
  1011.                     Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  1012.                     GameObject *SearchObj5 = Commands->Find_Object(400507);
  1013.                     Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  1014.                     GameObject *SearchObj6 = Commands->Find_Object(400508);
  1015.                     Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  1016.                     GameObject *SearchObj7 = Commands->Find_Object(400509);
  1017.                     Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  1018.                     GameObject *SearchObj8 = Commands->Find_Object(400510);
  1019.                     Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  1020.                     Commands->Send_Custom_Event(obj, SearchObj, 104, 24, 0);
  1021.                     Commands->Send_Custom_Event(obj, SearchObj, 214, 0, 0);
  1022.                     DestroyObjID = 400502;
  1023.                     break;
  1024.                 case 230:
  1025.                     Commands->Send_Custom_Event(obj, SearchObj 104, 24, 0);
  1026.                     GameObject *SearchObj1 = Commands->Find_Object(400503);
  1027.                     Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  1028.                     GameObject *SearchObj2 = Commands->Find_Object(400504);
  1029.                     Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  1030.                     GameObject *SearchObj3 = Commands->Find_Object(400505);
  1031.                     Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  1032.                     GameObject *SearchObj4 = Commands->Find_Object(400506);
  1033.                     Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  1034.                     GameObject *SearchObj5 = Commands->Find_Object(400507);
  1035.                     Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  1036.                     GameObject *SearchObj6 = Commands->Find_Object(400508);
  1037.                     Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  1038.                     GameObject *SearchObj7 = Commands->Find_Object(400509);
  1039.                     Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  1040.                     GameObject *SearchObj8 = Commands->Find_Object(400510);
  1041.                     Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  1042.                     Commands->Send_Custom_Event(obj, SearchObj, 214, 0, 0);
  1043.                     DestroyObjID = 400501;
  1044.                     break;
  1045.             }
  1046.             GameObject *SearchObj_02 = Commands->Find_Object(DestroyObjID);
  1047.             if(SearchObj_02)
  1048.                 Commands->Destroy_Object(SearchObj_02);
  1049.             Commands->Destroy_Object(obj);
  1050.             return;
  1051.         }
  1052.         if(ObjID == 400271)
  1053.         {
  1054.             Commands->Send_Custom_Event(obj, SearchObj, 105, 9, 0);
  1055.             Commands->Send_Custom_Event(obj, SearchObj, 104, 8, 0);
  1056.             GameObject *SearchObj1 = Commands->Find_Object(400275);
  1057.             Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  1058.              GameObject *SearchObj2 = Commands->Find_Object(401046);
  1059.             Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  1060.             GameObject *SearchObj3 = Commands->Find_Object(401047);
  1061.             Commands->Send_Custom_Event(obj, SearchObj3 0, 0, 0);
  1062.             GameObject *SearchObj4 = Commands->Find_Object(401048);
  1063.             Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  1064.             GameObject *SearchObj5 = Commands->Find_Object(401049);
  1065.             Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  1066.             GameObject *SearchObj6 = Commands->Find_Object(401050);
  1067.             Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  1068.             GameObject *SearchObj7 = Commands->Find_Object(401051);
  1069.             Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  1070.             GameObject *SearchObj8 = Commands->Find_Object(401052);
  1071.             Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  1072.             GameObject *SearchObj9 = Commands->Find_Object(401053);
  1073.             Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
  1074.             Vector3 Pos = Commands->Get_Position(obj);
  1075.             Commands->Create_Logical_Sound(obj, 1059, Pos, 1000.000000);
  1076.             GameObject *SearchObj10 = Commands->Find_Object(303203);
  1077.             GameObject *SearchObj_02 = Commands->Find_Object(400270);
  1078.             if(SearchObj_02)
  1079.                 Commands->Destroy_Object(SearchObj_02);
  1080.             Commands->Destroy_Object(obj);
  1081.             return;
  1082.         }
  1083.         ObjID -= 400198;
  1084.         switch(ObjID)
  1085.         {
  1086.             case 0:
  1087.                 Unknown4 = 1;
  1088.                 Vector3 Pos = Commands->Get_Position(obj);
  1089.                 Commands->Create_Logical_Sound(obj, 1000, Pos, 1000.000000);
  1090.                 Commands->Start_Timer(obj, this, 1, 6);
  1091.             case 3:
  1092.                 Unknown4 = 1;
  1093.                 Vector3 Pos = Commands->Get_Position(obj);
  1094.                 Commands->Create_Logical_Sound(obj, 1000, Pos, 1000.000000);
  1095.                 Commands->Start_Timer(obj, this, 1, 7);
  1096.             case 69:
  1097.                 Commands->Send_Custom_Event(obj, SearchObj, 211, 0, 0);
  1098.                 Commands->Send_Custom_Event(obj, SearchObj, 105, 3, 0);
  1099.                 Commands->Send_Custom_Event(obj, SearchObj, 104, 4, 0);
  1100.                 Vector3 Pos = Commands->Get_Position(obj);
  1101.                 Commands->Create_Logical_Sound(obj, 1053, Pos, 1000.000000);
  1102.                 Commands->Create_Logical_Sound(obj, 1102, Pos, 1000.000000);
  1103.                 GameObject *SearchObj1 = Commands->Find_Object(400210);
  1104.                 Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  1105.                 GameObject *SearchObj2 = Commands->Find_Object(400451);
  1106.                 Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  1107.                 GameObject *SearchObj3 = Commands->Find_Object(400452);
  1108.                 Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  1109.                 GameObject *SearchObj4 = Commands->Find_Object(400453);
  1110.                 Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  1111.                 GameObject *SearchObj5 = Commands->Find_Object(400499);
  1112.                 Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  1113.                 GameObject *SearchObj6 = Commands->Find_Object(400500);
  1114.                 Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  1115.                 GameObject *SearchObj7 = Commands->Find_Object(401025);
  1116.                 Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  1117.                 GameObject *SearchObj8 = Commands->Find_Object(401026);
  1118.                 Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  1119.                 GameObject *SearchObj9 = Commands->Find_Object(401027);
  1120.                 Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
  1121.                 GameObject *SearchObj10 = Commands->Find_Object(401028);
  1122.                 Commands->Send_Custom_Event(obj, SearchObj10, 0, 0, 0);
  1123.                 Commands->Send_Custom_Event(obj, SearchObj, 112, 4, 0);
  1124.                 Commands->Send_Custom_Event(obj, SearchObj, 111, 4, 0);
  1125.                 GameObject *Buggy = Commands->Create_Object("Nod_Buggy", Vector3(366.209015, 861.401001, 6.488000));
  1126.                 if(Buggy)
  1127.                 {
  1128.                     Commands->Set_Facing(Buggy, -0.040039);
  1129.                     Commands->Attach_Script(Buggy, "M02_Nod_Vehicle", "4");
  1130.                 }
  1131.                 GameObject *SearchObj_02 = Commands->Find_Object(401018);
  1132.                 Commands->Send_Custom_Event(obj, SearchObj_02, 0, 0, 0);
  1133.                 Commands->Start_Timer(obj, this, 0.100000, 10);
  1134.                 GameObject *SearchObj_03 = Commands->Find_Object(400187);
  1135.                 if(SearchObj_03)
  1136.                     Commands->Destroy_Object(SearchObj_03);
  1137.                 Commands->Destroy_Object(obj);
  1138.                 return;
  1139.             case 70:
  1140.                 Commands->Send_Custom_Event(obj, SearchObj, 105, 4, 0);
  1141.                 Vector3 Pos = Commands->Get_Position(obj);
  1142.                 Commands->Create_Logical_Sound(obj, 1054, Pos, 1000.000000);
  1143.                 GameObject *SearchObj1 = Commands->Find_Object(400552);
  1144.                 Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  1145.                 GameObject *SearchObj2 = Commands->Find_Object(400553);
  1146.                 Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  1147.                 GameObject *SearchObj3 = Commands->Find_Object(400560);
  1148.                 Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  1149.                 GameObject *SearchObj4 = Commands->Find_Object(400555);
  1150.                 Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  1151.                 GameObject *SearchObj5 = Commands->Find_Object(400558);
  1152.                 Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  1153.                 GameObject *SearchObj6 = Commands->Find_Object(400559);
  1154.                 Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  1155.                 GameObject *SearchObj7 = Commands->Find_Object(400557);
  1156.                 Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  1157.                 GameObject *SearchObj8 = Commands->Find_Object(400554);
  1158.                 Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  1159.                 GameObject *SearchObj9 = Commands->Find_Object(400556);
  1160.                 Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
  1161.                 Commands->Send_Custom_Event(obj, Commands->Get_A_Star(Commands->Get_Position(obj)), 2, 5, 0);
  1162.                 Commands->Destroy_Object(obj);
  1163.                 return;
  1164.             case 71:
  1165.                 Commands->Send_Custom_Event(obj, SearchObj, 202, 0, 0);
  1166.                 Commands->Send_Custom_Event(obj, SearchObj, 203, 0, 0);
  1167.                 Commands->Send_Custom_Event(obj, SearchObj, 217, 0, 0);
  1168.                 Commands->Send_Custom_Event(obj, SearchObj, 105, 6, 0);
  1169.                 Commands->Send_Custom_Event(obj, SearchObj, 104, 9, 0);
  1170.                 GameObject *SearchObj1 = Commands->Find_Object(400212);
  1171.                 Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  1172.                 GameObject *SearchObj2 = Commands->Find_Object(400981);
  1173.                 Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  1174.                 GameObject *SearchObj3 = Commands->Find_Object(400982);
  1175.                 Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  1176.                 GameObject *SearchObj4 = Commands->Find_Object(400983);
  1177.                 Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  1178.                 Vector3 Pos = Commands->Get_Position(obj);
  1179.                 Commands->Create_Logical_Sound(obj, 1056, Pos, 1000.000000);
  1180.                 GameObject *CinObject = Commands->Create_Object("Invisible_Object", Vector3(869.320007, 912.315979, 30.150000));
  1181.                 if(CinObject)
  1182.                 {
  1183.                     Commands->Set_Facing(CinObject, 110.000000);
  1184.                     Commands->Attach_Script(CinObject, "Test_Cinematic", "X2I_GDI_Drop03_Minigunner.txt");
  1185.                 }
  1186.                 Commands->Stop_All_Conversations();
  1187.                 int M02_PRIMARY_01_GUIDE = Commands->Create_Conversation("M02_PRIMARY_01_GUIDE", 100, 300, true);
  1188.                 Commands->Join_Conversation(0, M02_PRIMARY_01_GUIDE, true, true, true);
  1189.                 GameObject *Star = Commands->Get_A_Star(Pos);
  1190.                 Commands->Join_Conversation(Star, M02_PRIMARY_01_GUIDE, true, false, false);
  1191.                 Commands->Start_Conversation(M02_PRIMARY_01_GUIDE, 0);
  1192.                 Commands->Destroy_Object(obj);
  1193.                 return
  1194.             case 72:
  1195.                 Commands->Send_Custom_Event(obj, SearchObj, 105, 9, 0);
  1196.                 Commands->Send_Custom_Event(obj, SearchObj, 104, 8, 0);
  1197.                 GameObject *SearchObj1 = Commands->Find_Object(400275);
  1198.                 Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  1199.                 GameObject *SearchObj2 = Commands->Find_Object(401046);
  1200.                 Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  1201.                 GameObject *SearchObj3 = Commands->Find_Object(401047);
  1202.                 Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  1203.                 GameObject *SearchObj4 = Commands->Find_Object(401048);
  1204.                 Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  1205.                 GameObject *SearchObj5 = Commands->Find_Object(401049);
  1206.                 Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  1207.                 GameObject *SearchObj6 = Commands->Find_Object(401050);
  1208.                 Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  1209.                 GameObject *SearchObj7 = Commands->Find_Object(401051);
  1210.                 Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  1211.                 GameObject *SearchObj8 = Commands->Find_Object(401052);
  1212.                 Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  1213.                 GameObject *SearchObj9 = Commands->Find_Object(401053);
  1214.                 Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
  1215.                 Vector3 Pos = Commands->Get_Position(obj);
  1216.                 Commands->Create_Logical_Sound(obj, 1059, Pos, 1000.000000);
  1217.                 GameObject *SearchObj_02 = Commands->Find_Object(400271);
  1218.                 if(SearchObj_02)
  1219.                     Commands->Destroy_Object(SearchObj_02);
  1220.                 Commands->Destroy_Object(obj);
  1221.                 return;
  1222.             default:
  1223.                 return;
  1224.         }
  1225.     }
  1226.     else
  1227.     {
  1228.         if(ObjID == 400197)
  1229.         {
  1230.             Unknown3 = 1;
  1231.             Vector3 Pos = Commands->Get_Position(obj);
  1232.             Commands->Create_Logical_Sound(obj, 1000, Pos, 1000.000000);
  1233.             Commands->Start_Timer(obj, this, 1, 5);
  1234.         }
  1235.         else
  1236.         {
  1237.             if(ObjID <= 400188)
  1238.             {
  1239.                 if(ObjID == 400188)
  1240.                 {
  1241.                     Commands->Send_Custom_Event(obj, SearchObj, 212, 0, 0);
  1242.                     Commands->Send_Custom_Event(obj, SearchObj, 213, 0, 0);
  1243.                     Commands->Send_Custom_Event(obj, SearchObj, 105, 2, 0);
  1244.                     Commands->Send_Custom_Event(obj, SearchObj, 104, 3, 0);
  1245.                     Vector3 Pos = Commands->Get_Position(obj);
  1246.                     Commands->Create_Logical_Sound(obj, 1052, Pos, 1000.000000);
  1247.                     GameObject *Light = Commands->Create_Object("Nod_Light_Tank", Vector3(465.644989, 715.859985, -0.283281));
  1248.                     if(Light)
  1249.                     {
  1250.                         Commands->Set_Facing(Light, -0.437500);
  1251.                         Commands->Attach_Script(Light, "M02_Nod_Vehicle", "3");
  1252.                     }
  1253.                     GameObject *SearchObj1 = Commands->Find_Object(400410);
  1254.                     Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  1255.                     GameObject *SearchObj2 = Commands->Find_Object(400209);
  1256.                     Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  1257.                     GameObject *SearchObj3 = Commands->Find_Object(400411);
  1258.                     Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  1259.                     GameObject *SearchObj4 = Commands->Find_Object(400412);
  1260.                     Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  1261.                     GameObject *SearchObj5 = Commands->Find_Object(400413);
  1262.                     Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  1263.                     GameObject *SearchObj6 = Commands->Find_Object(400414);
  1264.                     Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  1265.                     GameObject *SearchObj7 = Commands->Find_Object(400415);
  1266.                     Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  1267.                     Commands->Destroy_Object(obj);
  1268.                     return;
  1269.                 }
  1270.                 if(ObjID <= 400184)
  1271.                 {
  1272.                     if(ObjID == 400184)
  1273.                     {
  1274.                         Commands->Send_Custom_Event(obj, SearchObj, 206, 0, 0);
  1275.                         Commands->Send_Custom_Event(obj, SearchObj, 207, 0, 0);
  1276.                         Commands->Send_Custom_Event(obj, SearchObj, 104, 0, 0);
  1277.                         GameObject *CinObject = Commands->Create_Object("Invisible_Object", Vector3(-0.418750, -0.178906, -0.112891));
  1278.                         if(CinObject)
  1279.                         {
  1280.                             Commands->Set_Facing(CinObject, 70.500000);
  1281.                             Commands->Attach_Script(CinObject, "Test_Cinematic", "X2I_GDI_Drop02_Rocket.txt");
  1282.                         }
  1283.                         GameObject *Search_Obj_02 = Commands->Find_Object(474463);
  1284.                         if(Search_Obj_02 && Commands->Get_Building_Power(Search_Obj_02) && Commands->Get_Health(Search_Obj_02) > 0.0)
  1285.                         {
  1286.                             GameObject *Apache = Commands->Create_Object("Nod_Apache", Vector3(138.360001, -0.798750, -0.368750));
  1287.                             if(Apache)
  1288.                             {
  1289.                                 Commands->Set_Facing(Apache, -0.054688);
  1290.                                 Commands->Attach_Script(Apache, "M02_Nod_Apache", "0");
  1291.                             }
  1292.                         }
  1293.                         GameObject *SearchObj1 = Commands->Find_Object(400286);
  1294.                         Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  1295.                         GameObject *SearchObj2 = Commands->Find_Object(400287);
  1296.                         Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  1297.                         GameObject *SearchObj3 = Commands->Find_Object(400288);
  1298.                         Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  1299.                         GameObject *SearchObj4 = Commands->Find_Object(400292);
  1300.                         Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  1301.                         GameObject *SearchObj5 = Commands->Find_Object(400293);
  1302.                         Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  1303.                         GameObject *SearchObj6 = Commands->Find_Object(400285);
  1304.                         Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  1305.                         GameObject *SearchObj7 = Commands->Find_Object(400206);
  1306.                         Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  1307.                         GameObject *SearchObj8 = Commands->Find_Object(401004);
  1308.                         Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  1309.                         GameObject *SearchObj9 = Commands->Find_Object(401005);
  1310.                         Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
  1311.                         GameObject *SearchObj10 = Commands->Find_Object(401006);
  1312.                         Commands->Send_Custom_Event(obj, SearchObj10, 0, 0, 0);
  1313.                     }
  1314.                     else
  1315.                     {
  1316.                         if(ObjID == 301601)
  1317.                         {
  1318.                             Vector3 Pos = Commands->Get_Position(obj);
  1319.                             GameObject *Star = Commands->Get_A_Star(Pos);
  1320.                             if(Commands->Has_Key(Star, 6, false)) // Something like this?
  1321.                                 return;
  1322.                             Commands->Stop_All_Conversations();
  1323.                             int M02_BAY_DOOR_WARNING = Commands->Create_Conversation("M02_BAY_DOOR_WARNING", 100,  300, true);
  1324.                             Commands->Join_Conversation(0, M02_BAY_DOOR_WARNING, true, true, true);
  1325.                             Commands->Join_Conversation(Star, M02_BAY_DOOR_WARNING, true, false, false);
  1326.                             Commands->Start_Conversation(M02_BAY_DOOR_WARNING, 0);
  1327.                         }
  1328.                         else
  1329.                         {
  1330.                             if(ObjID != 303203)
  1331.                             {
  1332.                                 if(ObjID == 304006)
  1333.                                 {
  1334.                                     if(!Unknown3)
  1335.                                     {
  1336.                                         Unknown3 = 1;
  1337.                                         int MX2DSGN_DSGN0001 = Commands->Create_Conversation("MX2DSGN_DSGN0001", 100, 300, true);
  1338.                                         Commands->Join_Conversation(0, MX2DSGN_DSGN0001, true, true, true);
  1339.                                         Vector3 Pos = Commands->Get_Position(obj);
  1340.                                         GameObject *Star = Commands->Get_A_Star(Pos);
  1341.                                         Commands->Join_Conversation(Star, MX2DSGN_DSGN0001, true, false, false);
  1342.                                         Commands->Start_Conversation(MX2DSGN_DSGN0001, 0);
  1343.                                         Commands->Set_HUD_Help_Text(8287, Vector3(0.196000, 0.882000, 0.196000));
  1344.                                     }
  1345.                                 }
  1346.                                 return;
  1347.                             }
  1348.                             Commands->Stop_All_Conversations();
  1349.                             int M02_PRIMARY_03_GUIDE = Commands->Create_Conversation("M02_PRIMARY_03_GUIDE", 100, 300, true);
  1350.                             Commands->Join_Conversation(0, M02_PRIMARY_03_GUIDE, true, true, true);
  1351.                             Vector3 Pos = Commands->Get_Position(obj);
  1352.                             GameObject *Star = Commands->Get_A_Star(Pos);
  1353.                             Commands->Join_Conversation(Star, M02_PRIMARY_03_GUIDE, true, false, false);
  1354.                             Commands->Start_Conversation(M02_PRIMARY_03_GUIDE, 0);
  1355.                         }
  1356.                     }
  1357.                     Commands->Destroy_Object(obj);
  1358.                     return;
  1359.                 }
  1360.                 if(!(ObjID - 400185))
  1361.                 {
  1362.                     Commands->Send_Custom_Event(obj, SearchObj, 208, 0, 0);
  1363.                     Commands->Send_Custom_Event(obj, SearchObj, 209, 0, 0);
  1364.                     Commands->Send_Custom_Event(obj, SearchObj, 104, 1, 0);
  1365.                     Commands->Send_Custom_Event(obj, SearchObj, 112, 1, 0);
  1366.                     Commands->Send_Custom_Event(obj, SearchObj, 111, 1, 0);
  1367.                     Vector3 Pos = Commands->Get_Position(obj);
  1368.                     Commands->Create_Logical_Sound(obj, 1100, Pos, 1000.000000);
  1369.                     Commands->Create_Logical_Sound(obj, 1073, Pos, 1000.000000);
  1370.                     GameObject *SearchObj1 = Commands->Find_Object(400342);
  1371.                     Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  1372.                     GameObject *SearchObj2 = Commands->Find_Object(400343);
  1373.                     Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  1374.                     GameObject *SearchObj3 = Commands->Find_Object(400347);
  1375.                     Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  1376.                     GameObject *SearchObj4 = Commands->Find_Object(400332);
  1377.                     Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  1378.                     GameObject *SearchObj5 = Commands->Find_Object(400340);
  1379.                     Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  1380.                     GameObject *SearchObj6 = Commands->Find_Object(400348);
  1381.                     Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  1382.                     GameObject *SearchObj7 = Commands->Find_Object(400344);
  1383.                     Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  1384.                     GameObject *SearchObj8 = Commands->Find_Object(400345);
  1385.                     Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  1386.                     GameObject *SearchObj9 = Commands->Find_Object(400333);
  1387.                     Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
  1388.                     GameObject *SearchObj10 = Commands->Find_Object(400207);
  1389.                     Commands->Send_Custom_Event(obj, SearchObj10, 0, 0, 0);
  1390.                     GameObject *SearchObj11 = Commands->Find_Object(400371);
  1391.                     Commands->Send_Custom_Event(obj, SearchObj11, 0, 0, 0);
  1392.                     GameObject *SearchObj12 = Commands->Find_Object(401008);
  1393.                     Commands->Send_Custom_Event(obj, SearchObj12, 0, 0, 0);
  1394.                     Commands->Destroy_Object(obj);
  1395.                     return;
  1396.                 }
  1397.                 if(!(ObjID - 400186))
  1398.                 {
  1399.                     Commands->Send_Custom_Event(obj, SearchObj, 210, 0, 0);
  1400.                     Commands->Send_Custom_Event(obj, SearchObj, 221, 0, 0);
  1401.                     Commands->Send_Custom_Event(obj, SearchObj, 105, 1, 0);
  1402.                     Commands->Send_Custom_Event(obj, SearchObj, 104, 2, 0);
  1403.                     Vector3 Pos = Commands->Get_Position(obj);
  1404.                     Commands->Create_Logical_Sound(obj, 1051, Pos, 1000.000000);
  1405.                     GameObject *SearchObj1 = Commands->Find_Object(400372);
  1406.                     Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  1407.                     GameObject *SearchObj2 = Commands->Find_Object(400373);
  1408.                     Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  1409.                     GameObject *SearchObj3 = Commands->Find_Object(400374);
  1410.                     Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  1411.                     GameObject *SearchObj4 = Commands->Find_Object(401167);
  1412.                     Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  1413.                     GameObject *SearchObj5 = Commands->Find_Object(400208);
  1414.                     Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  1415.                     GameObject *SearchObj6 = Commands->Find_Object(401014);
  1416.                     Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  1417.                     GameObject *SearchObj7 = Commands->Find_Object(401015);
  1418.                     Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  1419.                     GameObject *SearchObj8 = Commands->Find_Object(401016);
  1420.                     Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  1421.                     GameObject *SearchObj9 = Commands->Find_Object(401017);
  1422.                     Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
  1423.                     GameObject *Buggy = Commands->Create_Object("Nod_Buggy", Vector3(674.622009, 308.295990, -0.067043));
  1424.                     if(Buggy)
  1425.                     {
  1426.                         Commands->Set_Facing(Buggy, -0.049805);
  1427.                         Commands->Attach_Script(Buggy, "M02_Nod_Vehicle", "2");
  1428.                     }
  1429.                     GameObject *SearchObj_02 = Commands->Find_Object(474463);
  1430.                     if(SearchObj_02 && Commands->Get_Building_Power(SearchObj_02) && Commands->Get_Health(SearchObj_02) > 0.0)
  1431.                     {
  1432.                         GameObject *Apache = Commands->Create_Object("Nod_Apache", Vector3(509.362000, 473.582001, -0.109375));
  1433.                         if(Apache)
  1434.                         {
  1435.                             Commands->Set_Facing(Apache, 0);
  1436.                             Commands->Attach_Script(Apache, "M02_Nod_Sakura", "2");
  1437.                         }
  1438.                     }
  1439.                     Commands->Destroy_Object(obj);
  1440.                     return;
  1441.                 }
  1442.                 if(!(ObjID - 400187))
  1443.                 {
  1444.                     Commands->Send_Custom_Event(obj, SearchObj, 211, 0, 0);
  1445.                     Commands->Send_Custom_Event(obj, SearchObj, 105, 3, 0);
  1446.                     Commands->Send_Custom_Event(obj, SearchObj, 104, 4, 0);
  1447.                     Vector3 Pos = Commands->Get_Position(obj);
  1448.                     Commands->Create_Logical_Sound(obj, 1102, Pos, 1000.000000);
  1449.                     Commands->Create_Logical_Sound(obj, 1053, Pos, 1000.000000);
  1450.                     GameObject *SearchObj1 = Commands->Find_Object(400210);
  1451.                     Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  1452.                     GameObject *SearchObj2 = Commands->Find_Object(400451);
  1453.                     Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  1454.                     GameObject *SearchObj3 = Commands->Find_Object(400452);
  1455.                     Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  1456.                     GameObject *SearchObj4 = Commands->Find_Object(400453);
  1457.                     Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  1458.                     GameObject *SearchObj5 = Commands->Find_Object(400499);
  1459.                     Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  1460.                     GameObject *SearchObj6 = Commands->Find_Object(400500);
  1461.                     Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  1462.                     GameObject *SearchObj7 = Commands->Find_Object(401025);
  1463.                     Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  1464.                     GameObject *SearchObj8 = Commands->Find_Object(401026);
  1465.                     Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  1466.                     GameObject *SearchObj9 = Commands->Find_Object(401027);
  1467.                     Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
  1468.                     GameObject *SearchObj10 = Commands->Find_Object(401028);
  1469.                     Commands->Send_Custom_Event(obj, SearchObj10, 0, 0, 0);
  1470.                     Commands->Send_Custom_Event(obj, SearchObj, 112, 4, 0);
  1471.                     Commands->Send_Custom_Event(obj, SearchObj, 111, 4, 0);
  1472.                     GameObject *Buggy = Commands->Create_Object("Nod_Buggy", Vector3(366.209015, 861.401001, 6.488000));
  1473.                     if(Buggy)
  1474.                     {
  1475.                         Commands->Set_Facing(Buggy, -0.040039);
  1476.                         Commands->Attach_Script(Buggy, "M02_Nod_Vehicle", "4");
  1477.                     }
  1478.                     GameObject *SearchObj_02 = Commands->Find_Object(401018);
  1479.                     Commands->Send_Custom_Event(obj, SearchObj_02, 0, 0, 0);
  1480.                     Commands->Start_Timer(obj, this, 0.100000, 10);
  1481.                     GameObject *SearchObj_03 = Commands->Find_Object(400267);
  1482.                     if(SearchObj_03)
  1483.                         Commands->Destroy_Object(SearchObj_03);
  1484.                     Commands->Destroy_Object(obj);
  1485.                     return;
  1486.                 }
  1487.             }
  1488.             switch(ObjID)
  1489.             {
  1490.                 case 400189:
  1491.                     Commands->Send_Custom_Event(obj, SearchObj, 215, 0, 0);
  1492.                     Commands->Send_Custom_Event(obj, SearchObj, 216, 0, 0);
  1493.                     Commands->Send_Custom_Event(obj, SearchObj, 104, 6, 0);
  1494.                     GameObject *SearchObj1 = Commands->Find_Object(400211);
  1495.                     Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  1496.                     GameObject *SearchObj2 = Commands->Find_Object(400976);
  1497.                     Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  1498.                     GameObject *SearchObj3 = Commands->Find_Object(400975);
  1499.                     Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  1500.                     GameObject *SearchObj4 = Commands->Find_Object(400977);
  1501.                     Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  1502.                     GameObject *SearchObj5 = Commands->Find_Object(400978);
  1503.                     Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  1504.                     GameObject *SearchObj6 = Commands->Find_Object(400979);
  1505.                     Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  1506.                     GameObject *SearchObj7 = Commands->Find_Object(400980);
  1507.                     Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  1508.                     GameObject *SearchObj8 = Commands->Find_Object(401036);
  1509.                     Commands->Send_Custom_Event(obj, SearchObj8, 0, 0, 0);
  1510.                     GameObject *SearchObj9 = Commands->Find_Object(401037);
  1511.                     Commands->Send_Custom_Event(obj, SearchObj9, 0, 0, 0);
  1512.                     GameObject *SearchObj10 = Commands->Find_Object(401038);
  1513.                     Commands->Send_Custom_Event(obj, SearchObj10, 0, 0, 0);
  1514.                     GameObject *SearchObj11 = Commands->Find_Object(401045);
  1515.                     Commands->Send_Custom_Event(obj, SearchObj11, 0, 0, 0);
  1516.                     Commands->Destroy_Object(obj);
  1517.                     return;
  1518.                 case 400192:
  1519.                     Commands->Send_Custom_Event(obj, SearchObj, 105, 11, 0);
  1520.                     Commands->Create_Logical_Sound(obj, 1061, Commands->Get_Position(obj), 1000.000000);
  1521.                     Commands->Destroy_Object(obj);
  1522.                     return;
  1523.                 case 400193:
  1524.                     GameObject *CinObject = Commands->Create_Object("Invisible_Object", Vector3(0,0,0));
  1525.                     if(CinObject)
  1526.                     {
  1527.                         Vector3 Pos = Commands->Get_Position(obj);
  1528.                         GameObject *Star = Commands->Get_A_Star(Pos);
  1529.                         Commands->Control_Enable(Star, false);
  1530.                         Commands->Start_Timer(obj, this, 1, 9);
  1531.                         Commands->Send_Custom_Event(obj, SearchObj, 1000, 1002, 25.000000);
  1532.                         Commands->Attach_Script(CinObject, "Test_Cinematic", "X2K_Midtro.txt");
  1533.                     }
  1534.                     return;
  1535.                 case 400194:
  1536.                     if(!Unknown3)
  1537.                     {
  1538.                         Unknown3 = 1;
  1539.                         Commands->Send_Custom_Event(obj, SearchObj, 205, 1, 0);
  1540.                         Commands->Mission_Complete(true);
  1541.                         Commands->Send_Custom_Event(obj, SearchObj, 105, 21, 0);
  1542.                     }
  1543.                     return;
  1544.                 case 400195:
  1545.                     Unknown4 = 1;
  1546.                     Commands->Create_Logical_Sound(obj, 1000, Commands->Get_Position(obj), 1000.000000);
  1547.                     Commands->Start_Timer(obj, this, 1, 3);
  1548.                     break;
  1549.                 case 400196:
  1550.                     Unknown4 = 1;
  1551.                     Commands->Create_Logical_Sound(obj, 1000, Commands->Get_Position(obj), 1000.000000);
  1552.                     Commands->Start_Timer(obj, this, 1, 4);
  1553.                     break;
  1554.                 default:
  1555.                     return;
  1556.             }
  1557.         }
  1558.     }
  1559.     return;
  1560. }
  1561.  
  1562. void M02_Objective_Zone::Timer_Expired(GameObject *obj,int number)
  1563. {
  1564.     if(number == 3)
  1565.     {
  1566.         if(Unknown4)
  1567.         {
  1568.             GameObject *SearchObj = Commands->Find_Object(1111112);
  1569.             if(SearchObj)
  1570.             {
  1571.                 Commands->Send_Custom_Event(obj, SearchObj, 207, 1, 0);
  1572.                 Unknown4 = 0;
  1573.                 Commands->Send_Custom_Event(obj, SearchObj, 111, 0, 0);
  1574.                 Commands->Create_Logical_Sound(obj, 1100, Commands->Get_Position(obj), 1000.000000);
  1575.                 Commands->Destroy_Object(obj);
  1576.             }
  1577.             return;
  1578.         }
  1579.         if(!Unknown1)
  1580.         {
  1581.             Unknown1 = 1;
  1582.             Commands->Stop_All_Conversations();
  1583.             int M02_EVAG_SECURE_WARNING = Commands->Create_Conversation("M02_EVAG_SECURE_WARNING", 100, 300, true);
  1584.             Commands->Join_Conversation(0, M02_EVAG_SECURE_WARNING, true, true, true);
  1585.             Vector3 Pos = Commands->Get_Position(obj);
  1586.             GameObject *Star = Commands->Get_A_Star(Pos);
  1587.             Commands->Join_Conversation(Star, M02_EVAG_SECURE_WARNING, true, false, false);
  1588.             Commands->Start_Conversation(M02_EVAG_SECURE_WARNING, 0);
  1589.             return;
  1590.         }
  1591.     }
  1592.     if(number >= 4 && number <= 7)
  1593.     {
  1594.         if(!Unknown4)
  1595.         {
  1596.             if(!Unknown1)
  1597.             {
  1598.                 Unknown1 = 1;
  1599.                 Commands->Stop_All_Conversations();
  1600.                 int M02_EVAG_SECURE_WARNING = Commands->Create_Conversation("M02_EVAG_SECURE_WARNING", 100, 300, true);
  1601.                 Commands->Join_Conversation(0, M02_EVAG_SECURE_WARNING, true, true, true);
  1602.                 Vector3 Pos = Commands->Get_Position(obj);
  1603.                 GameObject *Star = Commands->Get_A_Star(Pos);
  1604.                 Commands->Join_Conversation(Star, M02_EVAG_SECURE_WARNING, true, false, false);
  1605.                 Commands->Start_Conversation(M02_EVAG_SECURE_WARNING, 0);
  1606.             }
  1607.         }
  1608.         GameObject *SearchObj = Commands->Find_Object(1111112);
  1609.         if(SearchObj)
  1610.         {
  1611.             Commands->Send_Custom_Event(obj, SearchObj, 208 + number - 4, 1, 0);
  1612.             Commands->Destroy_Object(obj);
  1613.             return;
  1614.         }
  1615.     }
  1616.     if(number == 9)
  1617.     {
  1618.         GameObject *Jet = Commands->Create_Object("Nod_Jet", Vector3(1190.267944, 558.538025, 32.500000));
  1619.         if(Jet)
  1620.             Commands->Attach_Script(Jet, "M02_Nod_Jet_Waypath", "");
  1621.         GameObject *SearchObj = Commands->Find_Object(1111112);
  1622.         if(SearchObj)
  1623.         {
  1624.             Vector3 Pos = Commands->Get_Position(obj);
  1625.             GameObject *Star = Commands->Get_A_Star(Pos);
  1626.             Commands->Control_Enable(Star, true);
  1627.             ActionParamsStruct Params;
  1628.             Params.Set_Basic(this, 100, 0);
  1629.             // I have no idea what should be done here.
  1630.             Commands->Action_Follow_Input(Star, Params);
  1631.             Commands->Send_Custom_Event(obj, SearchObj, 201, 1, 0);
  1632.             Commands->Send_Custom_Event(obj, SearchObj, 205, 0, 0);
  1633.             Commands->Send_Custom_Event(obj, SearchObj, 104, 21, 0);
  1634.             GameObject *SearchObj1 = Commands->Find_Object(400277);
  1635.             Commands->Send_Custom_Event(obj, SearchObj1, 0, 0, 0);
  1636.             GameObject *SearchObj2 = Commands->Find_Object(401141);
  1637.             Commands->Send_Custom_Event(obj, SearchObj2, 0, 0, 0);
  1638.             GameObject *SearchObj3 = Commands->Find_Object(401142);
  1639.             Commands->Send_Custom_Event(obj, SearchObj3, 0, 0, 0);
  1640.             GameObject *SearchObj4 = Commands->Find_Object(401143);
  1641.             Commands->Send_Custom_Event(obj, SearchObj4, 0, 0, 0);
  1642.             GameObject *SearchObj5 = Commands->Find_Object(401144);
  1643.             Commands->Send_Custom_Event(obj, SearchObj5, 0, 0, 0);
  1644.             GameObject *SearchObj6 = Commands->Find_Object(401145);
  1645.             Commands->Send_Custom_Event(obj, SearchObj6, 0, 0, 0);
  1646.             GameObject *SearchObj7 = Commands->Find_Object(401146);
  1647.             Commands->Send_Custom_Event(obj, SearchObj7, 0, 0, 0);
  1648.             GameObject *Mendoza = Commands->Create_Object("Nod_FlameThrower_3Boss", Vector3(1260.006958, 535.460022, 18.427999));
  1649.             if(Mendoza)
  1650.             {
  1651.                 Commands->Attach_Script(Mendoza, "M02_Mendoza", "");
  1652.                 Unknown2 = Commands->Get_ID(Mendoza);
  1653.                 GameObject *SearchObj_02 = Commands->Find_Object(400194);
  1654.                 if(SearchObj_02)
  1655.                     Commands->Send_Custom_Event(obj, SearchObj_02, 999, Unknown2, 0);
  1656.             }
  1657.             Commands->Destroy_Object(obj);
  1658.         }
  1659.     }
  1660.     if(number == 10)
  1661.     {
  1662.         GameObject *SearchObj = Commands->Find_Object(401028);
  1663.         if(SearchObj)
  1664.         {
  1665.             Vector3 Pos = Commands->Get_Position(obj);
  1666.             GameObject *Star = Commands->Get_A_Star(Pos);
  1667.             Vector3 StarPos = Commands->Get_Position(Star);
  1668.             if(Commands->Get_Distance(Pos, StarPos) >= 20.0)
  1669.                 Commands->Start_Timer(obj, this, 2, 10);
  1670.             else
  1671.             {
  1672.                 int MX2DSGN_DSGN0009 = Commands->Create_Conversation("MX2DSGN_DSGN0009", 100, 300, true);
  1673.                 Commands->Join_Conversation(0, MX2DSGN_DSGN0009, true, true, true);
  1674.                 Vector3 Pos = Commands->Get_Position(obj);
  1675.                 GameObject *Star = Commands->Get_A_Star(Pos);
  1676.                 Commands->Join_Conversation(Star, MX2DSGN_DSGN0009, true, false, false);
  1677.                 Commands->Start_Conversation(MX2DSGN_DSGN0009, 0);
  1678.             }
  1679.         }
  1680.     }
  1681.     if(number == 11)
  1682.     {
  1683.         GameObject *SearchObj = Commands->Find_Object(401028);
  1684.         if(SearchObj)
  1685.         {
  1686.             int MX2DSGN_DSGN0010 = Commands->Create_Conversation("MX2DSGN_DSGN0010", 100, 300, true);
  1687.             Commands->Join_Conversation(0, MX2DSGN_DSGN0010, true, true, true);
  1688.             Vector3 Pos = Commands->Get_Position(obj);
  1689.             GameObject *Star = Commands->Get_A_Star(Pos);
  1690.             Commands->Join_Conversation(Star, MX2DSGN_DSGN0010, true, false, false);
  1691.             Commands->Start_Conversation(MX2DSGN_DSGN0010, 0);
  1692.         }
  1693.     }
  1694.     if(number == 12 && Commands->Find_Object(401036))
  1695.     {
  1696.         int MX2DSGN_DSGN0011 = Commands->Create_Conversation("MX2DSGN_DSGN0011", 100, 300, true);
  1697.         Commands->Join_Conversation(0, MX2DSGN_DSGN0011, true, true, true);
  1698.         Vector3 Pos = Commands->Get_Position(obj);
  1699.         GameObject *Star = Commands->Get_A_Star(Pos);
  1700.         Commands->Join_Conversation(Star, MX2DSGN_DSGN0011, true, false, false);
  1701.         Commands->Start_Conversation(MX2DSGN_DSGN0011, 0);
  1702.     }
  1703. }
  1704.  
  1705. void M02_Objective_Zone::Custom(GameObject *obj,int type,int param,GameObject *sender)
  1706. {
  1707.     if(type == 100 && param == 1)
  1708.         Unknown4 = 0;
  1709.     if(type == 999)
  1710.     {
  1711.         if(param == 999)
  1712.         {
  1713.             GameObject *Mendoza = Commands->Find_Object(Unknown2);
  1714.             if(Mendoza)
  1715.             {
  1716.                 Unknown2 = 0;
  1717.                 Commands->Destroy_Object(Mendoza);
  1718.             }
  1719.         }
  1720.         else
  1721.             Unknown2 = a4;
  1722.     }
  1723. }
  1724.  
  1725. void M02_Objective_Zone::unknown(int a1)
  1726. {
  1727.     // I'm sorry but i was unable to find out what script event this is. The first parameter (a1) is usually a this pointer, the second parameter (a2) is usually a GameObject *obj. The others are for you to guess.. Sometimes there are more variables than the function suggests.
  1728.     Vector3 Pos = Vector3(0,0,0);
  1729.     float Facing = 0;
  1730.     if(a1 == 2)
  1731.     {
  1732.         Pos = Vector3(664.700012, 312.570007, -0.070996);
  1733.         Facing = -0.028564;
  1734.     }
  1735.     else if(a1 == 9)
  1736.     {
  1737.         Pos = Vector3(869.320007, 912.315979, 30.150000);
  1738.         Facing = 110.000000;
  1739.     }
  1740.     else
  1741.     {
  1742.         Pos = Vector3(-0.418750, -0.178906, -0.112891);
  1743.         Facing = 70.500000;
  1744.     }
  1745.     GameObject *CinObject = Create_Object("Invisible_Object", Pos);
  1746.     if(CinObject)
  1747.     {
  1748.         Commands->Set_Facing(CinObject, Facing);
  1749.         Commands->Attach_Script(CinObject, "Test_Cinematic", "X2I_GDI_Drop02_Rocket.txt");
  1750.     }
  1751. }
  1752.  
  1753. class M02_Reset_Spawn : public ScriptImpClass
  1754. {
  1755.     void Created(GameObject *obj);
  1756. };
  1757.  
  1758. void M02_Reset_Spawn::Created(GameObject *obj)
  1759. {
  1760.     GameObject *SearchObj = Commands->Find_Object(1111112);
  1761.     if(SearchObj)
  1762.     {
  1763.         int Area_ID = Get_Int_Parameter("Area_ID");
  1764.         int Spawn_Type = Get_Int_Parameter("Spawn_Type");
  1765.         Commands->Send_Custom_Event(obj, SearchObj, Spawn_Type, Area_ID, 0);
  1766.     }
  1767. }
  1768.  
  1769. class M02_Nod_Soldier : public ScriptImpClass
  1770. {
  1771.     void Register_Auto_Save_Variables();
  1772.     void Created(GameObject *obj);
  1773.     void Timer_Expired(GameObject *obj, int number);
  1774.     void Custom(GameObject *obj,int type,int param,GameObject *sender);
  1775.     void Damaged(GameObject *obj,GameObject *damager,float amount);
  1776.     int UnknownVar;
  1777.     int AnimSwitcher;
  1778.     bool StarAttackingStarted;
  1779.     bool AttackStar;
  1780.     bool FallingDmgTriggered;
  1781.     float MaxHealth;
  1782. };
  1783.  
  1784. void M02_Nod_Soldier::Register_Auto_Save_Variables()
  1785. {
  1786.     Auto_Save_Variable(&UnknownVar, 12, 1);
  1787.     Auto_Save_Variable(&StarAttackingStarted, 1, 2);
  1788.     Auto_Save_Variable(&AnimSwitcher, 4, 3);
  1789.     Auto_Save_Variable(&FallingDmgTriggered 1, 4);
  1790.     Auto_Save_Variable(&MaxHealth, 4, 5);
  1791.     Auto_Save_Variable(&AttackStar, 1, 6);
  1792. }
  1793.  
  1794. void M02_Nod_Soldier::Created(GameObject *obj)
  1795. {
  1796.     AnimSwitcher = 0;
  1797.     StarAttackingStarted = false;
  1798.     AttackStar = false;
  1799.     FallingDmgTriggered = false;
  1800.     MaxHealth = 0;
  1801.     Vector3 Pos = Commands->Get_Position(obj);
  1802.     Commands->Set_Innate_Soldier_Home_Location(obj, Pos, 20);
  1803.     Commands->Enable_Hibernation(obj, false);
  1804.     Commands->Start_Timer(obj, this, 1, 1);
  1805.     int Pre_Placed = Get_Int_Parameter("Pre_Placed");
  1806.     if(Pre_Placed)
  1807.         Commands->Innate_Disable(obj);
  1808.     else
  1809.     {
  1810.         Commands->Grant_Key(obj, 1, true);
  1811.         GameObject *Star = Commands->Get_A_Star(Pos);
  1812.         if(Star)
  1813.         {
  1814.             ActionParamsStruct Params;
  1815.             Params.Set_Basic(this, 71, 0);
  1816.             Params.Set_Movement(Star, 0.800000, 5.000000);
  1817.             // The following numbers are used but idk where they belong:
  1818.             // 4 times 1.
  1819.             // 1101004800 OR 20.0000000
  1820.             // 1073741824 OR 2.000000
  1821.             // And a bunch of zeros
  1822.             Commands->Action_Goto(obj, Params);
  1823.         }
  1824.     }
  1825. }
  1826.  
  1827. void M02_Nod_Soldier::Timer_Expired(GameObject *obj, int number)
  1828. {
  1829.     if(number == 1)
  1830.     {
  1831.         int Area_Officer = Get_Int_Parameter("Area_Officer");
  1832.         int Pre_Placed = Get_Int_Parameter("Pre_Placed");
  1833.         int Area_Number = Get_Int_Parameter("Area_Number");
  1834.         GameObject *SearchObj = Commands->Find_Object(1111112);
  1835.         if(SearchObj)
  1836.         {
  1837.             Commands->Send_Custom_Event(obj, SearchObj, 103, Area_Number, 0);
  1838.             if(Area_Officer)
  1839.             {
  1840.                 Commands->Set_Innate_Take_Cover_Probability(obj, 100);
  1841.                 Commands->Send_Custom_Event(obj, SearchObj, 106, Area_Number, 0);
  1842.                 Commands->Enable_Hibernation(obj, true);
  1843.             }
  1844.             else
  1845.             {
  1846.                 if(!Pre_Placed)
  1847.                     Commands->Start_Timer(obj, this, 15, 2);
  1848.                 else if(Pre_Placed == 4)
  1849.                 {
  1850.                     Commands->Attach_Script(obj, "M00_Soldier_Powerup_Disable", "");
  1851.                     if ( !Area_Number || Area_Number == 3 || Area_Number == 6 || Area_Number == 10 || Area_Number == 16 || Area_Number == 21 )
  1852.                     {
  1853.                         StarAttackingStarted = true;
  1854.                         Commands->Start_Timer(obj, this, 15, 4);
  1855.                     }
  1856.                 }
  1857.                 else f(Pre_Placed == 2)
  1858.                 {
  1859.                     if(Area_Number == 99)
  1860.                         Commands->Start_Timer(obj, this, 5, 6);
  1861.                 }
  1862.             }
  1863.         }
  1864.     }
  1865.     else if(number == 2)
  1866.     {
  1867.         Vector3 Pos = Commands->Get_Position(obj);
  1868.         GameObject *Star = Commands->Get_A_Star(Pos);
  1869.         if(Star)
  1870.         {
  1871.             ActionParamsStruct Params;
  1872.             Vector3 StarPos = Commands->Get_Position(Star);
  1873.             if(Commands->Get_Distance(Pos, StarPos) <= 70)
  1874.             {
  1875.                 GameObject *Star2 = Commands->Get_A_Star(Pos);
  1876.                 if(Commands->Is_Performing_Pathfind_Action(obj) || !Star2)
  1877.                 {
  1878.                     Commands->Start_Timer(obj, this, 5, 2);
  1879.                     return;
  1880.                 }
  1881.                 Params.Set_Basic(this, 90, 0);
  1882.                 Params.Set_Movement(Star2, 0.800000, 10.000000);
  1883.                 Params.Set_Attack(Star2, 150.000000, 0, true);
  1884.             }
  1885.             else
  1886.             {
  1887.                 if(!Commands->Is_Object_Visible(Star, obj))
  1888.                 {
  1889.                     Commands->Apply_Damage(obj, 10000, "Blamokiller", 0);
  1890.                     Commands->Start_Timer(obj, this, 5, 2);
  1891.                     return;
  1892.                 }
  1893.                 GameObject *Star2 = Commands->Get_A_Star(Pos);
  1894.                 if(Commands->Is_Performing_Pathfind_Action(obj) || !Star2)
  1895.                 {
  1896.                     Commands->Start_Timer(obj, this, 5, 2);
  1897.                     return;
  1898.                 }
  1899.                 Params.Set_Basic(this, 90, 0);
  1900.                 Params.Set_Movement(Star2, 0.800000, 10.0000000);
  1901.                 Params.Set_Attack(Star2, 150.000000, 0, true);
  1902.             }
  1903.             Commands->Action_Attack(obj, Params);
  1904.         }
  1905.     }
  1906.     else if(number == 3)
  1907.     {
  1908.         if(!Commands->Is_Performing_Pathfind_Action(obj))
  1909.         {
  1910.             Vector3 Pos = Commands->Get_Position(obj);
  1911.             GameObject *Star = Commands->Get_A_Star(Pos);
  1912.             if(Star)
  1913.             {
  1914.                 ActionParamsStruct Params;
  1915.                 Params.Set_Basic(this, 90, 0);
  1916.                 Params.Set_Movement(Star, 0.800000, 10.0000000);
  1917.                 Params.Set_Attack(Star, 150.000000, 0, true);
  1918.                 Commands->Action_Attack(obj, Params);
  1919.             }
  1920.         }
  1921.     }
  1922.     else if(number == 4)
  1923.     {
  1924.         Vector3 Pos = Commands->Get_Position(obj);
  1925.         GameObject *Star = Commands->Get_A_Star(Pos);
  1926.         if(Star)
  1927.         {
  1928.             Vector3 StarPos = Commands->Get_Position(Star);
  1929.             if(Commands->Get_Distance(Pos, StarPos) < 150.0)
  1930.             {
  1931.                 ActionParamsStruct Params;
  1932.                 Params.Set_Basic(this, 90, 0);
  1933.                 Params.Set_Attack(Star, 150.00000, 0, true);
  1934.                 // The following numbers are used but idk where they belong:
  1935.                 // 4 times 1.
  1936.                 // 1065353216; OR 1
  1937.                 // 1073741824 OR 2
  1938.                 // 2 times 0.0
  1939.                 // And a bunch of zeros
  1940.                 Commands->Action_Attack(obj, Params);
  1941.             }
  1942.         }
  1943.         Commands->Start_Timer(obj, this, 15, 4);
  1944.     }
  1945.     else if(number == 5)
  1946.     {
  1947.         Vector3 Pos = Commands->Get_Position(obj);
  1948.         GameObject *Star = Commands->Get_A_Star(Pos);
  1949.         Vector3 StarPos = Commands->Get_Position(Star);
  1950.         if(Commands->Get_Distance(StarPos, Pos) > 10.0 && !Commands->Is_Performing_Pathfind_Action(obj))
  1951.         {
  1952.             AnimSwitcher++;
  1953.             if(AnimSwitcher > 2)
  1954.                 AnimSwitcher = 0;
  1955.             if(AnimSwitcher == 1)
  1956.             {
  1957.                 if(Commands->Get_A_Star(Pos))
  1958.                 {
  1959.                     ActionParamsStruct Params;
  1960.                     Params.Set_Basic(this, 99, 0);
  1961.                     Params.Set_Animation("H_A_J23C", false);
  1962.                     // The following numbers are used but idk where they belong:
  1963.                     // 5 times 1.
  1964.                     // 1065353216 OR 1
  1965.                     // 1101004800 OR 20
  1966.                     // 1082130432 OR 4
  1967.                     // 1 time 0.0
  1968.                     // And a bunch of zeros
  1969.                     Commands->Action_Play_Animation(obj, Params);
  1970.                     Commands->Start_Timer(obj, this, 10, 5);
  1971.                     return;
  1972.                 }
  1973.             }
  1974.             else
  1975.             {
  1976.                 if (Commands->Get_A_Star(Pos))
  1977.                 {
  1978.                     ActionParamsStruct Params;
  1979.                     Params.Set_Basic(this, 99, 0);
  1980.                     Params.Set_Animation("H_A_J27C", false);
  1981.                     // The following numbers are used but idk where they belong:
  1982.                     // 5 times 1.
  1983.                     // 1065353216 OR 1
  1984.                     // 1101004800 OR 20
  1985.                     // 1082130432 OR 4
  1986.                     // 1 time 0.0
  1987.                     // And a bunch of zeros
  1988.                     Commands->Action_Play_Animation(obj, Params);
  1989.                     Commands->Start_Timer(obj, this, 10, 5);
  1990.                     return;
  1991.                 }
  1992.             }
  1993.         }
  1994.         else
  1995.         {
  1996.             GameObject *Soldier = Commands->Find_Closest_Soldier(Pos, 1.000000, 50.000000, true);
  1997.             if(Soldier)
  1998.             {
  1999.                 if(Soldier != Commands->Get_A_Star(Pos))
  2000.                 {
  2001.                     ActionParamsStruct Params;
  2002.                     Params.Set_Basic(this, 99, 0 );
  2003.                     Params.Set_Animation("H_A_J27C", false);
  2004.                     // The following numbers are used but idk where they belong:
  2005.                     // 6 times 1.
  2006.                     // 1065353216 OR 1
  2007.                     // 1101004800 OR 20
  2008.                     // 1082130432 OR 4
  2009.                     // 1 time 0.0
  2010.                     // And a bunch of zeros
  2011.                     Commands->Action_Play_Animation(obj, Params);
  2012.                 }
  2013.             }
  2014.         }
  2015.         Commands->Start_Timer(obj, this, 10, 5)
  2016.     }
  2017.     else if(number == 6)
  2018.         Commands->Apply_Damage(obj, 10000, "Blamokiller", 0);
  2019.     else if(number == 7)
  2020.     {
  2021.         if(AttackStar)
  2022.         {
  2023.             if(!Commands->Is_Performing_Pathfind_Action(obj))
  2024.             {
  2025.                 Vector3 Pos = Commands->Get_Position(obj);
  2026.                 GameObject *Star = Commands->Get_A_Star(Pos);
  2027.                 if(Star)
  2028.                 {
  2029.                     ActionParamsStruct Params;
  2030.                     Params.Set_Basic(this, 90, 0);
  2031.                     Params.Set_Attack(Star, 150.000000, 0, true);
  2032.                     // The following numbers are used but idk where they belong:
  2033.                     // 1061997773; OR 0.800000
  2034.                     // 1092616192 OR 10.000000
  2035.                     // some zeros
  2036.                     Commands->Action_Attack(obj, Params);
  2037.                 }
  2038.             }
  2039.         }
  2040.         else
  2041.         {
  2042.             float Random = Commands->Get_Random(0, 1.999900); // v50
  2043.             if(Random > 1)
  2044.                 Random = 1; // Didnt know what to make out of this.. doesn't make much sense...
  2045.             Random *= 5;
  2046.             Vector3 MovePos = Vector3(0,0,0);
  2047.             if(Random)
  2048.             {
  2049.                 Random--;
  2050.                 if(Random)
  2051.                 {
  2052.                     if(Number == 1) // Not possible..
  2053.                         MovePos = Vector3(1310.67, 694.739990, 19.709999);
  2054.                     else
  2055.                         MovePos = Vector3(1242.26, 646.039978, 19.650000);
  2056.                 }
  2057.                 else
  2058.                     MovePos = Vector3(1340.65, 655.039978, 19.510000);
  2059.             }
  2060.             else // This will never be executed aswell.. but there might have gone something wrong up here.
  2061.                 MovePos = Vector3(1301.55, 617.890015, 19.660000);
  2062.             ActionParamsStruct Params;
  2063.             Params.Set_Basic(this, 31, 0);
  2064.             Params.Set_Movement(MovePos, 0.300000, 10.000000);
  2065.             // The following numbers are used but idk where they belong:
  2066.             // 5 times 1.
  2067.             // 1101004800 OR 20.0000000
  2068.             // 1073741824 OR 2.000000
  2069.             // And a bunch of zeros
  2070.             Commands->Action_Goto(obj, Params);
  2071.         }
  2072.         Commands->Start_Timer(obj, this, 30, 7);
  2073.     }
  2074.     else if(number == 10)
  2075.     {
  2076.         Vector3 Pos = Commands->Get_Position(obj);
  2077.         GameObject *Star = Commands->Get_A_Star(Pos);
  2078.         Vector3 StarPos = Commands->Get_Position(Star);
  2079.         if(Commands->Get_Distance(Pos, Star) < 20.0)
  2080.         {
  2081.             int MX2DSGN_DSGN0014 = Commands->Create_Conversation("MX2DSGN_DSGN0014", 100, 300, true);
  2082.             Commands->Join_Conversation(0, MX2DSGN_DSGN0014, true, true, true);
  2083.             Commands->Join_Conversation(obj, MX2DSGN_DSGN0014, true, false, false);
  2084.             Commands->Start_Conversation(MX2DSGN_DSGN0014, 0);
  2085.             Commands->Start_Timer(obj, this, 3, 11);
  2086.             return;
  2087.         }
  2088.         Commands->Start_Timer(obj, this, 2, 10);
  2089.     }
  2090.     else if(number == 11)
  2091.     {
  2092.         int MX2DSGN_DSGN0015 = Commands->Create_Conversation("MX2DSGN_DSGN0015", 100, 300, true);
  2093.         Commands->Join_Conversation(0, MX2DSGN_DSGN0015, true, true, true);
  2094.         Commands->Join_Conversation(obj, MX2DSGN_DSGN0015, true, false, false);
  2095.         Commands->Start_Conversation(MX2DSGN_DSGN0015, 0);
  2096.     }
  2097. }
  2098.  
  2099. void M02_Nod_Soldier::Custom(GameObject *obj,int type,int param,GameObject *sender)
  2100. {
  2101.   v6 = a1;
  2102.     if ( Commands->Get_ID(obj) == 400276 )
  2103.         Commands->Start_Timer(obj, this, 2, 10);
  2104.     if(type)
  2105.     {
  2106.         if(type == 99 && !Commands->Is_Performing_Pathfind_Action(obj))
  2107.         {
  2108.             switch(param)
  2109.             {
  2110.                 case 214:
  2111.                     ActionParamsStruct Params;
  2112.                     Params.Set_Basic(this, 71, 214);
  2113.                     Vector3 SenderPos = Commands->Get_Position(sender);
  2114.                     SenderPos.Z -= 1;
  2115.                     Params.Set_Movement(sender, 0.800000, 10.000000);
  2116.                     Params.Set_Attack(SenderPos, 10.000000, 0, true);
  2117.                     // The following numbers are used but idk where they belong:
  2118.                     // 5 times 1.
  2119.                     // 1101004800 OR 20.0000000
  2120.                     // 1073741824 OR 2.000000
  2121.                     // 1 time 0.0
  2122.                     // And a bunch of zeros
  2123.                     Commands->Action_Attack(obj, Params);
  2124.                     break;
  2125.                 case 202:
  2126.                     ActionParamsStruct Params;
  2127.                     Params.Set_Basic(this, 50, 214);
  2128.                     Params.Set_Attack(Vector3(1113.609985, 877.400024, 17.15), 10.000000, 0, false);
  2129.                     // The following numbers are used but idk where they belong:
  2130.                     // 5 times 1.
  2131.                     // 1101004800 OR 20.0000000
  2132.                     // 1073741824 OR 2.000000
  2133.                     // 1146837402 OR 877.400024
  2134.                     // 1099510579 OR 17.150000
  2135.                     // 1061997773 OR 0.800000
  2136.                     // 1 time 0.0
  2137.                     // And a bunch of zeros
  2138.                     Commands->Action_Attack(obj, Params);
  2139.                     break;
  2140.                 case 217:
  2141.                     ActionParamsStruct Params;
  2142.                     Params.Set_Basic(this, 50.0, 214);
  2143.                     Params.Set_Movement(Vector3(1062.239990, 978.380005, -16.85), 0.800000, 10.000000);
  2144.                     Params.Set_Attack(Vector3(1062.239990, 978.380005, -16.85), 10.000000, 0, false);
  2145.                     Commands->Action_Attack(obj, Params);
  2146.                     break;
  2147.             }
  2148.         }
  2149.     }
  2150.     else
  2151.     {
  2152.         if(!param)
  2153.         {
  2154.             Commands->Innate_Enable(obj);
  2155.             int Pre_Placed = Get_Int_Parameter("Pre_Placed"); // v7
  2156.             switch(Pre_Placed)
  2157.             {
  2158.                 case 2:
  2159.                     Commands->Start_Timer(obj, this, 1, 3);
  2160.                     break;
  2161.                 case 1:
  2162.                     Commands->Start_Timer(obj, this, 10, 5);
  2163.                     break;
  2164.                 case 6:
  2165.                     Commands->Start_Timer(obj, this, 1, 7);
  2166.                     break;
  2167.                 default:
  2168.                     if(Pre_Placed == 5 && Get_Int_Parameter("Area_Number") == 19)
  2169.                     {
  2170.                         ActionParamsStruct Params;
  2171.                         Params.Set_Basic(this, 31, 100);
  2172.                         Params.Set_Animation("H_A_CON2", true);
  2173.                         // The following numbers are used but idk where they belong:
  2174.                         // 5 times 1.
  2175.                         // 1065353216 OR 1.000000
  2176.                         // 1101004800 OR 20.000000
  2177.                         // 1073741824 OR 2.000000
  2178.                         // 1 time 0.0
  2179.                         // And a bunch of zeros
  2180.                         Commands->Action_Play_Animation(a3, &v17);
  2181.                     }
  2182.                     break;
  2183.             }
  2184.         }
  2185.     }
  2186.     if (!FallingDmgTriggered)
  2187.     {
  2188.         if(type == CUSTOM_EVENT_FALLING_DAMAGE)
  2189.             MaxHealth = Commands->Get_Max_Health(obj);
  2190.     }
  2191. }
  2192.  
  2193. void M02_Nod_Soldier::Damaged(GameObject *obj,GameObject *damager,float amount)
  2194. {
  2195.     if(!FallingDmgTriggered)
  2196.     {
  2197.         if (!damager)
  2198.         {
  2199.             FallingDmgTriggered = true;
  2200.             Commands->Set_Health(obj, MaxHealth);
  2201.         }
  2202.     }
  2203. }
  2204.  
  2205. class M02_Obelisk : public ScriptImpClass
  2206. {
  2207.     void Damaged(GameObject *obj,GameObject *damager,float amount);
  2208.     void Killed(GameObject *obj,GameObject *killer);
  2209.     void Custom(GameObject *obj,int type,int param,GameObject *sender);
  2210.     bool DidAnouncement;
  2211. };
  2212.  
  2213. void M02_Obelisk::Damaged(GameObject *obj,GameObject *damager,float amount)
  2214. {
  2215.     if(Commands->Get_Building_Power(obj))
  2216.     {
  2217.         GameObject *SearchObj = Commands->Find_Object(400200);
  2218.         if (SearchObj)
  2219.         {
  2220.             Commands->Send_Custom_Event(obj, SearchObj, 99, 202, 0);
  2221.             float MaxHealth = Commands->Get_Max_Health(obj);
  2222.             Commands->Set_Health(obj, MaxHealth);
  2223.             if(!DidAnouncement)
  2224.             {
  2225.                 Vector3 Pos = Commands->Get_Position(obj);
  2226.                 GameObject *Star = Commands->Get_A_Star(Pos);
  2227.                 if(damager == Star)
  2228.                 {
  2229.                     DidAnouncement = true;
  2230.                     Commands->Stop_All_Conversations();
  2231.                     int M02_EVA_OBELISK_REPAIR = Commands->Create_Conversation("M02_EVA_OBELISK_REPAIR", 100, 300, true);
  2232.                     Commands->Join_Conversation(0, M02_EVA_OBELISK_REPAIR, true, true, true);
  2233.                     Commands->Join_Conversation(Star, M02_EVA_OBELISK_REPAIR, true, false, false);
  2234.                     Commands->Start_Conversation(M02_EVA_OBELISK_REPAIR, 0);
  2235.                 }
  2236.             }
  2237.         }
  2238.     }
  2239. }
  2240.  
  2241. void M02_Obelisk::Killed(GameObject *obj,GameObject *killer)
  2242. {
  2243.     if(Commands->Get_Building_Power(obj))
  2244.     {
  2245.         GameObject *SearchObj1 = Commands->Find_Object(1111112);
  2246.         if (SearchObj1)
  2247.             Commands->Send_Custom_Event(obj, SearchObj1, 202, 1, 0);
  2248.     }
  2249.     GameObject *SearchObj2 = Commands->Find_Object(405116);
  2250.     if(SearchObj2)
  2251.         Commands->Destroy_Object(SearchObj2);
  2252.     GameObject *SearchObj3 = Commands->Find_Object(405117);
  2253.     if(SearchObj3)
  2254.         Commands->Destroy_Object(SearchObj3);
  2255. }
  2256.  
  2257. void M02_Obelisk::Custom(GameObject *obj,int type,int param,GameObject *sender)
  2258. {
  2259.     if(type == 1)
  2260.         DidAnouncement = true;
  2261. }
  2262.  
  2263. class M02_Power_Plant : public ScriptImpClass
  2264. {
  2265.     void Damaged(GameObject *obj,GameObject *damager,float amount);
  2266.     void Killed(GameObject *obj,GameObject *killer);
  2267.     bool DidAnouncement;
  2268. };
  2269.  
  2270. void M02_Power_Plant::Damaged(GameObject *obj,GameObject *damager,float amount)
  2271. {
  2272.     GameObject *SearchObj = Commands->Find_Object(400199);
  2273.     if(SearchObj)
  2274.     {
  2275.         Commands->Send_Custom_Event(obj, SearchObj, 99, 217, 0);
  2276.         float MaxHealth = Commands->Get_Max_Health(obj);
  2277.         Commands->Set_Health(obj, MaxHealth);
  2278.         if(!DidAnouncement)
  2279.         {
  2280.             Vector3 Pos = Commands->Get_Position(obj);
  2281.             GameObject *Star = Commands->Get_A_Star(Pos);
  2282.             if(damager == Star)
  2283.             {
  2284.                 DidAnouncement = true;
  2285.                 Commands->Stop_All_Conversations();
  2286.                 int M02_EVA_POWER_REPAIR = Commands->Create_Conversation("M02_EVA_POWER_REPAIR", 100, 300, true);
  2287.                 Commands->Join_Conversation(0, M02_EVA_POWER_REPAIR, true, true, true);
  2288.                 Commands->Join_Conversation(Star, M02_EVA_POWER_REPAIR, true, false, false);
  2289.                 Commands->Start_Conversation(M02_EVA_POWER_REPAIR, 0);
  2290.             }
  2291.         }
  2292.     }
  2293. }
  2294.  
  2295. void M02_Power_Plant::Killed(GameObject *obj,GameObject *killer)
  2296. {
  2297.     GameObject *SearchObj1 = Commands->Find_Object(1111112);
  2298.     if(SearchObj1)
  2299.     {
  2300.         Commands->Send_Custom_Event(obj, SearchObj1, 217, 1, 0);
  2301.         Commands->Send_Custom_Event(obj, SearchObj1, 202, 1, 0);
  2302.     }
  2303.     GameObject *SearchObj2 = Commands->Find_Object(1153845);
  2304.     if(SearchObj2)
  2305.         Commands->Set_Building_Power(SearchObj2, false);
  2306.     GameObject *SearchObj3 = Commands->Find_Object(405116);
  2307.     if(SearchObj3)
  2308.         Commands->Destroy_Object(SearchObj3);
  2309.     GameObject *SearchObj4 = Commands->Find_Object(405117);
  2310.     if(SearchObj4)
  2311.         Commands->Destroy_Object(SearchObj4);
  2312.     GameObject *SearchObj5 = Commands->Find_Object(1157690);
  2313.     if(SearchObj5)
  2314.         Commands->Set_Building_Power(SearchObj5, false);
  2315. }
  2316.  
  2317. class M02_Dam_MCT : public ScriptImpClass
  2318. {
  2319.     void Damaged(Gameobject *obj, Gameobject *damager, float amount);
  2320.     bool Triggered;
  2321. };
  2322.  
  2323. void M02_Dam_MCT::Damaged(Gameobject *obj, Gameobject *damager, float amount)
  2324. {
  2325.     if(Commands->Get_Health(obj) < 1.0)
  2326.     {
  2327.         Commands->Set_Health(obj, 0.100000);
  2328.         if(!Triggered)
  2329.         {
  2330.             Triggered = true;
  2331.             GameObject *SearchObject = Commands->Find_Object(1111112);
  2332.             if (SearchObject)
  2333.             {
  2334.                 Commands->Send_Custom_Event(obj, SearchObject, 203, 1, 0);
  2335.                 Vector3 ObjPos = Commands->Get_Position(obj);
  2336.                 GameObject *Star = Commands->Get_A_Star(ObjPos);
  2337.                 Commands->Grant_Key(Star, unknownkey, true);
  2338.             }
  2339.             Commands->Set_Animation_Frame(obj, "MCT_NOD.MCT_NOD", 7);
  2340.         }
  2341.     }
  2342. }
  2343.  
  2344. class M02_Helipad : public ScriptImpClass
  2345. {
  2346.     void Killed(GameObject *obj,GameObject *killer);
  2347. };
  2348.  
  2349. void M02_Helipad::Killed(GameObject *obj,GameObject *killer)
  2350. {
  2351.     GameObject *SearchObj = Commands->Find_Object(1111112);
  2352.     if(SearchObj)
  2353.         Commands->Send_Custom_Event(obj, SearchObj, 206, 1, 0);
  2354. }
  2355.  
  2356. class M02_Destroy_Objective : public ScriptImpClass
  2357. {
  2358.     void unknown1(int this, int a2, int a3);
  2359.     void unknown2(int this, int a2, int a3, int a4);
  2360. };
  2361.  
  2362. void M02_Destroy_Objective::unknown1(int this, int a2, int a3) // int this, int a2, int a3
  2363. {
  2364.     // I'm sorry but i was unable to find out what script event this is. The first parameter (a1) is usually a this pointer, the second parameter (a2) is usually a GameObject *obj. The others are for you to guess.. Sometimes there are more variables than the function suggests.
  2365.     int Objective_ID = Get_Int_Parameter("Objective_ID");
  2366.     GameObject *SearchObj = Commands->Find_Object(1111112);
  2367.     if(SearchObj)
  2368.     {
  2369.         if (Objective_ID != 222)
  2370.             Commands->Send_Custom_Event(obj, SearchObj, Objective_ID, 1, 0);
  2371.         switch(Objective_ID)
  2372.         {
  2373.             case 212:
  2374.                 Commands->Send_Custom_Event(obj, SearchObj, 113, 3, 0);
  2375.                 break;
  2376.             case 214:
  2377.                 GameObject *CinObject = Create_Object("Invisible_Object", Vector3(580.369995, 889.690002, -7.440000));
  2378.                 if(CinObject)
  2379.                 {
  2380.                     Commands->Set_Facing(CinObject, -0.024902);
  2381.                     Attach_Script(CinObject, "Test_Cinematic", "X2I_GDI_Drop02_Rocket_24.txt");
  2382.                 }
  2383.                 break;
  2384.             case 215:
  2385.                 // w00t nothing at all here.. lol but it showed up so im gonna leave it in here.
  2386.             case 216:
  2387.                 Commands->Send_Custom_Event(obj, SearchObj, 115, 0, 0);
  2388.                 break;
  2389.             case 204:
  2390.                 Commands->Send_Custom_Event(obj, SearchObj, 105, 21, 0);
  2391.                 break;
  2392.             case 222:
  2393.                 result = Commands->Send_Custom_Event(obj, SearchObj, 116, 0, 0);
  2394.                 break;
  2395.         }
  2396.     }
  2397. }
  2398.  
  2399. void M02_Destroy_Objective::unknown2(int this, int a2, int a3, int a4)
  2400. {
  2401.     // I'm sorry but i was unable to find out what script event this is. The first parameter (a1) is usually a this pointer, the second parameter (a2) is usually a GameObject *obj. The others are for you to guess.. Sometimes there are more variables than the function suggests.
  2402.     int Objective_ID = Get_Int_Parameter("Objective_ID");
  2403.     if(Objective_ID == 214)
  2404.     {
  2405.         GameObject *SearchObj = Commands->Find_Object(400510);
  2406.         if(SearchObj)
  2407.             Commands->Send_Custom_Event(obj, SearchObj, 99, 214, 0);
  2408.     }
  2409. }
  2410.  
  2411. class M02_Nod_Convoy_Truck : public ScriptImpClass
  2412. {
  2413.     void Killed(GameObject *obj,GameObject *killer);
  2414. };
  2415.  
  2416. void M02_Nod_Convoy_Truck::Killed(GameObject *obj,GameObject *killer) // int a1, int a2
  2417. {
  2418.   GameObject *SearchObj = Commands->Find_Object(1111112);
  2419.   if(SearchObj)
  2420.         Commands->Send_Custom_Event(obj, SearchObj, 900, 3, 0);
  2421. }
  2422.  
  2423. class M02_GDI_Soldier : public ScriptImpClass
  2424. {
  2425.     void Created(GameObject *obj);
  2426.     void Timer_Expired(GameObject *obj,int number);
  2427.     void Poked(GameObject *obj,GameObject *poker);
  2428.     void unknown(int this, int a2, int a3);
  2429.     void Killed(GameObject *obj,GameObject *killer);
  2430.     void Damaged(GameObject *obj,GameObject *damager,float amount);
  2431.     bool AtStar;
  2432.     bool SpeakInterval;
  2433.     int RadioPick;
  2434. };
  2435.  
  2436. void M02_GDI_Soldier::Created(GameObject *obj)
  2437. {
  2438.     Commands->Enable_Hibernation(obj, false);
  2439.     AtStar = false;
  2440.     SpeakInterval = false;
  2441.     RadioPick = 0;
  2442.     if(Get_Int_Parameter("Area_ID") == 1)
  2443.     {
  2444.         Commands->Innate_Disable(obj);
  2445.         if(Get_Int_Parameter("Soldier_Type") == 2)
  2446.             Commands->Start_Timer(obj, this, 10, 2);
  2447.     }
  2448.     else
  2449.         Commands->Start_Timer(obj, this, 1, 1);
  2450. }
  2451.  
  2452. void M02_GDI_Soldier::Timer_Expired(GameObject *obj,int number)
  2453. {
  2454.     if(number != 1)
  2455.     {
  2456.         if(number != 2 || SpeakInterval)
  2457.             SpeakInterval = false
  2458.         Vector3 Pos = Commands->Get_Position(obj);
  2459.         GameObject *Star = Commands->Get_A_Star(Pos);
  2460.         Vector3 StarPos = Commands->Get_Position(Star);
  2461.         if(Commands->Get_Distance(Pos, StarPos) < 30.0)
  2462.         {
  2463.             const char *Conversation_Name;
  2464.             if(!RadioPick)
  2465.                 Conversation_Name = "M02_GOMG_RADIO_01";
  2466.             if(!(RadioPick - 1))
  2467.                 Conversation_Name = "M02_GOMG_RADIO_02";
  2468.             if((RadioPick - 1) == 1)
  2469.                 Conversation_Name = "M02_GOMG_RADIO_03";
  2470.              int ConversationID = Commands->Create_Conversation(Conversation_Name, 99, 20, true);
  2471.             Commands->Join_Conversation(obj, ConversationID, true, true, true);
  2472.             Commands->Start_Conversation(ConversationID, 0);
  2473.             RadioPick++;
  2474.         }
  2475.         Commands->Start_Timer(obj, this, 10, 2);
  2476.         return;
  2477.     }
  2478.     if(Get_Int_Parameter("Area_ID") == 9)
  2479.     {
  2480.         GameObject *SearchObj = Commands->Find_Object(1153845);
  2481.         if(SearchObj)
  2482.         {
  2483.             if(Commands->Get_Building_Power(SearchObj))
  2484.             {
  2485.                 ActionParamsStruct Params;
  2486.                 Params.Set_Basic(this, 71, 0);
  2487.                 Params.Set_Movement(Vector3(1105.780029, 897.750000, 35.049999), 1.000000, 20.000000);
  2488.                 // The following numbers are used but idk where they belong:
  2489.                 // 5 times 1.
  2490.                 // 1101004800 OR 20.000000
  2491.                 // 1073741824 OR 2.000000
  2492.                 // And a bunch of zeros
  2493.                 Commands->Action_Goto(obj, Params);
  2494.             }
  2495.         }
  2496.     }
  2497.     else
  2498.     {
  2499.         if(!AtStar)
  2500.         {
  2501.             Vector3 Pos = Commands->Get_Position(obj);
  2502.             GameObject *Star = Commands->Get_A_Star(Pos);
  2503.             if(Star)
  2504.             {
  2505.                 ActionParamsStruct Params;
  2506.                 Params.Set_Basic(this, 71, 1);
  2507.                 Params.Set_Movement(Star, 1.000000, 20.000000);
  2508.                 // The following numbers are used but idk where they belong:
  2509.                 // 5 times 1.
  2510.                 // 1101004800 OR 20.000000
  2511.                 // 1073741824 OR 2.000000
  2512.                 // And a bunch of zeros
  2513.                 Commands->Action_Goto(obj, Params);
  2514.             }
  2515.             else
  2516.                 AtStar = true;
  2517.         }
  2518.     }
  2519.     Commands->Start_Timer(obj, this, 10, 1);
  2520. }
  2521.  
  2522. void M02_GDI_Soldier::unknown(int this, int a2, int a3)
  2523. {
  2524.     // I'm sorry but i was unable to find out what script event this is. The first parameter (a1) is usually a this pointer, the second parameter (a2) is usually a GameObject *obj. The others are for you to guess.. Sometimes there are more variables than the function suggests.
  2525.     result = *(_DWORD *)(a3 + 12); // Unable to identify
  2526.     if(result > 1099)
  2527.     {
  2528.         if (result < 1199)
  2529.         {
  2530.             int Area_ID = Get_Int_Parameter("Area_ID");
  2531.             if((result - 1100) == Area_ID)
  2532.             {
  2533.                 AtStar = true;
  2534.                 if (Area_ID)
  2535.                 {
  2536.                     if (Area_ID == 2)
  2537.                     {
  2538.                         ActionParamsStruct Params;
  2539.                         Params.Set_Basic(this, 2.000000, 81);
  2540.                         Params.Set_Movement(Vector(648.770020, 300.739990, -0.070332), 0.300000, 1.000000);
  2541.                         // The following numbers are used but idk where they belong:
  2542.                         // 5 times 1.
  2543.                         // 1101004800 OR 20.000000
  2544.                         // 1073741824 OR 2.000000
  2545.                         // And a bunch of zeros
  2546.                         Commands->Action_Goto(obj, Params);
  2547.                     }
  2548.                 }
  2549.                 else
  2550.                     Commands->Action_Reset(obj, 100);
  2551.             }
  2552.         }
  2553.     }
  2554. }
  2555.  
  2556. void M02_GDI_Soldier::Killed(GameObject *obj,GameObject *killer)
  2557. {
  2558.     int Area_ID = Get_Int_Parameter("Area_ID");
  2559.     if(!Area_ID)
  2560.     {
  2561.         GameObject *SearchObj = Commands->Find_Object(1111112);
  2562.         if(SearchObj)
  2563.             Commands->Send_Custom_Event(obj, SearchObj, 1000, 1000, 0);
  2564.     }
  2565.     if(Area_ID == 9)
  2566.     {
  2567.         GameObject *SearchObj = Commands->Find_Object(1111112);
  2568.         if(SearchObj)
  2569.             Commands->Send_Custom_Event(obj, result, 1000, 1001, 0);
  2570.     }
  2571. }
  2572.  
  2573. void M02_GDI_Soldier::Damaged(GameObject *obj,GameObject *damager,float amount)
  2574. {
  2575.     if(damager)
  2576.     {
  2577.         if (!amount)
  2578.         {
  2579.             if(!SpeakInterval)
  2580.             {
  2581.                 SpeakInterval = true;
  2582.                 int Soldier_Type = Get_Int_Parameter("Soldier_Type") - 1;
  2583.                 if (Soldier_Type)
  2584.                 {
  2585.                     if(!(Soldier_Type - 3))
  2586.                     {
  2587.                         int M02_GEGR_COVER_01 = Commands->Create_Conversation("M02_GEGR_COVER_01", 99, 50, true);
  2588.                         Commands->Join_Conversation(obj, M02_GEGR_COVER_01, true, true, false);
  2589.                         Vector3 Pos = Commands->Get_Position(obj);
  2590.                         GameObject *Star = Commands->Get_A_Star(Pos);
  2591.                         Commands->Join_Conversation(Star, M02_GEGR_COVER_01, true, true, false);
  2592.                         Commands->Start_Conversation(M02_GEGR_COVER_01, 0);
  2593.                     }
  2594.                 }
  2595.                 else
  2596.                 {
  2597.                     int M02_GERS_COVER_01 = Commands->Create_Conversation("M02_GERS_COVER_01", 99, 50, true);
  2598.                     Commands->Join_Conversation(obj, M02_GERS_COVER_01, true, true, false);
  2599.                     Vector3 Pos = Commands->Get_Position(obj);
  2600.                     GameObject *Star = Commands->Get_A_Star(Pos);
  2601.                     Commands->Join_Conversation(Star, M02_GEGR_COVER_01, true, true, false);
  2602.                     Commands->Start_Conversation(M02_GEGR_COVER_01, 0);
  2603.                 }
  2604.             }
  2605.         }
  2606.     }
  2607. }
  2608.  
  2609. class M02_Stationary_Vehicle : public ScriptImpClass
  2610. {
  2611.     void Created(GameObject *obj);
  2612.     void unknown(int this, int a2, int a3);
  2613.     void Enemy_Seen(GameObject *obj,GameObject *enemy);
  2614.     void Killed(GameObject *obj,GameObject *killer);
  2615.     void Action_Complete(GameObject *obj,int action_id,ActionCompleteReason complete_reason);
  2616.     void Timer_Expired(GameObject *obj,int number);
  2617. };
  2618.  
  2619. void M02_Stationary_Vehicle::Created(GameObject *obj)
  2620. {
  2621.     int Area_ID = Get_Int_Parameter("Area_ID");
  2622.     Commands->Enable_Enemy_Seen(obj, false);
  2623.     if(Area_ID == 99)
  2624.     {
  2625.         Commands->Innate_Disable(obj);
  2626.         Commands->Start_Timer(obj, this, 5.330000, 1);
  2627.     }
  2628. }
  2629.  
  2630. void M02_Stationary_Vehicle::unknown(int this, int a2, int a3)
  2631. {
  2632.     // I'm sorry but i was unable to find out what script event this is. The first parameter (a1) is usually a this pointer, the second parameter (a2) is usually a GameObject *obj. The others are for you to guess.. Sometimes there are more variables than the function suggests.
  2633.     int Area_ID = Get_Int_Parameter("Area_ID");
  2634.     int ObjID = Commands->Get_ID(obj);
  2635.     if(Area_ID == 2)
  2636.     {
  2637.         if(ObjID == 401016)
  2638.         {
  2639.             int MX2DSGN_DSGN0008 = Commands->Create_Conversation("MX2DSGN_DSGN0008", 100, 300, true);
  2640.             Commands->Join_Conversation(0, MX2DSGN_DSGN0008, true, true, true);
  2641.             Vector3 Pos = Commands->Get_Position(obj);
  2642.             GameObject *Star = Commands->Get_A_Star(Pos);
  2643.             Commands->Join_Conversation(Star, MX2DSGN_DSGN0008, true, false, false);
  2644.             Commands->Start_Conversation(MX2DSGN_DSGN0008, 0);
  2645.         }
  2646.         else if(ObjID == 401167)
  2647.         {
  2648.             GameObject *SearchObj = Commands->Find_Object(401016);
  2649.             if(SearchObj)
  2650.             {
  2651.                 int MX2DSGN_DSGN0007 = Commands->Create_Conversation("MX2DSGN_DSGN0007", 100, 300, true);
  2652.                 Commands->Join_Conversation(SearchObj, MX2DSGN_DSGN0007, true, true, true);
  2653.                 Vector3 Pos = Commands->Get_Position(obj);
  2654.                 GameObject *Star = Commands->Get_A_Star(Pos);
  2655.                 Commands->Join_Conversation(Star, MX2DSGN_DSGN0007, true, false, false);
  2656.                 Commands->Start_Conversation(MX2DSGN_DSGN0007, 0);
  2657.             }
  2658.         }
  2659.     }
  2660. }
  2661.  
  2662. void M02_Stationary_Vehicle::Enemy_Seen(GameObject *obj,GameObject *enemy)
  2663. {
  2664.     int Area_ID = Get_Int_Parameter("Area_ID");
  2665.     if(Area_ID != 99)
  2666.     {
  2667.         ActionParamsStruct Params;
  2668.         Params.Set_Basic(this, 2.000000, 90);
  2669.         Params.Set_Attack(enemy, 300.000000, 0, true);
  2670.         // The following numbers are used but idk where they belong:
  2671.         // 4 times 1.
  2672.         // 1065353216 OR 1.000000
  2673.         // And a bunch of zeros
  2674.         Commands->Action_Attack(obj, Params);
  2675.         Commands->Start_Timer(obj, this, 5, 2);
  2676.     }
  2677. }
  2678.  
  2679. void M02_Stationary_Vehicle::Killed(GameObject *obj,GameObject *killer)
  2680. {
  2681.     if(*(_DWORD *)(killer + 12) == 1000 && *(_DWORD *)(killer + 16)) // unknown
  2682.     {
  2683.         if(!Commands->Get_Player_Type(obj))
  2684.             Commands->Send_Custom_Event(obj, *(_DWORD *)(killer + 16), 100, 1, 0);
  2685.     }
  2686. }
  2687.  
  2688. void M02_Stationary_Vehicle::Action_Complete(GameObject *obj,int action_id,ActionCompleteReason complete_reason)
  2689. {
  2690.     if(!action_id && !complete_reason)
  2691.             Commands->Enable_Enemy_Seen(obj, true);
  2692. }
  2693.  
  2694. void M02_Stationary_Vehicle::Timer_Expired(GameObject *obj,int number)
  2695. {
  2696.     if(number == 1)
  2697.         result = Apply_Damage(obj, 10000, "Blamokiller", 0);
  2698.     else if(number == 2)
  2699.         Commands->Action_Reset(obj, 100);
  2700. }
  2701.  
  2702. class M02_Nod_Apache : public ScriptImpClass
  2703. {
  2704.     void Created(GameObject *obj);
  2705.     void Timer_Expired(GameObject *obj, int number);
  2706.     int UnknownAttackParam;
  2707. };
  2708.  
  2709. void M02_Nod_Apache::Created(GameObject *obj)
  2710. {
  2711.     float TimerLength = 1;
  2712.     int Area_ID = Get_Int_Parameter("Area_ID");
  2713.     if(Area_ID)
  2714.     {
  2715.         if(Area_ID == 15)
  2716.         {
  2717.             UnknownAttackParam = 1;
  2718.             TimerLength = 15;
  2719.         }
  2720.         else if(Area_ID == 24)
  2721.             UnknownAttackParam = 24;
  2722.     }
  2723.     else
  2724.     {
  2725.         UnknownAttackParam = 0;
  2726.         TimerLength = 8;
  2727.     }
  2728.     Commands->Enable_Engine(obj, true);
  2729.     Commands->Disable_Physical_Collisions(obj);
  2730.     Commands->Start_Timer(obj, this, TimerLength, 1);
  2731.     Commands->Start_Timer(obj, this, 15, 3);
  2732. }
  2733.  
  2734. void M02_Nod_Apache::Timer_Expired(GameObject *obj, int number)
  2735. {
  2736.     if(number == 1)
  2737.     {
  2738.         if(UnknownAttackParam <= 400310)
  2739.         {
  2740.             if(UnknownAttackParam != 400310)
  2741.             {
  2742.                 if(UnknownAttackParam <= 24)
  2743.                 {
  2744.                     if(UnknownAttackParam == 24)
  2745.                         UnknownAttackParam = 400544;
  2746.                     else
  2747.                     {
  2748.                         if(UnknownAttackParam)
  2749.                         {
  2750.                             if(UnknownAttackParam == 1)
  2751.                                 UnknownAttackParam = 401169;
  2752.                         }
  2753.                         else
  2754.                             UnknownAttackParam = 400296;
  2755.                     }
  2756.                     goto ATTACK;
  2757.                 }
  2758.                 if(UnknownAttackParam - 400296)
  2759.                 {
  2760.                     if((UnknownAttackParam - 400296) == 8)
  2761.                         UnknownAttackParam = 400310;
  2762.                     goto ATTACK;
  2763.                 }
  2764.             }
  2765.             UnknownAttackParam = 400304;
  2766.             goto ATTACK;
  2767.         }
  2768.         if(UnknownAttackParam > 401173)
  2769.         {
  2770.             if(UnknownAttackParam != 401180)
  2771.             goto ATTACK;
  2772.         }
  2773.         else
  2774.         {
  2775.             if(UnknownAttackParam == 401173)
  2776.             {
  2777.                 UnknownAttackParam = 401180;
  2778.                 goto ATTACK;
  2779.             }
  2780.             if(UnknownAttackParam == 400544)
  2781.             {
  2782.                 UnknownAttackParam = -1;
  2783.                 goto ATTACK;
  2784.             }
  2785.             if(UnknownAttackParam != 401169)
  2786.             {
  2787.                 ATTACK:
  2788.                     if(UnknownAttackParam != -1)
  2789.                     {
  2790.                         ActionParamsStruct Params;
  2791.                         Params.Set_Basic(this, 90, 0); // Possibly Params.Set_Basic(this, 90, 0, Commands->Get_Difficulty_Level());
  2792.                         Params.Set_Attack(Commands->Get_A_Star(Commands->Get_Position(obj)), 200.000000, 0, true);
  2793.                         Params.MoveArrivedDistance = 5.000000; // Maybe..
  2794.                         // The following numbers are used but idk where they belong:
  2795.                         // 5 times 1.
  2796.                         // 1101004800 OR 20.0000000
  2797.                         // 1073741824 OR 2.000000
  2798.                         // 1084227584 OR 5.000000 Used it in MoveArrivedDistance
  2799.                         // This calculation Commands->Get_Difficulty_Level() * 0.1 + 0.2
  2800.                         // UnknownAttackParam
  2801.                         // 1 time 0.0
  2802.                         // 1 time 1.0
  2803.                         // And a bunch of zeros
  2804.                         Commands->Action_Attack(obj, Params);
  2805.                     }
  2806.                     Commands->Start_Timer(obj, this, 5, 2);
  2807.                     return;
  2808.             }
  2809.         }
  2810.         UnknownAttackParam = 401173;
  2811.         goto ATTACK;
  2812.     }
  2813.     if(number == 2)
  2814.     {
  2815.         ActionParamsStruct Params;
  2816.         Params.Set_Basic(this, 90, 0);
  2817.         Params.Set_Attack(Commands->Get_A_Star(Commands->Get_Position(obj)), 200.000000, 0, true);
  2818.         Params.MoveArrivedDistance = 5.000000; // Maybe..
  2819.         // The following numbers are used but idk where they belong:
  2820.         // 5 times 1.
  2821.         // 1101004800 OR 20.0000000
  2822.         // 1073741824 OR 2.000000
  2823.         // 1084227584 OR 5.000000 Used it in MoveArrivedDistance
  2824.         // 1 time 0.0
  2825.         // And a bunch of zeros
  2826.         Commands->Action_Attack(obj, Params);
  2827.         Commands->Start_Timer(obj, this, 5, 1);
  2828.     }
  2829.     if(number == 3)
  2830.     {
  2831.         Vector3 Pos = Commands->Get_Position(obj);
  2832.         GameObject *Star = Commands->Get_A_Star(Pos);
  2833.         if(Star)
  2834.         {
  2835.             Vector3 StarPos = Commands->Get_Position(Star);
  2836.             if(Commands->Get_Distance(Pos, StarPos) > 300.0)
  2837.                 Commands->Apply_Damage(obj, 10000, "Blamokiller", 0);
  2838.         }
  2839.         Commands->Start_Timer(obj, this, 15, 3);
  2840.     }
  2841. }
  2842.  
  2843. class M02_Nod_Vehicle : public ScriptImpClass
  2844. {
  2845.     void Created(GameObject *obj);
  2846.     void Timer_Expired(GameObject *obj, int number);
  2847. };
  2848.  
  2849. void M02_Nod_Vehicle::Created(GameObject *obj)
  2850. {
  2851.     Commands->Enable_Enemy_Seen(obj, true);
  2852.     Commands->Enable_Engine(obj, true);
  2853.     int Area_ID = Get_Int_Parameter("Area_ID") - 2;
  2854.     if(Area_ID)
  2855.     {
  2856.         v4 = v3 - 1;
  2857.         if(Area_ID - 1)
  2858.         {
  2859.             if((Area_ID - 1) == 1)
  2860.             {
  2861.                 ActionParamsStruct Params;
  2862.                 Params.Set_Basic(this, 98, 0);
  2863.                 Params.Set_Movement(Vector3(0,0,0), 1.000000, 5.000000);
  2864.                 Params.Set_Attack(Commands->Get_A_Star(Commands->Get_Position(obj)), 300.000000, 0, true);
  2865.                 Params.WaypathID = 400454; // maybe...
  2866.                 Commands->Action_Attack(obj, Params);
  2867.             }
  2868.         }
  2869.         else
  2870.         {
  2871.             ActionParamsStruct Params;
  2872.             Params.Set_Basic(this, 98, 0);
  2873.             Params.Set_Movement(Vector3(0,0,0), 1.000000, 5.000000);
  2874.             Params.Set_Attack(Commands->Get_A_Star(Commands->Get_Position(obj)), 300.000000, 0, true);
  2875.             Set_Attack((int)&v22, v17, 1133903872, 0, 1);
  2876.             Params.WaypathID = 400416; // maybe...
  2877.             Commands->Action_Attack(obj, Params);
  2878.         }
  2879.     }
  2880.     else
  2881.     {
  2882.         ActionParamsStruct Params;
  2883.         Params.Set_Basic(this, 98, 0);
  2884.         Params.Set_Movement(Vector3(0,0,0), 1.000000, 5.000000);
  2885.         Params.Set_Attack(Commands->Get_A_Star(Commands->Get_Position(obj)), 300.000000, 0, true);
  2886.         Params.WaypathID = 400375; // maybe...
  2887.         Commands->Action_Attack(obj, Params);
  2888.     }
  2889.     Commands->Start_Timer(obj, this, 15, 1);
  2890. }
  2891.  
  2892. void M02_Nod_Vehicle::Timer_Expired(GameObject *obj, int number)
  2893. {
  2894.     if(number == 1)
  2895.     {
  2896.         Vector3 Pos = Commands->Get_Position(obj);
  2897.         GameObject *Star = Commands->Get_A_Star(Pos);
  2898.         if(Star)
  2899.         {
  2900.             Vector3 StarPos = Commands->Get_Position(Star);
  2901.             if(Commands->Get_Distance(Pos, StarPos) > 300.0)
  2902.                 Commands->Apply_Damage(obj, 10000, "Blamokiller", 0);
  2903.         }
  2904.         Commands->Start_Timer(obj, this, 15, 1);
  2905.     }
  2906. }
  2907.  
  2908. class M02_Player_Vehicle : public ScriptImpClass
  2909. {
  2910.     void Created(GameObject *obj);
  2911.     void Timer_Expired(GameObject *obj, int number);
  2912.     void Destroyed(GameObject *obj);
  2913.     void Custom(GameObject *obj,int type,int param,GameObject *sender);
  2914.     bool Entered;
  2915. };
  2916.  
  2917. void M02_Player_Vehicle::Created(GameObject *obj)
  2918. {
  2919.     Entered = false;
  2920.     Commands->Enable_Vehicle_Transitions(obj, true);
  2921.     Commands->Set_Player_Type(obj, -2);
  2922.     Commands->Start_Timer(obj, this, 15, 1);
  2923.     int ObjID = Commands->Get_ID(obj);
  2924.     GameObject *SearchObj1 = Commands->Find_Object(1100085);
  2925.     if(SearchObj1)
  2926.         Commands->Send_Custom_Event(obj, SearchObj1, 100008, ObjID, 0.500000);
  2927.     GameObject *SearchObj2 = Commands->Find_Object(1100094);
  2928.     if(SearchObj2)
  2929.         Commands->Send_Custom_Event(obj, SearchObj2, 100008, ObjID, 0.500000);
  2930.     GameObject *SearchObj3 = Commands->Find_Object(1100120);
  2931.     if(SearchObj3)
  2932.         Commands->Send_Custom_Event(obj, SearchObj3, 100008, ObjID, 0.500000);
  2933.     GameObject *SearchObj4 = Commands->Find_Object(1100130);
  2934.     if(SearchObj4)
  2935.         result = Commands->Send_Custom_Event(obj, SearchObj4, 100008, ObjID, 0.500000);
  2936. }
  2937.  
  2938. void M02_Player_Vehicle::Timer_Expired(GameObject *obj, int number)
  2939. {
  2940.     if(number == 1)
  2941.     {
  2942.         Vector3 Pos = Commands->Get_Position(obj);
  2943.         GameObject *Star = Commands->Get_A_Star(Pos);
  2944.         if(Star)
  2945.         {
  2946.             Vector3 StarPos = Commands->Get_Position(Star);
  2947.             if(Commands->Get_Distance(Pos, StarPos) > 300.0)
  2948.                 Commands->Apply_Damage(obj, 10000, "Blamokiller", 0);
  2949.         }
  2950.         Commands->Start_Timer(obj, this, 15, 1);
  2951.     }
  2952. }
  2953.  
  2954. void M02_Player_Vehicle::Destroyed(GameObject *obj)
  2955. {
  2956.     int Area_ID = Get_Int_Parameter("Area_ID");
  2957.     GameObject SearchObj = Commands->Find_Object(1111112);
  2958.     if(SearchObj)
  2959.         Commands->Send_Custom_Event(obj, SearchObj, 112, Area_ID, 0);
  2960.     if(Area_ID == 2)
  2961.     {
  2962.         if(!Entered)
  2963.             Commands->Send_Custom_Event(obj, SearchObj, 221, 2, 0);
  2964.     }
  2965. }
  2966.  
  2967. void M02_Player_Vehicle::Custom(GameObject *obj,int type,int param,GameObject *sender)
  2968. {
  2969.     if(type == CUSTOM_EVENT_VEHICLE_ENTERED)
  2970.     {
  2971.         int Area_ID = Get_Int_Parameter("Area_ID");
  2972.         if(Area_ID == 2)
  2973.         {
  2974.             if (!Entered)
  2975.             {
  2976.                 Entered = true;
  2977.                 GameObject *SearchObj = Commands->Find_Object(1111112);
  2978.                 if(SearchObj)
  2979.                     Commands->Send_Custom_Event(obj, SearchObj, 221, 1, 0);
  2980.             }
  2981.         }
  2982.     }
  2983. }
  2984.  
  2985. class M02_Nod_Sakura : public ScriptImpClass
  2986. {
  2987.     void Created(GameObject *obj);
  2988.     void Enemy_Seen(GameObject *obj,GameObject *enemy);
  2989.     void Timer_Expired(GameObject *obj,int number);
  2990.     void Killed(GameObject *obj,GameObject *killer);
  2991.     int Unknown1;
  2992. };
  2993.  
  2994. void M02_Nod_Sakura::Created(GameObject *obj)
  2995. {
  2996.     Unknown1 = 0;
  2997.     Commands->Enable_Enemy_Seen(obj, true);
  2998.     Commands->Enable_Engine(obj, true); // LOL?
  2999.     Commands->Disable_Physical_Collisions(obj);
  3000.     ActionParamsStruct Params;
  3001.     Params.Set_Basic(this, 91, 0);
  3002.     Params.Set_Movement(Vector3(0,0,0), 2.500000, 1.000000);
  3003.     Params.Set_Attack(Commands->Get_A_Star(Commands->Get_Position(obj)), 200.000000, 0, true); // probably.. but strange
  3004.     Params.WaypathID = 400397; // probably.
  3005.     Params.MovePathfind = true; // probably.
  3006.     Commands->Action_Goto(obj, Params);
  3007.     Commands->Start_Timer(obj, this, 15, 1);
  3008.     Commands->Start_Timer(obj, this, 10, 3);
  3009. }
  3010.  
  3011. void M02_Nod_Sakura::Enemy_Seen(GameObject *obj,GameObject *enemy)
  3012. {
  3013.     ActionParamsStruct Params;
  3014.     Params.Set_Basic(this, 92, 2);
  3015.     Params.Set_Attack(enemy, 300.000000, 0, true);
  3016.     Commands->Action_Attack(obj, Params); // this one was the most vague ActionParamsStruct i've had so far.. don't completly trust this one
  3017. }
  3018.  
  3019. void M02_Nod_Sakura::Timer_Expired(GameObject *obj,int number)
  3020. {
  3021.     if(number == 1)
  3022.     {
  3023.         Vector3 Pos = Commands->Get_Position(obj);
  3024.         GameObject *Star = Commands->Get_A_Star(Pos);
  3025.         if(Star)
  3026.         {
  3027.             Vector3 StarPos = Commands->Get_Position(Star);
  3028.             if(Commands->Get_Distance(Pos, StarPos) > 300.0)
  3029.                 Commands->Apply_Damage(obj, 10000, "Blamokiller", 0);
  3030.         }
  3031.         Commands->Start_Timer(obj, this, 15, 1);
  3032.     }
  3033.     else if(number == 2)
  3034.         Commands->Destroy_Object(obj);
  3035.     else if(number == 3)
  3036.     {
  3037.         ActionParamsStruct Params;
  3038.         Params.Set_Basic(this, 93, 1);
  3039.         Params.Set_Attack(Commands->Get_A_Star(Commands->Get_Position(obj)), 200.000000, 0, true);
  3040.         Params.MoveArrivedDistance = 5.000000; // probably
  3041.         Commands->Action_Attack(obj, Params);
  3042.     }
  3043. }
  3044.  
  3045. void M02_Nod_Sakura::Killed(GameObject *obj,GameObject *killer)
  3046. {
  3047.     if(*(_DWORD *)(killer + 12) == 1000 && *(_DWORD *)(killer + 16)) // Have no clue yet what member function is called right here.
  3048.             Commands->Send_Custom_Event(obj, *(_DWORD *)(killer + 16), 100, 1, 0);
  3049. }
  3050.  
  3051. class M02_Approach_Vehicle : public ScriptImpClass
  3052. {
  3053.     void Custom(GameObject *obj,int type,int param,GameObject *sender);
  3054.     void Timer_Expired(GameObject *obj,int number);
  3055. };
  3056.  
  3057. void M02_Approach_Vehicle::Custom(GameObject *obj,int type,int param,GameObject *sender)
  3058. {
  3059.     if(!type && !param)
  3060.     {
  3061.         Commands->Enable_Engine(obj, true);
  3062.         ActionParamsStruct Params;
  3063.         Params.Set_Basic(this, 100, 0);
  3064.         Params.Set_Movement(Vector3(0,0,0), 1.000000, 1.000000);
  3065.         Params.MovePathfind = true; // probably.
  3066.         int Area_ID = Get_Int_Parameter("Area_ID");
  3067.         if(Area_ID - 1)
  3068.         {
  3069.             if(Area_ID - 4)
  3070.             {
  3071.                 if((Area_ID - 4) == 2)
  3072.                     Params.WaypathID = 401039;
  3073.             }
  3074.             else
  3075.                 Params.WaypathID = 401031;
  3076.         }
  3077.         else
  3078.             Params.WaypathID = 401009;
  3079.         Commands->Action_Goto(obj, Params);
  3080.         Commands->Start_Timer(obj, this, 6, 0);
  3081.     }
  3082. }
  3083.  
  3084. void M02_Approach_Vehicle::Timer_Expired(GameObject *obj,int number)
  3085. {
  3086.     Commands->Apply_Damage(obj, 10000, "Blamokiller", 0);
  3087. }
  3088.  
  3089. class M02_Destroy_Vehicle : public ScriptImpClass
  3090. {
  3091.     void Created(GameObject *obj);
  3092.     void Timer_Expired(GameObject *obj,int number);
  3093.     void unknown1(void *this, int a2, int a3, int a4);
  3094.     void unknown2(int this, int a2, int a3);
  3095. };
  3096.  
  3097. void M02_Destroy_Vehicle::Created(GameObject *obj)
  3098. {
  3099.     Commands->Enable_Engine(obj, true);
  3100.     Commands->Disable_Physical_Collisions(obj);
  3101.     Commands->Start_Timer(obj, this, 4, 1);
  3102. }
  3103.  
  3104. void M02_Destroy_Vehicle::Timer_Expired(GameObject *obj,int number)
  3105. {
  3106.     if(number == 1)
  3107.     {
  3108.         ActionParamsStruct Params;
  3109.         Params.Set_Basic(this, 99, 0);
  3110.         Params.Set_Movement(Vector3(0,0,0), 1.000000, 2.500000);
  3111.         Params.WaypathID = 400993; // probably.
  3112.         Params.MovePathfind = true;
  3113.         Commands->Action_Goto(obj, Params);
  3114.         Commands->Start_Timer(obj, this, 20, 2);
  3115.     }
  3116.     else if(number == 2)
  3117.         Commands->Apply_Damage(obj, 10000, "Blamokiller", 0);
  3118. }
  3119.  
  3120. void M02_Destroy_Vehicle::unknown1(void *this, int a2, int a3, int a4)
  3121. {
  3122.     // I'm sorry but i was unable to find out what script event this is. The first parameter (a1) is usually a this pointer, the second parameter (a2) is usually a GameObject *obj. The others are for you to guess.. Sometimes there are more variables than the function suggests.
  3123.     Vector3 Pos = Commands->Get_Position(obj);
  3124.     GameObject *Star = Commands->Get_A_Star(Pos);
  3125.     if(a3 != Star)
  3126.         Commands->Apply_Damage(obj, 10000, "Blamokiller", 0);
  3127. }
  3128.  
  3129. void M02_Destroy_Vehicle::unknown2(int this, int a2, int a3)
  3130. {
  3131.     // I'm sorry but i was unable to find out what script event this is. The first parameter (a1) is usually a this pointer, the second parameter (a2) is usually a GameObject *obj. The others are for you to guess.. Sometimes there are more variables than the function suggests.
  3132.     ActionParamsStruct Params;
  3133.     Params.Set_Basic(this, 90, 0);
  3134.     Params.Set_Movement(Vector3(0,0,0), 1.000000, 2.000000);
  3135.     Params.Set_Attack(a3, 200.000000, 0, true);
  3136.     Commands->Action_Attack(obj, Params);
  3137. }
  3138.  
  3139. class M02_Mendoza : public ScriptImpClass
  3140. {
  3141.     void Register_Auto_Save_Variables();
  3142.     void Created(GameObject *obj);
  3143.     void Damaged(GameObject *obj,GameObject *damager,float amount);
  3144.     void Action_Complete(GameObject *obj,int action_id,ActionCompleteReason complete_reason);
  3145.     void Timer_Expired(GameObject *obj,int number);
  3146.     float Health;
  3147.     float ShieldStr;
  3148.     bool DidFlee;
  3149.     bool MoveRandom;
  3150.     int VoiceTwiddler;
  3151. };
  3152.  
  3153. void M02_Mendoza::Register_Auto_Save_Variables()
  3154. {
  3155.     Auto_Save_Variable(&DidFlee, 1, 1);
  3156.     Auto_Save_Variable(&Health, 4, 2);
  3157.     Auto_Save_Variable(&ShieldStr, 4, 3);
  3158.     Auto_Save_Variable(&VoiceTwiddler, 4, 4);
  3159.     Auto_Save_Variable(&MoveRandom, 1, 5);
  3160. }
  3161.  
  3162. void M02_Mendoza::Created(GameObject *obj)
  3163. {
  3164.     Health = Commands->Get_Health(obj);
  3165.     ShieldStr = Commands->Get_Shield_Strength(obj);
  3166.     DidFlee = false;
  3167.     MoveRandom = true;
  3168.     VoiceTwiddler = 0;
  3169.     Commands->Innate_Disable(obj);
  3170.     ActionParamsStruct Params;
  3171.     Params.Set_Basic(this, 98, 3);
  3172.     Params.Set_Attack(Commands->Get_A_Star(Commands->Get_Position(obj)), 300.000000, 0, true);
  3173.     Commands->Action_Attack(obj, Params);
  3174.     Commands->Start_Timer(obj, this, 2, 1);
  3175. }
  3176.  
  3177. void M02_Mendoza::Damaged(GameObject *obj,GameObject *damager,float amount)
  3178. {
  3179.     Commands->Set_Health(obj, Health);
  3180.     ShieldStr -= 2.0; // Lol all damage done to this bastard is capped to 2.
  3181.     Commands->Set_Shield_Strength(obj, ShieldStr);
  3182.     if(ShieldStr < 1.0 && !DidFlee)
  3183.     {
  3184.         DidFlee = true;
  3185.         ActionParamsStruct Params;
  3186.         Params.Set_Basic(this, 100, 1);
  3187.         Params.Set_Movement(Vector3(1260.006958, 535.460022, 18.427999), 0.800000, 5.000000);
  3188.         Commands->Action_Goto(obj, Params);
  3189.     }
  3190. }
  3191.  
  3192. void M02_Mendoza::Action_Complete(GameObject *obj,int action_id,ActionCompleteReason complete_reason)
  3193. {
  3194.     if(action_id == 1)
  3195.     {
  3196.         Commands->Innate_Disable(obj);
  3197.         Vector3 Pos = Commands->Get_Position(obj);
  3198.         GameObject *CinObject = Create_Object("Invisible_Object", Pos);
  3199.         if(CinObject)
  3200.         {
  3201.             Commands->Attach_Script(CinObject, "Test_Cinematic", "XG_ROPE_EVAC_F.txt");
  3202.             int MX2DSGN_DSGN0025 = Commands->Create_Conversation("MX2DSGN_DSGN0025", 100, 300, true);
  3203.             Commands->Join_Conversation(obj, MX2DSGN_DSGN0025, true, false, false);
  3204.             GameObject *Star = Commands->Get_A_Star(Pos);
  3205.             Commands->Join_Conversation(Star, MX2DSGN_DSGN0025, true, false, false);
  3206.             Commands->Join_Conversation(0, MX2DSGN_DSGN0025, true, true, true);
  3207.             Commands->Start_Conversation(MX2DSGN_DSGN0025, 0);
  3208.         }
  3209.     }
  3210.     else if(action_id == 2)
  3211.     {
  3212.         ActionParamsStruct Params;
  3213.         Params.Set_Basic(this, 98, 3);
  3214.         Params.Set_Attack(Commands->Get_A_Star(Commands->Get_Position(obj)), 300.000000, 0, true);
  3215.         Commands->Action_Attack(obj, Params);
  3216.     }
  3217. }
  3218.  
  3219. void M02_Mendoza::Timer_Expired(GameObject *obj,int number)
  3220. {
  3221.     if(number == 1)
  3222.     {
  3223.         if(!DidFlee)
  3224.         {
  3225.             VoiceTwiddler++;
  3226.             if (VoiceTwiddler > 6)
  3227.                 VoiceTwiddler = 1;
  3228.             int ConversationID;
  3229.             switch(VoiceTwiddler)
  3230.             {
  3231.                 case 1:
  3232.                     ConversationID = Commands->Create_Conversation("MX2DSGN_DSGN0019", 100, 300, true);
  3233.                     break;
  3234.                 case 2:
  3235.                     ConversationID = Commands->Create_Conversation("MX2DSGN_DSGN0020", 100, 300, true);
  3236.                     break;
  3237.                 case 3:
  3238.                     ConversationID = Commands->Create_Conversation("MX2DSGN_DSGN0021", 100, 300, true);
  3239.                     break;
  3240.                 case 4:
  3241.                     ConversationID = Commands->Create_Conversation("MX2DSGN_DSGN0022", 100, 300, true);
  3242.                     break;
  3243.                 case 5:
  3244.                     ConversationID = Commands->Create_Conversation("MX2DSGN_DSGN0023", 100, 300, true);
  3245.                     break;
  3246.                 case 6:
  3247.                     ConversationID = Commands->Create_Conversation("MX2DSGN_DSGN0024", 100, 300, true);
  3248.                     break;
  3249.                 default:
  3250.                     ConversationID = Commands->Create_Conversation("MX2DSGN_DSGN0024", 100, 300, true);
  3251.             }
  3252.             Commands->Join_Conversation(obj, ConversationID, true, false, false);
  3253.             Vector3 Pos = Commands->Get_Position(obj);
  3254.             GameObject *Star = Commands->Get_A_Star(Pos);
  3255.             Commands->Join_Conversation(Star, ConversationID, true, false, false);
  3256.             Commands->Start_Conversation(ConversationID, 0);
  3257.             Commands->Start_Timer(obj, this, 7, 1);
  3258.             if(MoveRandom)
  3259.                 MoveRandom = false;
  3260.             else
  3261.             {
  3262.                 MoveRandom = true;
  3263.                 Commands->Action_Reset(obj, 100);
  3264.                 ActionParamsStruct Params;
  3265.                 Params.Set_Basic(this 99, 2);
  3266.                 Vector3 GotoPos = Vector3(0,0,0);
  3267.                 int Random = Commands->Get_Random_Int(0, 4); // v16
  3268.                 if(Random > 3)
  3269.                     Random = 3;
  3270.                 switch(Random)
  3271.                 {
  3272.                     case 0:
  3273.                         GotoPos = Vector3(1248.592041, 568.431030, 17.396000);
  3274.                         break;
  3275.                     case 1:
  3276.                         GotoPos = Vector3(1264.680054, 564.458984, 17.816000)
  3277.                         break;
  3278.                     case 2:
  3279.                         GotoPos = Vector3(1270.219971, 541.406006, 17.978001);
  3280.                         break;
  3281.                     case 3:
  3282.                         GotoPos = Vector3(1251.213013, 544.658020, 17.854000);
  3283.                         break;
  3284.                 }
  3285.                 Params.Set_Movement(GotoPos, 0.800000, 5.000000);
  3286.                 Commands->Action_Goto(obj, Params);
  3287.             }
  3288.         }
  3289.     }
  3290. }
  3291.  
  3292. class M02_Nod_Jet : public ScriptImpClass
  3293. {
  3294.     void Created(GameObject *obj);
  3295.     void Action_Complete(GameObject *obj,int action_id,ActionCompleteReason complete_reason);
  3296. };
  3297.  
  3298. void M02_Nod_Jet::Created(GameObject *obj)
  3299. {
  3300.     Commands->Enable_Engine(obj, true);
  3301.     Commands->Disable_Physical_Collisions(obj);
  3302.     ActionParamsStruct Params;
  3303.     Params.Set_Basic(this, 100, 1);
  3304.     Params.Set_Movement(Vector3(1143.089966, 702.080017, 70.500000), 4.000000, 5.000000);
  3305.     Commands->Action_Goto(obj, Params);
  3306. }
  3307.  
  3308. void M02_Nod_Jet::Action_Complete(GameObject *obj,int action_id,ActionCompleteReason complete_reason)
  3309. {
  3310.     if(action_id == 1)
  3311.         Commands->Destroy_Object(obj);
  3312. }
  3313.  
  3314. class M02_Nod_Jet_Waypath : public ScriptImpClass
  3315. {
  3316.     void Created(GameObject *obj);
  3317. };
  3318.  
  3319. void M02_Nod_Jet_Waypath::Created(GameObject *obj)
  3320. {
  3321.     Commands->Enable_Engine(obj, true);
  3322.     Commands->Disable_Physical_Collisions(obj);
  3323.     ActionParamsStruct Params;
  3324.     Params.Set_Basic(this, 100, 1);
  3325.     Params.Set_Movement(Vector3(0,0,0), 4.000000, 5.000000);
  3326.     Params.WaypathID = 403389;
  3327.     Params.MovePathfind = true;
  3328.     Commands->Action_Goto(obj, Params);
  3329. }
  3330.  
  3331. class M02_GDI_Helicopter : public ScriptImpClass
  3332. {
  3333.     void Created(GameObject *obj);
  3334. };
  3335.  
  3336. void M02_GDI_Helicopter::Created(GameObject *obj)
  3337. {
  3338.     Commands->Enable_Engine(obj, true);
  3339.     Commands->Disable_Physical_Collisions(obj);
  3340.     ActionParamsStruct Params;
  3341.     Params.Set_Basic(this, 100, 1);
  3342.     Params.Set_Movement(Vector3(100.750000, 17.420000, -0.016740), 1.000000, 5.000000); // Location was a bit weird, don't completly trust this one. Its either this or the other way around  (Vector3(-0.016740, 17.420000, 100.750000)) or maybe something even weirder...
  3343.     Commands->Action_Goto(obj, Params);
  3344. }
  3345.  
  3346. class M02_Commando_Start : public ScriptImpClass
  3347. {
  3348.     void Created(GameObject *obj);
  3349. };
  3350.  
  3351. void M02_Commando_Start::Created(GameObject *obj)
  3352. {
  3353.     Commands->Give_PowerUp(obj, "POW_MineRemote_Player", false);
  3354.     Commands->Give_PowerUp(obj, "POW_Chaingun_Player", false);
  3355.     Commands->Give_PowerUp(obj, "POW_SniperRifle_Player", false);
  3356. }
  3357.  
  3358. class M02_Data_Disk : public ScriptImpClass
  3359. {
  3360.     void Custom(GameObject *obj,int type,int param,GameObject *sender);
  3361. };
  3362.  
  3363. void M02_Data_Disk::Custom(GameObject *obj,int type,int param,GameObject *sender)
  3364. {
  3365.     if(type == CUSTOM_EVENT_POWERUP_GRANTED)
  3366.     {
  3367.         int Disk_ID = Get_Int_Parameter("Disk_ID") - 1;
  3368.         if(Disk_ID)
  3369.         {
  3370.             if(Disk_ID == 1)
  3371.                 Commands->Clear_Map_Region_By_Pos(Vector3(1016.429993, 885.960022, 35.410000), 30);
  3372.             else
  3373.                 Commands->Clear_Map_Region_By_Pos(Vector3(1204.459961, 565.349976, 37.840000), 15);
  3374.         }
  3375.         else
  3376.             Commands->Clear_Map_Region_By_Pos(Vector3(425.760010, 840.780029, 8.190000), 15);
  3377.         Commands->Set_HUD_Help_Text(7587, Vector3(0.196000, 0.882000, 0.196000));
  3378.     }
  3379. }
  3380.  
  3381. class M02_Encyclopedia_Reveal : public ScriptImpClass
  3382. {
  3383.     void Custom(GameObject *obj,int type,int param,GameObject *sender);
  3384. };
  3385.  
  3386. void M02_Encyclopedia_Reveal::Custom(GameObject *obj,int type,int param,GameObject *sender)
  3387. {
  3388.     if(type == CUSTOM_EVENT_POWERUP_GRANTED)
  3389.     {  
  3390.         if(Get_Int_Parameter("Disk_ID") == 1)
  3391.             Commands->Reveal_Encyclopedia_Vehicle(5);
  3392.         else
  3393.             Commands->Reveal_Encyclopedia_Building(15);
  3394.         Commands->Set_HUD_Help_Text(7588, Vector3(0.196000, 0.882000, 0.196000));
  3395.     }
  3396. }
  3397.  
  3398. ScriptRegistrant<M02_Encyclopedia_Reveal> M02_Encyclopedia_Reveal_Registrant("M02_Encyclopedia_Reveal", "Disk_ID:int");
  3399. ScriptRegistrant<M02_Data_Disk> M02_Data_Disk_Registrant("M02_Data_Disk", "Disk_ID:int");
  3400. ScriptRegistrant<M02_Commando_Start> M02_Commando_Start_Registrant("M02_Commando_Start", "");
  3401. ScriptRegistrant<M02_GDI_Helicopter> M02_GDI_Helicopter_Registrant("M02_GDI_Helicopter", "");
  3402. ScriptRegistrant<M02_Nod_Jet_Waypath> M02_Nod_Jet_Waypath_Registrant("M02_Nod_Jet_Waypath", "");
  3403. ScriptRegistrant<M02_Nod_Jet> M02_Nod_Jet_Registrant("M02_Nod_Jet", "");
  3404. ScriptRegistrant<M02_Mendoza> M02_Mendoza_Registrant("M02_Mendoza", "");
  3405. ScriptRegistrant<M02_Destroy_Vehicle> M02_Destroy_Vehicle_Registrant("M02_Destroy_Vehicle", "");
  3406. ScriptRegistrant<M02_Approach_Vehicle> M02_Approach_Vehicle_Registrant("M02_Approach_Vehicle", "Area_ID:int");
  3407. ScriptRegistrant<M02_Player_Vehicle> M02_Player_Vehicle_Registrant("M02_Player_Vehicle", "Area_ID:int");
  3408. ScriptRegistrant<M02_Nod_Vehicle> M02_Nod_Vehicle_Registrant("M02_Nod_Vehicle", "Area_ID:int");
  3409. ScriptRegistrant<M02_Nod_Apache> M02_Nod_Apache_Registrant("M02_Nod_Apache", "Area_ID:int");
  3410. ScriptRegistrant<M02_Stationary_Vehicle> M02_Stationary_Vehicle_Registrant("M02_Stationary_Vehicle", "Area_ID:int");
  3411. ScriptRegistrant<M02_GDI_Soldier> M02_GDI_Soldier_Registrant("M02_GDI_Soldier", "Area_ID:int, Soldier_Type=0:int");
  3412. ScriptRegistrant<M02_Nod_Convoy_Truck> M02_Nod_Convoy_Truck_Registrant("M02_Nod_Convoy_Truck", "");
  3413. ScriptRegistrant<M02_Destroy_Objective> M02_Destroy_Objective_Registrant("M02_Destroy_Objective", "Objective_ID:int");
  3414. ScriptRegistrant<M02_Helipad> M02_Helipad_Registrant("M02_Helipad", "");
  3415. ScriptRegistrant<M02_Dam_MCT> M02_Dam_MCT_Registrant("M02_Dam_MCT", "");
  3416. ScriptRegistrant<M02_Power_Plant> M02_Power_Plant_Registrant("M02_Power_Plant", "");
  3417. ScriptRegistrant<M02_Obelisk> M02_Obelisk_Registrant("M02_Obelisk", "");
  3418. ScriptRegistrant<M02_Nod_Soldier> M02_Nod_Soldier_Registrant("M02_Nod_Soldier", "Area_Number:int,Area_Officer:int,Pre_Placed:int");
  3419. ScriptRegistrant<M02_Reset_Spawn> M02_Reset_Spawn_Registrant("M02_Reset_Spawn", "Area_ID:int,Spawn_Type:int");
  3420. ScriptRegistrant<M02_Objective_Zone> M02_Objective_Zone_Registrant("M02_Objective_Zone", "");
  3421. ScriptRegistrant<M02_Objective_Controller> M02_Objective_Controller_Registrant("M02_Objective_Controller", "");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement