------------------------------------------------------------
--     2008 Elite Games Team (R) All Rights Reserved      --
--             "STAR WOLVES 2: CIVIL WAR"                 --
------------------------------------------------------------

------------------------------------------------------------
-- Auto-built Quest-Action-file created by "MapBuilder2"  --
------------------------------------------------------------
--      "MapBuilder2" v.2.6 Elite Games Team              --
------------------------------------------------------------


--info:top=110,left=80,allvis=0;
function StartMission()
  if (GetQuestState("quest_9e_01")==QUEST_PROCESS) then SetQuestState("quest_9e_01", QUEST_DONE); end;
  SetQuestLabel("QuestPoint", "1");
  StartDialog("Dialog1");
end;


--info:top=160,left=110,allvis=0;
function GoTo_Station()
  last_loc = GetLastLocation();
  if (last_loc=="nj2") then
    NewTrigger("outside", TrueCondition, Create_Path, mothership, PORTAL_D:GetPosition(), 100);
  else
    NewTrigger("outside", TrueCondition, Create_Path, mothership, PORTAL_R:GetPosition(), 100);
  end;
end;


--info:top=200,left=80,allvis=0;
function Create_Path()
  nav_current = CreateNavPoint("", mothership:GetPosition(), "nav_void.dds", RGB(255,255,255));
  LineToStation = CreateLine(nav_current, nav_STO, RGB(20,80,220), .3, TRUE, .2, 1);
  NewFlight("Grey_Group", "meier", "Cleaner_merc1", "Trader", mothership:GetPosition()+Vector3(0, 0, 300), Vector3(0, 0, -1));
  trig_AttackMeier = NewTrigger("reps", TrueCondition, Attack_Meier, Player_Group, Grey_Group, RELATION_WAR);
  flight_meier:Escort(mothership);
  NewTrigger("f_object_inside", TrueCondition, Meier_Dialog, flight_meier, mothership, 70);
  AddQuest("quest_9e_02", "#L_Quest_9e_02a", "#L_Quest_9e_02b", QUEST_PROCESS);
end;


--info:top=240,left=80,allvis=0;
function Meier_Dialog()
  SetNormalTimeMode();
  flight_meier:Stop();
  SetQuestLabel("QuestPoint", "2");
  NewVksFlight("Vks_Group", "vks1", Vector3(550, 20, -300), 1, 14, Vector3(1, 0, 0)); 
  NewVksFlight("Vks_Group", "vks2", Vector3(570, 20, -250), 1, 15, Vector3(0.5, 0, -0.5)); 
  NewVksFlight("Vks_Group", "vks3", Vector3(770, 20, -350), 2, 14, Vector3(-0.5, 0, 0.5));
  NewVksFlight("Vks_Group", "vks4", Vector3(770, 20, -330), 3, 11, Vector3(-0.5, 0, 0.5));
  flight_vks3:Escort(ship_vks4_1);
  NewTrigger("inside", TrueCondition, Near_Station, mothership, Vector3(600, 0, -300), 250); 
  StartDialog("Dialog2");
end;


--info:top=300,left=260,allvis=0;
function Attack_Meier()
  MeierSpeaker:Message("#L_Meier_01", 4);
  NewTrigger("f_died", TrueCondition, After_Fight_1, flight_meier);
end;


--info:top=340,left=260,allvis=0;
function After_Fight_1()
  SetQuestLabel("Meier", "kill");
  mothership:AddModuleToInventory("Escape_PodMeier", 1);
  LastochkaSpeaker:Message("#L_Lastochka_03", 10, "After_Fight_2");
end;


--info:top=380,left=260,allvis=0;
function After_Fight_2()
  HeroSpeaker:Message("#L_Hero_04", 15, "After_Fight_3");
end;


--info:top=420,left=260,allvis=0;
function After_Fight_3()
  SedoySpeaker:Message("#L_Sedoy_02", 8, "After_Fight_4");
end;


--info:top=460,left=260,allvis=0;
function After_Fight_4()
  HeroSpeaker:Message("#L_Hero_05", 12);
end;


--info:top=300,left=130,allvis=0;
function Meier_Ok()
  SetQuestLabel("Meier", "yes");
  LastochkaSpeaker:Message("#L_Lastochka_01", 8, "Ok_ToStation_1");
end;


--info:top=340,left=130,allvis=0;
function Ok_ToStation_1()
  HeroSpeaker:Message("#L_Hero_01", 10, "Ok_ToStation_2");
