//Captain Eduardo Villanueva
case "tortuga_chevalle":
if(IsOfficer(characterFromID("Captaine Chevalle")))
{
RemovePassenger(pchar, characterFromID("Captaine Chevalle"));
if (ENABLE_BROTHEL == 1)
{
ChangeCharacterAddressGroup(CharacterFromID("Captaine Chevalle"), "Tortuga_Brothel_room", "goto", "locator2");
Pchar.quest.meetturner.win_condition.l1 = "location";
Pchar.quest.meetturner.win_condition.l1.location = "Tortuga_Brothel_room";
PChar.quest.meetturner.win_condition = "MeetTurner";
}
else
{
ChangeCharacterAddressGroup(CharacterFromID("Captaine Chevalle"), "Tortuga_Townhall", "goto", "goto7");
Pchar.quest.meetturner.win_condition.l1 = "location";
Pchar.quest.meetturner.win_condition.l1.location = "Tortuga_Townhall";
PChar.quest.meetturner.win_condition = "MeetTurner";
}
LAi_SetActorType(Pchar);
Pchar.Temp.self.dialog = Pchar.dialog.currentnode;
Pchar.dialog.currentnode = "Where Chevalle";
LAi_ActorSelfDialog(Pchar, "player_back");
AddQuestRecord("Chevalle", 11);
PChar.quest.Jackpot = "search";
}
else
{
Pchar.quest.Eduardo_Villanueva.win_condition.l1 = "location";
Pchar.quest.Eduardo_Villanueva.win_condition.l1.character = "Captaine Chevalle";
Pchar.quest.Eduardo_Villanueva.win_condition.l1.location = "Tortuga_port";
PChar.quest.Eduardo_Villanueva.win_condition = "tortuga_chevalle";
}
break;
case "MeetTurner":
LAi_SetActorType(pchar);
LAi_SetActorType(characterFromID("Captaine Chevalle"));
LAi_SetActorType(characterFromID("Eduardo Villanueva"));
LAi_ActorWaitDialog(CharacterFromID("Eduardo Villanueva"), Pchar);
LAi_ActorDialog(pchar, characterFromID("Eduardo Villanueva"), "", 10.0, 1.0);
break;
case "talktoswann":
LAi_SetActorType(pchar);
LAi_SetActorType(characterFromID("Captaine Chevalle"));
LAi_ActorWaitDialog(CharacterFromID("Captaine Chevalle"), Pchar);
LAi_ActorDialog(pchar, characterFromID("Captaine Chevalle"), "", 10.0, 1.0);
break;
case "leavetortuga":
PChar.quest.Jackpot = "gobattlerocks";
bSuppressResurrection = true;
SetQuestHeader("Villanueva_and_Chevalle");
AddQuestRecord("Villanueva_and_Chevalle", "1");
CloseQuestHeader("Chevalle");
LAi_SetPlayerType(pchar);
LAi_SetCitizenType(characterFromID("Eduardo Villanueva"));
LAi_SetCitizenType(characterFromID("Captaine Chevalle"));
if (GetAttribute(pchar, "Chevalle") == "Mutiny")
{
GiveShip2Character(pchar,"SP_Neptunus","Sargento",-1,SPAIN,true,true);
}
else
{
SetCompanionIndex(Pchar, -1, GetCharacterIndex("Eduardo Villanueva"));
}
//SetCharacterRemovable(characterFromID("Eduardo Villanueva"), false);
Island_SetReloadEnableLocal("Battle_Rocks", "reload_2", true);
Islands[FindIsland("Battle_Rocks")].reload.l1.goto_enable = true; // PB
locations[FindLocation("Battle_Rocks_Jungle_01")].disableencounters = 1;
Locations[FindLocation("Battle_Rocks_Jungle_01")].vcskip = true;
locations[FindLocation("Battle_Rocks_Jungle_02")].disableencounters = 1;
Locations[FindLocation("Battle_Rocks_Jungle_02")].vcskip = true;
locations[FindLocation("Spanish_Camp")].disableencounters = 1;
Locations[FindLocation("Spanish_Camp")].vcskip = true;
locations[FindLocation("Battle_Rocks_Jungle_03")].disableencounters = 1;
Locations[FindLocation("Battle_Rocks_Jungle_03")].vcskip = true;
locations[FindLocation("Battle_Rocks_Jungle_04")].disableencounters = 1;
Locations[FindLocation("Battle_Rocks_Jungle_04")].vcskip = true;
locations[FindLocation("Battle_Rocks_Jungle_05")].disableencounters = 1;
Locations[FindLocation("Battle_Rocks_Jungle_05")].vcskip = true;
pchar.quest.todevilcreek.win_condition.l1 = "location";
pchar.quest.todevilcreek.win_condition.l1.location = "Devil_Creek";
pchar.quest.todevilcreek.win_condition = "to_Devil_Creek";
break;
case "jackpotrefused":
PChar.quest.Jackpot = "fin";
SetQuestHeader("Villanueva_and_Chevalle");
AddQuestRecord("Villanueva_and_Chevalle", "2");
CloseQuestHeader("Villanueva_and_Chevalle");
CloseQuestHeader("Chevalle");
LAi_SetPlayerType(pchar);
LAi_SetActorType(characterFromID("Eduardo Villanueva"));
LAi_ActorGoToLocation(characterFromID("Eduardo Villanueva"), "reload", "reload1", "none", "", "", "", 0.0);
LAi_SetActorType(characterFromID("Captaine Chevalle"));
LAi_ActorGoToLocation(characterFromID("Captaine Chevalle"), "reload", "reload1", "none", "", "", "", 0.0);
break;
case "to_Devil_Creek":
LAi_SetCivilianGuardianType(characterFromID("Eduardo Villanueva"));
LAi_SetCivilianGuardianType(characterFromID("Captaine Chevalle"));
ChangeCharacterAddressGroup(CharacterFromID("Eduardo Villanueva"), "Devil_Creek", "goto", "locator10");
ChangeCharacterAddressGroup(CharacterFromID("Captaine Chevalle"), "Devil_Creek", "goto", "citizen07");
Characters[GetCharacterIndex("Eduardo Villanueva")].dialog.CurrentNode = "begin_11";
LAi_SetActorType(pchar);
LAi_SetActorType(characterFromID("Eduardo Villanueva"));
LAi_ActorWaitDialog(CharacterFromID("Eduardo Villanueva"), Pchar);
LAi_ActorDialog(pchar, characterFromID("Eduardo Villanueva"), "", 10.0, 1.0);
break;
case "meetindians":
LAi_SetPlayerType(pchar);
LAi_SetActorType(characterFromID("Eduardo Villanueva"));
LAi_SetImmortal(CharacterFromID("Eduardo Villanueva"), 1);
LAi_ActorFollowEverywhere(characterFromID("Eduardo Villanueva"), "", 60.0);
LAi_SetActorType(characterFromID("Captaine Chevalle"));
LAi_SetImmortal(CharacterFromID("Captaine Chevalle"), 1);
LAi_ActorFollowEverywhere(characterFromID("Captaine Chevalle"), "", 60.0);
pchar.quest.meet_indians.win_condition.l1 = "location";
pchar.quest.meet_indians.win_condition.l1.location = "Battle_Rocks_Jungle_04";
pchar.quest.meet_indians.win_condition = "fightindians";
break;
case "fightindians":
locations[FindLocation("Battle_Rocks_Jungle_04")].reload.l3.disable = 1;
locations[FindLocation("Battle_Rocks_Jungle_04")].reload.l4.disable = 1;
LAi_SetOfficerType(characterFromID("Eduardo Villanueva"));
LAi_SetOfficerType(characterFromID("Captaine Chevalle"));
sld = LAi_CreateFantomCharacter(false, 0, false, true, 0.25, "Native", "goto", "goto2");
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "JUNGLE_INDIANS");
sld.name = "Indian";
sld.lastname = "";
sld = LAi_CreateFantomCharacter(false, 0, false, true, 0.25, "Native", "goto", "goto2");
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "JUNGLE_INDIANS");
sld.name = "Indian";
sld.lastname = "";
sld = LAi_CreateFantomCharacter(false, 0, false, true, 0.25, "Native", "goto", "goto2");
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "JUNGLE_INDIANS");
sld.name = "Indian";
sld.lastname = "";
sld = LAi_CreateFantomCharacter(false, 0, false, true, 0.25, "Native", "goto", "goto2");
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "JUNGLE_INDIANS");
sld.name = "Indian";
sld.lastname = "";
sld = LAi_CreateFantomCharacter(false, 0, false, true, 0.25, "Native", "goto", "goto2");
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "JUNGLE_INDIANS");
sld.name = "Indian";
sld.lastname = "";
sld = LAi_CreateFantomCharacter(false, 0, false, true, 0.25, "Native", "goto", "goto2");
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "JUNGLE_INDIANS");
sld.name = "Indian";
sld.lastname = "";
LAi_group_FightGroups("JUNGLE_INDIANS", LAI_GROUP_PLAYER, true);
LAi_group_SetCheck("JUNGLE_INDIANS", "leaveindians");
break;
case "leaveindians":
locations[FindLocation("Battle_Rocks_Jungle_04")].reload.l4.disable = 0;
locations[FindLocation("Battle_Rocks_Jungle_04")].reload.l3.disable = 0;
LAi_SetActorType(characterFromID("Captaine Chevalle"));
Characters[GetCharacterIndex("Captaine Chevalle")].dialog.currentnode = "begin2_4";
LAi_ActorDialog(characterFromID("Captaine Chevalle"), pchar, "", 50.0, 10.0);
LAi_SetActorType(characterFromID("Eduardo Villanueva"));
LAi_ActorFollowEverywhere(characterFromID("Eduardo Villanueva"), "", 60.0);
AddQuestRecord("Villanueva_and_Chevalle", "3");
break;
case "meetprisoner":
LAi_SetPlayerType(pchar);
LAi_SetActorType(characterFromID("Captaine Chevalle"));
LAi_ActorFollowEverywhere(characterFromID("Captaine Chevalle"), "", 60.0);
LAi_SetImmortal(characterFromID("Francois de Hadoque"), true);
ChangeCharacterAddress(CharacterFromID("Francois de Hadoque"), "Battle_Rocks_Jungle_02", "goto8");
LAi_SetPoorType(characterfromID("Francois de Hadoque"));
locations[FindLocation("Battle_Rocks_Jungle_02")].reload.l4.disable = 1;
break;
case "opinionturner":
LAi_SetActorType(characterFromID("Eduardo Villanueva"));
Characters[GetCharacterIndex("Eduardo Villanueva")].dialog.currentnode = "begin_12";
LAi_ActorDialog(characterFromID("Eduardo Villanueva"), pchar, "", 2.0, 1.0);
break;
case "gospanishcamp":
LAi_SetActorType(characterFromID("Francois de Hadoque"));
Characters[GetCharacterIndex("Francois de Hadoque")].dialog.currentnode = "begin_7";
LAi_ActorDialog(characterFromID("Francois de Hadoque"), pchar, "", 2.0, 1.0);
break;
case "gospanishcamp2":
locations[FindLocation("Battle_Rocks_Jungle_02")].reload.l4.disable = 0;
AddQuestRecord("Villanueva_and_Chevalle", "4");
LAi_SetActorType(characterFromID("Eduardo Villanueva"));
LAi_ActorFollowEverywhere(characterFromID("Eduardo Villanueva"), "", 60.0);
LAi_SetActorType(characterFromID("Francois de Hadoque"));
LAi_ActorRunToLocation(characterFromID("Francois de Hadoque"), "reload", "reload1", "none", "", "", "", 0.0);
pchar.quest.meet_spaniards.win_condition.l1 = "location";
pchar.quest.meet_spaniards.win_condition.l1.location = "spanish_camp";
pchar.quest.meet_spaniards.win_condition = "fightspaniards";
break;
case "fightspaniards":
locations[FindLocation("spanish_camp")].reload.l4.disable = 1;
locations[FindLocation("spanish_camp")].reload.l5.disable = 1;
locations[FindLocation("spanish_camp")].reload.l6.disable = 1;
ChangeCharacterAddressGroup(characterFromID("Francois de Hadoque"), "spanish_camp", "officers", "reload2_1");
ChangeCharacterAddressGroup(characterFromID("Eduardo Villanueva"), "spanish_camp", "officers", "reload2_2");
ChangeCharacterAddressGroup(characterFromID("Captaine Chevalle"), "spanish_camp", "officers", "reload2_3");
GiveItem2Character(characterFromID("Francois de Hadoque"),"blade15");
EquipCharacterByItem(characterFromID("Francois de Hadoque"),"blade15");
GiveItem2Character(CharacterFromId("Francois de Hadoque"),"pistol3");
EquipCharacterByItem(CharacterFromId("Francois de Hadoque"), "pistol3");
//JRH ammo mod -->
if (ENABLE_AMMOMOD) { // LDH change
TakenItems(CharacterFromId("Francois de Hadoque"), "gunpowder", 6);
TakenItems(CharacterFromId("Francois de Hadoque"), "pistolgrapes", 6);
}
//JRH ammo mod <--
LAi_SetActorType(Pchar);
Pchar.Temp.self.dialog = Pchar.dialog.currentnode;
Pchar.dialog.currentnode = "Spaniardsattack";
LAi_ActorSelfDialog(Pchar, "player_back");
break;
case "fightspaniards2":
LAi_SetPlayerType(pchar);
LAi_SetOfficerType(characterFromID("Eduardo Villanueva"));
LAi_SetOfficerType(characterFromID("Captaine Chevalle"));
LAi_SetOfficerType(characterFromID("Francois de Hadoque"));
LAi_QuestDelay("fightspaniards3", 1.5);
PlayStereoSound("OBJECTS\SHIPCHARGE\hurrah.wav");
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[SPAIN].fantomModel.m1, "goto", "goto5"); // PB
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "CAMP_SOLDIERS");
sld.name = "Soldier";
sld.lastname = "";
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[SPAIN].fantomModel.m2, "goto", "goto5"); // PB
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "CAMP_SOLDIERS");
sld.name = "Soldier";
sld.lastname = "";
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[SPAIN].fantomModel.m3, "goto", "goto5"); // PB
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "CAMP_SOLDIERS");
sld.name = "Soldier";
sld.lastname = "";
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[SPAIN].fantomModel.m4, "goto", "goto5"); // PB
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "CAMP_SOLDIERS");
sld.name = "Soldier";
sld.lastname = "";
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[SPAIN].fantomModel.m5, "goto", "goto5"); // PB
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "CAMP_SOLDIERS");
sld.name = "Soldier";
sld.lastname = "";
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[SPAIN].fantomModel.m6, "goto", "goto5"); // PB
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "CAMP_SOLDIERS");
sld.name = "Soldier";
sld.lastname = "";
LAi_group_FightGroups("CAMP_SOLDIERS", LAI_GROUP_PLAYER, true);
LAi_group_SetCheck("CAMP_SOLDIERS", "gomine");
break;
case "fightspaniards3":
CreateParticleSystemX("blast_inv", -26.95, 0.00, 11.17, -1.57, 0.0, 0.0,0);
CreateParticleSystemX("cancloud", -26.95, 0.00, 11.17, -1.57, 0.0, 0.0,20);
CreateParticleSystemX("cancloud", -21.95, 0.00, 11.17, -1.57, 0.0, 0.0,20);
CreateParticleSystemX("cancloud", -26.95, 0.00, 16.17, -1.57, 0.0, 0.0,20);
CreateParticleSystemX("cancloud", -26.95, 0.00, 6.17, -1.57, 0.0, 0.0,20);
PlayStereoSound("OBJECTS\SHIPCHARGE\cannon_fire1.wav");
PlaySound("OBJECTS\shipcharge\hit_torock.wav");
break;
case "gomine":
LAi_SetActorType(characterFromID("Captaine Chevalle"));
LAi_ActorFollowEverywhere(characterFromID("Captaine Chevalle"), "", 60.0);
LAi_SetActorType(characterFromID("Eduardo Villanueva"));
LAi_ActorFollowEverywhere(characterFromID("Eduardo Villanueva"), "", 60.0);
LAi_SetActorType(characterFromID("Francois de Hadoque"));
Characters[GetCharacterIndex("Francois de Hadoque")].dialog.currentnode = "begin_9";
LAi_ActorDialog(characterFromID("Francois de Hadoque"), pchar, "", 50.0, 10.0);
break;
case "gomine2":
locations[FindLocation("spanish_camp")].reload.l5.disable = 0;
locations[FindLocation("spanish_camp")].reload.l6.disable = 0;
LAi_SetPlayerType(pchar);
LAi_SetActorType(characterFromID("Francois de Hadoque"));
LAi_ActorRunToLocation(characterFromID("Francois de Hadoque"), "reload", "reload3", "none", "", "", "", 0.0);
pchar.quest.meet_friends.win_condition.l1 = "location";
pchar.quest.meet_friends.win_condition.l1.location = "Battle_Rocks_Jungle_01";
pchar.quest.meet_friends.win_condition = "minefight";
break;
case "minefight":
ChangeCharacterAddressGroup(characterFromID("Francois de Hadoque"), "Battle_Rocks_Jungle_01", "goto", "goto10");
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[SPAIN].fantomModel.m6, "officers", "reload1_2"); // PB
LAi_SetHP(sld, 80.0, 80.0);
LAi_group_MoveCharacter(sld, "MINE_SOLDATOS");
sld.name = "Soldier";
sld.lastname = "";
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[SPAIN].fantomModel.m5, "officers", "reload1_3"); // PB
LAi_SetHP(sld, 80.0, 80.0);
LAi_group_MoveCharacter(sld, "MINE_SOLDATOS");
sld.dialog.filename = "Francois de Hadoque_dialog.c";
sld.dialog.currentnode = "begin_11";
sld.id = "futurmort";
sld.name = "Soldier";
sld.lastname = "";
LAi_SetActorType(pchar);
LAi_ActorGoToLocator(PChar, "goto", "goto7", "minefightbis", 20.0);
break;
case "minefightbis":
LAi_SetActorType(pchar);
LAi_SetActorType(characterFromID("futurmort"));
LAi_ActorWaitDialog(CharacterFromID("futurmort"), Pchar);
LAi_ActorDialog(pchar, characterFromID("futurmort"), "", 10.0, 10.0);
break;
case "minefight2":
LAi_SetPlayerType(pchar);
LAi_SetOfficerType(characterFromID("Eduardo Villanueva"));
LAi_SetOfficerType(characterFromID("Captaine Chevalle"));
LAi_SetOfficerType(characterFromID("Francois de Hadoque"));
LAi_group_MoveCharacter(characterFromID("futurmort"), "MINE_SOLDATOS");
LAi_group_FightGroups("MINE_SOLDATOS", LAI_GROUP_PLAYER, true);
LAi_group_SetCheck("MINE_SOLDATOS", "entrermine");
break;
case "entrermine":
pchar.quest.meet_friend.win_condition.l1 = "location";
pchar.quest.meet_friend.win_condition.l1.location = "Battle_Rocks_Mine";
pchar.quest.meet_friend.win_condition = "talktofriends";
LAi_SetActorType(characterFromID("Francois de Hadoque"));
LAi_ActorFollowEverywhere(characterFromID("Francois de Hadoque"), "", 60.0);
break;
case "talktofriends":
sld = LAi_CreateFantomCharacter(false, 0, false, false, 0.25, "Brodyag1", "goto", "goto1");
LAi_SetHP(sld, 80.0, 80.0);
LAi_group_MoveCharacter(sld, "MINE_FRIENDS");
sld = LAi_CreateFantomCharacter(false, 0, false, false, 0.25, "man4", "goto", "goto10");
LAi_SetHP(sld, 80.0, 80.0);
sld.id = "mineami";
sld.dialog.filename = "Francois de Hadoque_dialog.c";
sld.dialog.currentnode = "begin_12";
LAi_SetCivilianGuardianType(characterFromID("mineami"));
break;
case "allerport":
LAi_SetActorType(pchar);
LAi_SetActorType(characterFromID("Francois de Hadoque"));
Characters[GetCharacterIndex("Francois de Hadoque")].dialog.currentnode = "begin_16";
LAi_ActorWaitDialog(CharacterFromID("Francois de Hadoque"), Pchar);
LAi_ActorDialog(pchar, characterFromID("Francois de Hadoque"), "", 10.0, 10.0);
break;
case "allerport2":
AddQuestRecord("Villanueva_and_Chevalle", "5");
setCharacterShipLocation(characterFromID("Francois de Hadoque"), "Battle_Rocks_port");
locations[FindLocation("spanish_camp")].reload.l4.disable = 0;
locations[FindLocation("Battle_Rocks_port")].reload.l3.disable = 1;
LAi_SetPlayerType(pchar);
DoReloadCharacterToLocation("Battle_Rocks_port", "goto", "locator10");
LAi_SetActorType(characterFromID("Eduardo Villanueva"));
//LAi_ActorFollowEverywhere(characterFromID("Eduardo Villanueva"), "", 60.0);
ChangeCharacterAddressGroup(characterFromID("Eduardo Villanueva"), "Battle_Rocks_port", "goto", "citizen03");
LAi_SetActorType(characterFromID("Francois de Hadoque"));
LAi_ActorFollowEverywhere(characterFromID("Francois de Hadoque"), "", 60.0);
ChangeCharacterAddressGroup(characterFromID("Captaine Chevalle"), "Battle_Rocks_port", "officers", "reload1_1");
LAi_SetActorType(pchar);
LAi_SetActorType(characterFromID("Captaine Chevalle"));
Characters[GetCharacterIndex("Captaine Chevalle")].dialog.currentnode = "begin2_5";
LAi_ActorWaitDialog(CharacterFromID("Captaine Chevalle"), Pchar);
LAi_ActorDialog(pchar, characterFromID("Captaine Chevalle"), "", 10.0, 10.0);
break;
case "argument1_CC_CEV":
LAi_SetActorType(characterFromID("Eduardo Villanueva"));
Characters[GetCharacterIndex("Eduardo Villanueva")].dialog.currentnode = "begin_18";
LAi_ActorWaitDialog(CharacterFromID("Eduardo Villanueva"), Pchar);
LAi_ActorDialog(pchar, characterFromID("Eduardo Villanueva"), "", 10.0, 10.0);
break;
case "argument2_CC_CEV":
LAi_SetActorType(characterFromID("Captaine Chevalle"));
Characters[GetCharacterIndex("Captaine Chevalle")].dialog.currentnode = "begin2_2";
LAi_ActorWaitDialog(CharacterFromID("Captaine Chevalle"), Pchar);
LAi_ActorDialog(pchar, characterFromID("Captaine Chevalle"), "", 10.0, 10.0);
break;
case "argument3_CC_CEV":
LAi_SetActorType(characterFromID("Eduardo Villanueva"));
Characters[GetCharacterIndex("Eduardo Villanueva")].dialog.currentnode = "begin_19";
LAi_ActorWaitDialog(CharacterFromID("Eduardo Villanueva"), Pchar);
LAi_ActorDialog(pchar, characterFromID("Eduardo Villanueva"), "", 10.0, 10.0);
break;
case "argument4_CC_CEV":
LAi_SetActorType(characterFromID("Captaine Chevalle"));
Characters[GetCharacterIndex("Captaine Chevalle")].dialog.currentnode = "begin2_3";
LAi_ActorWaitDialog(CharacterFromID("Captaine Chevalle"), Pchar);
LAi_ActorDialog(pchar, characterFromID("Captaine Chevalle"), "", 10.0, 10.0);
break;
case "board_spanish_ship_BR":
QDeck = GetCharacterShipQDeck(Characters[GetCharacterIndex("Francois de Hadoque")]);
pchar.vcskip = true;
DoQuestReloadToLocation(QDeck, "reload", "boatl", "board_spanish_ship_BR2");
break;
case "board_spanish_ship_BR2":
LAi_SetPlayerType(pchar);
SetCharacterToNearLocatorFromMe("Francois de Hadoque", 3);
changeCharacterAddressGroup(characterfromID("Captaine Chevalle"), "none", "", "");
changeCharacterAddressGroup(characterfromID("Eduardo Villanueva"), "none", "", "");
LAi_QuestDelay("board_spanish_ship_BR3", 0.0);
break;
case "board_spanish_ship_BR3":
LAi_SetOfficerType(characterFromID("Francois de Hadoque"));
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[FRANCE].fantomModel.m5, "goto", "goto3"); // CTM
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "SHIP_SOLDIERS");
sld.name = "Soldier";
sld.lastname = "";
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[FRANCE].fantomModel.m6, "goto", "goto3"); // CTM
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "SHIP_SOLDIERS");
sld.name = "Soldier";
sld.lastname = "";
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[FRANCE].fantomModel.m1, "goto", "goto3"); // CTM
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "SHIP_SOLDIERS");
sld.name = "Soldier";
sld.lastname = "";
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[FRANCE].fantomModel.m2, "goto", "goto3"); // CTM
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "SHIP_SOLDIERS");
sld.name = "Soldier";
sld.lastname = "";
LAi_group_FightGroups("SHIP_SOLDIERS", LAI_GROUP_PLAYER, true);
LAi_group_SetCheck("SHIP_SOLDIERS", "captured_spanish_ship_BR");
break;
case "captured_spanish_ship_BR":
LAi_SetActorType(pchar);
LAi_SetActorType(characterFromID("Francois de Hadoque"));
Characters[GetCharacterIndex("Francois de Hadoque")].dialog.currentnode = "on_ship";
LAi_ActorWaitDialog(CharacterFromID("Francois de Hadoque"), Pchar);
LAi_ActorDialog(pchar, characterFromID("Francois de Hadoque"), "", 10.0, 10.0);
DeleteAttribute(pchar,"vcskip");
break;
case "Back_to_BR_port":
characters[GetCharacterIndex("Francois de Hadoque")].sailaway = true;
locations[FindLocation("spanish_camp")].reload.l4.disable = 0;
locations[FindLocation("Battle_Rocks_port")].reload.l3.disable = 1;
LAi_SetPlayerType(pchar);
DoReloadCharacterToLocation("Battle_Rocks_port", "goto", "locator10");
LAi_SetActorType(characterFromID("Eduardo Villanueva"));
//LAi_ActorFollowEverywhere(characterFromID("Eduardo Villanueva"), "", 60.0);
ChangeCharacterAddressGroup(characterFromID("Eduardo Villanueva"), "Battle_Rocks_port", "goto", "citizen03");
LAi_SetActorType(characterFromID("Francois de Hadoque"));
LAi_ActorFollowEverywhere(characterFromID("Francois de Hadoque"), "", 60.0);
ChangeCharacterAddressGroup(characterFromID("Captaine Chevalle"), "Battle_Rocks_port", "officers", "reload1_1");
LAi_SetActorType(pchar);
LAi_SetActorType(characterFromID("Captaine Chevalle"));
Characters[GetCharacterIndex("Captaine Chevalle")].dialog.currentnode = "begin2_8";
LAi_ActorWaitDialog(CharacterFromID("Captaine Chevalle"), Pchar);
LAi_ActorDialog(pchar, characterFromID("Captaine Chevalle"), "", 10.0, 10.0);
break;
case "seesoldier":
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[SPAIN].fantomModel.m1, "goto", "citizen01"); // PB
LAi_SetHP(sld, 80.0, 80.0);
LAi_group_MoveCharacter(sld, "PRAIA_SOLDATOS");
sld.id = "fuyard";
LAi_SetActorType(pchar);
LAi_ActorTurnToCharacter(pchar, characterFromID("fuyard"));
LAi_ActorTurnToCharacter(characterFromID("fuyard"), pchar);
LAi_SetActorType(characterFromID("fuyard"));
LAi_ActorRunToLocation(characterFromID("fuyard"), "reload", "reload2", "none", "", "", "", 0.0);
LAi_QuestDelay("attraperfuyard", 2.5);
break;
case "attraperfuyard":
LAi_SetActorType(pchar);
//LAi_ActorGoToLocator(PChar, "goto", "citizen07", "fuyardparti", 20.0);
LAi_ActorRunToLocator(PChar, "goto", "citizen07", "fuyardparti", 20.0);
LAi_SetActorType(characterFromID("Captaine Chevalle"));
LAi_ActorFollowEverywhere(characterFromID("Captaine Chevalle"), "", 60.0);
LAi_SetActorType(characterFromID("Eduardo Villanueva"));
LAi_ActorFollowEverywhere(characterFromID("Eduardo Villanueva"), "", 60.0);
break;
case "fuyardparti":
LAi_SetPlayerType(pchar);
LAi_SetActorType(characterFromID("Eduardo Villanueva"));
Characters[GetCharacterIndex("Eduardo Villanueva")].dialog.currentnode = "begin_13";
LAi_ActorDialog(characterFromID("Eduardo Villanueva"), pchar, "", 20.0, 10.0);
break;
case "gosilvertrain":
locations[FindLocation("Battle_Rocks_port")].reload.l3.disable = 0;
LAi_SetActorType(characterFromID("Eduardo Villanueva"));
LAi_ActorFollowEverywhere(characterFromID("Eduardo Villanueva"), "", 60.0);
pchar.quest.meet_friend.win_condition.l1 = "location";
pchar.quest.meet_friend.win_condition.l1.location = "Battle_Rocks_Jungle_03";
pchar.quest.meet_friend.win_condition = "joinsilvertrain";
break;
case "joinsilvertrain":
DeleteAttribute(characterFromID("Francois de Hadoque"), "sailaway"); // CTM: Reset - just in case
locations[FindLocation("Battle_Rocks_Jungle_03")].reload.l4.disable = 1;
locations[FindLocation("Battle_Rocks_Jungle_03")].reload.l5.disable = 1;
ChangeCharacterAddressGroup(characterFromID("Francois de Hadoque"), "Battle_Rocks_Jungle_03", "officers", "reload1_3");
ChangeCharacterAddressGroup(characterFromID("Eduardo Villanueva"), "Battle_Rocks_Jungle_03", "officers", "reload1_1");
ChangeCharacterAddressGroup(characterFromID("Captaine Chevalle"), "Battle_Rocks_Jungle_03", "officers", "reload1_2");
sld = LAi_CreateFantomCharacter(false, 0, false, false, 0.25, "Chelovek", "goto", "goto7");
LAi_SetHP(sld, 100.0, 100.0);
LAi_SetPoorType(sld);
LAi_group_MoveCharacter(sld, "CONVOY_FRIENDS");
sld = LAi_CreateFantomCharacter(false, 0, false, false, 0.25, "Fatman", "goto", "goto8");
LAi_SetHP(sld, 80.0, 80.0);
LAi_SetPoorType(sld);
LAi_group_MoveCharacter(sld, "CONVOY_FRIENDS");
sld = LAi_CreateFantomCharacter(false, 0, false, false, 0.25, "Brodyag1", "goto", "goto4");
LAi_SetHP(sld, 80.0, 80.0);
LAi_SetPoorType(sld);
LAi_group_MoveCharacter(sld, "CONVOY_FRIENDS");
sld = LAi_CreateFantomCharacter(false, 0, false, false, 0.25, "man1", "goto", "goto3");
LAi_SetHP(sld, 80.0, 80.0);
sld.id = "convoyami";
sld.dialog.filename = "Francois de Hadoque_dialog.c";
sld.dialog.currentnode = "begin_17";
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[SPAIN].fantomModel.m1, "goto", "goto2"); // PB
LAi_SetHP(sld, 80.0, 80.0);
sld.id = "fuyard";
LAi_ActorTurnToCharacter(pchar, characterFromID("fuyard"));
LAi_SetActorType(characterFromID("fuyard"));
LAi_ActorRunToLocation(characterFromID("fuyard"), "goto", "goto5", "none", "", "", "joinsilvertrain2", 0.0);
LAi_SetActorType(Pchar);
Pchar.Temp.self.dialog = Pchar.dialog.currentnode;
Pchar.dialog.currentnode = "Spanishrunaway";
LAi_ActorSelfDialog(Pchar, "player_back");
break;
case "joinsilvertrain2":
LAi_SetOfficerType(characterFromID("Eduardo Villanueva"));
LAi_SetOfficerType(characterFromID("Captaine Chevalle"));
LAi_SetOfficerType(characterFromID("Francois de Hadoque"));
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[SPAIN].fantomModel.m1, "goto", "goto6"); // PB
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "CONVOY_SOLDIERS");
sld.name = "Soldier";
sld.lastname = "";
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[FRANCE].fantomModel.m2, "goto", "goto6"); // PB
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "CONVOY_SOLDIERS");
sld.name = "Soldier";
sld.lastname = "";
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[FRANCE].fantomModel.m3, "goto", "goto6"); // PB
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "CONVOY_SOLDIERS");
sld.name = "Soldier";
sld.lastname = "";
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[SPAIN].fantomModel.m4, "goto", "goto6"); // PB
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "CONVOY_SOLDIERS");
sld.name = "Soldier";
sld.lastname = "";
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[SPAIN].fantomModel.m5, "goto", "goto6"); // PB
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "CONVOY_SOLDIERS");
sld.name = "Soldier";
sld.lastname = "";
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[FRANCE].fantomModel.m6, "goto", "goto6"); // PB
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "CONVOY_SOLDIERS");
sld.name = "Soldier";
sld.lastname = "";
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[FRANCE].fantomModel.m1, "goto", "goto6"); // PB
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "CONVOY_SOLDIERS");
sld.name = "Soldier";
sld.lastname = "";
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[SPAIN].fantomModel.m2, "goto", "goto6"); // PB
LAi_SetHP(sld, 100.0, 100.0);
LAi_group_MoveCharacter(sld, "CONVOY_SOLDIERS");
sld.name = "Soldier";
sld.lastname = "";
LAi_group_FightGroups("CONVOY_SOLDIERS", LAI_GROUP_PLAYER, true);
LAi_group_SetCheck("CONVOY_SOLDIERS", "joinsilvertrain3");
break;
case "joinsilvertrain3":
LAi_SetActorType(characterFromID("Captaine Chevalle"));
LAi_ActorFollowEverywhere(characterFromID("Captaine Chevalle"), "", 60.0);
LAi_SetActorType(characterFromID("Eduardo Villanueva"));
LAi_ActorFollowEverywhere(characterFromID("Eduardo Villanueva"), "", 60.0);
LAi_SetActorType(characterFromID("Francois de Hadoque"));
LAi_ActorFollowEverywhere(characterFromID("Francois de Hadoque"), "", 60.0);
LAi_SetCivilianGuardianType(characterFromID("convoyami"));
break;
case "leavebattle":
locations[FindLocation("Battle_Rocks_Jungle_03")].reload.l4.disable = 0;
locations[FindLocation("Battle_Rocks_Jungle_03")].reload.l5.disable = 0;
LAi_SetActorType(characterFromID("Eduardo Villanueva"));
Characters[GetCharacterIndex("Eduardo Villanueva")].dialog.currentnode = "begin_15";
LAi_ActorDialog(characterFromID("Eduardo Villanueva"), pchar, "", 20.0, 10.0);
break;
case "leavedevilcreek":
LAi_SetCivilianGuardianType(characterFromID("Captaine Chevalle"));
DoReloadCharacterToLocation("Devil_Creek", "goto", "locator10");
ChangeCharacterAddressGroup(characterFromID("Captaine Chevalle"), "Devil_Creek", "goto", "citizen02");
LAi_SetActorType(characterFromID("Eduardo Villanueva"));
LAi_ActorFollowEverywhere(characterFromID("Eduardo Villanueva"), "", 60.0);
setCharacterShipLocation(characterFromID("Francois de Hadoque"), "Devil_Creek");
LAi_SetActorType(pchar);
LAi_SetActorType(characterFromID("Captaine Chevalle"));
Characters[GetCharacterIndex("Captaine Chevalle")].dialog.currentnode = "begin2_6";
LAi_ActorWaitDialog(CharacterFromID("Captaine Chevalle"), Pchar);
LAi_ActorDialog(pchar, characterFromID("Captaine Chevalle"), "", 10.0, 10.0);
break;
case "leavedevilcreek2":
AddQuestRecord("Villanueva_and_Chevalle", "6");
pchar.quest.sail_tortuga.win_condition.l1 = "location";
pchar.quest.sail_tortuga.win_condition.l1.location = "Tortuga_port";
pchar.quest.sail_tortuga.win_condition = "meetshopkeeper";
LAi_SetPlayerType(pchar);
LAi_SetActorType(characterFromID("Captaine Chevalle"));
LAi_ActorFollowEverywhere(characterFromID("Captaine Chevalle"), "", 60.0);
if (GetAttribute(pchar, "Chevalle") == "0")
{
SetCompanionIndex(Pchar, -1, GetCharacterIndex("Eduardo Villanueva"));
}
SetCompanionIndex(Pchar, -1, GetCharacterIndex("Francois de Hadoque"));
break;
case "meetshopkeeper":
LAi_SetActorType(characterFromID("Eduardo Villanueva"));
Characters[GetCharacterIndex("Eduardo Villanueva")].dialog.currentnode = "begin_16";
LAi_ActorDialog(characterFromID("Eduardo Villanueva"), pchar, "", 20.0, 10.0);
break;
case "leaveturner":
LAi_SetActorType(characterFromID("Captaine Chevalle"));
Characters[GetCharacterIndex("Captaine Chevalle")].dialog.currentnode = "begin2_7";
LAi_ActorDialog(characterFromID("Captaine Chevalle"), pchar, "", 20.0, 10.0);
break;
case "leaveturner2":
LAi_SetActorType(characterFromID("Eduardo Villanueva"));
Characters[GetCharacterIndex("Eduardo Villanueva")].dialog.currentnode = "begin_17";
LAi_ActorDialog(characterFromID("Eduardo Villanueva"), pchar, "", 20.0, 10.0);
break;
case "leaveturner3":
LAi_ActorTurnToCharacter(characterFromID("Eduardo Villanueva"), characterFromID("Captaine Chevalle"));
LAi_ActorTurnToCharacter(characterFromID("Captaine Chevalle"), characterFromID("Eduardo Villanueva"));
LAi_QuestDelay("leaveKonradKulczycki", 1.0);
break;
case "leaveKonradKulczycki":
LAi_SetActorType(characterFromID("Francois de Hadoque"));
Characters[GetCharacterIndex("Francois de Hadoque")].dialog.currentnode = "begin_18";
LAi_ActorDialog(characterFromID("Francois de Hadoque"), pchar, "", 20.0, 10.0);
break;
case "leaveswann":
if(AUTO_SKILL_SYSTEM)
{
AddPartyExpChar(pchar, "Leadership", 25000);
AddPartyExpChar(pchar, "Sneak", 200);
}
else { AddPartyExp(pchar, 25000); }
bSuppressResurrection = false;
AddQuestRecord("Villanueva_and_Chevalle", "7");
RemoveCharacterCompanion(Pchar, characterFromID("Eduardo Villanueva"));
setCharacterShipLocation(characterFromID("Eduardo Villanueva"), "none");
LAi_SetActorType(characterFromID("Francois de Hadoque"));
LAi_ActorFollowEverywhere(characterFromID("Francois de Hadoque"), "", 60.0);
LAi_SetActorType(characterFromID("Captaine Chevalle"));
LAi_ActorAnimation(characterFromID("Captaine Chevalle"), "attack_2", "/*Eduardo_retail*/", 0.0);
PlaySound("OBJECTS\duel\punch1.wav");
LAi_QuestDelay("Eduardo_retail", 0.2);
pchar.quest.sail_turks.win_condition.l1 = "location";
pchar.quest.sail_turks.win_condition.l1.location = "Turks_port";
pchar.quest.sail_turks.win_condition = "Francois_to_Turks";
break;
case "Eduardo_retail":
LAi_SetActorType(characterFromID("Eduardo Villanueva"));
LAi_ActorAnimation(characterFromID("Eduardo Villanueva"), "shot", "Eduardo_shot", 0.0);
PlaySound("OBJECTS\duel\pistol_bbus.wav");
break;
case "Eduardo_shot":
//LAi_SetStunnedTypeNoGroup(characterFromID("Eduardo Villanueva"));
//LAi_SetStunnedTypeNoGroup(characterFromID("Captaine Chevalle"));
/*LAi_SetActorType(characterFromID("Eduardo Villanueva"));
LAi_SetActorType(characterFromID("Captaine Chevalle"));
LAi_ActorAttack(characterfromID("Eduardo Villanueva"), characterFromID("Captaine Chevalle"), "");
LAi_ActorAttack(characterFromID("Captaine Chevalle"), characterfromID("Eduardo Villanueva"), "");*/
LAi_group_MoveCharacter(characterFromID("Eduardo Villanueva"), "PLAYER1");
LAi_group_MoveCharacter(characterFromID("Captaine Chevalle"), "PLAYER2");
LAi_group_FightGroups("PLAYER1", "PLAYER2", true);
LAi_SetActorType(pchar);
LAi_ActorGoToLocator(PChar, "reload", "reload2_back", "", 10.0);
LAi_ActorGoToLocation(characterFromID("Francois de Hadoque"), "reload", "reload2_back", "Turks_Port", "goto", "goto4", "", 10.0);
LAi_QuestDelay("reset_after_CC_EV", 0.0);
break;
case "reset_after_CC_EV":
LAi_SetPlayerType(pchar);
LAi_QuestDelay("CC_EV_Disappear", 20.0);
break;
case "CC_EV_Disappear":
changeCharacterAddressGroup(characterfromID("Eduardo Villanueva"), "none", "", "");
changeCharacterAddressGroup(characterFromID("Captaine Chevalle"), "none", "", "");
break;
case "Francois_to_Turks":
LAi_SetActorType(characterFromID("Francois de Hadoque"));
Characters[GetCharacterIndex("Francois de Hadoque")].dialog.currentnode = "begin_20";
LAi_ActorDialog(characterFromID("Francois de Hadoque"), pchar, "", 20.0, 10.0);
break;
case "Francois_to_Turks2":
if (GetAttribute(pchar, "Chevalle") == "Mutiny")
{
LAi_QuestDelay("Gibbs_in_tavern2_1", 3.0);
}
LAi_ActorRunToLocation(characterFromID("Francois de Hadoque"), "reload", "reload3_back", "none", "", "", "", 0.0);
RemoveCharacterCompanion(Pchar, characterFromID("Francois de Hadoque"));
setCharacterShipLocation(characterFromID("Francois de Hadoque"), "none");
AddQuestRecord("Villanueva_and_Chevalle", "8");
CloseQuestHeader("Villanueva_and_Chevalle");
break;
//Captain Eduardo Villanueva