end;


--info:top=380,left=130,allvis=0;
function Ok_ToStation_2()
  LastochkaSpeaker:Message("#L_Lastochka_02", 6, "Ok_ToStation_3");
end;


--info:top=420,left=130,allvis=0;
function Ok_ToStation_3()
  HeroSpeaker:Message("#L_Hero_02", 15);
end;


--info:top=300,left=20,allvis=0;
function Meier_No()
  SetQuestLabel("Meier", "no");
  SedoySpeaker:Message("#L_Sedoy_01", 8, "No_ToStation");
end;


--info:top=340,left=20,allvis=0;
function No_ToStation()
  HeroSpeaker:Message("#L_Hero_03", 12);
end;


--info:top=220,left=340,allvis=0;
function Start_Point2()
  nav_current = CreateNavPoint("", mothership:GetPosition(), "nav_void.dds", RGB(255,255,255));
  LineToStation = CreateLine(nav_current, nav_STO, RGB(20,80,220), .3, TRUE, .2, 1);
  NewFlight("Grey_Group", "meier", "Cleaner_merc1", "Trader", PORTAL_D:GetPosition()+Vector3(60, 0, 50), Vector3(0, 0, 1));
  trig_AttackMeier = NewTrigger("reps", TrueCondition, Attack_Meier, Player_Group, Grey_Group, RELATION_WAR);
  NewVksFlight("Vks_Group", "vks1", Vector3(550, 20, -300), 1, 14, Vector3(1, 0, 0)); 
  NewVksFlight("Vks_Group", "vks2", Vector3(570, 20, -250), 1, 15, Vector3(0.5, 0, -0.5)); 
  NewVksFlight("Vks_Group", "vks3", Vector3(770, 20, -350), 2, 14, Vector3(-0.5, 0, 0.5));
  NewVksFlight("Vks_Group", "vks4", Vector3(770, 20, -330), 3, 11, Vector3(-0.5, 0, 0.5));
  flight_vks3:Escort(ship_vks4_1);
  NewTrigger("inside", TrueCondition, Near_Station, mothership, Vector3(600, 0, -300), 250); 
end;


--info:top=750,left=200,allvis=0;
function Near_Station()
  flight_vks1:Attack(Inoco_STO);
  flight_vks2:Attack(Inoco_STO);
  trig_AttackMeier:Delete();
  trig_StationDied = NewTrigger("died", TrueCondition, After_Blow_1, Inoco_STO);
  trig_NearStation = NewTrigger("inside", TrueCondition, After_Blow_Go, mothership, Vector3(600, 0, -300), 150);
end;


--info:top=780,left=240,allvis=0;
function After_Blow_Go()
  LineToStation:Delete();
  LineToStation = NIL;
  nav_current:Delete();
  nav_current = NIL;
  trig_StationDied:Delete();
  trig_NearStation:Delete();
  Inoco_STO:Blow();
  SetQuestState("quest_9e_02", QUEST_DONE);
  Timer_Seq(2, After_Blow_1);
end;


--info:top=810,left=200,allvis=0;
function After_Blow_1()
  SedoySpeaker:Message("#L_Sedoy_03", 6, "After_Blow_2");
end;


--info:top=850,left=200,allvis=0;
function After_Blow_2()
  Vks1Speaker:Message("#L_vks_01", 3, "After_Blow_3");
end;


--info:top=890,left=200,allvis=0;
function After_Blow_3()
  radarV = Vks_Group:CreateShipAttachedRadar(mothership);
  new_SetGroupRelations("Vks_Group", PLAYER_GROUP, "W");
  flight_vks1:Escort(mothership);
  flight_vks2:Escort(mothership);
  countg = 0;
  countf = flight_vks1:GetPilotCount();
  for i=0,countf,1 do
    pilot_tmp = flight_vks1:GetPilotByNumber(i);
    ship_tmp = pilot_tmp:GetShip();
    NewTrigger("died", DiedGreyCondition, Reinforcement, ship_tmp);
    countg = countg + 1;
  end;
  countf = flight_vks2:GetPilotCount();
  for i=0,countf,1 do
    pilot_tmp = flight_vks2:GetPilotByNumber(i);
    ship_tmp = pilot_tmp:GetShip();
    NewTrigger("died", DiedGreyCondition, Reinforcement, ship_tmp);
    countg = countg + 1;
  end;
  flagUel = countg - floor(0.5+(countg / 2));
  Vks2Speaker:Message("#L_vks_02", 3, "After_Blow_4");
end;


--info:top=920,left=230,allvis=0;
function After_Blow_4()
  LastochkaSpeaker:Message("#L_Lastochka_04", 4);
end;


--info:top=940,left=200,allvis=0;
--------------------------------------------------------------------------------
--function Reinforcement()
--  Vks2Speaker:Message("#L_vks_03", 5);
--  flight_vks4:Move(mothership:GetPosition()+Vector3(40, 0, -30));
--  count = 3;
--  if (flight_vks1:IsAlive()) then
--    NewTrigger("f_died", DiedCondition, After_Vks_Died, flight_vks1);
--  else
--    NewTrigger("f_died", DiedCondition, After_Vks_Died, flight_vks2);
--  end; 
--  NewTrigger("f_died", DiedCondition, After_Vks_Died, flight_vks3);
--  NewTrigger("f_died", DiedCondition, After_Vks_Died, flight_vks4);
--end;

function Reinforcement()
  Vks2Speaker:Message("#L_vks_03", 5);
  flight_vks4:Move(mothership:GetPosition()+Vector3(40, 0, -30));
  count = 3;
  if (flight_vks1:IsAlive()) then
    NewTrigger("f_died", DiedCondition, count_or_go_on, flight_vks1);
  else
    NewTrigger("f_died", DiedCondition, count_or_go_on, flight_vks2);
  end; 
  NewTrigger("f_died", DiedCondition, count_or_go_on, flight_vks3);
  NewTrigger("f_died", DiedCondition, count_or_go_on, flight_vks4);
end;
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

function count_or_go_on()
  if (pilot_El) or (pilot_Ace) or (pilot_Astra) or (pilot_Bavard) or (pilot_Joker) then
    if (count_pilots() >= 6) then
      choose_pilot();
    else
      After_Vks_Died();
    end;
  else
    After_Vks_Died();
  end; 
end;

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------



--info:top=1480,left=520,allvis=0;
function DiedCondition()
  count = count - 1;
  if (count==0) then
    return TRUE;
  end;
  return FALSE;
end;


--info:top=980,left=200,allvis=0;
function After_Vks_Died()
  SetQuestLabel("QuestPoint", "3");
  Vks_Group:DeleteRadar(radarV);
  inventory = GetInventory();
  if (inventory:IsExist("Escape_PodMeier")) then
    StartDialog("Dialog3");
  else
    StartDialog("Dialog4");
  end;
end;


--info:top=1020,left=200,allvis=0;
function Add_Yana()
  AddPilotToPlayer(YanaSpeaker);
end;


--info:top=1060,left=320,allvis=0;
function GoTo_Ashelon()
  nav_current = CreateNavPoint("", mothership:GetPosition(), "nav_void.dds", RGB(255,255,255));
  LineToPortal = CreateLine(nav_current, NP_PORTAL_R, RGB(20,80,220), .3, TRUE, .2, 1);
  AddQuest("quest_9e_03", "#L_Quest_9e_03a", "#L_Quest_9e_03b", QUEST_PROCESS);
  if (inventory:IsExist("Escape_PodMeier")) then
    NewTrigger("inside", TrueCondition, Attack_Grey, mothership, PORTAL_D:GetPosition(), 200);
  else
    NewTrigger("inside", TrueCondition, Again_Meier, mothership, PORTAL_D:GetPosition(), 200);
  end;
end;


--info:top=1060,left=80,allvis=0;
function GoTo_NJ2()
  nav_current = CreateNavPoint("", mothership:GetPosition(), "nav_void.dds", RGB(255,255,255));
  LineToPortal = CreateLine(nav_current, NP_PORTAL_D, RGB(20,80,220), .3, TRUE, .2, 1);
  if (inventory:IsExist("Escape_PodMeier")) then
    AddQuest("quest_9e_04", "#L_Quest_9e_04a", "#L_Quest_9e_04b", QUEST_PROCESS);
    NewTrigger("inside", TrueCondition, Attack_Grey, mothership, PORTAL_D:GetPosition(), 200);
  else
    AddQuest("quest_9e_05", "#L_Quest_9e_05a", "#L_Quest_9e_05b", QUEST_PROCESS);
    NewTrigger("inside", TrueCondition, Again_Meier, mothership, PORTAL_D:GetPosition(), 200);
  end;
end;


--info:top=1120,left=200,allvis=0;
function Again_Meier()
  flight_meier:Escort(mothership);
  NewTrigger("f_object_inside", TrueCondition, Again_Meier_Dialog, flight_meier, mothership, 70);
end;


--info:top=1160,left=200,allvis=0;
function Again_Meier_Dialog()
  SetNormalTimeMode();
  MothershipFlight:Stop();
  flight_meier:Stop();
  SetQuestState("quest_9e_05", QUEST_DONE);
  MeierSpeaker:Message("#L_Meier_02", 3, "Again_Meier_1");
end;


--info:top=1200,left=200,allvis=0;
function Again_Meier_1()
  HeroSpeaker:Message("#L_Hero_06", 7, "Again_Meier_2");
end;


--info:top=1240,left=200,allvis=0;
function Again_Meier_2()
  MeierSpeaker:Message("#L_Meier_03", 6, "Again_Meier_3");
end;


--info:top=1280,left=200,allvis=0;
function Again_Meier_3()
  HeroSpeaker:Message("#L_Hero_07", 3, "Again_Meier_4");
end;


--info:top=1320,left=200,allvis=0;
function Again_Meier_4()
  MeierSpeaker:Message("#L_Meier_04", 5);
  Timer_Seq(1, Attack_Grey);
end;


--info:top=1370,left=200,allvis=0;
function Attack_Grey()
  if (GetQuestState("quest_9e_03")==QUEST_PROCESS) then SetQuestState("quest_9e_03", QUEST_FAILED); end;
  NewGreyFlight("Grey_Group", "grey1", mothership:GetPosition()+Vector3(60, 5, 0), 1, 7, Vector3(-1, 0, 0));
  countg = 0;
  countf = flight_grey1:GetPilotCount();
  for i=0,countf,1 do
    pilot_tmp = flight_grey1:GetPilotByNumber(i);
    ship_tmp = pilot_tmp:GetShip();
    ship_tmp:PlayFX("Cloak Out.shfx");
    NewTrigger("died", DiedGreyCondition, Uel_ComeOn, ship_tmp);
    countg = countg + 1;
  end;
  NewGreyFlight("Grey_Group", "grey2", mothership:GetPosition()+Vector3(0, 5, -70), 1, 7, Vector3(0, 0, 1));
  countf = flight_grey2:GetPilotCount();
  for i=0,countf,1 do
    pilot_tmp = flight_grey2:GetPilotByNumber(i);
    ship_tmp = pilot_tmp:GetShip();
    ship_tmp:PlayFX("Cloak Out.shfx");
    NewTrigger("died", DiedGreyCondition, Uel_ComeOn, ship_tmp);
    countg = countg + 1;
  end;
  NewGreyFlight("Grey_Group", "grey3", mothership:GetPosition()+Vector3(-40, 5, 65), 1, 9, Vector3(0.5, 0, -0.5));
  countf = flight_grey3:GetPilotCount();
  for i=0,countf,1 do
    pilot_tmp = flight_grey3:GetPilotByNumber(i);
    ship_tmp = pilot_tmp:GetShip();
    ship_tmp:PlayFX("Cloak Out.shfx");
    NewTrigger("died", DiedGreyCondition, Uel_ComeOn, ship_tmp);
    countg = countg + 1;
  end;
  flagUel = countg - floor(0.5+(countg / 3));
  new_SetGroupRelations("Grey_Group", PLAYER_GROUP, "W");
end;


--info:top=1420,left=500,allvis=0;
function DiedGreyCondition()
  countg = countg - 1;
  if (countg==flagUel) then
    return TRUE;
  end;
  return FALSE;
end;


--info:top=1420,left=200,allvis=0;
function Uel_ComeOn()
  PORTAL_D:Start(5, 0);
  NewFlight("Uel_Group", "uel1", "Manticore_ino1", "Uel", PORTAL_D:GetPosition() + Vector3(0,0,20), Vector3(0, 0, 1));
  NewInocoFlight("Uel_Group", "uel2", PORTAL_D:GetPosition()+Vector3(0, 15, 10), 1, 16, Vector3(0, 0, 1));
  NewInocoFlight("Uel_Group", "uel3", PORTAL_D:GetPosition()+Vector3(-11, -11, 10), 1, 16, Vector3(0, 0, 1));
  NewInocoFlight("Uel_Group", "uel4", PORTAL_D:GetPosition()+Vector3(11, -11, 10), 1, 16, Vector3(0, 0, 1));
  flight_uel2:Escort(mothership);
  flight_uel3:Escort(mothership);
  flight_uel4:Escort(mothership);
  flight_uel1:Escort(mothership);
  NewTrigger("f_object_inside", TrueCondition, Uel_Help, flight_uel1, mothership, 100);
  count = 0;
  if (flight_grey1:IsAlive()) then
    count = count + 1;
    NewTrigger("f_died", DiedCondition, Uel_Dialog, flight_grey1);
  end;
  if (flight_grey2:IsAlive()) then
    count = count + 1;
    NewTrigger("f_died", DiedCondition, Uel_Dialog, flight_grey2);
  end;
  if (flight_grey3:IsAlive()) then
    count = count + 1;
    NewTrigger("f_died", DiedCondition, Uel_Dialog, flight_grey3);
  end;
  if (flight_meier:IsAlive()) then
    count = count + 1;
    NewTrigger("f_died", DiedCondition, Uel_Dialog, flight_meier);
  end;
end;


--info:top=1470,left=230,allvis=0;
function Uel_Help()
  new_SetGroupRelations("Grey_Group", "Uel_Group", "W");
  flight_uel1:Stop();
  if (count~=0) then
    LastochkaSpeaker:Message("#L_Lastochka_05", 4, "Uel_Help_Next");
  end;
end;


--info:top=1510,left=230,allvis=0;
function Uel_Help_Next()
  HeroSpeaker:Message("#L_Hero_07", 3);
end;


--info:top=1540,left=200,allvis=0;
function Uel_Dialog()
  SetQuestLabel("QuestPoint", "4");
  if (GetLevelDifficult()==HARD) then
    StartDialog("Dialog5");
  elseif (GetLevelDifficult()==NORMAL) then
    StartDialog("Dialog9");
  else
    StartDialog("Dialog10");
  end;
end;


--info:top=1570,left=240,allvis=0;
function Uel_Pay()
  if (GetLevelDifficult()==HARD) then
    AddPlayerCredits(500000);
  elseif (GetLevelDifficult()==NORMAL) then
    AddPlayerCredits(1250000);
  else
    AddPlayerCredits(2500000);
  end;
end;


--info:top=1600,left=240,allvis=0;
function Remove_Meier()
  if (inventory:IsExist("Escape_PodMeier")) then inventory:DeleteModule("Escape_PodMeier"); end;
end;


--info:top=1620,left=200,allvis=0;
function After_Uel_Dialog()
  if (GetQuestState("quest_9e_04")==QUEST_PROCESS) then RemoveQuest("quest_9e_04"); end;
  if (flight_uel2:IsAlive()) then flight_uel2:Escort(ship_uel1_1); end;
  if (flight_uel3:IsAlive()) then flight_uel3:Escort(ship_uel1_1); end;
  if (flight_uel4:IsAlive()) then flight_uel4:Escort(ship_uel1_1); end;
  local pos = ship_uel1_1:GetPosition();
  local orn = ship_uel1_1:GetVectorOrientation();
  local glow_orn = ship_uel1_1:GetVectorOrientation();
  orn.x = orn.x * 25;
  orn.y = orn.y * 25;
  orn.z = orn.z * 25;
  glow_orn.x = -glow_orn.x;
  glow_orn.y = -glow_orn.y;
  glow_orn.z = -glow_orn.z;
  CreatePortalGlow(pos+orn, glow_orn, 5);
  flight_uel1:Move(pos+orn);
  ship_uel1_1:PlayFX("Portal Out.shfx");
  Timer_Seq(5,Uel_Out);
end;


--info:top=1700,left=200,allvis=0;
function Uel_Out()
  flight_uel1:Delete();
  if (flight_uel2:IsAlive()) then flight_uel2:Delete(); end;
  if (flight_uel3:IsAlive()) then flight_uel3:Delete(); end;
  if (flight_uel4:IsAlive()) then flight_uel4:Delete(); end;
  RemovePost("mail_008d");
  RemovePost("mail_008e_3");
  AddPost("news009_2");
  AddPost("news009_8");
  SetQuestLabel("Transfer_To_NI", "step1");
  AddPost("news009_5");
  AddPost("news009_9");
  AddPost("news009_6");
  AddPost("news009_10");
  AddPost("news009_7");
  StartDialog("Dialog6");
end;


--info:top=1740,left=200,allvis=0;
function finMission()
  SetQuestLabel("NoHafaLife", "not_use");
  AutoSave("#AS_mission_9_4");
end;


--info:top=110,left=340,allvis=0;
function StartInitMission()
  VksTeam = CreateTeam("Vks");
  GreyTeam = CreateTeam("Grey");
  UelTeam = CreateTeam("Inoco");
  
  MothershipPilot = mothership:GetPilot();
  MothershipFlight = MothershipPilot:GetFlight();
  
  Player_Group = MothershipPilot:GetGroup();
  Vks_Group = VksTeam:CreateGroup("Vks_Group");
  Grey_Group = GreyTeam:CreateGroup("Grey_Group");
  Uel_Group = UelTeam:CreateGroup("Uel_Group");
  
  HeroSpeaker = GetPilot("Hero");
  LastochkaSpeaker = GetPilot("Lastochka");
  SedoySpeaker = GetPilot("Sedoy");
  MeierSpeaker = CreatePilot("m9e_Meier");
  Vks1Speaker = CreatePilot("VksOfficer");
  Vks2Speaker = CreatePilot("VksAce");
  YanaSpeaker = CreatePilot("Yana");
  
  Inoco_STO = CreateCarcass("Station_triada_zaprav", Vector3(600, 0, -300), Vector3(0, 0, 1));
  nav_STO = CreateNavPoint("#M_Name_Station_triada_zaprav", Vector3(600, 0, -300), "nav_factory.dds", RGB(255,255,255), Inoco_STO);
  Inoco_STO:SetHP(1500);
  _Dock_exclude(); 
end;


--info:top=70,left=80,allvis=0;
function ACTION_INIT()
  StartInitMission();
  SetQuestLabel("CurrentQuest", "9e");

  if (GetQuestLabel("QuestPoint")=="0") then
    Timer_Seq(3, StartMission);
  else
    Timer_Seq(1, Start_Point2);
  end;
  return TRUE;
end;


--info:top=70,left=570,allvis=0;
function ACTION_LEAVELOCATION()
  if (LineToStation) then LineToStation:Delete(); end;
  if (nav_current) then nav_current:Delete(); end;
  if (LineToPortal) then LineToPortal:Delete(); end;
  if (GetQuestLabel("QuestPoint")=="1") then
    SetQuestLabel("QuestPoint", "0");
    SetQuestLabel("HafaLife", "Vks");
    AddPost("book009e_2");
    if (GetQuestState("quest_9e_02")==QUEST_PROCESS) then SetQuestState("quest_9e_02", QUEST_FAILED); end;
    QuestActionDone();
    ClearQuests();
    QuestStart("mission_9e_01");
  elseif (GetQuestLabel("QuestPoint")=="3") then
    SetQuestLabel("QuestPoint", "0");
    if (GetQuestState("quest_9e_04")==QUEST_PROCESS) then SetQuestState("quest_9e_04", QUEST_FAILED); end;
    if (GetQuestState("quest_9e_05")==QUEST_PROCESS) then SetQuestState("quest_9e_05", QUEST_FAILED); end;
    QuestActionDone();
  elseif (GetQuestLabel("QuestPoint")=="4") then
    SetQuestLabel("QuestPoint", "0");
    SetQuestLabel("HafaLife", "Inoco");
    if (GetQuestState("quest_9e_01")~=QUEST_NOINIT) then RemoveQuest("quest_9e_01"); end;
    if (GetQuestState("quest_9e_02")~=QUEST_NOINIT) then RemoveQuest("quest_9e_02"); end;
    if (GetQuestState("quest_9e_03")~=QUEST_NOINIT) then RemoveQuest("quest_9e_03"); end;
    if (GetQuestState("quest_9e_04")~=QUEST_NOINIT) then RemoveQuest("quest_9e_04"); end;
    if (GetQuestState("quest_9e_05")~=QUEST_NOINIT) then RemoveQuest("quest_9e_05"); end;
    lMeier = GetQuestLabel("Meier");
    if (lMeier=="yes") then
      AddPost("book009e_3");
    elseif (lMeier=="no") then
      AddPost("book009e_5");
    else
      AddPost("book009e_7");
    end;
    QuestActionDone();
    ClearQuests();
    PauseInMissionActivity("__start_Mission10", 2);
  end;

  return TRUE;
end;


--info:top=70,left=470,allvis=0;
function ACTION_FINI()

  return TRUE;
end;
