void QuestComplete(string sQuestName) { ref PChar, sld, ch; // KK --> int iPassenger, cidx, iHP, cc, crew_lost, crew_left, i, n; ref officer1, officer2, romance, villain, arrester, crewref; int officer1idx, officer2idx, romanceidx, villainidx, arresteridx, crewidx; float locx, locy, locz; string speaker, homelocation, homegroup, homelocator, gov_kid, merch_kid, romance_name, villain_name, normal_dialog, romance_pronoun1, romance_pronoun2, villain_pronoun, temp; int canQty = 0; int crewQty = 0; int survivors = 0; // <-- KK aref arship; // PB PChar = GetMainCharacter(); officer1 = characterFromID("Louwe Louwman"); officer2 = characterFromID("Giraldo Annibal"); officer1idx = getCharacterIndex("Louwe Louwman"); officer2idx = getCharacterIndex("Giraldo Annibal"); if (PChar.name == "Charles" && PChar.sex != "man") GiveModel2Player("Ardent", true); if (PChar.name == "Helen" && PChar.sex != "woman") GiveModel2Player("Ardent_F", true); if (checkquestattribute("alignment", "evil")) { officer1 = characterFromID("Gheerkin Kamalaas"); officer2 = characterFromID("Morys Badlad"); officer1idx = getCharacterIndex("Gheerkin Kamalaas"); officer2idx = getCharacterIndex("Morys Badlad"); } if (PChar.sex == "man") { romance = characterFromID("Lucia de la Vega"); romanceidx = getCharacterIndex("Lucia de la Vega"); villain = characterFromID("Piers Downing"); villainidx = getCharacterIndex("Piers Downing"); LAi_SetStayType(characterfromID("Piers Downing")); gov_kid = "daughter"; merch_kid = "son"; romance_pronoun1 = "her"; romance_pronoun2 = "she"; villain_pronoun = "him"; } else { romance = characterFromID("Edmundo de la Vega"); romanceidx = getCharacterIndex("Edmundo de la Vega"); villain = characterFromID("Valerie Downing"); villainidx = getCharacterIndex("Valerie Downing"); LAi_SetStayType(characterfromID("Valerie Downing")); gov_kid = "son"; merch_kid = "daughter"; romance_pronoun1 = "him"; romance_pronoun2 = "he"; villain_pronoun = "her"; } PChar.quest.romance = romance.id; PChar.quest.villain = villain.id; LAi_SetActorType(villain); LAi_ActorTurnToLocator(villain, "reload", "reload1"); LAi_SetStayType(villain); if (!CheckAttribute(PChar, "quest.background")) PChar.quest.background = "pirate"; // Failsafe in case "background" attribute hasn't been set by Inquisitor switch(sQuestName) { case "StartAdventure": DisableTownCapture("Redmond", true); DisableTownCapture("Santiago", true); Locations[FindLocation("Quest_Santiago_Bedroom")].vcskip = true; if (PChar.sex == "man") { ChangeCharacterAddress(characterFromID("Edmundo de la Vega"), "None", ""); ChangeCharacterAddress(characterFromID("Valerie Downing"), "None", ""); ChangeCharacterAddressGroup(characterfromID("Piers Downing"), "Quest_Merchant_House", "goto", "goto2"); } else { ChangeCharacterAddress(characterFromID("Lucia de la Vega"), "None", ""); ChangeCharacterAddress(characterFromID("Piers Downing"), "None", ""); ChangeCharacterAddressGroup(characterfromID("Valerie Downing"), "Quest_Merchant_House", "goto", "goto2"); } Locations[FindLocation("Havana_prison")].vcskip = true; Locations[FindLocation("Havana_prison")].reload.l1.disable = 1; Locations[FindLocation("Havana_prison")].locators_radius.reload.reload11 = 3.0; Locations[FindLocation("Havana_prison")].locators_radius.reload.reload9 = 2.5; Locations[FindLocation("Cuba_Jungle_02")].locators_radius.monsters.monster1 = 2.0; DisableFastTravel(true); DeleteAttribute(pchar, "Ship"); pchar.Ship.Type = SHIP_NOTUSED_TYPE_NAME; pchar.Ship.Name = ""; PChar.isnotcaptain = true; GiveItem2Character(characterfromID("Warden"), "key4"); GiveItem2Character(characterfromID("Havana Prison Commandant"), "key3"); GiveItem2Character(characterfromID("Havana Prison Commandant"), "spyglass2"); GiveItem2Character(characterfromID("Havana Prison Commandant"), "compass2"); GiveItem2Character(characterfromID("Havana Prison Commandant"), "clock1"); GiveItem2Character(characterfromID("Havana Prison Commandant"), "SecurityLetter"); Pchar.quest.get_monkey.win_condition.l1 = "locator"; Pchar.quest.get_monkey.win_condition.l1.location = "Cuba_Jungle_02"; Pchar.quest.get_monkey.win_condition.l1.locator_group = "monsters"; Pchar.quest.get_monkey.win_condition.l1.locator = "monster1"; Pchar.quest.get_monkey.win_condition = "get_monkey"; Pchar.quest.got_Cuba_map.win_condition.l1 = "item"; PChar.quest.got_Cuba_map.win_condition.l1.character = Pchar.id; Pchar.quest.got_Cuba_map.win_condition.l1.item = "mapCuba"; Pchar.quest.got_Cuba_map.win_condition = "got_Cuba_map"; SetNextWeather("Clear"); DoQuestReloadToLocation("Havana_prison", "goto", "goto24", "In_jail"); break; case "get_monkey": if (CheckAttribute(PChar, "quest.monkey_follow")) { PChar.quest.monkey_follow.over = "yes"; } if (!CheckAttribute(PChar, "quest.monkey_farewell")) { Locations[FindLocation("Muelle_Cave")].vcskip = true; // Don't want bandits near Animist cave when monkeys are there PChar.quest.monkey_farewell.win_condition.l1 = "location"; PChar.quest.monkey_farewell.win_condition.l1.location = "Muelle_Cave"; PChar.quest.monkey_farewell.win_condition = "monkey_farewell"; } LAi_SetActorType(characterFromID("Monkey")); LAi_ActorDialog(characterFromID("Monkey"),PChar,"monkey_follow",5.0,5.0); break; case "monkey_follow": if (PChar.location != "Muelle_Cave") { LAi_ActorFollowEverywhere(CharacterFromID("Monkey"), "", 1.0); Pchar.quest.monkey_follow.win_condition.l1 = "ExitFromLocation"; Pchar.quest.monkey_follow.win_condition.l1.character = Pchar.id; PChar.quest.monkey_follow.win_condition.l1.location = PChar.location; Pchar.quest.monkey_follow.win_condition = "get_monkey"; } break; case "monkey_farewell": Pchar.quest.monkey_follow.over = "yes"; ChangeCharacterAddressGroup(characterfromID("Monkey2"), "Muelle_Cave", "monsters", "monster1"); ChangeCharacterAddressGroup(characterfromID("Monkey3"), "Muelle_Cave", "monsters", "monster2"); ChangeCharacterAddressGroup(characterfromID("Monkey4"), "Muelle_Cave", "goto", "goto6"); ChangeCharacterAddressGroup(characterfromID("Monkey5"), "Muelle_Cave", "goto", "goto7"); LAi_SetImmortal(characterFromID("Monkey"), true); LAi_SetImmortal(characterFromID("Monkey2"), true); LAi_SetImmortal(characterFromID("Monkey3"), true); LAi_SetImmortal(characterFromID("Monkey4"), true); LAi_SetImmortal(characterFromID("Monkey5"), true); LAi_SetActorType(characterFromID("Monkey")); Characters[GetCharacterIndex("Monkey")].dialog.CurrentNode = "farewell1"; LAi_ActorDialog(characterFromID("Monkey"),PChar,"",5.0,5.0); break; case "monkey_farewell2": LAi_SetActorType(characterFromID("Monkey")); LAi_ActorFollow(characterFromID("Monkey"), characterFromID("Monkey2"), "", 30.0); Islands[FindIsland("IslaMuelle")].reload.l2.label = "Monkey Island"; break; case "In_jail": locations[FindLocation("Tutorial_Deck")].type = "own_deck"; PChar.quest.disable_rebirth = true; SetQuestHeader("Imprisoned"); if (PChar.ServedNation == PERSONAL_NATION) AddQuestRecord("Imprisoned", 1); else AddQuestRecord("Imprisoned", 2); if (!CheckCharacterItem(PChar, "bladeX2")) GiveItem2Character(PChar, "bladeX2"); EquipCharacterByItem(PChar, "bladeX2"); LAi_LocationFightDisable(&Locations[FindLocation("Havana_prison")], false); LAi_QuestDelay("Still_stuck", 0.0); if(GetDifficulty() <= DIFFICULTY_MARINER) logit("HINT: If that warden comes close enough to the bars, you can mug him!"); Pchar.quest.got_the_key.win_condition.l1 = "item"; PChar.quest.got_the_key.win_condition.l1.character = Pchar.id; Pchar.quest.got_the_key.win_condition.l1.item = "key4"; Pchar.quest.got_the_key.win_condition = "got_the_key"; PChar.quest.warden_dead.win_condition.l1 = "NPC_Death"; PChar.quest.warden_dead.win_condition.l1.character = "Warden"; PChar.quest.warden_dead.win_condition = "warden_dead"; break; case "warden_dead": ChangeCharacterAddressGroup(characterfromID("Warden"), "Havana_prison", "reload", "reload12"); break; case "Still_stuck": logit("Crew remaining: " + PChar.quest.crew_left); LAi_SetActorType(characterFromID("Warden")); LAi_ActorGoToLocator(characterfromID("Warden"), "reload", "reload12", "feeding_time", 30.0); break; case "feeding_time": LAi_ActorTurnToCharacter(characterFromID("Warden"), (Pchar)); if (!CheckAttribute(characterfromID("Warden"), "stuntime")) { characters[GetCharacterIndex("Warden")].Dialog.Filename = "Warden_dialog.c"; Characters[GetCharacterIndex("Warden")].dialog.CurrentNode = "feeding"; LAi_ActorDialog(characterFromID("Warden"),PChar,"",5.0,5.0); LAi_QuestDelay("Warden_leaves", 10.0); } break; case "Warden_leaves": if (!CheckAttribute(characterfromID("Warden"), "stuntime")) { LAi_SetActorType(characterFromID("Warden")); LAi_ActorGoToLocator(characterfromID("Warden"), "officers", "reload1_2", "next_day", 30.0); } break; case "next_day": LAi_Fade("", ""); WaitDate("", 0, 0, 1, 0, 0); crew_lost = rand(5); logit(crew_lost + " crew died of maltreatment"); crew_left = PChar.quest.crew_left; crew_left = crew_left - crew_lost; if (crew_left < 0) crew_left = 0; PChar.quest.crew_left = crew_left; if (pchar.CrewStatus.explength > 5) { PChar.quest.arresterid = "Havana Prison Commandant"; LAi_QuestDelay("hanging_day", 1.0); } else LAi_QuestDelay("Still_stuck", 5.0); break; case "hanging_day": // Should work if you're in any prison location RemoveCharacterEquip(pchar, BLADE_ITEM_TYPE); RemoveCharacterEquip(pchar, GUN_ITEM_TYPE); EnableEquip(pchar, BLADE_ITEM_TYPE, false); EnableEquip(pchar, GUN_ITEM_TYPE, false); arrester = characterFromID(PChar.quest.arresterid); arresteridx = GetCharacterIndex(PChar.quest.arresterid); // LAi_LocationFightDisable(&Locations[FindLocation("Havana_prison")], true); LAi_LocationFightDisable(&Locations[FindLocation(PChar.location)], true); LAi_SetFightMode(PChar, false); if (PChar.location == "Havana_prison" && !LAi_IsDead(characterFromID("Warden"))) { LAi_SetActorType(characterFromID("Warden")); LAi_ActorGoToLocator(characterfromID("Warden"), "officers", "reload1_2", "", 30.0); } LAi_SetActorType(arrester); // ChangeCharacterAddressGroup(arrester, "Havana_prison", "officers", "reload1_1"); ChangeCharacterAddressGroup(arrester, PChar.location, "officers", "reload1_1"); LAi_ActorGoToLocator(arrester, "reload", "reload12", "sentenced_to_death", 30.0); break; case "sentenced_to_death": arrester = characterFromID(PChar.quest.arresterid); arresteridx = GetCharacterIndex(PChar.quest.arresterid); LAi_ActorTurnToCharacter(arrester, (Pchar)); characters[arresteridx].Dialog.Filename = "commandant_dialog.c"; Characters[arresteridx].dialog.CurrentNode = "execution"; LAi_ActorDialog(arrester,PChar,"hung at dawn",5.0,5.0); break; case "hung at dawn": pchar.disable_rebirth = true; PostEvent("LAi_event_GameOver", 0, "s", "mutiny"); break; case "got_the_key": ChangeCharacterAddressGroup(PChar, "Havana_prison", "reload", "reload12"); ChangeCharacterAddressGroup(characterfromID("Havana Prison Commandant"), "Havana_prison", "officers", "reload1_1"); LAi_SetGuardianType(characterFromID("Havana Prison Commandant")); if (!LAi_IsDead(characterFromID("Warden"))) { LAi_SetStunnedTypeNoGroup(characterFromID("Warden")); ChangeCharacterAddressGroup(characterFromID("Warden"), "Havana_prison", "goto", "goto24"); } if(GetDifficulty() <= DIFFICULTY_MARINER) logit("HINT: You aren't well armed and your officers aren't armed at all. Take all the help you can get!"); Pchar.quest.release_officer1.win_condition.l1 = "locator"; Pchar.quest.release_officer1.win_condition.l1.location = "Havana_prison"; Pchar.quest.release_officer1.win_condition.l1.locator_group = "reload"; Pchar.quest.release_officer1.win_condition.l1.locator = "reload11"; Pchar.quest.release_officer1.win_condition = "release_officer1"; Pchar.quest.release_officer2.win_condition.l1 = "locator"; Pchar.quest.release_officer2.win_condition.l1.location = "Havana_prison"; Pchar.quest.release_officer2.win_condition.l1.locator_group = "reload"; Pchar.quest.release_officer2.win_condition.l1.locator = "reload10"; Pchar.quest.release_officer2.win_condition = "release_officer2"; Pchar.quest.release_two_dogs.win_condition.l1 = "locator"; Pchar.quest.release_two_dogs.win_condition.l1.location = "Havana_prison"; Pchar.quest.release_two_dogs.win_condition.l1.locator_group = "reload"; Pchar.quest.release_two_dogs.win_condition.l1.locator = "reload9"; Pchar.quest.release_two_dogs.win_condition = "release_two_dogs"; Pchar.quest.fight_commandant.win_condition.l1 = "locator"; Pchar.quest.fight_commandant.win_condition.l1.location = "Havana_prison"; Pchar.quest.fight_commandant.win_condition.l1.locator_group = "merchant"; Pchar.quest.fight_commandant.win_condition.l1.locator = "reload13"; Pchar.quest.fight_commandant.win_condition = "fight_commandant"; Pchar.quest.got_the_big_key.win_condition.l1 = "item"; PChar.quest.got_the_big_key.win_condition.l1.character = Pchar.id; Pchar.quest.got_the_big_key.win_condition.l1.item = "key3"; Pchar.quest.got_the_big_key.win_condition = "got_the_big_key"; Pchar.quest.got_the_security_letter.win_condition.l1 = "item"; PChar.quest.got_the_security_letter.win_condition.l1.character = Pchar.id; Pchar.quest.got_the_security_letter.win_condition.l1.item = "SecurityLetter"; Pchar.quest.got_the_security_letter.win_condition = "got_the_security_letter"; break; case "release_officer1": LAi_SetActorType(officer1); characters[officer1idx].Dialog.Filename = "officer1_dialog.c"; Characters[officer1idx].dialog.CurrentNode = "you_escaped"; LAi_ActorDialogNow(officer1,PChar,"release_officer1_2",2.0); break; case "release_officer1_2": ChangeCharacterAddressGroup(officer1, "Havana_prison", "reload", "reload11"); SetOfficersIndex(Pchar, 1, officer1idx); SetCharacterRemovable(officer1, false); GiveItem2Character(officer1, "bladeX4"); officer1.equip.blade = "bladeX4"; SetQuestHeader("Crew Rescue"); AddQuestRecord("Crew Rescue", 1); break; case "release_officer2": ChangeCharacterAddressGroup(officer2, "Havana_prison", "reload", "reload10"); SetOfficersIndex(Pchar, 2, officer2idx); SetCharacterRemovable(officer2, false); GiveItem2Character(officer2, "bladeX4"); officer2.equip.blade = "bladeX4"; break; case "release_two_dogs": LAi_SetActorType(officer1); LAi_SetActorType(officer2); LAi_group_SetRelation("SPAIN_SOLDIERS", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY); LAi_group_FightGroups("SPAIN_SOLDIERS", LAI_GROUP_PLAYER, true); LAi_group_SetCheck("SPAIN_SOLDIERS", "guards_dead"); LAi_SetActorType(characterFromID("Two Dogs")); characters[GetCharacterIndex("Two Dogs")].Dialog.Filename = "Two Dogs_dialog.c"; Characters[GetCharacterIndex("Two Dogs")].dialog.CurrentNode = "meet_two_dogs"; LAi_ActorDialogNow(characterFromID("Two Dogs"),PChar,"",2.0); break; case "release_two_dogs_2": ChangeCharacterAddressGroup(characterfromID("Two Dogs"), "Havana_prison", "reload", "reload9"); SetOfficersIndex(Pchar, 3, GetCharacterIndex("Two Dogs")); SetCharacterRemovable(characterFromID("Two Dogs"), false); sld = characterfromID("Two Dogs"); GiveItem2Character(sld, "Guestsknife"); EquipCharacterByItem(sld, "Guestsknife"); LAi_SetImmortal(characterFromID("Two Dogs"), true); AddQuestRecord("Crew Rescue", 2); break; case "guards_dead": LAi_SetOfficerType(officer1); LAi_SetOfficerType(officer2); PChar.quest.escaped.win_condition.l1 = "location"; PChar.quest.escaped.win_condition.l1.character = PChar.id; Pchar.quest.escaped.win_condition.l1.location = "Havana_town_05"; Pchar.quest.escaped.win_condition = "escaped"; break; case "fight_commandant": LAi_SetActorType(characterFromID("Havana Prison Commandant")); LAi_ActorAttack(characterfromID("Havana Prison Commandant"), PChar, ""); break; case "got_the_big_key": Locations[FindLocation("Havana_prison")].reload.l1.disable = 0; AddQuestRecord("Imprisoned", 3); break; case "got_the_security_letter": SetQuestHeader("Payroll Ship"); AddQuestRecord("Payroll Ship", 1); PChar.quest.payroll_ship = "active"; PChar.quest.payroll_ship_timer1.win_condition.l1 = "Timer"; PChar.quest.payroll_ship_timer1.win_condition.l1.date.day = GetAddingDataDay(0, 0, 14); PChar.quest.payroll_ship_timer1.win_condition.l1.date.month = GetAddingDataMonth(0, 0, 14); PChar.quest.payroll_ship_timer1.win_condition.l1.date.year = GetAddingDataYear(0, 0, 14); PChar.quest.payroll_ship_timer1.win_condition = "payroll_ship_sails"; break; case "escaped": TakeItemFromCharacter(PChar, "key4"); // Don't need cell key any more PChar.quest.disable_rebirth = false; Locations[FindLocation("Havana_town_05")].reload.l4.disable = 1; PChar.quest.warden_dead.over = "yes"; AddQuestRecord("Imprisoned", 4); CloseQuestHeader("Imprisoned"); if(AUTO_SKILL_SYSTEM) { AddPartyExpChar(pchar, "Leadership", 1000); AddPartyExpChar(PChar, "", 100); AddPartyExpChar(pchar, "Sneak", 100); } else {AddPartyExp(pchar, 1500);} LAi_SetImmortal(characterFromID("Two Dogs"), false); if (PChar.quest.alignment == "good" && !LAi_IsDead(characterFromID("Warden")) && isofficer(officer2)) { LAi_SetActorType(officer2); characters[officer2idx].Dialog.Filename = "officer2_dialog.c"; Characters[officer2idx].dialog.CurrentNode = "Nice guy"; LAi_ActorDialog(officer2,PChar,"escaped2",0.0,0.0); ChangeCharacterReputation(pchar, 8); } if (PChar.quest.alignment == "evil" && LAi_IsDead(characterFromID("Warden")) && isofficer(officer2)) { LAi_SetActorType(officer2); characters[officer2idx].Dialog.Filename = "officer2_dialog.c"; Characters[officer2idx].dialog.CurrentNode = "Nasty guy"; LAi_ActorDialog(officer2,PChar,"escaped2",0.0,0.0); ChangeCharacterReputation(pchar, -5); } ChangeCharacterAddress(characterFromID("Havana Prison Commandant"), "None", ""); ChangeCharacterAddress(characterFromID("Spanish_guard1"), "None", ""); ChangeCharacterAddress(characterFromID("Spanish_guard2"), "None", ""); ChangeCharacterAddress(characterFromID("Spanish_guard3"), "None", ""); if (!LAi_IsDead(characterFromID("Warden"))) { LAi_SetCitizenTypeNoGroup(characterFromID("Warden")); ChangeCharacterAddressGroup(characterFromID("Warden"), "Havana_prison", "goto", "goto23"); } Locations[FindLocation("Havana_Outskirts")].vcskip = true; // Prevent random bandits from making Two Dogs look silly when he ignores them Locations[FindLocation("Cuba_Jungle_01")].vcskip = true; Locations[FindLocation("Cuba_Jungle_02")].vcskip = true; Locations[FindLocation("Cuba_Jungle_03")].vcskip = true; PChar.quest.left_Havana.win_condition.l1 = "location"; PChar.quest.left_Havana.win_condition.l1.location = "Havana_Outskirts"; PChar.quest.left_Havana.win_condition = "left_Havana"; PChar.quest.port_bad.win_condition.l1 = "location"; PChar.quest.port_bad.win_condition.l1.location = "Cuba_port"; PChar.quest.port_bad.win_condition = "port_bad"; ChangeCharacterAddressGroup(characterfromID("Spanish_Captain1"), "Cuba_port", "goto", "goto_2"); ChangeCharacterAddressGroup(characterfromID("Spanish_guard1"), "Cuba_port", "officers", "Door_1_1"); ChangeCharacterAddressGroup(characterfromID("Spanish_guard2"), "Cuba_port", "officers", "Door_1_2"); ChangeCharacterAddressGroup(characterfromID("Spanish_guard3"), "Cuba_port", "officers", "Door_1_3"); LAi_QuestDelay("Pursuers", 0.0); break; case "escaped2": if (isofficer(officer2)) LAi_SetOfficerType(officer2); break; case "Pursuers": PChar.quest.pursuers = "counting"; Pchar.quest.pursuit_new_location.win_condition.l1 = "ExitFromLocation"; PChar.quest.pursuit_new_location.win_condition.l1.location = PChar.location; Pchar.quest.pursuit_new_location.win_condition = "pursuit_new_location"; LAi_QuestDelay("Pursuers2", 5.0); break; case "pursuit_new_location": switch(PChar.quest.pursuers) { case "counting": PChar.quest.pursuers = "cancel"; break; case "active": PChar.quest.pursuers = "idle"; LAi_QuestDelay("Pursuers", 0.0); break; case "idle": LAi_QuestDelay("Pursuers", 0.0); // PChar.quest.pursuers = "counting"; break; case "cancel": PChar.quest.pursuers = "idle"; LAi_QuestDelay("Pursuers", 0.0); break; Pchar.quest.pursuit_new_location.over = "no"; } break; case "Pursuers2": if (PChar.quest.pursuers != "cancel") { Rapid_Raid("Soldiers", 5, SPAIN, LAI_GROUP_ENEMY, LAI_GROUP_NEUTRAL, "Run! They're after you!", "Search party", OFFIC_TYPE_GUARD, 3, true, "blade_mKnife", "pistolmket"); PChar.quest.pursuers = "active"; LAi_group_SetRelation("SPAIN_SOLDIERS", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY); LAi_group_FightGroups("SPAIN_SOLDIERS", LAI_GROUP_PLAYER, true); } break; case "left_Havana": // PChar.quest.pursuers = "cancel"; // PChar.quest.pursuit_new_location.over = "yes"; DeleteQuestAttribute("pursuers"); DeleteQuestAttribute("pursuit_new_location"); if (isofficer(characterFromID("Two Dogs"))) { LAi_SetActorType(characterFromID("Two Dogs")); characters[GetCharacterIndex("Two Dogs")].name = TranslateString("","Two Dogs"); characters[GetCharacterIndex("Two Dogs")].lastname = TranslateString("","Fighting"); characters[GetCharacterIndex("Two Dogs")].Dialog.Filename = "Two Dogs_dialog.c"; Characters[GetCharacterIndex("Two Dogs")].dialog.CurrentNode = "introduction"; LAi_ActorDialogNow(characterFromID("Two Dogs"),PChar,"",2.0); // Dialog exits to "new_deal_with_Two_Dogs" or "get_lost_Two_Dogs" } PChar.quest.slave_camp.win_condition.l1 = "location"; PChar.quest.slave_camp.win_condition.l1.character = PChar.id; Pchar.quest.slave_camp.win_condition.l1.location = "Smugglers_Fort"; Pchar.quest.slave_camp.win_condition = "slave_camp"; break; case "port_bad": Locations[FindLocation("Cuba_port")].reload.l1.disable = 1; DisableFastTravel(true); // PChar.quest.pursuers = "cancel"; // PChar.quest.pursuit_new_location.over = "yes"; DeleteQuestAttribute("pursuers"); DeleteQuestAttribute("pursuit_new_location"); LAi_SetActorType(characterFromID("Spanish_Captain1")); characters[GetCharacterIndex("Spanish_Captain1")].Dialog.Filename = "Spanish_Captain1_dialog.c"; Characters[GetCharacterIndex("Spanish_Captain1")].Dialog.CurrentNode = "caught_in_port"; LAi_ActorDialog(characterfromID("Spanish_Captain1"), pchar, "", 5.0, 5.0); // Dialog exits to "port_fight" or "back_to_prison" break; case "port_fight": LAi_SetImmortal(characterFromID("Two Dogs"), false); LAi_group_MoveCharacter(characterfromID("Spanish_Captain1"), "SPAIN_SOLDIERS"); LAi_group_MoveCharacter(characterfromID("Spanish_guard1"), "SPAIN_SOLDIERS"); LAi_group_MoveCharacter(characterfromID("Spanish_guard2"), "SPAIN_SOLDIERS"); LAi_group_MoveCharacter(characterfromID("Spanish_guard3"), "SPAIN_SOLDIERS"); LAi_group_SetRelation("SPAIN_SOLDIERS", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY); LAi_group_FightGroups("SPAIN_SOLDIERS", LAI_GROUP_PLAYER, true); LAi_group_SetCheck("SPAIN_SOLDIERS", "port_fight_won"); break; case "port_fight_won": Locations[FindLocation("Cuba_port")].reload.l1.disable = 0; DisableFastTravel(false); break; case "back_to_prison": PChar.quest.arresterid = "Spanish_Captain1"; ChangeCharacterAddressGroup(characterfromID("Spanish_Captain1"), "Havana_prison", "officers", "reload1_1"); ChangeCharacterAddressGroup(characterfromID("Spanish_guard1"), "Havana_prison", "goto", "goto14"); ChangeCharacterAddressGroup(characterfromID("Spanish_guard2"), "Havana_prison", "goto", "goto16"); ChangeCharacterAddressGroup(characterfromID("Spanish_guard3"), "Havana_prison", "goto", "goto17"); LAi_SetGuardianType(characterfromID("Spanish_guard1")); LAi_SetGuardianType(characterfromID("Spanish_guard2")); LAi_SetGuardianType(characterfromID("Spanish_guard3")); TakeItemFromCharacter(Pchar, "key3"); TakeItemFromCharacter(Pchar, "key4"); RemoveCharacterEquip(PChar, "pistolmket"); RemoveCharacterEquip(PChar, "pistolmketB"); TakeItemFromCharacter(Pchar, "pistolmket"); TakeItemFromCharacter(Pchar, "pistolmketB"); if (!CheckCharacterItem(pchar, "pistolrock")) GiveItem2Character(pchar, "pistolrock"); EquipCharacterByItem(pchar, "bladeX4"); EquipCharacterByItem(pchar, "pistolrock"); PChar.quest.got_the_key.over = "no"; PChar.quest.got_the_big_key.over = "no"; if (!LAi_IsDead(characterFromID("Warden"))) { LAi_SetCitizenTypeNoGroup(characterFromID("Warden")); ChangeCharacterAddressGroup(characterFromID("Warden"), "Havana_prison", "goto", "goto23"); } DoQuestReloadToLocation("Havana_prison", "goto", "goto24", "hanging_day"); break; case "get_lost_Two_Dogs": SetCharacterRemovable(characterFromID("Two Dogs"), true); RemoveOfficersIndex(pchar, GetCharacterIndex("Two Dogs")); RemovePassenger(pchar, characterFromID("Two Dogs")); LAi_SetCitizenTypeNoGroup(characterFromID("Two Dogs")); ChangeCharacterAddress(characterFromID("Two Dogs"), "None", ""); break; case "new_deal_with_Two_Dogs": SetQuestHeader("Take Two Dogs Home"); AddQuestRecord("Take Two Dogs Home", 1); AddQuestRecord("Crew Rescue", 3); pchar.quest.take_two_dogs_home = "yes"; PChar.quest.two_dogs_dead.win_condition.l1 = "NPC_Death"; PChar.quest.two_dogs_dead.win_condition.l1.character = "Two Dogs"; PChar.quest.two_dogs_dead.win_condition = "two_dogs_dead"; pchar.quest.Cuba_Jungle_01.win_condition.l1 = "location"; PChar.quest.Cuba_Jungle_01.win_condition.l1.character = PChar.id; pchar.quest.Cuba_Jungle_01.win_condition.l1.location = "Cuba_Jungle_01"; pchar.quest.Cuba_Jungle_01.win_condition = "Cuba_Jungle_01"; pchar.quest.two_dogs_is_home.win_condition.l1 = "location"; PChar.quest.two_dogs_is_home.win_condition.l1.character = PChar.id; pchar.quest.two_dogs_is_home.win_condition.l1.location = "Quest_Indian_house"; pchar.quest.two_dogs_is_home.win_condition = "two_dogs_is_home"; LAi_ActorGoToLocator(characterFromID("Two Dogs"), "reload", "reload1_back", "",80.0); break; case "two_dogs_dead": AddQuestRecord("Take Two Dogs Home", 2); CloseQuestHeader("Take Two Dogs Home"); DeleteQuestAttribute("take_two_dogs_home"); break; case "Cuba_Jungle_01": Locations[FindLocation("Cuba_Jungle_01")].reload.l5.disable = 1; if (isofficer(characterFromID("Two Dogs"))) { pchar.quest.Cuba_Jungle_02.win_condition.l1 = "location"; PChar.quest.Cuba_Jungle_02.win_condition.l1.character = PChar.id; pchar.quest.Cuba_Jungle_02.win_condition.l1.location = "Cuba_Jungle_02"; pchar.quest.Cuba_Jungle_02.win_condition = "Cuba_Jungle_02"; LAi_SetActorType(characterFromID("Two Dogs")); LAi_ActorGoToLocator(characterFromID("Two Dogs"), "reload", "reload1_back", "",60.0); } break; case "Cuba_Jungle_02": Locations[FindLocation("Cuba_Jungle_01")].reload.l5.disable = 0; Locations[FindLocation("Cuba_Jungle_02")].reload.l5.disable = 1; if (isofficer(characterFromID("Two Dogs"))) { pchar.quest.Cuba_Jungle_03.win_condition.l1 = "location"; PChar.quest.Cuba_Jungle_03.win_condition.l1.character = PChar.id; pchar.quest.Cuba_Jungle_03.win_condition.l1.location = "Cuba_Jungle_03"; pchar.quest.Cuba_Jungle_03.win_condition = "Cuba_Jungle_03"; LAi_SetActorType(characterFromID("Two Dogs")); LAi_ActorGoToLocator(characterFromID("Two Dogs"), "reload", "reload2_back", "",65.0); } break; case "Cuba_Jungle_03": Locations[FindLocation("Smugglers_Fort")].locators_radius.goto.goto19 = 5.0; Locations[FindLocation("Cuba_Jungle_02")].reload.l5.disable = 0; Locations[FindLocation("Cuba_Jungle_03")].reload.l2.disable = 1; if (isofficer(characterFromID("Two Dogs"))) { LAi_SetActorType(characterFromID("Two Dogs")); LAi_ActorGoToLocator(characterFromID("Two Dogs"), "reload", "reload1_back", "",65.0); } break; case "slave_camp": Locations[FindLocation("Smugglers_Fort")].reload.l5.disable = 1; Locations[FindLocation("Cuba_Jungle_03")].reload.l2.disable = 0; LAi_SetFightMode(PChar, false); LAi_LocationFightDisable(&Locations[FindLocation("Smugglers_Fort")], true); if (isofficer(characterFromID("Two Dogs"))) { LAi_SetOfficerType(characterFromID("Two Dogs")); characters[GetCharacterindex("Two Dogs")].nodisarm = 1; } sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[SPAIN].fantomModel.m6, "goto", "goto7"); TakeItemFromCharacter(sld, CheckCharacterEquipByGroup(sld, BLADE_ITEM_TYPE)); GiveItem2Character(sld, "blade4"); EquipCharacterByItem(sld, "blade4"); sld.nation = SPAIN; SetRandomNameToCharacter(sld); LAi_group_MoveCharacter(sld, "SPAIN_SOLDIERS"); sld.id = "soldier1"; sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[SPAIN].fantomModel.m3, "goto", "goto15"); TakeItemFromCharacter(sld, CheckCharacterEquipByGroup(sld, BLADE_ITEM_TYPE)); GiveItem2Character(sld, "blade4"); EquipCharacterByItem(sld, "blade4"); sld.nation = SPAIN; SetRandomNameToCharacter(sld); LAi_group_MoveCharacter(sld, "SPAIN_SOLDIERS"); sld.id = "soldier2"; sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[SPAIN].fantomModel.m2, "goto", "goto23"); TakeItemFromCharacter(sld, CheckCharacterEquipByGroup(sld, BLADE_ITEM_TYPE)); GiveItem2Character(sld, "blade4"); EquipCharacterByItem(sld, "blade4"); sld.nation = SPAIN; SetRandomNameToCharacter(sld); LAi_group_MoveCharacter(sld, "SPAIN_SOLDIERS"); sld.id = "soldier3"; sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[SPAIN].fantomModel.m5, "goto", "goto33"); TakeItemFromCharacter(sld, CheckCharacterEquipByGroup(sld, BLADE_ITEM_TYPE)); GiveItem2Character(sld, "blade4"); EquipCharacterByItem(sld, "blade4"); sld.nation = SPAIN; SetRandomNameToCharacter(sld); LAi_group_MoveCharacter(sld, "SPAIN_SOLDIERS"); sld.id = "soldier4"; Pchar.quest.meet_slave_commandant.win_condition.l1 = "locator"; Pchar.quest.meet_slave_commandant.win_condition.l1.location = "Smugglers_Fort"; Pchar.quest.meet_slave_commandant.win_condition.l1.locator_group = "goto"; Pchar.quest.meet_slave_commandant.win_condition.l1.locator = "goto19"; Pchar.quest.meet_slave_commandant.win_condition = "meet_slave_commandant"; break; case "meet_slave_commandant": LAi_SetActorType(characterFromID("Slave Camp Commandant")); characters[GetCharacterIndex("Slave Camp Commandant")].Dialog.Filename = "Slave_Commandant_dialog.c"; Characters[GetCharacterIndex("Slave Camp Commandant")].Dialog.CurrentNode = "Intruder"; LAi_ActorDialog(characterfromID("Slave Camp Commandant"), pchar, "slave_camp_battle", 5.0, 5.0); LAi_group_MoveCharacter(characterfromID("Slave Camp Commandant"), "SPAIN_SOLDIERS"); break; case "slave_camp_battle": LAi_LocationFightDisable(&Locations[FindLocation("Smugglers_Fort")], false); LAi_group_SetRelation("SPAIN_SOLDIERS", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY); LAi_group_FightGroups("SPAIN_SOLDIERS", LAI_GROUP_PLAYER, true); LAi_group_SetCheck("SPAIN_SOLDIERS", "slave_camp_fight_won"); LAi_QuestDelay("crew_join_in", 2.0); break; case "crew_join_in": if (!LAi_IsDead(characterFromID("Ralph Partridge")) && !LAi_IsDead(characterFromID("soldier1"))) { LAi_SetActorType(characterFromID("Ralph Partridge")); LAi_ActorAttack(characterFromID("Ralph Partridge"), characterFromID("soldier1"), ""); } if (!LAi_IsDead(characterFromID("Coper Blumberger")) && !LAi_IsDead(characterFromID("soldier2"))) { LAi_SetActorType(characterFromID("Coper Blumberger")); LAi_ActorAttack(characterFromID("Coper Blumberger"),characterFromID("soldier2"), ""); } if (!LAi_IsDead(characterFromID("Amtónio Guajira")) && !LAi_IsDead(characterFromID("soldier3"))) { LAi_SetActorType(characterFromID("Amtónio Guajira")); LAi_ActorAttack(characterFromID("Amtónio Guajira"),characterFromID("soldier3"), ""); } if (!LAi_IsDead(characterFromID("Ayol Bacha")) && !LAi_IsDead(characterFromID("soldier4"))) { LAi_SetActorType(characterFromID("Ayol Bacha")); LAi_ActorAttack(characterFromID("Ayol Bacha"),characterFromID("soldier4"), ""); } break; case "slave_camp_fight_won": LAi_SetFightMode(PChar, false); LAi_LocationFightDisable(&Locations[FindLocation("Smugglers_Fort")], true); PlaySound("VOICE\ENGLISH\Dut_m_a_030.wav"); survivors = 0; if (!LAi_IsDead(characterFromID("Ayol Bacha"))) { survivors = survivors + 1; crewref = characterFromID("Ayol Bacha"); crewidx = GetCharacterIndex("Ayol Bacha"); } if (!LAi_IsDead(characterFromID("Amtónio Guajira"))) { survivors = survivors + 1; crewref = characterFromID("Amtónio Guajira"); crewidx = GetCharacterIndex("Amtónio Guajira"); } if (!LAi_IsDead(characterFromID("Coper Blumberger"))) { survivors = survivors + 1; crewref = characterFromID("Coper Blumberger"); crewidx = GetCharacterIndex("Coper Blumberger"); } if (!LAi_IsDead(characterFromID("Ralph Partridge"))) { survivors = survivors + 1; crewref = characterFromID("Ralph Partridge"); crewidx = GetCharacterIndex("Ralph Partridge"); } crew_lost = 4 - survivors; crew_left = PChar.quest.crew_left; crew_left = crew_left - crew_lost; if (crew_left < 0) crew_left = 0; // Shouldn't be possible! Take no chances anyway. PChar.quest.crew_left = crew_left; logit(crew_lost + " crew died in the battle"); logit("Crew remaining: " + PChar.quest.crew_left); if (survivors > 0) { LAi_SetActorType(crewref); characters[crewidx].Dialog.Filename = "crew_dialog.c"; Characters[crewidx].Dialog.CurrentNode = "Rescued"; LAi_ActorDialog(crewref, pchar, "move_out", 5.0, 5.0); } else LAi_QuestDelay("move_out", 0.0); break; case "move_out": Locations[FindLocation("Smugglers_Fort")].reload.l5.disable = 0; PChar.quest.port_bad.over = "yes"; LAi_LocationFightDisable(&Locations[FindLocation("Smugglers_Fort")], false); ChangeCharacterAddress(characterFromID("Spanish_Captain1"), "None", ""); ChangeCharacterAddress(characterFromID("Spanish_guard1"), "None", ""); ChangeCharacterAddress(characterFromID("Spanish_guard2"), "None", ""); ChangeCharacterAddress(characterFromID("Spanish_guard3"), "None", ""); // if (PChar.sex == "man") // { // logit("I'm taking one of the soldier's uniforms. A disguise might be useful later."); // GiveModel2Player("Ardent_S", false); // } logit("I'm taking one of the soldier's uniforms. A disguise might be useful later."); if (PChar.sex == "man") GiveModel2Player("Ardent_S", false); else GiveModel2Player("Ardent_SF", false); if (!LAi_IsDead(characterFromID("Ayol Bacha"))) { LAi_SetActorType(characterFromID("Ayol Bacha")); LAi_ActorFollowEverywhere(CharacterFromID("Ayol Bacha"), "", 1.0); } if (!LAi_IsDead(characterFromID("Amtónio Guajira"))) { LAi_SetActorType(characterFromID("Amtónio Guajira")); LAi_ActorFollowEverywhere(CharacterFromID("Amtónio Guajira"), "", 1.0); } if (!LAi_IsDead(characterFromID("Coper Blumberger"))) { LAi_SetActorType(characterFromID("Coper Blumberger")); LAi_ActorFollowEverywhere(CharacterFromID("Coper Blumberger"), "", 1.0); } if (!LAi_IsDead(characterFromID("Ralph Partridge"))) { LAi_SetActorType(characterFromID("Ralph Partridge")); LAi_ActorFollowEverywhere(CharacterFromID("Ralph Partridge"), "", 1.0); } DeleteAttribute(&Locations[FindLocation("Havana_Outskirts")],"vcskip"); // Bandits can attack you now DeleteAttribute(&Locations[FindLocation("Cuba_Jungle_01")],"vcskip"); DeleteAttribute(&Locations[FindLocation("Cuba_Jungle_02")],"vcskip"); DeleteAttribute(&Locations[FindLocation("Cuba_Jungle_03")],"vcskip"); pchar.quest.back_to_jungle.win_condition.l1 = "location"; PChar.quest.back_to_jungle.win_condition.l1.character = PChar.id; pchar.quest.back_to_jungle.win_condition.l1.location = "Cuba_Jungle_03"; pchar.quest.back_to_jungle.win_condition = "back_to_jungle"; PChar.quest.back_in_town.win_condition.l1 = "location"; PChar.quest.back_in_town.win_condition.l1.character = PChar.id; Pchar.quest.back_in_town.win_condition.l1.location = "Havana_town_05"; Pchar.quest.back_in_town.win_condition = "back_in_town"; break; case "back_to_jungle": if (LAi_IsDead(characterFromID("Ralph Partridge"))) ChangeCharacterAddress(characterFromID("Ralph Partridge"), "None", ""); if (LAi_IsDead(characterFromID("Coper Blumberger"))) ChangeCharacterAddress(characterFromID("Coper Blumberger"), "None", ""); if (LAi_IsDead(characterFromID("Amtónio Guajira"))) ChangeCharacterAddress(characterFromID("Amtónio Guajira"), "None", ""); if (LAi_IsDead(characterFromID("Ayol Bacha"))) ChangeCharacterAddress(characterFromID("Ayol Bacha"), "None", ""); ChangeCharacterAddress(characterFromID("Slave Camp Commandant"), "None", ""); if (isofficer(characterFromID("Two Dogs"))) { LAi_SetActorType(characterFromID("Two Dogs")); characters[GetCharacterIndex("Two Dogs")].Dialog.Filename = "Two Dogs_dialog.c"; Characters[GetCharacterIndex("Two Dogs")].dialog.CurrentNode = "job_done"; LAi_ActorDialogNow(characterFromID("Two Dogs"),PChar,"",2.0); // Dialog exits to "take_Two_Dogs_home" or "two_dogs_betrayed" } break; case "take_Two_Dogs_home": AddQuestRecord("Take Two Dogs Home", 4); LAi_SetOfficerType(characterFromID("Two Dogs")); characters[GetCharacterindex("Two Dogs")].nodisarm = 0; break; case "two_dogs_betrayed": AddQuestRecord("Take Two Dogs Home", 3); CloseQuestHeader("Take Two Dogs Home"); SetCharacterRemovable(characterFromID("Two Dogs"), true); RemoveOfficersIndex(pchar, GetCharacterIndex("Two Dogs")); RemovePassenger(pchar, characterFromID("Two Dogs")); LAi_SetActorType(characterFromID("Two Dogs")); LAi_ActorAttack(characterfromID("Two Dogs"), PChar, ""); break; case "back_in_town": Locations[FindLocation("Havana_town_05")].reload.l3.disable = 1; AddQuestRecord("Crew Rescue", 4); CloseQuestHeader("Crew Rescue"); if(AUTO_SKILL_SYSTEM) { AddPartyExpChar(pchar, "Leadership", 1000); AddPartyExpChar(PChar, "", 100); AddPartyExpChar(pchar, "Fencing", 100); // AddPartyExpChar(pchar, "Leadership", 1500); // AddPartyExpChar(pchar, "Fencing", 50); } else {AddPartyExp(pchar, 1500);} LAi_SetFightMode(PChar, false); speaker = ""; if (!LAi_IsDead(characterFromID("Ayol Bacha"))) speaker= "Ayol Bacha"; if (!LAi_IsDead(characterFromID("Amtónio Guajira"))) speaker= "Amtónio Guajira"; if (!LAi_IsDead(characterFromID("Coper Blumberger"))) speaker= "Coper Blumberger"; if (!LAi_IsDead(characterFromID("Ralph Partridge"))) speaker= "Ralph Partridge"; if (!LAi_IsDead(officer2)) speaker= characters[officer2idx].id; if (!LAi_IsDead(officer1)) speaker= characters[officer1idx].id; if (speaker != "") { crewref = characterFromID(speaker); crewidx = GetCharacterIndex(speaker); LAi_SetActorType(crewref); PChar.quest.normal_dialog = characters[crewidx].Dialog.Filename; characters[crewidx].Dialog.Filename = "crew_dialog.c"; Characters[crewidx].Dialog.CurrentNode = "back_in_havana"; LAi_ActorDialog(crewref, pchar, "back_in_town2", 5.0, 5.0); } else LAi_QuestDelay("back_in_town2", 1.0); if (checkquestattribute("payroll_ship", "active")) { if (PChar.sex == "man") AddQuestRecord("Payroll Ship", 2); else AddQuestRecord("Payroll Ship", 3); } break; case "back_in_town2": Locations[FindLocation("Havana_town_05")].reload.l3.disable = 0; Locations[FindLocation("Havana_town_05")].reload.l4.disable = 0; speaker = Get_Speaker(); if (speaker != "") { crewidx = GetCharacterIndex(speaker); characters[crewidx].Dialog.Filename = PChar.quest.normal_dialog; } if (!LAi_IsDead(officer1)) { SetCharacterRemovable(officer1, true); LAi_SetActorType(officer1); LAi_ActorGoToLocator(officer1, "officers", "reload_4_1_1", "officers_leave",65.0); } if (!LAi_IsDead(officer2)) { SetCharacterRemovable(officer2, true); LAi_SetActorType(officer2); LAi_ActorGoToLocator(officer2, "reload", "reload_4_1_back", "",65.0); } if (isofficer(characterFromID("Two Dogs"))) { SetCharacterRemovable(characterFromID("Two Dogs"), true); LAi_SetActorType(characterFromID("Two Dogs")); LAi_ActorGoToLocator(characterFromID("Two Dogs"), "reload", "reload_4_1_back", "",65.0); } if (!LAi_IsDead(characterFromID("Ralph Partridge"))) { LAi_SetCitizenTypeNoGroup(characterFromID("Ralph Partridge")); LAi_SetActorType(characterFromID("Ralph Partridge")); LAi_ActorGoToLocator(characterFromID("Ralph Partridge"), "reload", "reload_4_1_back", "",65.0); } if (!LAi_IsDead(characterFromID("Coper Blumberger"))) { LAi_SetActorType(characterFromID("Coper Blumberger")); LAi_ActorGoToLocator(characterFromID("Coper Blumberger"), "reload", "reload_4_1_back", "",65.0); } if (!LAi_IsDead(characterFromID("Amtónio Guajira"))) { LAi_SetActorType(characterFromID("Amtónio Guajira")); LAi_ActorGoToLocator(characterFromID("Amtónio Guajira"), "reload", "reload_4_1_back", "",65.0); } if (!LAi_IsDead(characterFromID("Ayol Bacha"))) { LAi_SetActorType(characterFromID("Ayol Bacha")); LAi_ActorGoToLocator(characterFromID("Ayol Bacha"), "reload", "reload_4_1_back", "",65.0); } Pchar.quest.i_leave.win_condition.l1 = "ExitFromLocation"; PChar.quest.i_leave.win_condition.l1.location = PChar.location; Pchar.quest.i_leave.win_condition = "i_leave"; Pchar.quest.tavern_for_payroll.win_condition.l1 = "location"; Pchar.quest.tavern_for_payroll.win_condition.l1.location = "Havana_tavern"; Pchar.quest.tavern_for_payroll.win_condition = "tavern_for_payroll"; PChar.quest.port_good.win_condition.l1 = "location"; PChar.quest.port_good.win_condition.l1.location = "Cuba_port"; PChar.quest.port_good.win_condition = "port_good"; Pchar.quest.port_gate.win_condition.l1 = "locator"; Pchar.quest.port_gate.win_condition.l1.location = "Havana_town_01"; Pchar.quest.port_gate.win_condition.l1.locator_group = "reload"; Pchar.quest.port_gate.win_condition.l1.locator = "reload_from_port"; Pchar.quest.port_gate.win_condition = "port_gate"; break; case "i_leave": LAi_QuestDelay("officers_leave", 0.0); break; case "officers_leave": if(GetOfficersIndex(Pchar, 1) != -1) { ChangeCharacterAddressGroup(characters[GetOfficersIndex(Pchar, 1)], "Cuba_port", "officers", "reload_2_city_1"); } if(GetOfficersIndex(Pchar, 2) != -1) { ChangeCharacterAddressGroup(characters[GetOfficersIndex(Pchar, 2)], "Cuba_port", "officers", "reload_2_city_2"); } if(GetOfficersIndex(Pchar, 3) != -1) { ChangeCharacterAddressGroup(characters[GetOfficersIndex(Pchar, 3)], "Cuba_port", "officers", "reload_2_city_3"); } ChangeCharacterAddress(characterFromID("Ralph Partridge"), "None", ""); ChangeCharacterAddress(characterFromID("Coper Blumberger"), "None", ""); ChangeCharacterAddress(characterFromID("Amtónio Guajira"), "None", ""); ChangeCharacterAddress(characterFromID("Ayol Bacha"), "None", ""); StoreOfficers(PChar.id); break; case "tavern_for_payroll": PChar.quest.payroll_ship_known = "no"; characters[GetCharacterIndex("Spanish_Captain2")].Dialog.Filename = "Spanish_Captain2_dialog.c"; if (PChar.sex == "man") Characters[GetCharacterIndex("Spanish_Captain2")].dialog.CurrentNode = "soldier"; if (PChar.sex == "woman") Characters[GetCharacterIndex("Spanish_Captain2")].dialog.CurrentNode = "senorita"; break; case "tavern_for_payroll2": if (PChar.quest.payroll_ship_known == "no") LAi_QuestDelay("tavern_for_payroll", 0.0); else { if (!checkquestattribute("payroll_ship", "active")) { SetQuestHeader("Payroll Ship"); PChar.quest.payroll_ship_timer1.win_condition.l1 = "Timer"; PChar.quest.payroll_ship_timer1.win_condition.l1.date.day = GetAddingDataDay(0, 0, 14); PChar.quest.payroll_ship_timer1.win_condition.l1.date.month = GetAddingDataMonth(0, 0, 14); PChar.quest.payroll_ship_timer1.win_condition.l1.date.year = GetAddingDataYear(0, 0, 14); PChar.quest.payroll_ship_timer1.win_condition = "payroll_ship_sails"; } AddQuestRecord("Payroll Ship", 4); } break; case "port_gate": RestoreOfficers(PChar.id); GiveShip2Character(PChar,"TartaneWar","Esme",CANNON_TYPE_NONECANNON,SPAIN,false,false); // makearef(arShip, PChar.ship.stats); // arship.CannonsQuantity = 0; // GiveShip2Character(PChar,"TartaneWar","Esme",CANNON_TYPE_LONG_LBS4,SPAIN,false,true); DeleteAttribute(PChar, "isnotcaptain"); AddCharacterGoods(PChar, GOOD_RUM, 2); AddCharacterGoods(PChar, GOOD_WHEAT, 3); AddCharacterGoods(PChar, GOOD_SAILCLOTH, 3); AddCharacterGoods(PChar, GOOD_PLANKS, 6); SetCrewQuantity(PChar, sti(PChar.quest.crew_left)); setCharacterShipLocation(Pchar, "Cuba_port"); break; case "port_good": speaker = Get_Speaker(); if (speaker != "") { crewref = characterFromID(speaker); crewidx = GetCharacterIndex(speaker); LAi_SetActorType(crewref); PChar.quest.normal_dialog = characters[crewidx].Dialog.Filename; characters[crewidx].Dialog.Filename = "crew_dialog.c"; Characters[crewidx].Dialog.CurrentNode = "got_a_ship"; LAi_ActorDialog(crewref, pchar, "got_a_ship", 5.0, 5.0); } else LAi_QuestDelay("got_a_ship", 0.0); break; case "got_a_ship": speaker = Get_Speaker(); if (speaker != "") { crewref = characterFromID(speaker); crewidx = GetCharacterIndex(speaker); characters[crewidx].Dialog.Filename = PChar.quest.normal_dialog; LAi_SetOfficerType(CharacterFromId(characters[crewidx].id)); } HoistFlag(SPAIN); PChar.quest.arrival_Santiago_port.win_condition.l1 = "location"; PChar.quest.arrival_Santiago_port.win_condition.l1.location = "Santiago_port"; PChar.quest.arrival_Santiago_port.win_condition = "arrival_Santiago_port"; break; case "arrival_Santiago_port": characters[GetCharacterIndex("Pedro Fructoso")].Dialog.Filename = "Pedro Fructoso_dialog.c"; Characters[GetCharacterIndex("Pedro Fructoso")].dialog.currentnode = "free_drink"; GiveItem2Character(characterFromID("Jose Zugarro"),"mapCuba"); iForceDetectionFalseFlag = -1; // False flags never detected so storekeeper Zugarro never refuses to serve you Pchar.dialog.CurrentNode = "nothing_in_Santiago"; LAi_SetActorType(PChar); LAi_ActorSelfDialog(PChar, "nothing_in_Santiago"); PChar.quest.in_store.win_condition.l1 = "location"; PChar.quest.in_store.win_condition.l1.location = "Santiago_store"; PChar.quest.in_store.win_condition = "in_store"; break; case "initialise_kidnap": Locations[FindLocation("Santiago_town_01")].locators_radius.goto.goto10 = 15.0; Pchar.quest.seen_window.win_condition.l1 = "locator"; Pchar.quest.seen_window.win_condition.l1.location = "Santiago_town_01"; Pchar.quest.seen_window.win_condition.l1.locator_group = "goto"; Pchar.quest.seen_window.win_condition.l1.locator = "goto10"; Pchar.quest.seen_window.win_condition = "seen_window"; Characters[villainidx].dialog.currentnode = "first_letter"; break; case "seen_window": LAi_SetActorType(PChar); LAi_ActorTurnToLocator(PChar, "goto", "goto22"); LAi_QuestDelay("seen_window2", 1.0); break; case "seen_window2": LAi_SetPlayerType(PChar); AddQuestRecord("Kidnap", 2); break; case "congratulated_governor": if (PChar.sex == "man") { gov_kid = "daughter"; merch_kid = "son"; } else { gov_kid = "son"; merch_kid = "daughter"; } Preprocessor_AddQuestData("gov_kid", gov_kid); Preprocessor_AddQuestData("merch_kid", merch_kid); Preprocessor_AddQuestData("name", GetMyName(romance)); AddQuestRecord("Kidnap", 3); Preprocessor_Remove("gov_kid"); Preprocessor_Remove("merch_kid"); Preprocessor_Remove("name"); PChar.quest.ardent_kidnap = "Met_governor"; Pchar.quest.kidnap_breakin.win_condition.l1 = "Time"; // To break into the residence requires: Pchar.quest.kidnap_breakin.win_condition.l1.time = DAY_TIME_NIGHT; // night-time, PChar.quest.kidnap_breakin.win_condition.l2 = "NPC_Death"; // both guards dead, PChar.quest.kidnap_breakin.win_condition.l2.character = "Santiago_soldier_05"; PChar.quest.kidnap_breakin.win_condition.l3 = "NPC_Death"; PChar.quest.kidnap_breakin.win_condition.l3.character = "Santiago_soldier_06"; Pchar.quest.kidnap_breakin.win_condition.l4 = "item"; // you have a lockpick, PChar.quest.kidnap_breakin.win_condition.l4.character = Pchar.id; Pchar.quest.kidnap_breakin.win_condition.l4.item = "lockpick"; Pchar.quest.kidnap_breakin.win_condition.l5 = "locator"; // and you're standing at the door. Pchar.quest.kidnap_breakin.win_condition.l5.location = "Santiago_town_01"; Pchar.quest.kidnap_breakin.win_condition.l5.locator_group = "reload"; Pchar.quest.kidnap_breakin.win_condition.l5.locator = "reload4"; PChar.quest.kidnap_breakin.win_condition = "kidnap_breakin"; break; case "in_store": PChar.quest.out_of_store_no_map.win_condition.l1 = "location"; PChar.quest.out_of_store_no_map.win_condition.l1.location = "Santiago_town_01"; PChar.quest.out_of_store_no_map.win_condition = "out_of_store_no_map"; break; case "out_of_store_no_map": if (!CheckCharacterItem(PChar, "mapCuba")) { Pchar.dialog.CurrentNode = "rob_store"; LAi_SetActorType(PChar); LAi_ActorSelfDialog(PChar, "rob_store"); } break; case "rob_store": LAi_SetPlayerType(PChar); Pchar.quest.board_brig.win_condition.l1 = "locator"; Pchar.quest.board_brig.win_condition.l1.location = "Santiago_town_01"; Pchar.quest.board_brig.win_condition.l1.locator_group = "reload"; Pchar.quest.board_brig.win_condition.l1.locator = "reload6"; Pchar.quest.board_brig.win_condition.l2 = "Time"; Pchar.quest.board_brig.win_condition.l2.time = DAY_TIME_NIGHT; Pchar.quest.board_brig.win_condition = "rob_store2"; break; case "rob_store2": PlaySound("AMBIENT\TOWN\window_dog.wav"); logit("You broke the window and grabbed the map. Now RUN!"); GiveItem2Character(PChar,"mapCuba"); LAi_QuestDelay("guards_respond", 12.0); break; case "guards_respond": Rapid_Raid("Soldiers", 6, SPAIN, LAI_GROUP_ENEMY, LAI_GROUP_NEUTRAL, "Someone heard that window break!", "Soldier", OFFIC_TYPE_GUARD, 3, true, "blade_mKnife", "pistolmket"); break; case "got_Cuba_map": if (checkquestattribute("payroll_ship", "active")) AddQuestRecord("Payroll Ship", 5); iForceDetectionFalseFlag = 0; // Restore normal false flag detection chances // Enable sea access to Playa de Sierra Maestra once you have a map showing you where it is. Island_SetReloadEnableLocal("Cuba", "reload_8", true); Islands[FindIsland("Cuba")].reload.l7.goto_enable = true; // Re-route Cuba_Jungle_04 to lead to normal Santiago exit, and open up Santiago exit to Cuba_Jungle_04. // This allows you to walk between Santiago and Playa de Sierra Maestra. Locations[FindLocation("Santiago_town_exit1")].reload.l3.go = "Cuba_Jungle_04"; Locations[FindLocation("Santiago_town_exit1")].reload.l3.emerge = "reload2_back"; Locations[FindLocation("Santiago_town_exit1")].reload.l3.autoreload = "1"; Locations[FindLocation("Santiago_town_exit1")].reload.l3.label = "Jungle"; Locations[FindLocation("Cuba_Jungle_04")].reload.l4.go = "Santiago_town_exit1"; Locations[FindLocation("Cuba_Jungle_04")].reload.l4.emerge = "reload1_back"; Locations[FindLocation("Cuba_Jungle_04")].reload.l4.autoreload = "1"; Locations[FindLocation("Cuba_Jungle_04")].reload.l4.label = "Santiago outskirts"; break; case "nothing_in_Santiago": LAi_SetPlayerType(PChar); pchar.quest.after_night_Santiago_tavern.win_condition.l1 = "location"; pchar.quest.after_night_Santiago_tavern.win_condition.l1.location = "Santiago_tavern_upstairs"; pchar.quest.after_night_Santiago_tavern.win_condition = "after_night_Santiago_tavern"; break; case "after_night_Santiago_tavern": if (!CheckCharacterItem(characterFromID("Jose Zugarro"), "mapCuba")) GiveItem2Character(characterFromID("Jose Zugarro"),"mapCuba"); SetCharacterShipLocation(characterFromID("Spanish_Captain3"), "Santiago_port"); PChar.quest.next_day_Santiago_port.win_condition.l1 = "location"; PChar.quest.next_day_Santiago_port.win_condition.l1.location = "Santiago_port"; PChar.quest.next_day_Santiago_port.win_condition = "next_day_Santiago_port"; break; case "next_day_Santiago_port": Locations[FindLocation("Santiago_port")].reload.l2.disable = 1; DisableFastTravel(true); Pchar.quest.board_brig.win_condition.l1 = "locator"; Pchar.quest.board_brig.win_condition.l1.location = "Santiago_port"; Pchar.quest.board_brig.win_condition.l1.locator_group = "reload"; Pchar.quest.board_brig.win_condition.l1.locator = "reload2_back"; Pchar.quest.board_brig.win_condition = "board_brig"; ChangeCharacterAddressGroup(characterFromID("Spanish_Captain3"), "Quest_ShipDeck4", "officers", "reload1_1"); break; case "board_brig": DoQuestReloadToLocation("Quest_ShipDeck4", "goto", "goto1", "board_brig2"); break; case "board_brig2": LAi_SetFightMode(PChar, false); LAi_LocationFightDisable(&Locations[FindLocation("Quest_ShipDeck4")], true); sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, "sailor15", "officers", "reload1_2"); sld.id = "scout"; sld.old.name = "Hernan"; sld.old.lastname = "Coelho"; sld.name = TranslateString("","Hernan"); sld.lastname = TranslateString("","Coelho"); LAi_SetActorType(characterFromID("Spanish_Captain3")); Characters[GetCharacterIndex("Spanish_Captain3")].dialog.currentnode = "on_my_ship"; LAi_ActorDialog(characterFromID("Spanish_Captain3"), PChar, "leave_brig", 5.0, 5.0); break; case "leave_brig": LAi_LocationFightDisable(&Locations[FindLocation("Santiago_port")], true); DoQuestReloadToLocation("Santiago_port", "reload", "reload2_back", "scout_leaves"); break; case "scout_leaves": ChangeCharacterAddressGroup(characterFromID("Spanish_Captain3"), "Quest_Cabin", "goto", "goto2"); sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, "sailor15", "goto", "goto1"); sld.id = "scout"; sld.old.name = "Hernan"; sld.old.lastname = "Coelho"; sld.name = TranslateString("","Hernan"); sld.lastname = TranslateString("","Coelho"); LAi_SetActorType(characterFromID("scout")); LAi_ActorGoToLocator(characterFromID("scout"), "reload", "reload1", "",65.0); speaker = Get_Speaker(); if (speaker != "") { crewref = characterFromID(speaker); crewidx = GetCharacterIndex(speaker); PChar.quest.normal_dialog = characters[crewidx].Dialog.Filename; LAi_SetActorType(crewref); characters[crewidx].Dialog.Filename = "crew_dialog.c"; Characters[crewidx].Dialog.CurrentNode = "follow_him"; LAi_ActorDialog(crewref, pchar, "scout_leaves2", 5.0, 5.0); } break; case "scout_leaves2": LAi_LocationFightDisable(&Locations[FindLocation("Santiago_port")], false); speaker = Get_Speaker(); if (speaker != "") { crewidx = GetCharacterIndex(speaker); characters[crewidx].Dialog.Filename = PChar.quest.normal_dialog; } for (n=1; n<4; n++) { if(GetOfficersIndex(Pchar, n) != -1) { LAi_SetActorType(CharacterFromId(characters[GetOfficersIndex(Pchar, n)].id)); LAi_ActorGoToLocator(characters[GetOfficersIndex(Pchar, n)], "reload", "reload1", "",65.0); } } LAi_SetActorType(PChar); LAi_ActorGoToLocator(PChar, "goto", "goto8", "wait_for_crew", 65.0); break; case "wait_for_crew": for (n=1; n REL_WAR)) { PChar.quest.betrayed_spain.win_condition.l1 = "relation"; PChar.quest.betrayed_spain.win_condition.l1.relation = "Hostile"; PChar.quest.betrayed_spain.win_condition.l1.nation = "Spain"; PChar.quest.betrayed_spain.win_condition = "betrayed_spain"; } if (PChar.sex == "man") { PChar.quest.lucia_new_outfit.win_condition.l1 = "party_goods"; PChar.quest.lucia_new_outfit.win_condition.l1.goods = GOOD_SILK; PChar.quest.lucia_new_outfit.win_condition.l1.quantity = 1; PChar.quest.lucia_new_outfit.win_condition.l1.operation = ">="; PChar.quest.lucia_new_outfit.win_condition = "lucia_new_outfit"; } if (!checkattribute(PChar, "quest.revenge_type")) { PChar.quest.abduction_officer_setup.win_condition.l1 = "Timer"; PChar.quest.abduction_officer_setup.win_condition.l1.date.day = GetAddingDataDay(0, 0, 14); PChar.quest.abduction_officer_setup.win_condition.l1.date.month = GetAddingDataMonth(0, 0, 14); PChar.quest.abduction_officer_setup.win_condition.l1.date.year = GetAddingDataYear(0, 0, 14); PChar.quest.abduction_officer_setup.win_condition = "abduction_officer_setup"; } break; case "abduction_officer_setup": PChar.quest.abduction_officer_santiago.win_condition.l1 = "location"; // Check for arrival at Santiago and related beaches PChar.quest.abduction_officer_santiago.win_condition.l1.location = "Santiago_port"; PChar.quest.abduction_officer_santiago.win_condition = "abduction_officer_arrived"; PChar.quest.abduction_officer_santiago_beach1.win_condition.l1 = "location"; PChar.quest.abduction_officer_santiago_beach1.win_condition.l1.location = "Cuba_shore_02"; PChar.quest.abduction_officer_santiago_beach1.win_condition = "abduction_officer_arrived"; PChar.quest.abduction_officer_santiago_beach2.win_condition.l1 = "location"; PChar.quest.abduction_officer_santiago_beach2.win_condition.l1.location = "Cuba_shore_05"; PChar.quest.abduction_officer_santiago_beach2.win_condition = "abduction_officer_arrived"; Locations[FindLocation("Cuba_port")].vcskip = true; // Otherwise too many random people in Havana means Lucia / Edmundo can't spawn Locations[FindLocation("Cuba_shore_02")].vcskip = true; // Otherwise Lucia / Edmundo strolls past random bandits at Bahia de Moa Locations[FindLocation("Muelle_shore")].vcskip = true; // Ditto for Oyster Beach PChar.quest.abduction_officer_havana.win_condition.l1 = "location"; // Check for arrival at Havana and related beaches PChar.quest.abduction_officer_havana.win_condition.l1.location = "Cuba_port"; PChar.quest.abduction_officer_havana.win_condition = "abduction_officer_arrived"; PChar.quest.abduction_officer_havana_beach1.win_condition.l1 = "location"; PChar.quest.abduction_officer_havana_beach1.win_condition.l1.location = "Cuba_shore_01"; PChar.quest.abduction_officer_havana_beach1.win_condition = "abduction_officer_arrived"; PChar.quest.abduction_officer_havana_beach2.win_condition.l1 = "location"; PChar.quest.abduction_officer_havana_beach2.win_condition.l1.location = "Cuba_shore_03"; PChar.quest.abduction_officer_havana_beach2.win_condition = "abduction_officer_arrived"; PChar.quest.abduction_officer_havana_beach3.win_condition.l1 = "location"; PChar.quest.abduction_officer_havana_beach3.win_condition.l1.location = "Cuba_shore_04"; PChar.quest.abduction_officer_havana_beach3.win_condition = "abduction_officer_arrived"; PChar.quest.abduction_officer_sanjuan.win_condition.l1 = "location"; // Check for arrival at San Juan and related beach PChar.quest.abduction_officer_sanjuan.win_condition.l1.location = "Muelle_port"; PChar.quest.abduction_officer_sanjuan.win_condition = "abduction_officer_arrived"; PChar.quest.abduction_officer_sanjuan_beach.win_condition.l1 = "location"; PChar.quest.abduction_officer_sanjuan_beach.win_condition.l1.location = "Muelle_shore"; PChar.quest.abduction_officer_sanjuan_beach.win_condition = "abduction_officer_arrived"; PChar.quest.abduction_officer_santodomingo.win_condition.l1 = "location"; // Check for arrival at Santo Domingo and related beach PChar.quest.abduction_officer_santodomingo.win_condition.l1.location = "Santo_Domingo_port"; PChar.quest.abduction_officer_santodomingo.win_condition = "abduction_officer_arrived"; PChar.quest.abduction_officer_santodomingo_beach.win_condition.l1 = "location"; PChar.quest.abduction_officer_santodomingo_beach.win_condition.l1.location = "Hispaniola_shore_01"; PChar.quest.abduction_officer_santodomingo_beach.win_condition = "abduction_officer_arrived"; break; case "release_guest": Preprocessor_AddQuestData("name", GetMySimpleName(romance)); AddQuestRecord("Kidnap", 13); Preprocessor_Remove("name"); LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 1.0); PChar.quest.release_guest_port.win_condition.l1 = "location"; PChar.quest.release_guest_port.win_condition.l1.location = "Muelle_port"; PChar.quest.release_guest_port.win_condition = "release_guest_in_port"; PChar.quest.release_guest_town.win_condition.l1 = "location"; PChar.quest.release_guest_town.win_condition.l1.location = "Muelle_shore"; PChar.quest.release_guest_town.win_condition = "release_guest_shore"; break; case "release_guest_in_port": PChar.quest.release_guest_town.over = "yes"; ChangeCharacterAddressGroup(romance, "Muelle_port", "goto", "goto8"); LAi_QuestDelay("release_guest_in_town2", 1.0); break; case "release_guest_shore": PChar.quest.release_guest_port.over = "yes"; ChangeCharacterAddressGroup(romance, "Muelle_shore", "goto", "goto12"); LAi_QuestDelay("release_guest_shore2", 1.0); break; case "release_guest_shore2": LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 5.0); LAi_SetImmortal(romance, true); PChar.quest.release_guest_town.win_condition.l1 = "location"; PChar.quest.release_guest_town.win_condition.l1.location = "Muelle_town_03"; PChar.quest.release_guest_town.win_condition = "release_guest_in_town2"; break; case "release_guest_in_town2": LAi_SetImmortal(romance, false); LAi_SetFightMode(PChar, false); Locations[FindLocation("Muelle_town_03")].reload.l1.disable = 1; Pchar.quest.released_back_to_sea.win_condition.l1 = "MapEnter"; Pchar.quest.released_back_to_sea.win_condition = "released_back_to_sea"; Characters[romanceidx].dialog.CurrentNode = "just_released"; LAi_SetActorType(romance); LAi_ActorDialogNow(romance,PChar,"released_free1",1.0); // LAi_ActorDialog(romance,PChar,"released_free1",5.0,5.0); break; case "released_free1": Locations[FindLocation("Muelle_town_03")].reload.l1.disable = 0; Preprocessor_AddQuestData("name", GetMySimpleName(romance)); AddQuestRecord("Kidnap", 16); Preprocessor_Remove("name"); CloseQuestHeader("Kidnap"); DeleteQuestAttribute("ardent_kidnap"); PChar.quest.kidnap_hostage_dead.over = "yes"; if(AUTO_SKILL_SYSTEM) { AddPartyExpChar(pchar, "Leadership", 1000); AddPartyExpChar(PChar, "", 100); AddPartyExpChar(pchar, "Sneak", 100); // AddPartyExpChar(pchar, "Leadership", 1500); // AddPartyExpChar(pchar, "Sneak", 50); } else {AddPartyExp(pchar, 1500);} ChangeCharacterReputation(PChar, 5); LAi_SetCitizenType(romance); Characters[romanceidx].dialog.CurrentNode = "First time"; RemovePassenger(PChar, romance); break; case "released_back_to_sea": ChangeCharacterAddressGroup(romance, "Muelle_town_04", "goto", "goto11"); LAi_SetCitizenType(CharacterFromId(characters[romanceidx].id)); Characters[romanceidx].dialog.CurrentNode = "bored_in_san_juan"; PChar.quest.abduction_sanjuan.win_condition.l1 = "Timer"; PChar.quest.abduction_sanjuan.win_condition.l1.date.day = GetAddingDataDay(0, 1, 0); PChar.quest.abduction_sanjuan.win_condition.l1.date.month = GetAddingDataMonth(0, 1, 0); PChar.quest.abduction_sanjuan.win_condition.l1.date.year = GetAddingDataYear(0, 1, 0); PChar.quest.abduction_sanjuan.win_condition = "abduction_sanjuan"; break; case "governor_relaxes": Preprocessor_AddQuestData("name", GetMySimpleName(romance)); AddQuestRecord("Kidnap", 15); Preprocessor_Remove("name"); LAi_QuestDelay("reset_governor", 0.0); break; case "reset_governor": Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "First time"; ChangeCharacterAddressGroup(characterFromID("Javier Balboa"), "Santiago_townhall", "sit", "sit2"); LAi_SetHuberType(characterFromID("Javier Balboa")); break; case "deliver_first_CourtingLetter": GiveItem2Character(PChar, "CourtingLetter"); Characters[GetCharacterIndex("Grigorio Formoselle")].dialog.CurrentNode = "first_delivery"; Characters[villainidx].dialog.CurrentNode = "CourtingLetter_not_yet"; Preprocessor_AddQuestData("villain", GetMySimpleName(villain)); Preprocessor_AddQuestData("romance", GetMySimpleName(romance)); AddQuestRecord("Kidnap", 20); Preprocessor_Remove("romance"); Preprocessor_Remove("villain"); break; case "first_CourtingLetter_delivered": AddQuestRecord("Kidnap", 21); TakeItemFromCharacter(Pchar, "CourtingLetter"); Characters[villainidx].dialog.CurrentNode = "first_letter_delivered"; break; case "deliver_second_CourtingLetter": Locations[FindLocation("Quest_Santiago_Bedroom")].vcskip = true; GiveItem2Character(PChar, "CourtingLetter"); GiveItem2Character(PChar, "SignetRing"); Characters[GetCharacterIndex("Grigorio Formoselle")].dialog.CurrentNode = "second_delivery"; Characters[villainidx].dialog.CurrentNode = "CourtingLetter_not_yet"; Preprocessor_AddQuestData("villain", GetMySimpleName(villain)); Preprocessor_AddQuestData("romance", GetMySimpleName(romance)); AddQuestRecord("Kidnap", 23); Preprocessor_Remove("romance"); Preprocessor_Remove("villain"); PChar.quest.signet_ring_known = "true"; break; case "second_CourtingLetter_delivered": Characters[villainidx].dialog.CurrentNode = "First time"; DoQuestReloadToLocation("Quest_Santiago_Bedroom", "reload", "reload1", "second_CourtingLetter_delivered2"); break; case "second_CourtingLetter_delivered2": characters[romanceidx].dialog.CurrentNode = "second_CourtingLetter_delivered"; Pchar.quest.kidnap_breakin.over = "yes"; // You don't need to break in, you've got into the bedroom with the letter break; // When the second letter is delivered, dialog will exit to "second_CourtingLetter_return_with_answer", "second_CourtingLetter_kidnap", or "second_CourtingLetter_bow_escape" case "second_CourtingLetter_return_with_answer": DoQuestReloadToLocation("Santiago_townhall", "goto", "goto8", "second_CourtingLetter_return_with_answer2"); break; case "second_CourtingLetter_return_with_answer2": Preprocessor_AddQuestData("romance", GetMySimpleName(romance)); Preprocessor_AddQuestData("villain", GetMySimpleName(villain)); AddQuestRecord("Kidnap", 24); Preprocessor_Remove("romance"); Preprocessor_Remove("villain"); Characters[villainidx].dialog.CurrentNode = "second_letter_delivered"; break; case "second_CourtingLetter_kidnap": ChangeCharacterAddressGroup(romance, "Santiago_townhall", "goto", "goto9"); ChangeCharacterAddressGroup(characterfromID("Javier Balboa"), "Santiago_townhall", "goto", "goto3"); LAi_SetActorType(characterfromID("Javier Balboa")); if (checkquestattribute("ardent_kidnap.status", "cooperate")) { Locations[FindLocation("Santiago_town_01")].locators_radius.reload.reload1 = 5.0; Locations[FindLocation("Santiago_town_01")].locators_radius.reload.reload2 = 5.0; Locations[FindLocation("Santiago_town_01")].locators_radius.reload.reload3 = 5.0; Locations[FindLocation("Santiago_town_01")].locators_radius.reload.reload5 = 5.0; } DoQuestReloadToLocation("Santiago_townhall", "goto", "goto8", "kidnap_escape2"); break; // Most of the kidnap is identical to the night-time one except that the outside guard will behave differently case "kidnap_cooperate_day": Characters[GetCharacterIndex("Santiago_soldier_05")].dialog.CurrentNode = "still_suspicious"; LAi_ActorDialog(characterFromID("Santiago_soldier_05"),PChar,"shopping_for_ring",5.0,5.0); break; case "shopping_for_ring": LAi_SetActorType(characterFromID("Santiago_soldier_05")); LAi_ActorFollowEverywhere(characterFromID("Santiago_soldier_05"), "", 5.0); LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 5.0); // PChar.quest.Santiago_soldiers_fight_back.win_condition.l1 = "NPC_Death"; // PChar.quest.Santiago_soldiers_fight_back.win_condition.l1.character = "Santiago_soldier_05"; // PChar.quest.Santiago_soldiers_fight_back.win_condition = "soldiers_fight_back"; LAi_SetCheckMinHP(characterFromID("Santiago_soldier_05"), LAi_GetCharacterHP(characterFromID("Santiago_soldier_05"))-1.0, false, "soldiers_fight_back"); Locations[FindLocation("Santiago_town_01")].reload.l2.disable = 1; // Guard will react if you go near the town exit, Locations[FindLocation("Santiago_town_01")].reload.l7.disable = 1; // the tavern, Locations[FindLocation("Santiago_town_01")].reload.l4.disable = 1; // the town hall, Locations[FindLocation("Santiago_town_01")].reload.l5.disable = 1; // the church, Locations[FindLocation("Santiago_town_01")].reload.l1.disable = 1; // or initially the port. Pchar.quest.no_leave_town.win_condition.l1 = "locator"; Pchar.quest.no_leave_town.win_condition.l1.location = "Santiago_town_01"; Pchar.quest.no_leave_town.win_condition.l1.locator_group = "reload"; Pchar.quest.no_leave_town.win_condition.l1.locator = "reload2"; Pchar.quest.no_leave_town.win_condition = "not_that_way_to_ring"; Pchar.quest.no_go_tavern.win_condition.l1 = "locator"; Pchar.quest.no_go_tavern.win_condition.l1.location = "Santiago_town_01"; Pchar.quest.no_go_tavern.win_condition.l1.locator_group = "reload"; Pchar.quest.no_go_tavern.win_condition.l1.locator = "reload3"; Pchar.quest.no_go_tavern.win_condition = "not_that_way_to_ring"; Pchar.quest.no_go_townhall.win_condition.l1 = "locator"; Pchar.quest.no_go_townhall.win_condition.l1.location = "Santiago_town_01"; Pchar.quest.no_go_townhall.win_condition.l1.locator_group = "reload"; Pchar.quest.no_go_townhall.win_condition.l1.locator = "reload4"; Pchar.quest.no_go_townhall.win_condition = "not_that_way_to_ring"; Pchar.quest.no_go_church.win_condition.l1 = "locator"; Pchar.quest.no_go_church.win_condition.l1.location = "Santiago_town_01"; Pchar.quest.no_go_church.win_condition.l1.locator_group = "reload"; Pchar.quest.no_go_church.win_condition.l1.locator = "reload5"; Pchar.quest.no_go_church.win_condition = "no_church_for_you"; Pchar.quest.no_escape_to_port.win_condition.l1 = "locator"; Pchar.quest.no_escape_to_port.win_condition.l1.location = "Santiago_town_01"; Pchar.quest.no_escape_to_port.win_condition.l1.locator_group = "reload"; Pchar.quest.no_escape_to_port.win_condition.l1.locator = "reload1"; Pchar.quest.no_escape_to_port.win_condition = "no_escape_to_port"; PChar.quest.in_store_for_ring.win_condition.l1 = "location"; PChar.quest.in_store_for_ring.win_condition.l1.location = "Santiago_store"; PChar.quest.in_store_for_ring.win_condition = "in_store_for_ring"; Locations[FindLocation("Santiago_port")].locators_radius.goto.goto28 = 28.0; PChar.quest.kidnap_run_for_ship.win_condition.l1 = "locator"; Pchar.quest.kidnap_run_for_ship.win_condition.l1.location = "Santiago_port"; Pchar.quest.kidnap_run_for_ship.win_condition.l1.locator_group = "goto"; Pchar.quest.kidnap_run_for_ship.win_condition.l1.locator = "goto28"; PChar.quest.kidnap_run_for_ship.win_condition = "kidnap_run_for_ship"; PChar.quest.santiago_reset.win_condition.l1 = "location"; PChar.quest.santiago_reset.win_condition.l1.location = "Cuba"; PChar.quest.santiago_reset.win_condition = "santiago_reset"; break; case "soldiers_fight_back": if (!LAi_IsDead(characterFromID("Santiago_soldier_05"))) LAi_group_MoveCharacter(CharacterFromID("Santiago_soldier_05"), "SPAIN_SOLDIERS"); LAi_group_SetRelation("SPAIN_SOLDIERS", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY); LAi_group_FightGroups("SPAIN_SOLDIERS", LAI_GROUP_PLAYER, true); LAi_group_SetCheck("SPAIN_SOLDIERS", "reset_after_fight"); LAi_QuestDelay("santiago_reset2", 0.0); break; case "reset_after_fight": LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); break; case "not_that_way_to_ring": Characters[GetCharacterIndex("Santiago_soldier_05")].dialog.CurrentNode = "wrong_way_to_ring"; LAi_ActorDialog(characterFromID("Santiago_soldier_05"),PChar,"not_that_way_to_ring2",5.0,5.0); break; case "not_that_way_to_ring2": LAi_SetActorType(characterFromID("Santiago_soldier_05")); LAi_ActorFollowEverywhere(characterFromID("Santiago_soldier_05"), "", 5.0); LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); break; case "no_church_for_you": Characters[GetCharacterIndex("Santiago_soldier_05")].dialog.CurrentNode = "no_church_for_you"; LAi_ActorDialog(characterFromID("Santiago_soldier_05"),PChar,"not_that_way_to_ring2",5.0,5.0); break; case "no_escape_to_port": Characters[GetCharacterIndex("Santiago_soldier_05")].dialog.CurrentNode = "no_escape_to_port"; LAi_ActorDialog(characterFromID("Santiago_soldier_05"),PChar,"not_that_way_to_ring2",5.0,5.0); break; case "in_store_for_ring": PChar.quest.out_of_store_ring.win_condition.l1 = "location"; PChar.quest.out_of_store_ring.win_condition.l1.location = "Santiago_town_01"; PChar.quest.out_of_store_ring.win_condition = "out_of_store_ring"; Locations[FindLocation("Santiago_town_01")].locators_radius.reload.reload1 = 2.0; Locations[FindLocation("Santiago_town_01")].reload.l1.disable = 0; Pchar.quest.no_escape_to_port.over = "yes"; break; case "out_of_store_ring": ChangeCharacterAddressGroup(romance, "Santiago_town_01", "goto", "goto20"); Characters[GetCharacterIndex("Santiago_soldier_05")].dialog.CurrentNode = "did_you_get_ring"; LAi_ActorDialog(characterFromID("Santiago_soldier_05"),PChar,"out_of_store_ring2",25.0,25.0); break; case "out_of_store_ring2": LAi_SetActorType(characterFromID("Santiago_soldier_05")); LAi_ActorFollowEverywhere(characterFromID("Santiago_soldier_05"), "", 5.0); LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); break; case "kidnap_run_for_ship": Characters[romanceidx].dialog.CurrentNode = "run_for_ship"; LAi_SetActorType(romance); LAi_ActorDialog(romance,PChar,"kidnap_run_for_ship2",15.0,15.0); break; case "kidnap_run_for_ship2": LAi_SetActorType(romance); LAi_ActorRunToLocation(romance, "reload", "reload2_back", "Santiago_port", "", "", "", 90.0); LAi_ActorAttack(characterfromID("Santiago_soldier_05"), PChar, ""); break; case "santiago_reset": PChar.quest.Santiago_soldiers_fight_back.over = "yes"; LAi_RemoveCheckMinHP(characterFromID("Santiago_soldier_05")); ChangeCharacterAddressGroup(characterfromID("Santiago_soldier_05"), "Santiago_town_01", "goto", "locator36"); LAi_SetGuardianType(characterfromID("Santiago_soldier_05")); characters[GetCharacterIndex("Santiago_soldier_05")].Dialog.Filename = "Isla Muelle soldier_dialog.c"; LAi_QuestDelay("santiago_reset2", 0.0); break; case "santiago_reset2": Locations[FindLocation("Santiago_town_01")].locators_radius.reload.reload2 = 2.0; Locations[FindLocation("Santiago_town_01")].reload.l2.disable = 0; Locations[FindLocation("Santiago_town_01")].locators_radius.reload.reload3 = 2.0; Locations[FindLocation("Santiago_town_01")].reload.l7.disable = 0; Locations[FindLocation("Santiago_town_01")].reload.l4.disable = 0; Locations[FindLocation("Santiago_town_01")].locators_radius.reload.reload5 = 2.0; Locations[FindLocation("Santiago_town_01")].reload.l5.disable = 0; Locations[FindLocation("Santiago_port")].locators_radius.goto.goto28 = 1.0; Pchar.quest.no_leave_town.over = "yes"; Pchar.quest.no_go_tavern.over = "yes"; Pchar.quest.no_go_townhall.over = "yes"; Pchar.quest.no_go_church.over = "yes"; PChar.quest.in_store_for_ring.over = "yes"; break; case "second_CourtingLetter_bow_escape": Pchar.quest.bow_escape_shoot_bow.win_condition.l1 = "Time"; // The rescue with bow and arrow requires: Pchar.quest.bow_escape_shoot_bow.win_condition.l1.time = DAY_TIME_NIGHT; // night-time, Pchar.quest.bow_escape_shoot_bow.win_condition.l2 = "item"; // you have a bow PChar.quest.bow_escape_shoot_bow.win_condition.l2.character = Pchar.id; Pchar.quest.bow_escape_shoot_bow.win_condition.l2.item = "pistolbow"; Pchar.quest.bow_escape_shoot_bow.win_condition.l3 = "item"; // and arrow, PChar.quest.bow_escape_shoot_bow.win_condition.l3.character = Pchar.id; Pchar.quest.bow_escape_shoot_bow.win_condition.l3.item = "bladearrows"; Pchar.quest.bow_escape_shoot_bow.win_condition.l4 = "locator"; // and you're standing down the side street. Pchar.quest.bow_escape_shoot_bow.win_condition.l4.location = "Santiago_town_01"; Pchar.quest.bow_escape_shoot_bow.win_condition.l4.locator_group = "goto"; Pchar.quest.bow_escape_shoot_bow.win_condition.l4.locator = "goto10"; PChar.quest.bow_escape_shoot_bow.win_condition = "bow_escape_shoot_bow"; DoQuestReloadToLocation("Santiago_townhall", "goto", "goto8", "second_CourtingLetter_bow_escape2"); break; case "second_CourtingLetter_bow_escape2": Preprocessor_AddQuestData("romance", GetMySimpleName(romance)); if (PChar.sex == "man") { Preprocessor_AddQuestData("pronoun1", "she"); Preprocessor_AddQuestData("pronoun2", "her"); } else { Preprocessor_AddQuestData("pronoun1", "he"); Preprocessor_AddQuestData("pronoun2", "him"); } AddQuestRecord("Kidnap", 26); Preprocessor_Remove("romance"); Preprocessor_Remove("pronoun1"); Preprocessor_Remove("pronoun2"); break; case "bow_escape_shoot_bow": Locations[FindLocation("Quest_Santiago_Bedroom")].vcskip = true; PChar.quest.old_blade = GetCharacterEquipByGroup(PChar, BLADE_ITEM_TYPE); PChar.quest.old_gun = GetCharacterEquipByGroup(PChar, GUN_ITEM_TYPE); EquipCharacterByItem(PChar,"pistolbow"); EquipCharacterByItem(PChar,"bladearrows"); LAi_SetActorType(PChar); LAi_ActorTurnToLocator(PChar, "goto", "goto22"); LAi_QuestDelay("bow_escape_shoot_bow2", 1.0); break; case "bow_escape_shoot_bow2": LAi_SetPlayerType(PChar); LAi_SetFightMode(PChar, true); LAi_QuestDelay("bow_escape_shoot_bow3", 1.0); break; case "bow_escape_shoot_bow3": PlaySound("OBJECTS\duel\bow.wav"); TakeItemFromCharacter(Pchar, "bladearrows"); Pchar.dialog.CurrentNode = "arrow_through_window"; LAi_SetActorType(PChar); LAi_ActorSelfDialog(PChar, "bow_escape_shoot_bow4"); break; case "bow_escape_shoot_bow4": LAi_SetPlayerType(PChar); DoQuestReloadToLocation("Quest_Santiago_Bedroom", "goto", "goto6", "bow_escape_in_bedroom"); break; case "bow_escape_in_bedroom": if (PChar.quest.old_blade != "") EquipCharacterByItem(PChar,PChar.quest.old_blade); if (PChar.quest.old_gun != "") EquipCharacterByItem(PChar,PChar.quest.old_gun); DeleteQuestAttribute("old_blade"); DeleteQuestAttribute("old_gun"); Characters[romanceidx].dialog.CurrentNode = "bow_rescue_climbed_in"; LAi_SetActorType(romance); LAi_ActorDialog(romance,PChar,"bow_escape_out_of_bedroom",5.0,5.0); break; case "bow_escape_out_of_bedroom": ChangeCharacterAddressGroup(romance, "Santiago_town_01", "goto", "goto10"); PChar.quest.romance_model = romance.model; SetModelfromArray(romance, GetModelIndex("Animistse")); DoQuestReloadToLocation("Santiago_town_01", "goto", "goto22", "bow_escape_out_to_town"); break; case "bow_escape_out_to_town": Characters[romanceidx].dialog.CurrentNode = "bow_rescue_outside_residence"; LAi_SetActorType(romance); LAi_ActorDialog(romance,PChar,"bow_escape_now_to_port",5.0,5.0); break; case "bow_escape_now_to_port": Locations[FindLocation("Santiago_port")].locators_radius.goto.goto28 = 28.0; LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); PChar.quest.bow_escape_in_port.win_condition.l1 = "location"; PChar.quest.bow_escape_in_port.win_condition.l1.location = "Santiago_port"; PChar.quest.bow_escape_in_port.win_condition = "bow_escape_in_port"; Pchar.quest.kidnap_what_next.win_condition.l1 = "locator"; Pchar.quest.kidnap_what_next.win_condition.l1.location = "Santiago_port"; Pchar.quest.kidnap_what_next.win_condition.l1.locator_group = "reload"; Pchar.quest.kidnap_what_next.win_condition.l1.locator = "reload2_back"; Pchar.quest.kidnap_what_next.win_condition = "kidnap_what_next"; Locations[FindLocation("Santiago_port")].reload.l2.disable = 1; PChar.quest.kidnap_hostage_dead.win_condition.l1 = "NPC_Death"; PChar.quest.kidnap_hostage_dead.win_condition.l1.character = romance.id; PChar.quest.kidnap_hostage_dead.win_condition = "hostage_dead"; break; case "bow_escape_in_port": Locations[FindLocation("Santiago_port")].reload.l1.disable = 1; LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); characters[GetCharacterIndex("Santiago_soldier_01")].Dialog.Filename = "guard_dialog.c"; LAi_SetActorType(characterFromID("Santiago_soldier_01")); Characters[GetCharacterIndex("Santiago_soldier_01")].dialog.CurrentNode = "port_challenge"; LAi_ActorDialogNow(characterFromID("Santiago_soldier_01"),PChar,"bow_escape_in_port2",1.0); break; case "bow_escape_in_port2": LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "just_a_cabin_boy"; LAi_ActorDialog(romance,PChar,"bow_escape_in_port3",5.0,5.0); break; case "bow_escape_in_port3": LAi_SetActorType(characterFromID("Santiago_soldier_01")); Characters[GetCharacterIndex("Santiago_soldier_01")].dialog.CurrentNode = "cabin_boy"; LAi_ActorDialogNow(characterFromID("Santiago_soldier_01"),PChar,"bow_escape_in_port4",1.0); break; case "bow_escape_in_port4": LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "naughty_guard"; LAi_ActorDialog(romance,PChar,"bow_escape_in_port5",5.0,5.0); break; case "bow_escape_in_port5": LAi_SetActorType(characterFromID("Santiago_soldier_01")); Characters[GetCharacterIndex("Santiago_soldier_01")].dialog.CurrentNode = "guard_embarrassed"; LAi_ActorDialogNow(characterFromID("Santiago_soldier_01"),PChar,"bow_escape_in_port6",1.0); Pchar.quest.bow_escape_run_for_ship.win_condition.l1 = "locator"; Pchar.quest.bow_escape_run_for_ship.win_condition.l1.location = "Santiago_port"; Pchar.quest.bow_escape_run_for_ship.win_condition.l1.locator_group = "goto"; Pchar.quest.bow_escape_run_for_ship.win_condition.l1.locator = "goto28"; PChar.quest.bow_escape_run_for_ship.win_condition = "bow_escape_run_for_ship"; break; case "bow_escape_in_port6": LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); characters[GetCharacterIndex("Santiago_soldier_01")].Dialog.Filename = "Isla Muelle soldier_dialog.c"; LAi_SetGuardianType(characterFromID("Santiago_soldier_01")); Locations[FindLocation("Santiago_port")].reload.l1.disable = 0; break; case "bow_escape_run_for_ship": LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "board_before_he_remembers"; LAi_ActorDialog(romance,PChar,"bow_escape_run_for_ship2",15.0,15.0); break; case "bow_escape_run_for_ship2": LAi_SetActorType(romance); LAi_ActorRunToLocation(romance, "reload", "reload2_back", "Santiago_port", "", "", "", 90.0); LAi_SetActorType(characterFromID("Santiago_soldier_01")); LAi_ActorAttack(characterfromID("Santiago_soldier_01"), PChar, ""); LAi_SetCheckMinHP(characterFromID("Santiago_soldier_01"), LAi_GetCharacterHP(characterFromID("Santiago_soldier_01"))-1.0, false, "soldiers_fight_back_port"); PChar.quest.santiago_reset_port.win_condition.l1 = "location"; PChar.quest.santiago_reset_port.win_condition.l1.location = "Cuba"; PChar.quest.santiago_reset_port.win_condition = "santiago_reset_port"; break; case "soldiers_fight_back_port": if (!LAi_IsDead(characterFromID("Santiago_soldier_01"))) LAi_group_MoveCharacter(CharacterFromID("Santiago_soldier_01"), "SPAIN_SOLDIERS"); LAi_group_SetRelation("SPAIN_SOLDIERS", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY); LAi_group_FightGroups("SPAIN_SOLDIERS", LAI_GROUP_PLAYER, true); break; case "santiago_reset_port": PChar.quest.soldiers_fight_back_port.over = "yes"; LAi_RemoveCheckMinHP(characterFromID("Santiago_soldier_01")); ChangeCharacterAddressGroup(characterfromID("Santiago_soldier_01"), "Santiago_port", "goto", "goto23"); LAi_SetGuardianType(characterfromID("Santiago_soldier_01")); Locations[FindLocation("Santiago_port")].locators_radius.goto.goto28 = 1.0; SetModelFromID(romance, PChar.quest.romance_model); // DeleteQuestAttribute("romance_model"); break; case "abduction_move_to_prison": LAi_SetActorType(romance); ChangeCharacterAddressGroup(romance, "Quest_Cellar_Prison", "goto", "goto24"); characters[romanceidx].married = MR_MARRIED; characters[romanceidx].married.id = characters[villainidx].id; characters[villainidx].married = MR_MARRIED; characters[villainidx].married.id = characters[romanceidx].id; ChangeCharacterAddress(villain, "None", ""); DeleteQuestAttribute("betrayed_spain"); break; case "abduction_sanjuan": LAi_SetLoginTime(characterfromID("Isidro Edinho"), 0.0, 24.0); PChar.quest.abduction_sanjuan_witness.win_condition.l1 = "location"; PChar.quest.abduction_sanjuan_witness.win_condition.l1.location = "Muelle_town_04"; PChar.quest.abduction_sanjuan_witness.win_condition = "abduction_sanjuan_witness"; PChar.quest.revenge_type = "san_juan"; LAi_QuestDelay("abduction_move_to_prison", 0.0); break; case "abduction_sanjuan_witness": StartQuestMovie(true, true, false); DisableFastTravel(true); LAi_SetFightMode(PChar, false); LAi_LocationFightDisable(&Locations[FindLocation("Muelle_town_04")], true); PChar.quest.abduction_status = "taken_from_sanjuan"; ch = characterfromID("Isidro Edinho"); StoreDialog(ch); ch.Dialog.Filename = "witness_dialog.c"; ch.dialog.CurrentNode = "saw_sanjuan_abduction"; LAi_SetActorType(ch); LAi_ActorDialog(ch,PChar,"abduction_sanjuan_witness_reset",120.0,120.0); break; case "abduction_sanjuan_witness_reset": LAi_LocationFightDisable(&Locations[FindLocation("Muelle_town_04")], false); DisableFastTravel(false); EndQuestMovie(); ch = characterfromID("Isidro Edinho"); RestoreDialog(ch); LAi_SetCitizenType(ch); Preprocessor_AddQuestData("romance", GetMySimpleName(romance)); if (PChar.sex == "man") Preprocessor_AddQuestData("pronoun", "she"); else Preprocessor_AddQuestData("pronoun", "he"); SetQuestHeader("Abduction"); AddQuestRecord("Abduction", 1); Preprocessor_Remove("pronoun"); Preprocessor_Remove("romance"); break; case "abduction_officer_arrived": PChar.quest.abduction_officer_santiago.over = "yes"; PChar.quest.abduction_officer_santiago_beach1.over = "yes"; PChar.quest.abduction_officer_santiago_beach2.over = "yes"; PChar.quest.abduction_officer_havana.over = "yes"; PChar.quest.abduction_officer_havana_beach1.over = "yes"; PChar.quest.abduction_officer_havana_beach2.over = "yes"; PChar.quest.abduction_officer_havana_beach3.over = "yes"; PChar.quest.abduction_officer_sanjuan.over = "yes"; PChar.quest.abduction_officer_sanjuan_beach.over = "yes"; PChar.quest.abduction_officer_santodomingo.over = "yes"; PChar.quest.abduction_officer_santodomingo_beach.over = "yes"; PChar.quest.abduction_officer.return_site = GetCharacterShipLocation(PChar); bQuestDisableSeaEnter = true; // You're not going back to sea until the abduction has happened and you know about it switch(PChar.location) { case "Santiago_port": // Santiago PChar.quest.abduction_officer.sailor_group = "goto"; PChar.quest.abduction_officer.sailor_locator = "goto1"; PChar.quest.abduction_officer.leave_locator = "reload1"; PChar.quest.abduction_officer.tavernid = "Pedro Fructoso"; break; case "Cuba_shore_02": // Bahia de Moa PChar.quest.abduction_officer.sailor_group = "officers"; PChar.quest.abduction_officer.sailor_locator = "reload2_3"; PChar.quest.abduction_officer.leave_locator = "reload1_back"; PChar.quest.abduction_officer.tavernid = "Pedro Fructoso"; break; case "Cuba_shore_05": // Playa de Sierra Maestra PChar.quest.abduction_officer.sailor_group = "goto"; PChar.quest.abduction_officer.sailor_locator = "locator12"; PChar.quest.abduction_officer.leave_locator = "reload2_back"; PChar.quest.abduction_officer.tavernid = "Pedro Fructoso"; break; case "Cuba_port": // Havana PChar.quest.abduction_officer.sailor_group = "goto"; PChar.quest.abduction_officer.sailor_locator = "goto_34"; PChar.quest.abduction_officer.leave_locator = "reload_2_city"; PChar.quest.abduction_officer.tavernid = "Fadrique Castillo"; break; case "Cuba_shore_01": // Bahia de San Antonio PChar.quest.abduction_officer.sailor_group = "goto"; PChar.quest.abduction_officer.sailor_locator = "locator22"; PChar.quest.abduction_officer.leave_locator = "reload2_back"; PChar.quest.abduction_officer.tavernid = "Fadrique Castillo"; break; case "Cuba_shore_03": // Punta de Maisi PChar.quest.abduction_officer.sailor_group = "goto"; PChar.quest.abduction_officer.sailor_locator = "locator10"; PChar.quest.abduction_officer.leave_locator = "reload2_back"; PChar.quest.abduction_officer.tavernid = "Fadrique Castillo"; break; case "Cuba_shore_04": // Playa de Sabana PChar.quest.abduction_officer.sailor_group = "goto"; PChar.quest.abduction_officer.sailor_locator = "locator11"; PChar.quest.abduction_officer.leave_locator = "reload2_back"; PChar.quest.abduction_officer.tavernid = "Fadrique Castillo"; break; case "Muelle_port": // San Juan PChar.quest.abduction_officer.sailor_group = "goto"; PChar.quest.abduction_officer.sailor_locator = "goto8"; PChar.quest.abduction_officer.leave_locator = "reload2"; PChar.quest.abduction_officer.tavernid = "Claudio Burrieza"; break; case "Muelle_shore": // Oyster Beach PChar.quest.abduction_officer.sailor_group = "goto"; PChar.quest.abduction_officer.sailor_locator = "goto12"; PChar.quest.abduction_officer.leave_locator = "reload1_back"; PChar.quest.abduction_officer.tavernid = "Claudio Burrieza"; break; case "Santo_Domingo_port": // Santo Domingo PChar.quest.abduction_officer.sailor_group = "goto"; PChar.quest.abduction_officer.sailor_locator = "goto21"; PChar.quest.abduction_officer.leave_locator = "reload4"; PChar.quest.abduction_officer.tavernid = "Rodrigo Ramos"; break; case "Hispaniola_shore_01": // Boca de Yuman PChar.quest.abduction_officer.sailor_group = "goto"; PChar.quest.abduction_officer.sailor_locator = "goto7"; PChar.quest.abduction_officer.leave_locator = "reload2_back"; PChar.quest.abduction_officer.tavernid = "Rodrigo Ramos"; break; } if(!isofficer(romance)) ChangeCharacterAddressGroup(romance, PChar.location, PChar.quest.abduction_officer.sailor_group, PChar.quest.abduction_officer.sailor_locator); LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "abduction_officer_request_leave"; LAi_ActorDialog(romance,PChar,"abduction_officer_romance_leaves",5.0,5.0); Pchar.quest.abduction_officer_move_out.win_condition.l1 = "ExitFromLocation"; PChar.quest.abduction_officer_move_out.win_condition.l1.location = PChar.location; Pchar.quest.abduction_officer_move_out.win_condition = "abduction_officer_move_out"; break; case "abduction_officer_romance_leaves": DeleteAttribute(&Locations[FindLocation("Cuba_port")],"vcskip"); DeleteAttribute(&Locations[FindLocation("Cuba_shore_02")],"vcskip"); DeleteAttribute(&Locations[FindLocation("Muelle_shore")],"vcskip"); RemoveOfficersIndex(pchar, romanceidx); SetCharacterRemovable(romance, false); LAi_SetImmortal(romance, true); LAi_ActorGoToLocation(romance, "reload", PChar.quest.abduction_officer.leave_locator, "None", "", "", "", 300.0); if(iscompanion(romance)) { speaker = Get_Speaker(); if(speaker == "") { PChar.quest.abduction_officer_replacement = "Emmett Dawson"; LAi_QuestDelay("abduction_officer_replace_captain_romance", 0.0); } else { PChar.quest.abduction_officer_replacement = speaker; crewref = characterFromID(speaker); crewidx = GetCharacterIndex(speaker); PChar.quest.normal_dialog = characters[crewidx].Dialog.Filename; LAi_SetActorType(crewref); characters[crewidx].Dialog.Filename = "crew_dialog.c"; Characters[crewidx].Dialog.CurrentNode = "abduction_officer_replace_romance"; LAi_ActorDialog(crewref, PChar, "abduction_officer_replace_captain_romance", 5.0, 5.0); } } break; case "abduction_officer_replace_captain_romance": if (PChar.quest.abduction_officer_replacement != "Emmett Dawson") { characters[GetCharacterIndex(PChar.quest.abduction_officer_replacement)].Dialog.Filename = PChar.quest.normal_dialog; RemoveOfficersIndex(PChar, GetCharacterIndex(PChar.quest.abduction_officer_replacement)); RemovePassenger(PChar, characterFromID(PChar.quest.abduction_officer_replacement)); } Pchar.quest.abduction_officer_replace_captain_romance2.win_condition.l1 = "ExitFromLocation"; PChar.quest.abduction_officer_replace_captain_romance2.win_condition.l1.location = PChar.location; Pchar.quest.abduction_officer_replace_captain_romance2.win_condition = "abduction_officer_replace_captain_romance2"; break; case "abduction_officer_replace_captain_romance2": RemoveCharacterCompanion(Pchar, romance); ExchangeCharacterShip(romance, characterFromID(PChar.quest.abduction_officer_replacement)); SetCompanionIndex(PChar,-1, GetCharacterIndex(PChar.quest.abduction_officer_replacement)); DeleteQuestAttribute("abduction_officer_replacement"); break; case "abduction_officer_move_out": PChar.quest.abduction_officer_back_to_ship.win_condition.l1 = "location"; PChar.quest.abduction_officer_back_to_ship.win_condition.l1.location = PChar.quest.abduction_officer.return_site; PChar.quest.abduction_officer_back_to_ship.win_condition = "abduction_officer_back_to_ship"; SetCharacterRemovable(romance, true); RemovePassenger(pchar, romance); PChar.quest.revenge_type = "officer"; LAi_QuestDelay("abduction_move_to_prison", 0.0); break; case "abduction_officer_back_to_ship": StartQuestMovie(true, true, false); // You can't leave this area until you've talked to the crewman DisableFastTravel(true); sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, "pirat2", PChar.quest.abduction_officer.sailor_group, PChar.quest.abduction_officer.sailor_locator); LAi_SetHP(sld, 180.0, 180.0); LAi_SetImmortal(sld, true); LAi_SetStayType(sld); sld.id = "temp_crewman"; sld.Dialog.Filename = "crew_dialog.c"; sld.dialog.CurrentNode = "abduction_romance_not_back"; break; case "abduction_officer_return_town": // Triggered by dialog with sailor Preprocessor_AddQuestData("romance", GetMySimpleName(romance)); if (PChar.sex == "man") Preprocessor_AddQuestData("pronoun", "she"); else Preprocessor_AddQuestData("pronoun", "he"); SetQuestHeader("AWOL"); AddQuestRecord("AWOL", 1); Preprocessor_Remove("pronoun"); Preprocessor_Remove("romance"); ch = characterfromID(PChar.quest.abduction_officer.tavernid); StoreDialog(ch); ch.Dialog.Filename = "witness_dialog.c"; ch.dialog.CurrentNode = "abduction_tavern"; DisableFastTravel(false); // Finished talking to crewman, so now you can leave EndQuestMovie(); bQuestDisableSeaEnter = true; break; case "abduction_officer_tavern_reset": // Triggered by dialog with relevant tavern keeper ch = characterfromID(PChar.quest.abduction_officer.tavernid); RestoreDialog(ch); PChar.quest.abduction_status = "taken_from_ship"; Preprocessor_AddQuestData("romance", GetMySimpleName(romance)); if (PChar.sex == "man") Preprocessor_AddQuestData("pronoun", "she"); else Preprocessor_AddQuestData("pronoun", "he"); AddQuestRecord("AWOL", 2); CloseQuestHeader("AWOL"); Preprocessor_AddQuestData("romance", GetMySimpleName(romance)); if (PChar.sex == "man") Preprocessor_AddQuestData("pronoun", "she"); else Preprocessor_AddQuestData("pronoun", "he"); SetQuestHeader("Abduction"); AddQuestRecord("Abduction", 21); Preprocessor_Remove("pronoun"); Preprocessor_Remove("romance"); bQuestDisableSeaEnter = false; break; case "abduction_seen_governor": // Triggered by dialog with "Javier Balboa" Preprocessor_AddQuestData("governor", GetMySimpleName(characterfromID("Javier Balboa"))); if (checkquestattribute("background", "pirate")) { AddQuestRecord("Abduction", 2); ChangeCharacterAddressGroup(characterfromID("Garfield Leighton"), "Tortuga_Tavern", "goto", "goto6"); LAi_group_MoveCharacter(characterfromID("Garfield Leighton"), "TORTUGA_CITIZENS"); } else { AddQuestRecord("Abduction", 3); ChangeCharacterAddressGroup(characterfromID("Garfield Leighton"), "Smugglers_Tavern", "goto", "goto5"); LAi_group_MoveCharacter(characterfromID("Garfield Leighton"), "SMUGGLERS_CITIZENS"); } Characters[GetCharacterIndex("Garfield Leighton")].dialog.CurrentNode = "abduction_meeting"; Preprocessor_Remove("governor"); PChar.quest.abduction_status = "seen_governor"; Locations[FindLocation("Redmond_Dungeon_2")].models.always.locators = "d02_l_GR"; Locations[FindLocation("Redmond_Dungeon_2")].reload.l2.name = "reload2"; Locations[FindLocation("Redmond_Dungeon_2")].reload.l2.go = "Quest_Cellar_Prison"; Locations[FindLocation("Redmond_Dungeon_2")].reload.l2.emerge = "reload10"; Locations[FindLocation("Redmond_Dungeon_2")].reload.l2.autoreload = "0"; Locations[FindLocation("Redmond_Dungeon_2")].reload.l2.label = "Old Inquisition prison."; Locations[FindLocation("Redmond_Dungeon_2")].locators_radius.reload.reload2 = 2.5; break; case "abduction_guadeloupe_setup": // Triggered by dialog with Garfield Leighton ChangeCharacterAddressGroup(characterfromID("Wilfred Roscoe"), "PaP_prison", "goto", "goto9"); ChangeCharacterAddressGroup(characterfromID("French_guard1"), "Guadeloupe_port", "soldiers", "soldier8"); ChangeCharacterAddressGroup(characterfromID("French_guard2"), "Guadeloupe_port", "soldiers", "soldier9"); characters[GetCharacterIndex("French_guard1")].Dialog.Filename = "guard_dialog.c"; characters[GetCharacterIndex("French_guard2")].Dialog.Filename = "guard_dialog.c"; Characters[GetCharacterIndex("French_guard1")].dialog.CurrentNode = "French_first_time"; Characters[GetCharacterIndex("French_guard2")].dialog.CurrentNode = "French_first_time"; Locations[FindLocation("Guadeloupe_Port")].reload.l14.disable = 1; // Barracks door locked. PChar.quest.abduction_guadeloupe_arrival.win_condition.l1 = "location"; PChar.quest.abduction_guadeloupe_arrival.win_condition.l1.location = "Guadeloupe_port"; PChar.quest.abduction_guadeloupe_arrival.win_condition = "abduction_guadeloupe_arrival"; Pchar.quest.abduction_guard_challenges.win_condition.l1 = "locator"; Pchar.quest.abduction_guard_challenges.win_condition.l1.location = "Guadeloupe_port"; Pchar.quest.abduction_guard_challenges.win_condition.l1.locator_group = "reload"; Pchar.quest.abduction_guard_challenges.win_condition.l1.locator = "barracks"; Pchar.quest.abduction_guard_challenges.win_condition = "abduction_guard_challenges"; break; case "abduction_guadeloupe_arrival": Preprocessor_AddQuestData("pirate", GetMySimpleName(characterfromID("Wilfred Roscoe"))); AddQuestRecord("Abduction", 7); Preprocessor_Remove("pirate"); if (GetCharacterShipLocation(PChar) == "Guadeloupe_port") { speaker = Get_Speaker(); if (speaker != "") { crewref = characterFromID(speaker); crewidx = GetCharacterIndex(speaker); PChar.quest.normal_dialog = characters[crewidx].Dialog.Filename; PChar.quest.move_ship_officer = speaker; LAi_SetActorType(crewref); characters[crewidx].Dialog.Filename = "crew_dialog.c"; Characters[crewidx].Dialog.CurrentNode = "abduction_move_ship"; LAi_ActorDialog(crewref, pchar, "abduction_move_ship", 5.0, 5.0); } else { Pchar.dialog.CurrentNode = "abduction_move_ship"; LAi_SetActorType(PChar); LAi_ActorSelfDialog(PChar, ""); } } PChar.quest.abduction_in_prison.win_condition.l1 = "location"; PChar.quest.abduction_in_prison.win_condition.l1.location = "PaP_prison"; PChar.quest.abduction_in_prison.win_condition = "abduction_in_prison"; break; case "abduction_move_ship": RemoveOfficersIndex(PChar, GetCharacterIndex(PChar.quest.move_ship_officer)); SetCharacterRemovable(characterfromID(PChar.quest.move_ship_officer), false); LAi_SetActorType(characterFromID(PChar.quest.move_ship_officer)); LAi_ActorGoToLocation(characterFromID(PChar.quest.move_ship_officer), "reload", "reload2_back", "none", "", "", "", 120.0); bQuestDisableSeaEnter = true; // Prevent exiting to the sea. Locations[FindLocation("Guadeloupe_Port")].reload.l1.disable = 1; // Lock the pier. DisableFastTravel(true); // No teleporting to ship. Pchar.quest.abduction_move_ship2.win_condition.l1 = "ExitFromLocation"; // Actually move the ship when you're not looking. PChar.quest.abduction_move_ship2.win_condition.l1.location = PChar.location; Pchar.quest.abduction_move_ship2.win_condition = "abduction_move_ship2"; break; case "abduction_move_ship2": bQuestDisableSeaEnter = false; Locations[FindLocation("Guadeloupe_Port")].reload.l1.disable = 0; DisableFastTravel(false); characters[GetCharacterIndex(PChar.quest.move_ship_officer)].Dialog.Filename = PChar.quest.normal_dialog; SetCharacterRemovable(characterfromID(PChar.quest.move_ship_officer), true); DeleteQuestAttribute("move_ship_officer"); SetCharacterShipLocation(PChar, "Guadeloupe_shore_01"); PChar.location.from_sea = "Guadeloupe_shore_01"; break; case "abduction_guard_challenges": LAi_SetActorType(characterfromID("French_guard1")); Characters[GetCharacterIndex("French_guard1")].dialog.CurrentNode = "abduction_challenge"; LAi_ActorDialog(characterfromID("French_guard1"),PChar,"",5.0,5.0); // Exits to "abduction_fight_guards", "abduction_open_barracks_door" or just exits if you didn't fight, bribe or produce a pass break; case "abduction_fight_guards": StartQuestMovie(true, true, false); LAi_group_MoveCharacter(characterfromID("French_guard1"), "FRANCE_SOLDIERS"); LAi_group_MoveCharacter(characterfromID("French_guard2"), "FRANCE_SOLDIERS"); LAi_group_SetRelation("FRANCE_SOLDIERS", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY); LAi_group_FightGroups("FRANCE_SOLDIERS", LAI_GROUP_PLAYER, true); LAi_group_SetCheck("FRANCE_SOLDIERS", "abduction_guards_defeated"); break; case "abduction_guards_defeated": EndQuestMovie(); Pchar.quest.abduction_remove_bodies.win_condition.l1 = "ExitFromLocation"; PChar.quest.abduction_remove_bodies.win_condition.l1.location = PChar.location; Pchar.quest.abduction_remove_bodies.win_condition = "abduction_remove_bodies"; LAi_QuestDelay("abduction_open_barracks_door", 1.0); break; case "abduction_remove_bodies": ChangeCharacterAddress(characterFromID("French_guard1"), "None", ""); ChangeCharacterAddress(characterFromID("French_guard2"), "None", ""); break; case "abduction_open_barracks_door": Locations[FindLocation("Guadeloupe_Port")].reload.l14.disable = 0; Locations[FindLocation("PaP_Arsenal")].reload.l1.disable = 0; break; case "abduction_reset_guards": // Triggered by dialog with guard if you didn't fight, bribe or produce a pass if (!checkAttribute(PChar,"quest.abduction_need_pass")) { if (checkquestattribute("church_help", "Yedam") && !LAi_IsDead(characterFromID("Yedam Kinne"))) { Characters[GetCharacterIndex("Yedam Kinne")].dialog.CurrentNode = "return_visit"; AddQuestRecord("Abduction", 9); } else AddQuestRecord("Abduction", 8); PChar.quest.abduction_need_pass = "noted"; } LAi_SetGuardianType(characterfromID("French_guard1")); LAi_SetGuardianType(characterfromID("French_guard2")); Characters[GetCharacterIndex("French_guard1")].dialog.CurrentNode = "abduction_entry_options"; Characters[GetCharacterIndex("French_guard2")].dialog.CurrentNode = "abduction_entry_options"; break; case "abduction_in_prison": iForceDetectionFalseFlag = 1; bQuestDisableSeaEnter = false; if (checkquestattribute("abduction_guard_status", "fakepass") || checkquestattribute("abduction_guard_status", "bribed")) { ChangeCharacterAddressGroup(characterfromID("French_guard1"), "PaP_Arsenal", "goto", "goto3"); ChangeCharacterAddressGroup(characterfromID("French_guard2"), "PaP_Arsenal", "goto", "goto4"); LAi_SetActorType(characterfromID("French_guard1")); LAi_ActorTurnToLocator(characterfromID("French_guard1"), "reload", "reload2"); LAi_SetActorType(characterfromID("French_guard2")); LAi_ActorTurnToLocator(characterfromID("French_guard2"), "reload", "reload2"); } Pchar.quest.abduction_free_pirate.win_condition.l1 = "locator"; Pchar.quest.abduction_free_pirate.win_condition.l1.location = "PaP_prison"; Pchar.quest.abduction_free_pirate.win_condition.l1.locator_group = "reload"; Pchar.quest.abduction_free_pirate.win_condition.l1.locator = "reload12"; Pchar.quest.abduction_free_pirate.win_condition = "abduction_free_pirate"; Pchar.quest.abduction_reset_guadeloupe.win_condition.l1 = "MapEnter"; Pchar.quest.abduction_reset_guadeloupe.win_condition = "abduction_reset_guadeloupe"; break; case "abduction_free_pirate": pchar.quest.abduction_talk_to_pirate1.win_condition.l1 = "locator"; pchar.quest.abduction_talk_to_pirate1.win_condition.l1.location = "PaP_prison"; pchar.quest.abduction_talk_to_pirate1.win_condition.l1.locator_group = "reload"; pchar.quest.abduction_talk_to_pirate1.win_condition.l1.locator = "reload12"; pchar.quest.abduction_talk_to_pirate1.win_condition = "abduction_talk_to_pirate1"; break; case "abduction_talk_to_pirate1": LAi_SetActorType(characterFromID("Wilfred Roscoe")); characters[GetCharacterIndex("Wilfred Roscoe")].dialog.filename = "Wilfred Roscoe_dialog.c"; Characters[GetCharacterIndex("Wilfred Roscoe")].dialog.currentNode = "abduction_visit"; LAi_ActorDialog(characterFromID("Wilfred Roscoe"),PChar,"abduction_fight_prison_guards",3.0,10.0); // LAi_ActorDialogNow(characterFromID("Wilfred Roscoe"),PChar,"abduction_fight_prison_guards",10.0); break; case "abduction_fight_prison_guards": LAi_LocationFightDisable(&Locations[FindLocation("PaP_prison")], false); LAi_group_SetRelation("FRANCE_SOLDIERS", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY); LAi_group_FightGroups("FRANCE_SOLDIERS", LAI_GROUP_PLAYER, true); LAi_group_SetCheck("FRANCE_SOLDIERS", "abduction_free_pirate2"); break; case "abduction_free_pirate2": Locations[FindLocation("PaP_prison")].vcskip = true; ChangeCharacterAddressGroup(characterfromID("Wilfred Roscoe"), "PaP_prison", "reload", "reload12"); DoQuestReloadToLocation("PaP_prison", "reload", "reload11", "abduction_free_pirate3"); break; case "abduction_free_pirate3": LAi_SetFightMode(PChar, false); LAi_SetActorType(characterFromID("Wilfred Roscoe")); Characters[GetCharacterIndex("Wilfred Roscoe")].dialog.currentNode = "abduction_out"; LAi_ActorDialog(characterFromID("Wilfred Roscoe"),PChar,"abduction_pirate_changes_clothes",5.0,5.0); break; case "abduction_pirate_changes_clothes": LAi_SetImmortal(characterfromID("Wilfred Roscoe"), true); LAi_type_Actor_Reset(characterfromID("Wilfred Roscoe")); LAi_ActorFollowEverywhere(characterfromID("Wilfred Roscoe"), "", 5.0); AddPassenger(PChar, characterfromID("Wilfred Roscoe"), 0); SetCharacterRemovable(characterfromID("Wilfred Roscoe"), false); ch = characterfromID("Wilfred Roscoe"); ch.quest.outfit = ch.model; SetModelfromArray(ch, GetModelIndex("Soldier_Fra2_17")); ChangeCharacterAddressGroup(characterfromID("Wilfred Roscoe"), "PaP_prison", "reload", "reload12"); DoQuestReloadToLocation("PaP_prison", "reload", "reload11", "abduction_ready_to_escape"); break; case "abduction_ready_to_escape": Preprocessor_AddQuestData("pirate", GetMySimpleName(characterfromID("Wilfred Roscoe"))); AddQuestRecord("Abduction", 11); Preprocessor_Remove("pirate"); Characters[GetCharacterIndex("Remy Gatien_gov")].dialog.currentNode = "ardent_abduction_return"; // Set trap if you return to governor Characters[GetCharacterIndex("Garfield Leighton")].dialog.currentNode = "abduction_rescue_done"; // Set Garfield Leighton to exchange information for Wilfred Roscoe PChar.quest.abduction_back_in_guardroom.win_condition.l1 = "location"; PChar.quest.abduction_back_in_guardroom.win_condition.l1.location = "PaP_Arsenal"; PChar.quest.abduction_back_in_guardroom.win_condition = "abduction_back_in_guardroom"; if (PChar.quest.background == "pirate") { PChar.quest.abduction_arrive_tortuga.win_condition.l1 = "location"; PChar.quest.abduction_arrive_tortuga.win_condition.l1.location = "Tortuga_port"; PChar.quest.abduction_arrive_tortuga.win_condition = "abduction_arrive_tortuga"; Locations[FindLocation("Tortuga_Port")].vcskip = true; } else { PChar.quest.abduction_arrive_saojorge.win_condition.l1 = "location"; PChar.quest.abduction_arrive_saojorge.win_condition.l1.location = "Conceicao_port"; PChar.quest.abduction_arrive_saojorge.win_condition = "abduction_arrive_saojorge"; PChar.quest.abduction_arrive_leviathan.win_condition.l1 = "location"; PChar.quest.abduction_arrive_leviathan.win_condition.l1.location = "Conceicao_shore_02"; PChar.quest.abduction_arrive_leviathan.win_condition = "abduction_arrive_leviathan"; PChar.quest.abduction_arrive_sunny.win_condition.l1 = "location"; PChar.quest.abduction_arrive_sunny.win_condition.l1.location = "Conceicao_shore_01"; PChar.quest.abduction_arrive_sunny.win_condition = "abduction_arrive_sunny"; } break; case "abduction_back_in_guardroom": if (checkquestattribute("abduction_guard_status", "fakepass") || checkquestattribute("abduction_guard_status", "bribed")) { Locations[FindLocation("PaP_Arsenal")].reload.l1.disable = 1; if (checkquestattribute("abduction_guard_status", "bribed")) Characters[GetCharacterIndex("French_guard1")].dialog.currentNode = "abduction_demand_second_bribe"; else Characters[GetCharacterIndex("French_guard1")].dialog.currentNode = "abduction_demand_fine"; LAi_SetActorType(characterfromID("French_guard1")); LAi_ActorDialog(characterfromID("French_guard1"),PChar,"",5.0,5.0); // Exits to "abduction_fight_guards" or "abduction_open_barracks_door" } else { LAi_SetGuardianType(characterfromID("French_guard1")); PChar.quest.abduction_leave_guardroom.win_condition.l1 = "location"; PChar.quest.abduction_leave_guardroom.win_condition.l1.location = "Guadeloupe_port"; PChar.quest.abduction_leave_guardroom.win_condition = "abduction_exit_challenge"; } break; case "abduction_exit_challenge": Characters[GetCharacterIndex("French_guard1")].dialog.currentNode = "abduction_exit_challenge"; LAi_SetActorType(characterfromID("French_guard1")); LAi_ActorDialog(characterfromID("French_guard1"),PChar,"abduction_exit_challenge2",5.0,5.0); break; case "abduction_exit_challenge2": Characters[GetCharacterIndex("Wilfred Roscoe")].dialog.currentNode = "abduction_stand_straight"; LAi_SetActorType(characterfromID("Wilfred Roscoe")); LAi_ActorDialog(characterfromID("Wilfred Roscoe"),PChar,"abduction_exit_challenge3",5.0,5.0); break; case "abduction_exit_challenge3": Characters[GetCharacterIndex("French_guard1")].dialog.currentNode = "abduction_apology"; LAi_SetActorType(characterfromID("French_guard1")); LAi_ActorDialog(characterfromID("French_guard1"),PChar,"abduction_exit_challenge4",5.0,5.0); break; case "abduction_exit_challenge4": Characters[GetCharacterIndex("Wilfred Roscoe")].dialog.currentNode = "abduction_stay_at_posts"; LAi_SetActorType(characterfromID("Wilfred Roscoe")); LAi_ActorDialog(characterfromID("Wilfred Roscoe"),PChar,"abduction_exit_challenge5",5.0,5.0); break; case "abduction_exit_challenge5": Characters[GetCharacterIndex("French_guard1")].dialog.currentNode = "abduction_check_prisoner"; LAi_SetActorType(characterfromID("French_guard1")); LAi_ActorDialog(characterfromID("French_guard1"),PChar,"abduction_exit_challenge6",5.0,5.0); break; case "abduction_exit_challenge6": Characters[GetCharacterIndex("Wilfred Roscoe")].dialog.currentNode = "abduction_stay_at_posts2"; LAi_SetActorType(characterfromID("Wilfred Roscoe")); LAi_ActorDialog(characterfromID("Wilfred Roscoe"),PChar,"abduction_exit_challenge_end",5.0,5.0); break; case "abduction_exit_challenge_end": LAi_SetGuardianType(characterfromID("French_guard1")); LAi_ActorFollowEverywhere(characterfromID("Wilfred Roscoe"), "", 5.0); characters[GetCharacterIndex("French_guard1")].Dialog.Filename = "Falaise De Fleur Soldier_dialog.c"; characters[GetCharacterIndex("French_guard2")].Dialog.Filename = "Falaise De Fleur Soldier_dialog.c"; Characters[GetCharacterIndex("French_guard1")].dialog.currentNode = "First time"; Characters[GetCharacterIndex("French_guard2")].dialog.currentNode = "First time"; break; case "abduction_governor_arrest": // Triggered by dialog with "Remy Gatien_gov" if you go to townhall after releasing prisoner LAi_LocationFightDisable(&Locations[FindLocation("PaP_townhall")], false); Ambush("Soldiers", 8, "enemy", "friend", "reload1"); LAi_QuestDelay("abduction_arrested", 10.0); break; case "abduction_arrested": LAi_SetFightMode(PChar, false); PChar.quest.arresterid = "Guadeloupe_guard_1"; ChangeCharacterAddressGroup(characterfromID(PChar.quest.arresterid), "PaP_prison", "officers", "reload1_1"); if (!CheckCharacterItem(pchar, "pistolrock")) GiveItem2Character(pchar, "pistolrock"); EquipCharacterByItem(pchar, "bladeX4"); EquipCharacterByItem(pchar, "pistolrock"); DoQuestReloadToLocation("PaP_prison", "goto", "goto24", "hanging_day"); break; case "abduction_reset_guadeloupe": iForceDetectionFalseFlag = 0; LAi_LocationFightDisable(&Locations[FindLocation("PaP_prison")], true); DeleteAttribute(&Locations[FindLocation("PaP_prison")],"vcskip"); Characters[GetCharacterIndex("Remy Gatien_gov")].dialog.currentNode = "First time"; characters[GetCharacterIndex("French_guard1")].Dialog.Filename = "Falaise De Fleur Soldier_dialog.c"; characters[GetCharacterIndex("French_guard2")].Dialog.Filename = "Falaise De Fleur Soldier_dialog.c"; Characters[GetCharacterIndex("French_guard1")].dialog.currentNode = "First time"; Characters[GetCharacterIndex("French_guard2")].dialog.currentNode = "First time"; DisableFastTravel(false); ch = characterfromID("Wilfred Roscoe"); SetModelfromArray(ch, GetModelIndex(ch.quest.outfit)); DeleteAttribute(ch, "quest.outfit"); if (CheckCharacterItem(Pchar, "PrisonPass")) TakeItemFromCharacter(Pchar, "PrisonPass"); // We won't need these again, so clean them out of inventory if (CheckCharacterItem(Pchar, "FakePrisonPass")) TakeItemFromCharacter(Pchar, "FakePrisonPass"); break; case "abduction_wait_for_pass": // Triggered by dialog with Yedam Kinne, choosing to buy good pass PChar.quest.abduction_pass_ready.win_condition.l1 = "Timer"; PChar.quest.abduction_pass_ready.win_condition.l1.date.day = GetAddingDataDay(0, 0, 3); PChar.quest.abduction_pass_ready.win_condition.l1.date.month = GetAddingDataMonth(0, 0, 3); PChar.quest.abduction_pass_ready.win_condition.l1.date.year = GetAddingDataYear(0, 0, 3); PChar.quest.abduction_pass_ready.win_condition = "abduction_pass_ready"; break; case "abduction_pass_ready": logit("Yedam Kinne should have finished with the pass by now."); Characters[GetCharacterIndex("Yedam Kinne")].dialog.CurrentNode = "ardent_abduction_good_pass2"; break; case "abduction_arrive_tortuga": PlaceCharacter(characterFromID("Wilfred Roscoe"), "goto"); LAi_SetActorType(characterFromID("Wilfred Roscoe")); LAi_ActorFollowEverywhere(characterfromID("Wilfred Roscoe"), "", 10.0); DeleteAttribute(&Locations[FindLocation("Tortuga_port")],"vcskip"); break; case "abduction_arrive_saojorge": PChar.quest.abduction_arrive_leviathan.over = "yes"; PChar.quest.abduction_arrive_sunny.over = "yes"; PlaceCharacter(characterFromID("Wilfred Roscoe"), "goto"); LAi_SetActorType(characterFromID("Wilfred Roscoe")); LAi_ActorFollowEverywhere(characterfromID("Wilfred Roscoe"), "", 10.0); break; case "abduction_arrive_leviathan": PChar.quest.abduction_arrive_sunny.over = "yes"; PChar.quest.abduction_arrive_saojorge.over = "yes"; PlaceCharacter(characterFromID("Wilfred Roscoe"), "goto"); LAi_SetActorType(characterFromID("Wilfred Roscoe")); LAi_ActorFollowEverywhere(characterfromID("Wilfred Roscoe"), "", 10.0); break; case "abduction_arrive_sunny": PChar.quest.abduction_arrive_saojorge.over = "yes"; PChar.quest.abduction_arrive_leviathan.over = "yes"; PlaceCharacter(characterFromID("Wilfred Roscoe"), "goto"); LAi_SetActorType(characterFromID("Wilfred Roscoe")); LAi_ActorFollowEverywhere(characterfromID("Wilfred Roscoe"), "", 10.0); break; case "abduction_roscoe_joins_leighton": // Triggered by dialog with Garfield Leighton RemovePassenger(PChar, characterFromID("Wilfred Roscoe")); // LAi_ActorFollow(characterFromID("Wilfred Roscoe"), characterFromID("Garfield Leighton"), "", 5.0); LAi_SetCitizenType(characterFromID("Wilfred Roscoe")); PChar.quest.abduction_status = "pirate_rescued"; Pchar.quest.abduction_remove_pirates.win_condition.l1 = "MapEnter"; Pchar.quest.abduction_remove_pirates.win_condition = "abduction_remove_pirates"; break; case "abduction_remove_pirates": ChangeCharacterAddress(characterFromID("Wilfred Roscoe"), "None", ""); ChangeCharacterAddress(characterFromID("Garfield Leighton"), "None", ""); break; case "abduction_port_royale_witness": // Triggered by dialog with Gilbert Downing DisableFastTravel(true); PChar.quest.abduction_status = "in_villain_cell"; ch = characterfromID("Robert Blewett"); StoreDialog(ch); ch.Dialog.Filename = "witness_dialog.c"; ch.dialog.CurrentNode = "port_royale_dungeon"; ChangeCharacterAddressGroup(ch, "Redmond_town_03", "officers", "reload_3_2_3"); Pchar.quest.abduction_port_royale_witness_speaks.win_condition.l1 = "ExitFromLocation"; PChar.quest.abduction_port_royale_witness_speaks.win_condition.l1.location = PChar.location; Pchar.quest.abduction_port_royale_witness_speaks.win_condition = "abduction_port_royale_witness_speaks"; break; case "abduction_port_royale_witness_speaks": LAi_SetActorType(characterfromID("Robert Blewett")); Characters[GetCharacterIndex("Robert Blewett")].dialog.CurrentNode = "port_royale_dungeon"; LAi_ActorDialog(characterfromID("Robert Blewett"),PChar,"abduction_port_royale_witness_reset",60.0,60.0); break; case "abduction_port_royale_witness_reset": DisableFastTravel(false); ch = characterfromID("Robert Blewett"); RestoreDialog(ch); LAi_SetCitizenType(ch); Preprocessor_AddQuestData("romance", GetMySimpleName(romance)); Preprocessor_AddQuestData("villain", GetMySimpleName(villain)); SetQuestHeader("Abduction"); AddQuestRecord("Abduction", 16); Preprocessor_Remove("villain"); Preprocessor_Remove("romance"); Pchar.quest.abduction_port_royale_witness_reset2.win_condition.l1 = "ExitFromLocation"; PChar.quest.abduction_port_royale_witness_reset2.win_condition.l1.location = PChar.location; Pchar.quest.abduction_port_royale_witness_reset2.win_condition = "abduction_port_royale_witness_reset2"; pchar.quest.abduction_found_romance.win_condition.l1 = "locator"; pchar.quest.abduction_found_romance.win_condition.l1.location = "Quest_Cellar_Prison"; pchar.quest.abduction_found_romance.win_condition.l1.locator_group = "reload"; pchar.quest.abduction_found_romance.win_condition.l1.locator = "reload12"; pchar.quest.abduction_found_romance.win_condition = "abduction_found_romance"; break; case "abduction_port_royale_witness_reset2": ChangeCharacterAddressGroup(characterfromID("Robert Blewett"), "Redmond_town_03", "goto", "cityzen03"); break; case "abduction_found_romance": LAi_SetFightMode(PChar, false); DisableFastTravel(true); LAi_SetActorType(romance); if (CheckQuestAttribute("ardent_kidnap.status", "in_downing_prison")) Characters[romanceidx].dialog.CurrentNode = "kidnap_rescue_found_in_cell"; else Characters[romanceidx].dialog.CurrentNode = "abduction_found_in_cell"; LAi_ActorDialog(romance,PChar,"",5.0,5.0); // Exits to "abduction_release_romance" if you have lockpick, otherwise just exits Locations[FindLocation("Quest_Merchant_House")].reload.l2.name = "reload3"; Locations[FindLocation("Quest_Merchant_House")].reload.l2.go = "Quest_Cellar_Prison"; Locations[FindLocation("Quest_Merchant_House")].reload.l2.emerge = "reload1"; Locations[FindLocation("Quest_Merchant_House")].reload.l2.autoreload = "0"; Locations[FindLocation("Quest_Merchant_House")].reload.l2.label = "Old Inquisition prison."; locations[FindLocation("Quest_Merchant_House")].reload.l2.disable = 0; break; case "abduction_got_lockpick": pchar.quest.abduction_return_with_lockpick.win_condition.l1 = "locator"; pchar.quest.abduction_return_with_lockpick.win_condition.l1.location = "Quest_Cellar_Prison"; pchar.quest.abduction_return_with_lockpick.win_condition.l1.locator_group = "reload"; pchar.quest.abduction_return_with_lockpick.win_condition.l1.locator = "reload12"; pchar.quest.abduction_return_with_lockpick.win_condition = "abduction_return_with_lockpick"; break; case "abduction_return_with_lockpick": LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "abduction_return_with_lockpick"; LAi_ActorDialog(romance,PChar,"abduction_release_romance",5.0,5.0); break; case "abduction_release_romance": PlaySound("PEOPLE\lockpick2.wav"); ChangeCharacterAddressGroup(romance, "Quest_Cellar_Prison", "reload", "reload12"); DoQuestReloadToLocation("Quest_Cellar_Prison", "reload", "reload11", "abduction_romance_free"); break; case "abduction_romance_free": DeleteAttribute(characterFromID(PChar.quest.romance), "prisoned"); LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "abduction_romance_free"; LAi_ActorDialog(romance,PChar,"abduction_romance_free2",5.0,5.0); break; case "abduction_romance_free2": ChangeCharacterAddressGroup(CharacterFromID("Gilbert Downing"), "Quest_Merchant_House", "goto", "goto9"); LAi_SetHuberStayType(CharacterFromID("Gilbert Downing")); LAi_SetActorType(romance); LAi_ActorGoToLocation(romance, "reload", "reload1", "Quest_Merchant_House", "goto", "goto10", "", 30.0); Characters[GetCharacterIndex("Gilbert Downing")].dialog.CurrentNode = "abduction_romance_released"; pchar.quest.abduction_downing_house_with_romance.win_condition.l1 = "locator"; pchar.quest.abduction_downing_house_with_romance.win_condition.l1.location = "Quest_Cellar_Prison"; pchar.quest.abduction_downing_house_with_romance.win_condition.l1.locator_group = "reload"; pchar.quest.abduction_downing_house_with_romance.win_condition.l1.locator = "reload1"; pchar.quest.abduction_downing_house_with_romance.win_condition = "abduction_downing_house_with_romance"; break; case "abduction_downing_house_with_romance": LAi_SetActorType(romance); ChangeCharacterAddressGroup(romance, "Quest_Merchant_House", "goto", "goto10"); break; case "abduction_romance_confronts_merchant": // Triggered by dialog with Gilbert Downing LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "abduction_romance_confronts_merchant"; LAi_ActorDialog(romance,PChar,"abduction_merchant_refuses_to_betray",5.0,5.0); break; case "abduction_merchant_refuses_to_betray": LAi_SetActorType(characterfromID("Gilbert Downing")); Characters[GetCharacterIndex("Gilbert Downing")].dialog.CurrentNode = "abduction_merchant_refuses_to_betray"; if (CheckQuestAttribute("ardent_kidnap.status", "in_downing_prison")) { Pchar.quest.kidnap_rescue_reset_merchant.win_condition.l1 = "ExitFromLocation"; PChar.quest.kidnap_rescue_reset_merchant.win_condition.l1.location = PChar.location; Pchar.quest.kidnap_rescue_reset_merchant.win_condition = "abduction_reset_merchant"; LAi_ActorDialog(characterfromID("Gilbert Downing"),PChar,"kidnap_rescue_romance_from_house",5.0,5.0); } else LAi_ActorDialog(characterfromID("Gilbert Downing"),PChar,"abduction_romance_suggests_church",5.0,5.0); break; case "abduction_romance_suggests_church": LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "abduction_romance_suggests_church"; LAi_ActorDialog(romance,PChar,"abduction_set_up_church",5.0,5.0); Pchar.quest.abduction_reset_merchant.win_condition.l1 = "ExitFromLocation"; PChar.quest.abduction_reset_merchant.win_condition.l1.location = PChar.location; Pchar.quest.abduction_reset_merchant.win_condition = "abduction_reset_merchant"; ChangeCharacterAddressGroup(characterfromID("Javier Balboa"), "Santiago_townhall", "goto", "goto3"); LAi_SetStayType(characterfromID("Javier Balboa")); Pchar.quest.abduction_back_home.win_condition.l1 = "location"; PChar.quest.abduction_back_home.win_condition.l1.character = Pchar.id; Pchar.quest.abduction_back_home.win_condition.l1.location = "Santiago_townhall"; Pchar.quest.abduction_back_home.win_condition = "abduction_back_home"; break; case "abduction_reset_merchant": ChangeCharacterAddressGroup(CharacterFromID("Gilbert Downing"), "Quest_Merchant_House", "sit", "sit1"); LAi_SetHuberType(CharacterFromID("Gilbert Downing")); Characters[GetCharacterIndex("Gilbert Downing")].dialog.CurrentNode = "hostile"; DisableFastTravel(false); break; case "abduction_set_up_church": Preprocessor_AddQuestData("romance", GetMySimpleName(romance)); Preprocessor_AddQuestData("villain", GetMySimpleName(villain)); if (PChar.sex == "man") Preprocessor_AddQuestData("pronoun", "her"); else Preprocessor_AddQuestData("pronoun", "him"); AddQuestRecord("Abduction", 18); Preprocessor_Remove("pronoun"); Preprocessor_Remove("villain"); Preprocessor_Remove("romance"); LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); LAi_SetImmortal(romance, true); // AddPassenger(PChar, romance, 0); SetCharacterRemovable(romance, false); PChar.quest.abduction_status = "go_to_church"; break; case "abduction_confession_interlude": StartQuestMovie(true, true, false); LAi_SetActorType(characterfromID("Father Bernard")); LAi_ActorGoToLocation(characterfromID("Father Bernard"), "reload", "reload2", "None", "", "", "abduction_confession_interlude2", 30.0); LAi_SetActorType(romance); LAi_ActorGoToLocation(romance, "reload", "reload2", "None", "", "", "", 30.0); break; case "abduction_confession_interlude2": LAi_QuestDelay("abduction_confession_interlude3", 10.0); break; case "abduction_confession_interlude3": ChangeCharacterAddressGroup(characterfromID("Father Bernard"), "Redmond_church", "reload", "reload2"); ChangeCharacterAddressGroup(romance, "Redmond_church", "reload", "reload2"); LAi_QuestDelay("abduction_confession_interlude4", 1.0); break; case "abduction_confession_interlude4": LAi_SetActorType(characterfromID("Father Bernard")); LAi_SetActorType(romance); LAi_ActorGoToLocator(characterfromID("Father Bernard"), "goto", "goto11", "abduction_confession_interlude5",30.0); LAi_ActorFollowEverywhere(romance, "", 10.0); break; case "abduction_confession_interlude5": ChangeCharacterAddressGroup(characterfromID("Father Bernard"), "Redmond_church", "goto", "goto11"); LAi_SetPriestType(characterfromID("Father Bernard")); Characters[GetCharacterIndex("Father Bernard")].dialog.CurrentNode = "ardent_abduction_story_checks_out"; break; case "abduction_romance_will_pay": LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "abduction_romance_will_pay_church"; LAi_ActorDialog(romance,PChar,"abduction_romance_will_pay2",5.0,5.0); break; case "abduction_romance_will_pay2": LAi_SetActorType(characterfromID("Father Bernard")); Characters[GetCharacterIndex("Father Bernard")].dialog.CurrentNode = "ardent_abduction_write_to_rome"; LAi_ActorDialog(characterfromID("Father Bernard"),PChar,"abduction_finished_with_church",5.0,5.0); break; case "abduction_finished_with_church": LAi_SetPriestType(characterfromID("Father Bernard")); LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); PChar.quest.abduction_status = "been_to_church"; AddQuestRecord("Abduction", 19); EndQuestMovie(); Characters[romanceidx].married.annulled = "pending"; break; case "abduction_back_home": LAi_SetActorType(characterFromID("Javier Balboa")); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "abduction_return"; LAi_ActorDialog(CharacterFromID("Javier Balboa"),PChar,"abduction_romance_accuses",5.0,5.0); break; case "abduction_romance_accuses": LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "abduction_accuse_abductor"; LAi_ActorDialog(romance,PChar,"abduction_governor_outraged",5.0,5.0); break; case "abduction_governor_outraged": LAi_SetActorType(characterFromID("Javier Balboa")); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "abduction_outrage"; LAi_ActorDialog(CharacterFromID("Javier Balboa"),PChar,"abduction_romance_revenge",1.0,1.0); break; case "abduction_romance_revenge": Preprocessor_AddQuestData("romance", GetMyFullName(romance)); Preprocessor_AddQuestData("villain", GetMyFullName(villain)); AddQuestRecord("Abduction", 20); CloseQuestHeader("Abduction"); DeleteQuestAttribute("abduction_officer"); DeleteQuestAttribute("abduction_guard_status"); Preprocessor_Remove("villain"); Preprocessor_Remove("romance"); if(AUTO_SKILL_SYSTEM) { AddPartyExpChar(pchar, "Leadership", 1000); AddPartyExpChar(PChar, "", 100); AddPartyExpChar(pchar, "Sneak", 100); } else {AddPartyExp(pchar, 1200);} LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "abduction_revenge_plan"; LAi_ActorDialog(romance,PChar,"convoy_governor_issues_letter",1.0,1.0); Pchar.quest.abduction_reset_governor.win_condition.l1 = "ExitFromLocation"; PChar.quest.abduction_reset_governor.win_condition.l1.location = PChar.location; Pchar.quest.abduction_reset_governor.win_condition = "reset_governor"; break; case "kidnap_rescue_goto_Downing_House": // Triggered by dialog with Charles Windem Preprocessor_AddQuestData("romance", GetMySimpleName(romance)); Preprocessor_AddQuestData("villain", GetMySimpleName(villain)); SetQuestHeader("Dungeon"); AddQuestRecord("Dungeon", 1); Preprocessor_Remove("villain"); Preprocessor_Remove("romance"); Locations[FindLocation("Redmond_town_03")].reload.l9.disable = 0; // Re-open house of Gilbert Downing Characters[GetCharacterIndex("Gilbert Downing")].dialog.CurrentNode = "kidnap_rescue_buy_wine"; LAi_QuestDelay("abduction_move_to_prison", 0.0); break; case "kidnap_rescue_setup_witness": // Triggered by dialog with Gilbert Downing Preprocessor_AddQuestData("villain", GetMySimpleName(villain)); AddQuestRecord("Dungeon", 2); Preprocessor_Remove("villain"); DisableFastTravel(true); ch = characterfromID("Robert Blewett"); StoreDialog(ch); ch.Dialog.Filename = "witness_dialog.c"; ChangeCharacterAddressGroup(ch, "Redmond_town_03", "officers", "reload_3_2_3"); Pchar.quest.kidnap_rescue_port_royale_witness_speaks.win_condition.l1 = "location"; PChar.quest.kidnap_rescue_port_royale_witness_speaks.win_condition.l1.location = "Redmond_town_03"; Pchar.quest.kidnap_rescue_port_royale_witness_speaks.win_condition = "kidnap_rescue_port_royale_witness_speaks"; break; case "kidnap_rescue_port_royale_witness_speaks": Locations[FindLocation("Redmond_Dungeon_2")].models.always.locators = "d02_l_GR"; Locations[FindLocation("Redmond_Dungeon_2")].reload.l2.name = "reload2"; Locations[FindLocation("Redmond_Dungeon_2")].reload.l2.go = "Quest_Cellar_Prison"; Locations[FindLocation("Redmond_Dungeon_2")].reload.l2.emerge = "reload10"; Locations[FindLocation("Redmond_Dungeon_2")].reload.l2.autoreload = "0"; Locations[FindLocation("Redmond_Dungeon_2")].reload.l2.label = "Old Inquisition prison."; Locations[FindLocation("Redmond_Dungeon_2")].locators_radius.reload.reload2 = 2.5; LAi_SetActorType(characterfromID("Robert Blewett")); Characters[GetCharacterIndex("Robert Blewett")].dialog.CurrentNode = "port_royale_dungeon"; LAi_ActorDialog(characterfromID("Robert Blewett"),PChar,"kidnap_rescue_port_royale_witness_reset",60.0,60.0); break; case "kidnap_rescue_port_royale_witness_reset": DisableFastTravel(false); ch = characterfromID("Robert Blewett"); RestoreDialog(ch); LAi_SetCitizenType(ch); Preprocessor_AddQuestData("villain", GetMyLastName(villain)); AddQuestRecord("Dungeon", 3); Preprocessor_Remove("villain"); PChar.quest.ardent_kidnap.status = "in_downing_prison"; Pchar.quest.kidnap_rescue_port_royale_witness_reset2.win_condition.l1 = "ExitFromLocation"; PChar.quest.kidnap_rescue_port_royale_witness_reset2.win_condition.l1.location = PChar.location; Pchar.quest.kidnap_rescue_port_royale_witness_reset2.win_condition = "abduction_port_royale_witness_reset2"; pchar.quest.kidnap_rescue_found_romance.win_condition.l1 = "locator"; pchar.quest.kidnap_rescue_found_romance.win_condition.l1.location = "Quest_Cellar_Prison"; pchar.quest.kidnap_rescue_found_romance.win_condition.l1.locator_group = "reload"; pchar.quest.kidnap_rescue_found_romance.win_condition.l1.locator = "reload12"; pchar.quest.kidnap_rescue_found_romance.win_condition = "abduction_found_romance"; break; case "kidnap_rescue_romance_from_house": DisableFastTravel(true); PChar.quest.revenge_type = "kidnap_rescue"; LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); Pchar.quest.kidnap_rescue_leave_house.win_condition.l1 = "ExitFromLocation"; PChar.quest.kidnap_rescue_leave_house.win_condition.l1.location = PChar.location; Pchar.quest.kidnap_rescue_leave_house.win_condition = "kidnap_rescue_leave_house"; break; case "kidnap_rescue_leave_house": StartQuestMovie(true, true, false); LAi_QuestDelay("kidnap_rescue_propose_convoy", 0.0); break; case "kidnap_rescue_propose_convoy": LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "kidnap_rescue_propose_convoy1"; LAi_ActorDialog(romance,PChar,"kidnap_rescue_propose_convoy_finished",10.0,10.0); PChar.quest.kidnap_rescue_return_santiago_townhall.win_condition.l1 = "location"; PChar.quest.kidnap_rescue_return_santiago_townhall.win_condition.l1.location = "Santiago_townhall"; PChar.quest.kidnap_rescue_return_santiago_townhall.win_condition = "kidnap_rescue_return_santiago_townhall"; break; case "kidnap_rescue_propose_convoy_finished": EndQuestMovie(); DisableFastTravel(false); LAi_QuestDelay("convoy_setup", 0.0); break; case "kidnap_rescue_return_santiago_townhall": if (isofficer(romance)) { ChangeCharacterAddressGroup(romance, "Santiago_townhall", "goto", "goto9"); } else { Pchar.quest.kidnap_rescue_reset_townhall_detector.win_condition.l1 = "ExitFromLocation"; PChar.quest.kidnap_rescue_reset_townhall_detector.win_condition.l1.location = PChar.location; Pchar.quest.kidnap_rescue_reset_townhall_detector.win_condition = "kidnap_rescue_reset_townhall_detector"; } break; case "kidnap_rescue_reset_townhall_detector": DeleteQuestAttribute("kidnap_rescue_return_santiago_townhall"); PChar.quest.kidnap_rescue_return_santiago_townhall.win_condition.l1 = "location"; PChar.quest.kidnap_rescue_return_santiago_townhall.win_condition.l1.location = "Santiago_townhall"; PChar.quest.kidnap_rescue_return_santiago_townhall.win_condition = "kidnap_rescue_return_santiago_townhall"; break; case "kidnap_rescue_romance_to_governor1": // Triggered by dialog with "Javier Balboa" LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "kidnap_rescue_report1"; LAi_ActorDialog(romance,PChar,"kidnap_rescue_governor_to_romance1",10.0,10.0); break; case "kidnap_rescue_governor_to_romance1": LAi_SetActorType(characterFromID("Javier Balboa")); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "kidnap_rescue_received_letter"; LAi_ActorDialog(CharacterFromID("Javier Balboa"),PChar,"kidnap_rescue_romance_to_governor2",1.0,1.0); break; case "kidnap_rescue_romance_to_governor2": LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "kidnap_rescue_who_do_you_believe"; LAi_ActorDialog(romance,PChar,"kidnap_rescue_governor_to_romance2",5.0,5.0); break; case "kidnap_rescue_governor_to_romance2": LAi_SetActorType(characterFromID("Javier Balboa")); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "kidnap_rescue_believe_you"; LAi_ActorDialog(CharacterFromID("Javier Balboa"),PChar,"kidnap_rescue_romance_says_convoy",1.0,1.0); break; case "kidnap_rescue_romance_says_convoy": LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "kidnap_rescue_already_in_hand"; LAi_ActorDialog(romance,PChar,"kidnap_rescue_governor_proposes_deal",5.0,5.0); break; case "kidnap_rescue_governor_proposes_deal": LAi_SetActorType(characterFromID("Javier Balboa")); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "kidnap_rescue_propose_deal"; LAi_ActorDialog(CharacterFromID("Javier Balboa"),PChar,"kidnap_rescue_deal_agreed",1.0,1.0); break; case "kidnap_rescue_deal_agreed": LAi_SetHuberStayType(CharacterFromID("Javier Balboa")); LAi_SetOfficerType(romance); SetRank(PChar, SPAIN, GetOldRank(PChar, SPAIN)); Preprocessor_AddQuestData("villain", GetMySimpleName(villain)); Preprocessor_AddQuestData("governor", GetMyFullName(CharacterFromID("Javier Balboa"))); AddQuestRecord("Convoy Strike", 21); Preprocessor_Remove("governor"); Preprocessor_Remove("villain"); // PChar.quest.kidnap_convoy = "true"; PChar.quest.revenge_type = "kidnap_rescue_convoy_agreed"; PChar.quest.convoy_romance_dead.win_condition.l1 = "NPC_Death"; PChar.quest.convoy_romance_dead.win_condition.l1.character = romance.id; PChar.quest.convoy_romance_dead.win_condition = "convoy_romance_dead"; if(!CheckAttribute(PChar, "quest.betrayed_spain")) { PChar.quest.betrayed_spain.win_condition.l1 = "relation"; PChar.quest.betrayed_spain.win_condition.l1.relation = "Hostile"; PChar.quest.betrayed_spain.win_condition.l1.nation = "Spain"; PChar.quest.betrayed_spain.win_condition = "betrayed_spain"; } break; case "marriage_proposal_accepted": PChar.quest.in_santiago_for_ExplainLetter.over = "yes"; PChar.quest.abduction_sanjuan.over = "yes"; LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); AddPassenger(PChar, romance, 0); SetCharacterRemovable(romance, false); LAi_SetImmortal(romance, true); ChangeCharacterAddressGroup(characterfromID("Javier Balboa"), "Santiago_townhall", "goto", "goto3"); LAi_SetStayType(characterfromID("Javier Balboa")); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "marriage_request"; // Go to Santiago town hall and talk to the governor to continue. PChar.quest.marriage_arrive_port.win_condition.l1 = "location"; // LAi_ActorFollowEverywhere doesn't make the actor follow to next island, PChar.quest.marriage_arrive_port.win_condition.l1.location = "Santiago_port"; // so these cases check for arrival at all landing points from where you PChar.quest.marriage_arrive_port.win_condition = "marriage_arrive_port"; // can walk to Santiago and put your companion on a suitable locator. PChar.quest.marriage_arrive_moa.win_condition.l1 = "location"; PChar.quest.marriage_arrive_moa.win_condition.l1.location = "Cuba_shore_02"; PChar.quest.marriage_arrive_moa.win_condition = "marriage_arrive_moa"; PChar.quest.marriage_arrive_maestra.win_condition.l1 = "location"; PChar.quest.marriage_arrive_maestra.win_condition.l1.location = "Cuba_shore_05"; PChar.quest.marriage_arrive_maestra.win_condition = "marriage_arrive_maestra"; PChar.quest.betrayed_spain1.win_condition.l1 = "relation"; PChar.quest.betrayed_spain1.win_condition.l1.relation = "Hostile"; PChar.quest.betrayed_spain1.win_condition.l1.nation = "Spain"; PChar.quest.betrayed_spain1.win_condition = "betrayed_spain"; break; case "marriage_arrive_port": PChar.quest.marriage_arrive_moa.over = "yes"; PChar.quest.marriage_arrive_maestra.over = "yes"; ChangeCharacterAddressGroup(romance, "Santiago_port", "goto", "goto3"); LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); break; case "marriage_arrive_moa": PChar.quest.marriage_arrive_port.over = "yes"; PChar.quest.marriage_arrive_maestra.over = "yes"; ChangeCharacterAddressGroup(romance, "Cuba_shore_02", "goto", "goto12"); LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); break; case "marriage_arrive_maestra": PChar.quest.marriage_arrive_moa.over = "yes"; PChar.quest.marriage_arrive_port.over = "yes"; ChangeCharacterAddressGroup(romance, "Cuba_shore_05", "goto", "locator10"); LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); break; case "marriage_partner_interrupts": // Triggered by dialog with Santiago governor LAi_SetImmortal(romance, false); RemoveOfficersIndex(pchar, romanceidx); RemovePassenger(pchar, romance); LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "explain_absence"; LAi_ActorDialog(romance,PChar,"marriage_soft_heart",1.0,1.0); break; case "marriage_soft_heart": LAi_SetActorType(characterFromID("Javier Balboa")); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "soft_heart"; LAi_ActorDialog(CharacterFromID("Javier Balboa"),PChar,"marriage_ask_permission",1.0,1.0); break; case "marriage_ask_permission": LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "marriage_proposed"; LAi_ActorDialog(romance,PChar,"marriage_not_marry_pirate",1.0,1.0); break; case "marriage_not_marry_pirate": LAi_SetActorType(characterFromID("Javier Balboa")); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "not_marry_pirate"; LAi_ActorDialog(CharacterFromID("Javier Balboa"),PChar,"",1.0,1.0); // If you accept and pay up, exits to "escort_chosen" (you picked an escort or did not want one). // Or can exit to "broken_heart" (you refused). // Or can exit to "marriage_governor_waits" (you need to get more money, then talk again). break; case "marriage_governor_waits": LAi_SetStayType(characterFromID("Javier Balboa")); break; case "broken_heart": LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "broken-hearted"; LAi_ActorDialog(romance,PChar,"marriage_refused",1.0,1.0); break; case "marriage_refused": Preprocessor_AddQuestData("romance", GetMySimpleName(romance)); AddQuestRecord("Marriage", 2); Preprocessor_Remove("romance"); CloseQuestHeader("Marriage"); LAi_SetActorType(characterFromID("Javier Balboa")); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "be_ashamed"; LAi_ActorDialog(CharacterFromID("Javier Balboa"),PChar,"",1.0,1.0); PChar.quest.marriage_reject_leaves.win_condition.l1 = "location"; PChar.quest.marriage_reject_leaves.win_condition.l1.location = "Santiago_town_01"; PChar.quest.marriage_reject_leaves.win_condition = "marriage_reject_leaves"; PChar.quest.marriage_revenge.win_condition.l1 = "location"; PChar.quest.marriage_revenge.win_condition.l1.location = "Santiago_town_01"; PChar.quest.marriage_revenge.win_condition = "ransom_reject_escape"; // Re-use revenge code from kidnap ransom refusal break; case "forget_marriage": Pchar.quest.marriage_reject_leaves1.win_condition.l1 = "MapEnter"; Pchar.quest.marriage_reject_leaves1.win_condition = "marriage_reject_leaves"; break; case "marriage_reject_leaves": ChangeCharacterAddress(romance, "None", ""); break; case "escort_chosen": if (isofficer(romance)) { PChar.quest.marriage_romance_is_officer = "true"; RemoveOfficersIndex(pchar, romanceidx); SetCharacterRemovable(romance, false); } PChar.quest.marriage_status = "wait_in_tavern"; LAi_SetActorType(characterFromID("Javier Balboa")); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "wait_in_tavern"; LAi_ActorDialog(CharacterFromID("Javier Balboa"),PChar,"",1.0,1.0); pchar.quest.marriage_wait_in_tavern.win_condition.l1 = "location"; pchar.quest.marriage_wait_in_tavern.win_condition.l1.location = "Santiago_tavern_upstairs"; pchar.quest.marriage_wait_in_tavern.win_condition = "marriage_wait_in_tavern"; break; case "marriage_wait_in_tavern": WaitDate("", 0, 0, 6, 0, 0); SetCurrentTime(10.00, 0); LAi_Fade("", ""); Locations[FindLocation("Santiago_town_01")].reload.l2.disable = 1; // Lock the town exit, Locations[FindLocation("Santiago_port")].reload.l2.disable = 1; // the ship, Locations[FindLocation("Santiago_port")].reload.l5.disable = 1; // and the port exit. DisableFastTravel(true); // And no teleporting to the ship either! Locations[FindLocation("Santiago_town_01")].reload.l4.disable = 1; // Also lock the town hall because the governor has gone to church. bQuestDisableSeaEnter = true; // No skipping off to sea. LAi_QuestDelay("wedding_setup", 0.0); break; case "wedding_setup": PChar.quest.marriage_status = "going_to_church"; if (PChar.sex == "man") { PChar.quest.romance_model = romance.model; SetModelfromArray(romance, GetModelIndex("Lucia_1")); } if (CheckAttribute(PChar,"quest.wedding_escort") && PChar.quest.wedding_escort != "") { crewref = characterFromID(PChar.quest.wedding_escort); crewidx = GetCharacterIndex(PChar.quest.wedding_escort); RemoveOfficersIndex(pchar, crewidx); SetCharacterRemovable(crewref, false); ChangeCharacterAddressGroup(crewref, "Santiago_church", "sit", "sit13"); LAi_SetActorType(crewref); LAi_ActorSetSitMode(crewref); } LAi_SetActorType(characterFromID("Javier Balboa")); ChangeCharacterAddressGroup(characterFromID("Javier Balboa"), "Santiago_church", "sit", "sit3"); LAi_ActorSetSitMode(characterFromID("Javier Balboa")); LAi_SetImmortal(CharacterFromID("Javier Balboa"), true); Locations[FindLocation("Santiago_church")].locators_radius.goto.goto11 = 2.0; logit("Time to go to church!"); Pchar.quest.Wedding_ceremony.win_condition.l1 = "locator"; Pchar.quest.Wedding_ceremony.win_condition.l1.location = "Santiago_church"; Pchar.quest.Wedding_ceremony.win_condition.l1.locator_group = "goto"; Pchar.quest.Wedding_ceremony.win_condition.l1.locator = "goto11"; Pchar.quest.Wedding_ceremony.win_condition = "Wedding_ceremony"; break; case "Wedding_ceremony": PauseAllSounds(); PlayStereoOGG("wedding2"); LAi_SetActorType(PChar); LAi_SetActorType(romance); ChangeCharacterAddressGroup(romance, "Santiago_church", "reload", "reload1"); LAi_ActorTurnToCharacter(PChar, romance); LAi_SetOfficerType(romance); LAi_QuestDelay("Wedding_consent1", 5.0); break; case "Wedding_consent1": romance.father = "Javier Balboa"; romance.married = MR_SINGLE; LAi_SetPlayerType(PChar); LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 5.0); if (PChar.sex == "man") { PChar.quest.bride = GetMyFullName(romance); PChar.quest.groom = GetMyFullName(PChar); } else { PChar.quest.bride = GetMyFullName(PChar); PChar.quest.groom = GetMyFullName(romance); } LAi_SetActorType(characterFromID("Padre Magarino")); characters[GetCharacterIndex("Padre Magarino")].Dialog.Filename = "Padre Magarino_dialog.c"; Characters[GetCharacterIndex("Padre Magarino")].dialog.CurrentNode = "wedding_consent1"; LAi_ActorDialog(characterFromID("Padre Magarino"),PChar,"Wedding_consent1_answer",5.0,5.0); break; case "Wedding_consent1_answer": LAi_SetActorType(romance); characters[romanceidx].Dialog.Filename = "Gov MR_dialog.c"; Characters[romanceidx].dialog.CurrentNode = "consent_answer1"; LAi_ActorDialog(romance,PChar,"Wedding_consent2",5.0,5.0); break; case "Wedding_consent2": LAi_SetActorType(characterFromID("Padre Magarino")); Characters[GetCharacterIndex("Padre Magarino")].dialog.CurrentNode = "wedding_consent2"; LAi_ActorDialog(characterFromID("Padre Magarino"),PChar,"Wedding_consent2_answer",5.0,5.0); break; case "Wedding_consent2_answer": LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "consent_answer2"; LAi_ActorDialog(romance,PChar,"Wedding_consent3",5.0,5.0); break; case "Wedding_consent3": if(!LAi_IsDead(villain) && CheckAttribute(PChar, "quest.finale_marriage")) { PauseAllSounds(); ChangeCharacterAddressGroup(villain, "Santiago_church", "reload", "reload1"); LAi_SetActorType(PChar); LAi_ActorTurnToCharacter(PChar, villain); LAi_SetActorType(characterFromID("Javier Balboa")); LAi_ActorTurnToCharacter(characterFromID("Javier Balboa"), villain); LAi_SetActorType(romance); LAi_ActorTurnToCharacter(romance, villain); if (CheckAttribute(PChar,"quest.wedding_escort") && PChar.quest.wedding_escort != "") { crewref = characterFromID(PChar.quest.wedding_escort); crewidx = GetCharacterIndex(PChar.quest.wedding_escort); LAi_SetActorType(crewref); LAi_ActorTurnToCharacter(crewref, villain); } LAi_QuestDelay("finale_marriage_villain_interrupts", 2.0); } else { LAi_SetActorType(characterFromID("Padre Magarino")); LAi_SetActorType(PChar); Characters[GetCharacterIndex("Padre Magarino")].dialog.CurrentNode = "wedding_consent3"; LAi_ActorDialog(PChar,characterFromID("Padre Magarino"),"Wedding_consent3_answer",5.0,5.0); } break; case "Wedding_consent3_answer": LAi_SetPlayerType(PChar); LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "consent_answer3"; LAi_ActorDialog(romance,PChar,"Wedding_his_vow",5.0,5.0); break; case "Wedding_his_vow": LAi_SetActorType(characterFromID("Padre Magarino")); Characters[GetCharacterIndex("Padre Magarino")].dialog.CurrentNode = "his_vow"; LAi_ActorDialog(characterFromID("Padre Magarino"),PChar,"",5.0,5.0); // If you are man, exits to "Wedding_vow_her_answer", otherwise exits to "Wedding_vow_his_answer" break; case "Wedding_vow_her_answer": LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "vow_answer"; LAi_ActorDialog(romance,PChar,"Wedding_bless_rings",5.0,5.0); break; case "Wedding_vow_his_answer": LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "vow_answer"; LAi_ActorDialog(romance,PChar,"Wedding_her_vow",5.0,5.0); break; case "Wedding_her_vow": LAi_SetActorType(characterFromID("Padre Magarino")); Characters[GetCharacterIndex("Padre Magarino")].dialog.CurrentNode = "her_vow"; LAi_ActorDialog(characterFromID("Padre Magarino"),PChar,"",5.0,5.0); // If you are man, exits to "Wedding_vow_her_answer", otherwise exits to "Wedding_bless_rings" // LAi_ActorDialog(characterFromID("Padre Magarino"),PChar,"Wedding_bless_rings",5.0,5.0); break; case "Wedding_bless_rings": LAi_SetActorType(characterFromID("Padre Magarino")); Characters[GetCharacterIndex("Padre Magarino")].dialog.CurrentNode = "bless_rings"; LAi_ActorDialog(characterFromID("Padre Magarino"),PChar,"Wedding_exchange_rings",5.0,5.0); break; case "Wedding_exchange_rings": TakeItemFromCharacter(Pchar, PChar.quest.wedding_ring); GiveItem2Character(PChar, "WeddingRing"); LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "he_gives_ring"; LAi_ActorDialog(romance,PChar,"Wedding_final_blessing",5.0,5.0); break; case "Wedding_final_blessing": LAi_SetActorType(characterFromID("Padre Magarino")); Characters[GetCharacterIndex("Padre Magarino")].dialog.CurrentNode = "final_blessing"; LAi_ActorDialog(characterFromID("Padre Magarino"),PChar,"Wedding_done",5.0,5.0); break; case "Wedding_done": LAi_SetActorType(characterFromID("Javier Balboa")); ChangeCharacterAddressGroup(characterFromID("Javier Balboa"), "Santiago_church", "goto", "goto6"); if (CheckAttribute(PChar,"quest.wedding_escort") && PChar.quest.wedding_escort != "") { crewref = characterFromID(PChar.quest.wedding_escort); crewidx = GetCharacterIndex(PChar.quest.wedding_escort); PChar.quest.normal_dialog = characters[crewidx].Dialog.Filename; LAi_SetActorType(crewref); ChangeCharacterAddressGroup(crewref, "Santiago_church", "goto", "goto7"); characters[crewidx].Dialog.Filename = "crew_dialog.c"; Characters[crewidx].Dialog.CurrentNode = "married_congrats"; // trace("------------------------------"); // if (crewidx >0) dumpattributes(Characters[crewidx]); // else trace("Invalid crewidx for wedding escort"); // trace("------------------------------"); LAi_ActorDialog(crewref, pchar, "wedding_done2", 5.0, 5.0); } else LAi_QuestDelay("Wedding_done2", 1.0); break; case "Wedding_done2": if (CheckAttribute(PChar,"quest.wedding_escort") && PChar.quest.wedding_escort != "") { crewref = characterFromID(PChar.quest.wedding_escort); crewidx = GetCharacterIndex(PChar.quest.wedding_escort); characters[crewidx].Dialog.Filename = PChar.quest.normal_dialog; SetCharacterRemovable(crewref, true); } StoreOfficers(PChar.id); Locations[FindLocation("Santiago_town_01")].reload.l2.disable = 0; // Unlock the town exit, Locations[FindLocation("Santiago_port")].reload.l2.disable = 0; // the ship, Locations[FindLocation("Santiago_port")].reload.l5.disable = 0; // and the port exit. Locations[FindLocation("Santiago_town_01")].reload.l4.disable = 0; // Also the town hall because you're about to go there. DisableFastTravel(false); LAi_SetActorType(characterFromID("Javier Balboa")); ChangeCharacterAddressGroup(characterFromID("Javier Balboa"), "Santiago_church", "goto", "goto6"); LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); LAi_ActorFollowEverywhere(CharacterFromID("Javier Balboa"), "", 10.0); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "now_youre_married"; LAi_ActorDialog(CharacterFromID("Javier Balboa"),PChar,"Married",1.0,1.0); break; case "Married": PChar.quest.marriage_status = "married"; characters[romanceidx].married = MR_MARRIED; characters[romanceidx].married.id = PChar.id; characters[romanceidx].quest.meeting = "1" characters[romanceidx].Dialog.Filename = "Gov MR_dialog.c"; characters[romanceidx].Dialog.CurrentNode = "First time"; characters[romanceidx].talkpoints = 0; characters[romanceidx].marpoints = 1; characters[romanceidx].pcounter = 0; if (PChar.sex == "man") characters[romanceidx].middlename = TranslateString("","Ardent"); else PChar.middlename = TranslateString("","de la Vega"); // LAi_SetStayType(romance); PChar.married = MR_MARRIED; PChar.married.id = characters[romanceidx].id; LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); LAi_SetActorType(CharacterFromID("Javier Balboa")); LAi_ActorFollowEverywhere(CharacterFromID("Javier Balboa"), "", 10.0); Pchar.quest.return_to_residence.win_condition.l1 = "location"; PChar.quest.return_to_residence.win_condition.l1.character = Pchar.id; Pchar.quest.return_to_residence.win_condition.l1.location = "Santiago_townhall"; Pchar.quest.return_to_residence.win_condition = "return_to_residence"; Pchar.quest.leave_church.win_condition.l1 = "location"; Pchar.quest.leave_church.win_condition.l1.location = "Santiago_town_01"; Pchar.quest.leave_church.win_condition = "leave_church"; if (PChar.sex == "man") WriteNewLogEntry("Married my beautiful wife", "On this wonderful day I married my beautiful wife, "+GetMySimpleName(romance)+". We're both very happy, and now I am going to finish this writing, because I have something more important to do...","Personal",true); else WriteNewLogEntry("Married my handsome husband", "On this wonderful day I married my handsome husband, "+GetMySimpleName(romance)+". We're both very happy, and now I am going to finish this writing, because I have something more important to do...","Personal",true); Preprocessor_AddQuestData("romance", GetMySimpleName(romance)); AddQuestRecord("Marriage", 11); Preprocessor_Remove("romance"); ChangeCharacterReputation(PChar, 5); if(AUTO_SKILL_SYSTEM) { AddPartyExpChar(pchar, "Leadership", 500); AddPartyExpChar(PChar, "", 50); } else {AddPartyExp(pchar, 550);} break; case "leave_church": LAi_SetActorType(romance); LAi_SetActorType(characterFromID("Javier Balboa")); LAi_ActorGoToLocation(romance, "reload", "reload4", "none", "", "", "", 120.0); LAi_ActorGoToLocation(characterFromID("Javier Balboa"), "reload", "reload4", "none", "", "", "", 120.0); break; case "return_to_residence": DisableFastTravel(true); Locations[FindLocation("Santiago_townhall")].reload.l1.disable = 1; // ChangeCharacterAddressGroup(romance, "Santiago_townhall", "goto", "goto9"); ch = LAi_CreateFantomCharacter(true, 0, false, false, 0.0, romance.model, "goto", "goto9"); ch.id = "fake_romance"; ch.name = romance.name; ch.lastname = romance.lastname; if (checkattribute(romance, "middlename")) ch.middlename = romance.middlename; LAi_SetActorType(characterFromID("Javier Balboa")); ChangeCharacterAddressGroup(characterfromID("Javier Balboa"), "Santiago_townhall", "goto", "goto3"); LAi_QuestDelay("return_to_residence2", 1.0); DeleteQuestAttribute("marriage_status"); DeleteQuestAttribute("marriage_money"); DeleteQuestAttribute("wedding_escort"); DeleteQuestAttribute("bride"); DeleteQuestAttribute("groom"); break; case "return_to_residence2": LAi_SetActorType(characterfromID("Javier Balboa")); LAi_SetActorType(romance); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "enjoy_reception"; if(LAi_IsDead(villain) || CheckAttribute(PChar, "quest.finale_marriage")) LAi_ActorDialog(CharacterFromID("Javier Balboa"),PChar,"bypass_reception",5.0,5.0); // else LAi_ActorDialog(CharacterFromID("Javier Balboa"),PChar,"assassination_attempt",5.0,5.0); else LAi_ActorDialog(CharacterFromID("Javier Balboa"),PChar,"",5.0,5.0); // Exits to "assassination_attempt" break; case "bypass_reception": ChangeCharacterAddressGroup(romance, "Quest_Santiago_Bedroom", "goto", "goto5"); DoQuestReloadToLocation("Santiago_townhall", "goto", "goto8", "reception_done"); break; case "reception_done": Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "reception_done"; LAi_ActorDialog(characterFromID("Javier Balboa"),PChar,"prepare_for_bed",5.0,5.0); break; case "prepare_for_bed": DoQuestReloadToLocation("Quest_Santiago_Bedroom", "reload", "reload1", "bedtime_chat"); break; case "bedtime_chat": LAi_SetStayType(romance); characters[romanceidx].Dialog.Filename = "romance_dialog.c"; characters[romanceidx].Dialog.CurrentNode = "wedding_night"; // You will talk to your partner and the dialog exits to "get_lost_player" break; case "get_lost_player": Pchar.dialog.CurrentNode = "stop_peeking"; LAi_SetActorType(PChar); LAi_ActorSelfDialog(PChar, "morning_after_wedding"); break; case "morning_after_wedding": if (PChar.sex == "man") { SetModelFromID(romance, PChar.quest.romance_model); // DeleteQuestAttribute("romance_model"); } WaitDate("", 0, 0, 1, 0, 0); SetCurrentTime(10.00, 0); LAi_SetPlayerType(PChar); ChangeCharacterAddressGroup(romance, "Santiago_townhall", "goto", "goto9"); // ChangeCharacterAddressGroup(characterfromID("Javier Balboa"), "Santiago_townhall", "goto", "goto3"); // LAi_SetStayType(characterfromID("Javier Balboa")); ChangeCharacterAddressGroup(characterFromID("Javier Balboa"), "Santiago_townhall", "sit", "sit2"); LAi_SetHuberType(characterFromID("Javier Balboa")); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "enjoy_reception"; DoQuestReloadToLocation("Santiago_townhall", "goto", "goto8", "morning_after_wedding2"); break; case "morning_after_wedding2": Locations[FindLocation("Santiago_townhall")].reload.l1.disable = 0; DisableFastTravel(false); bQuestDisableSeaEnter = false; AddQuestRecord("Marriage", 12); CloseQuestHeader("Marriage"); RestoreOfficers(PChar.id); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "wedding_present"; if(CheckAttribute(romance,"officer") || CheckQuestAttribute("marriage_romance_is_officer", "true")) { AddPassenger(PChar, romance, 0); SetOfficersIndex(Pchar, 3, romanceidx); LAi_SetOfficerType(romance); SetCharacterRemovable(romance, true); if (CheckAttribute(PChar, "quest.marriage_romance_is_officer")) DeleteQuestAttribute("marriage_romance_is_officer"); characters[romanceidx].Dialog.Filename = "romance_dialog.c"; characters[romanceidx].Dialog.CurrentNode = "First time"; } else { characters[romanceidx].Dialog.Filename = "Gov MR_dialog.c"; characters[romanceidx].Dialog.CurrentNode = "First time"; } break; case "betrayed_spain": PChar.quest.betrayed_spain.over = "yes"; PChar.quest.betrayed_spain1.over = "yes"; PChar.quest.spain_betrayal = "true"; if(ispassenger(romance) || isofficer(romance)) { RemoveOfficersIndex(pchar, romanceidx); RemovePassenger(pchar, romance); Preprocessor_Save("romance", GetMySimpleName(romance)); GiveItem2Character(PChar, "BetrayedLetter"); ChangeCharacterAddress(romance, "None", ""); WriteNewLogEntry(GetMySimpleName(romance) + " deserts", GetMySimpleName(romance) + " didn't take too kindly to my actions against Spain, and has left me.", "Personal", true); } else { if(GetAttribute(romance, "married") == MR_MARRIED) { characters[romanceidx].Dialog.Filename = "romance_dialog.c"; characters[romanceidx].Dialog.CurrentNode = "dont_talk_to_me"; if (characters[getCharacterIndex(PChar.quest.romance)].married.id == PChar.id) { WriteNewLogEntry(GetMySimpleName(romance) + " deserts", GetMySimpleName(romance) + " didn't take too kindly to my actions against Spain, and has left me.", "Personal", true); } } } break; case "lucia_new_outfit": for (n=0; n 0) { AddCharacterGoods(ch, GOOD_SILK, -1); break; } } PChar.quest.lucia_new_outfit2.win_condition.l1 = "Timer"; PChar.quest.lucia_new_outfit2.win_condition.l1.date.day = GetAddingDataDay(0, 0, 2); PChar.quest.lucia_new_outfit2.win_condition.l1.date.month = GetAddingDataMonth(0, 0, 2); PChar.quest.lucia_new_outfit2.win_condition.l1.date.year = GetAddingDataYear(0, 0, 2); PChar.quest.lucia_new_outfit2.win_condition = "lucia_finishes_outfit"; break; case "lucia_finishes_outfit": GiveModel2Player("Lucia_1", false); GiveModel2Player("lucia_2", false); SetModelfromID(romance, "lucia_2"); WriteNewLogEntry(GetMyName(romance) + "'s new clothes", GetMySimpleName(romance) + " has taken some silk from our hold without bothering to ask. But after seeing the new clothes she made for herself with it, I'm not complaining!","Personal",true); break; case "finale_marriage_villain_interrupts": PauseAllSounds(); LAi_SetPlayerType(PChar); LAi_SetActorType(villain); Characters[villainidx].dialog.CurrentNode = "wedding_forbid_this"; LAi_ActorDialogNow(villain, PChar, "finale_marriage_priest_who_are_you",1.0); break; case "finale_marriage_priest_who_are_you": LAi_SetActorType(characterfromID("Padre Magarino")); Characters[GetCharacterIndex("Padre Magarino")].dialog.CurrentNode = "ardent_interruption1"; LAi_ActorDialogNow(characterfromID("Padre Magarino"), PChar, "finale_marriage_romance_is_mine",1.0); break; case "finale_marriage_romance_is_mine": LAi_SetActorType(villain); Characters[villainidx].dialog.CurrentNode = "wedding_romance_is_mine"; LAi_ActorDialogNow(villain, PChar, "finale_marriage_priest_recognises_villain",1.0); break; case "finale_marriage_priest_recognises_villain": LAi_SetActorType(characterfromID("Padre Magarino")); Characters[GetCharacterIndex("Padre Magarino")].dialog.CurrentNode = "ardent_interruption2"; LAi_ActorDialogNow(characterfromID("Padre Magarino"), PChar, "finale_marriage_over_my_dead_body",1.0); break; case "finale_marriage_over_my_dead_body": LAi_SetActorType(villain); Characters[villainidx].dialog.CurrentNode = "wedding_over_my_dead_body"; LAi_ActorDialogNow(villain, PChar, "finale_marriage_no_fight_here",1.0); break; case "finale_marriage_no_fight_here": LAi_SetActorType(characterfromID("Padre Magarino")); Characters[GetCharacterIndex("Padre Magarino")].dialog.CurrentNode = "ardent_no_fight_in_church"; LAi_ActorDialogNow(characterfromID("Padre Magarino"), PChar, "finale_marriage_lets_go_outside",1.0); break; case "finale_marriage_lets_go_outside": LAi_SetActorType(villain); Characters[villainidx].dialog.CurrentNode = "wedding_go_outside"; LAi_ActorDialogNow(villain, PChar, "finale_marriage_about_to_sin",1.0); break; case "finale_marriage_about_to_sin": LAi_SetActorType(characterfromID("Padre Magarino")); Characters[GetCharacterIndex("Padre Magarino")].dialog.CurrentNode = "ardent_about_to_sin"; LAi_ActorDialogNow(characterfromID("Padre Magarino"), PChar, "finale_marriage_fight_villain",1.0); break; case "finale_marriage_fight_villain": LAi_LocationFightDisable(&Locations[FindLocation("Santiago_church")], false); LAi_SetImmortal(romance, true); LAi_SetImmortal(villain, false); LAi_SetActorType(villain); LAi_ActorAttack(villain, PChar, ""); PChar.quest.finale_marriage_duel_over.win_condition.l1 = "NPC_death"; Pchar.quest.finale_marriage_duel_over.win_condition.l1.character = Characters[villainidx].id; Pchar.quest.finale_marriage_duel_over.win_condition = "finale_marriage_duel_over"; break; case "finale_marriage_duel_over": LAi_SetFightMode(PChar, false); LAi_LocationFightDisable(&Locations[FindLocation("Santiago_church")], true); LAi_SetImmortal(romance, false); LAi_SetActorType(characterfromID("Padre Magarino")); Characters[GetCharacterIndex("Padre Magarino")].dialog.CurrentNode = "ardent_church_desecrated"; LAi_ActorDialogNow(characterfromID("Padre Magarino"), PChar, "finale_marriage_governor_supports_you",1.0); break; case "finale_marriage_governor_supports_you": LAi_SetActorType(characterFromID("Javier Balboa")); ChangeCharacterAddressGroup(characterFromID("Javier Balboa"), "Santiago_church", "goto", "goto6"); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "finale_villain_was_traitor"; LAi_ActorDialogNow(characterfromID("Javier Balboa"), PChar, "finale_marriage_priest_loyal_to_church",1.0); break; case "finale_marriage_priest_loyal_to_church": LAi_SetActorType(characterfromID("Padre Magarino")); Characters[GetCharacterIndex("Padre Magarino")].dialog.CurrentNode = "ardent_loyal_to_church_first"; LAi_ActorDialogNow(characterfromID("Padre Magarino"), PChar, "finale_marriage_governor_insists",1.0); break; case "finale_marriage_governor_insists": LAi_SetActorType(characterFromID("Javier Balboa")); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "finale_reconsecrate_with_wedding"; // LAi_ActorDialogNow(characterfromID("Javier Balboa"), PChar, "finale_priest_gives_way",1.0); LAi_ActorDialogNow(characterfromID("Javier Balboa"), PChar, "finale_marriage_return_to_priest",1.0); break; case "finale_priest_gives_way": LAi_SetPlayerType(PChar); LAi_SetActorType(characterFromID("Javier Balboa")); ChangeCharacterAddressGroup(characterFromID("Javier Balboa"), "Santiago_church", "sit", "sit3"); LAi_ActorSetSitMode(characterFromID("Javier Balboa")); LAi_SetActorType(characterfromID("Padre Magarino")); Characters[GetCharacterIndex("Padre Magarino")].dialog.CurrentNode = "ardent_proceed_with_wedding"; LAi_ActorDialog(characterFromID("Padre Magarino"),PChar,"Wedding_consent3_answer",5.0,5.0); // LAi_ActorDialogNow(characterFromID("Padre Magarino"),PChar,"finale_marriage_return_to_priest",5.0); break; case "finale_marriage_return_to_priest": if (CheckAttribute(PChar,"quest.wedding_escort") && PChar.quest.wedding_escort != "") { crewref = characterFromID(PChar.quest.wedding_escort); crewidx = GetCharacterIndex(PChar.quest.wedding_escort); ChangeCharacterAddressGroup(crewref, "Santiago_church", "sit", "sit13"); LAi_SetActorType(crewref); LAi_ActorSetSitMode(crewref); } LAi_SetActorType(characterFromID("Javier Balboa")); ChangeCharacterAddressGroup(characterFromID("Javier Balboa"), "Santiago_church", "sit", "sit3"); LAi_ActorSetSitMode(characterFromID("Javier Balboa")); PauseAllSounds(); PlayStereoOGG("wedding2"); LAi_SetActorType(PChar); // LAi_ActorFollow(PChar, characterFromID("Padre Magarino"), "Wedding_consent3_answer", 10.0); LAi_ActorFollow(PChar, characterFromID("Padre Magarino"), "finale_priest_gives_way", 10.0); break; case "assassination_attempt": ChangeCharacterAddressGroup(characterfromID("Malbert Sangier"), "Santiago_town_01", "goto", "goto9"); LAi_QuestDelay("assassination_attempt2", 2.00); break; case "assassination_attempt2": PlaySound("OBJECTS\duel\pistol_medium2.wav"); PlaySound("AMBIENT\TOWN\window_dog.wav"); LAi_QuestDelay("assassination_attempt3", 0.02); break; case "assassination_attempt3": Locations[FindLocation("Santiago_townhall")].reload.l1.disable = 0; // Lai_KillCharacter(romance); LAi_KillCharacter(characterfromID("fake_romance")); ChangeCharacterAddress(romance, "None", ""); if(PChar.sex == "man") PlaySound("OBJECTS\VOICES\DEAD\female\dead_wom2.wav"); else PlaySound("OBJECTS\VOICES\DEAD\male\dead5.wav"); romance.chr_ai.hp = romance.chr_ai.hp_max; PChar.quest.assassination = "no_clue"; PChar.quest.revenge_type = "assassin"; Preprocessor_AddQuestData("romance", GetMySimpleName(romance)); AddQuestRecord("Marriage", 13); Preprocessor_Remove("romance"); LAi_SetActorType(CharacterFromID("Javier Balboa")); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "assassination"; LAi_ActorDialog(CharacterFromID("Javier Balboa"),PChar,"assassination_grigorio_moves",1.0,1.0); PChar.quest.assassin_dead.win_condition.l1 = "NPC_Death"; PChar.quest.assassin_dead.win_condition.l1.character = "Malbert Sangier"; PChar.quest.assassin_dead.win_condition = "assassin_dead"; /* PChar.quest.assassination_remove_body.win_condition.l1 = "location"; PChar.quest.assassination_remove_body.win_condition.l1.location = "Santiago_town_01"; PChar.quest.assassination_remove_body.win_condition = "assassination_remove_body"; break; case "assassination_remove_body": */ ChangeCharacterAddress(romance, "None", ""); break; case "assassination_grigorio_moves": LAi_SetActorType(characterFromID("Grigorio Formoselle")); LAi_ActorRunToLocator(characterFromID("Grigorio Formoselle"), "goto", "goto9", "",10.0); break; case "assassination_malbert_attacks": LAi_SetActorType(characterFromID("Malbert Sangier")); LAi_ActorAttack(characterfromID("Malbert Sangier"), PChar, ""); break; case "assassin_dead": PChar.quest.assassination = "assassin_dead"; LAi_SetFightMode(PChar, false); LAi_LocationFightDisable(&Locations[FindLocation("Santiago_town_01")], true); StartQuestMovie(true, true, false); TakeItemFromCharacter(characterfromID("Malbert Sangier"), "SignetRing"); GiveItem2Character(PChar, "SignetRing"); characters[GetCharacterIndex("Santiago_soldier_05")].Dialog.Filename = "guard_dialog.c"; LAi_SetActorType(characterFromID("Santiago_soldier_05")); Characters[GetCharacterIndex("Santiago_soldier_05")].dialog.CurrentNode = "assassination_arrest"; LAi_ActorDialog(characterFromID("Santiago_soldier_05"),PChar,"assassination_return_to_governor",60.0,60.0); break; case "assassination_return_to_governor": ChangeCharacterAddressGroup(characterfromID("Grigorio Formoselle"), "Santiago_townhall", "goto", "goto10"); LAi_SetStayType(characterfromID("Grigorio Formoselle")); ChangeCharacterAddressGroup(characterfromID("Javier Balboa"), "Santiago_townhall", "goto", "goto3"); LAi_SetStayType(characterfromID("Javier Balboa")); ChangeCharacterAddressGroup(characterfromID("Santiago_soldier_05"), "Santiago_townhall", "goto", "goto11"); DoQuestReloadToLocation("Santiago_townhall", "goto", "goto1", "assassination_return_to_governor2"); break; case "assassination_return_to_governor2": ChangeCharacterAddress(characterfromID("Malbert Sangier"), "None", ""); LAi_LocationFightDisable(&Locations[FindLocation("Santiago_town_01")], false); LAi_SetActorType(characterfromID("Santiago_soldier_05")); Characters[GetCharacterIndex("Santiago_soldier_05")].dialog.CurrentNode = "go_to_governor"; LAi_ActorDialog(CharacterFromID("Santiago_soldier_05"),PChar,"assassination_return_to_governor3",1.0,1.0); break; case "assassination_return_to_governor3": LAi_SetActorType(characterfromID("Javier Balboa")); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "will_be_fine"; LAi_ActorDialog(CharacterFromID("Javier Balboa"),PChar,"",1.0,1.0); // Exits to "assassination_fade_to_next_day", possibly via "assassination_grigorio_explains_ring" break; case "assassination_grigorio_explains_ring": LAi_SetActorType(CharacterFromID("Grigorio Formoselle")); Characters[GetCharacterIndex("Grigorio Formoselle")].dialog.CurrentNode = "assassination_examine_ring"; LAi_ActorDialog(CharacterFromID("Grigorio Formoselle"),PChar,"assassination_hired_by_villain",5.0,5.0); break; case "assassination_hired_by_villain": LAi_SetActorType(CharacterFromID("Javier Balboa")); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "villain_hired_assassin"; LAi_ActorDialog(CharacterFromID("Javier Balboa"),PChar,"",1.0,1.0); // Exits to "assassination_fade_to_next_day" break; case "assassination_fade_to_next_day": EndQuestMovie(); ResetHP(romance); LAi_SetStayType(characterfromID("Javier Balboa")); ChangeCharacterAddressGroup(characterfromID("Santiago_soldier_05"), "Santiago_town_01", "goto", "locator36"); LAi_SetGuardianType(characterfromID("Santiago_soldier_05")); characters[GetCharacterIndex("Santiago_soldier_05")].Dialog.Filename = "Isla Muelle soldier_dialog.c"; ChangeCharacterAddressGroup(romance, "Santiago_townhall", "goto", "goto9"); DoQuestReloadToLocation("Santiago_townhall", "goto", "goto8", "assassination_fade_to_next_day2"); break; case "assassination_fade_to_next_day2": WaitDate("", 0, 0, 5, 0, 0); SetCurrentTime(10.00, 0); LAi_SetActorType(CharacterFromID("Javier Balboa")); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "romance_recovered"; LAi_ActorDialog(CharacterFromID("Javier Balboa"),PChar,"romance_has_request",1.0,1.0); break; case "romance_has_request": Preprocessor_AddQuestData("villain", GetMySimpleName(villain)); Preprocessor_AddQuestData("romance", GetMyName(romance)); AddQuestRecord("Marriage", 17); CloseQuestHeader("Marriage"); Preprocessor_Remove("romance"); Preprocessor_Remove("villain"); LAi_SetActorType(romance); characters[romanceidx].Dialog.Filename = "romance_dialog.c"; Characters[romanceidx].dialog.CurrentNode = "ask_favour"; LAi_ActorDialog(romance,PChar,"convoy_governor_issues_letter",1.0,1.0); break; case "convoy_governor_issues_letter": LAi_SetStayType(romance); LAi_SetActorType(CharacterFromID("Javier Balboa")); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "convoy_letter_reprisal"; LAi_ActorDialog(CharacterFromID("Javier Balboa"),PChar,"convoy_officer",1.0,1.0); break; case "convoy_officer": LAi_SetHuberStayType(CharacterFromID("Javier Balboa")); if(CheckAttribute(romance,"officer")) { AddPassenger(PChar, romance, 0); SetOfficersIndex(Pchar, 3, romanceidx); characters[romanceidx].Dialog.Filename = "romance_dialog.c"; characters[romanceidx].Dialog.CurrentNode = "First time"; LAi_QuestDelay("convoy_officer2", 0.0); } else { LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "convoy_officer"; LAi_ActorDialog(romance,PChar,"convoy_officer2",5.0,5.0); } PChar.quest.convoy_romance_dead.win_condition.l1 = "NPC_Death"; PChar.quest.convoy_romance_dead.win_condition.l1.character = romance.id; PChar.quest.convoy_romance_dead.win_condition = "convoy_romance_dead"; if(!CheckAttribute(PChar, "quest.betrayed_spain")) { PChar.quest.betrayed_spain.win_condition.l1 = "relation"; PChar.quest.betrayed_spain.win_condition.l1.relation = "Hostile"; PChar.quest.betrayed_spain.win_condition.l1.nation = "Spain"; PChar.quest.betrayed_spain.win_condition = "betrayed_spain"; } break; case "convoy_officer2": LAi_SetOfficerType(romance); RestoreOfficers(PChar.id); Preprocessor_AddQuestData("villain", GetMySimpleName(villain)); Preprocessor_AddQuestData("romance", GetMyName(romance)); AddQuestRecord("Convoy Strike", 2); Preprocessor_Remove("romance"); Preprocessor_Remove("villain"); LAi_QuestDelay("convoy_setup", 0.0); break; case "convoy_setup": DisableFastTravel(false); bQuestDisableSeaEnter = false; PChar.quest.ardent_convoy = "Oxbay"; // PChar.quest.Abequa_moves.win_condition.l1 = "location"; // PChar.quest.Abequa_moves.win_condition.l1.location = "Cartagena Hotel"; // PChar.quest.Abequa_moves.win_condition = "convoy_Abequa_moves"; break; /* case "convoy_Abequa_moves": // No longer needed if Abequa is already on ground floor LAi_SetActorType(characterFromID("Abequa")); LAi_ActorGoToLocator(characterFromID("Abequa"), "goto", "goto6", "",30.0); break; */ case "convoy_Abequa_speaks": // Triggered by dialog with Mary Seacole PChar.quest.normal_dialog = characters[GetCharacterIndex("Abequa")].Dialog.Filename; characters[GetCharacterIndex("Abequa")].Dialog.Filename = "Abequa_dialog.c"; LAi_SetActorType(CharacterFromID("Abequa")); Characters[GetCharacterIndex("Abequa")].dialog.CurrentNode = "ardent_convoy_was_here"; LAi_ActorDialog(CharacterFromID("Abequa"),PChar,"",10.0,10.0); // Exits to "convoy_to_curacao" or "convoy_Abequa_waits" break; case "convoy_Abequa_waits": LAi_SetStayType(CharacterFromID("Abequa")); break; case "convoy_reset_Abequa": LAi_SetStayType(CharacterFromID("Abequa")); characters[GetCharacterIndex("Abequa")].Dialog.Filename = PChar.quest.normal_dialog; // ChangeCharacterAddressGroup(CharacterFromID("Abequa"), "Cartagena Hotel", "goto", "character2"); // LAi_SetOfficerType(romance); break; case "convoy_to_curacao": PChar.quest.ardent_convoy = "Curacao"; AddQuestRecord("Convoy Strike", 4); setCharacterShipLocation(characterFromID("Convoy_Captain1"), "Willemstad_port"); setCharacterShipLocation(characterFromID("Convoy_Captain2"), "Willemstad_port"); setCharacterShipLocation(characterFromID("Convoy_Captain3"), "Willemstad_port"); setCharacterShipLocation(characterFromID("Convoy_Captain4"), "Willemstad_port"); PChar.quest.reset_Abequa.win_condition.l1 = "location"; PChar.quest.reset_Abequa.win_condition.l1.location = "Cartagena_Center"; PChar.quest.reset_Abequa.win_condition = "convoy_reset_Abequa"; PChar.quest.arrival_curacao.win_condition.l1 = "location"; PChar.quest.arrival_curacao.win_condition.l1.location = "Curacao"; PChar.quest.arrival_curacao.win_condition = "convoy_arrival_curacao"; break; case "convoy_arrival_curacao": if(!LAi_IsDead(romance) && !CheckAttribute(PChar, "quest.spain_betrayal")) { SetCharacterShipLocation(PChar, "Willemstad_port"); if(!isofficer(romance)) SetOfficersIndex(Pchar, 3, romanceidx); SetCharacterRemovable(romance, false); ChangeCharacterAddressGroup(romance, GetCharacterShipCabin(PChar), "rld", "startloc"); StartQuestMovie(true, true, false); DoReloadFromSeaToLocation(GetCharacterShipCabin(PChar), "reload", "reload1"); LAi_QuestDelay("convoy_plan_attack", 1.0); } else { AddQuestRecord("Convoy Strike", 15); if (PChar.sex == "man") GiveModel2Player("Ardent_S", true); else GiveModel2Player("Ardent_SF", true); Pchar.quest.Willemstad_residence.win_condition.l1 = "location"; PChar.quest.Willemstad_residence.win_condition.l1.character = Pchar.id; Pchar.quest.Willemstad_residence.win_condition.l1.location = "Willemstad_townhall"; Pchar.quest.Willemstad_residence.win_condition = "Willemstad_residence"; } break; case "convoy_plan_attack": LAi_SetActorType(romance); characters[romanceidx].Dialog.Filename = "romance_dialog.c"; Characters[romanceidx].dialog.CurrentNode = "convoy_how_take_convoy"; LAi_ActorDialog(romance,PChar,"",5.0,5.0); // Exits to "convoy_arrive_port_plan1" or "convoy_arrive_port" // LAi_ActorDialog(romance,PChar,"convoy_arrive_port",5.0,5.0); break; case "convoy_arrive_port_plan1": LAi_SetOfficerType(romance); PChar.location.from_sea = "Willemstad_port"; SetFleetInTown(GetTownIDFromLocID(pchar.location.from_sea), "PChar"); DoQuestReloadToLocation("Willemstad_port", "reload", "sea_back", "convoy_arrive_port_plan1_2"); break; case "convoy_arrive_port_plan1_2": LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "convoy_recognised"; LAi_ActorDialog(romance,PChar,"convoy_plan1_no_good",5.0,5.0); break; case "convoy_plan1_no_good": ChangeCharacterAddressGroup(romance, GetCharacterShipCabin(PChar), "rld", "startloc"); DoQuestReloadToLocation(GetCharacterShipCabin(PChar), "reload", "reload1", "convoy_plan_attack2"); // DoReloadFromSeaToLocation("Tutorial_Deck", "reload", "reload1"); // LAi_QuestDelay("convoy_plan_attack2", 1.0); break; case "convoy_plan_attack2": LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "convoy_recognised2"; LAi_ActorDialog(romance,PChar,"",5.0,5.0); // Exits to "convoy_arrive_port" break; case "convoy_arrive_port": EndQuestMovie(); LAi_SetOfficerType(romance); // ChangeCharacterAddressGroup(romance, "Willemstad_port", "goto", "goto13"); PChar.quest.romance_model = romance.model; SetModelFromID(romance, "Animistse"); PChar.location.from_sea = "Willemstad_port"; SetFleetInTown(GetTownIDFromLocID(pchar.location.from_sea), "PChar"); if (PChar.sex == "man") GiveModel2Player("Ardent_S", true); else GiveModel2Player("Ardent_SF", true); DoQuestReloadToLocation("Willemstad_port", "reload", "sea_back", "convoy_arrive_port2"); break; case "convoy_arrive_port2": if(PChar.model == "Ardent_SF") logit("This uniform is uncomfortable, being made for a man, but I'd better wear it whenever I need to talk to the governor."); // LAi_SetOfficerType(romance); ChangeCharacterAddressGroup(CharacterFromID("Dutch_sergeant"), "Willemstad_townhall", "goto", "goto2"); characters[GetCharacterIndex("Dutch_sergeant")].Dialog.Filename = "guard_dialog.c"; LAi_SetGuardianType(characterfromID("Dutch_sergeant")); Pchar.quest.Willemstad_residence.win_condition.l1 = "location"; PChar.quest.Willemstad_residence.win_condition.l1.character = Pchar.id; Pchar.quest.Willemstad_residence.win_condition.l1.location = "Willemstad_townhall"; Pchar.quest.Willemstad_residence.win_condition = "Willemstad_residence"; n = 1; if(GetCompanionQuantity(PChar) > n) { Locations[FindLocation("Willemstad_town_3")].reload.l6.disable = 1; LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "convoy_dispose_ships"; LAi_ActorDialog(romance,PChar,"convoy_goto_shipyard",5.0,5.0); } if(CheckQuestAttribute("revenge_type","kidnap_rescue") && GetCompanionQuantity(PChar) == 1) { Locations[FindLocation("Willemstad_town_3")].reload.l6.disable = 1; LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "convoy_dispose_just_my_ship"; LAi_ActorDialog(romance,PChar,"convoy_goto_shipyard",5.0,5.0); } break; case "convoy_goto_shipyard": LAi_SetOfficerType(romance); Pchar.quest.Willemstad_Shipyard.win_condition.l1 = "location"; Pchar.quest.Willemstad_Shipyard.win_condition.l1.location = "Willemstad_Shipyard"; Pchar.quest.Willemstad_Shipyard.win_condition = "convoy_Willemstad_Shipyard"; break; case "convoy_Willemstad_Shipyard": SetCharacterRemovable(romance, true); // In case you put Lucia / Edmundo in command of a ship Pchar.quest.back_in_Willemstad_town.win_condition.l1 = "location"; Pchar.quest.back_in_Willemstad_town.win_condition.l1.location = "Willemstad_town"; Pchar.quest.back_in_Willemstad_town.win_condition = "convoy_back_in_Willemstad_town"; break; case "convoy_back_in_Willemstad_town": SetCharacterRemovable(romance, false); n = 1; if (CheckQuestAttribute("revenge_type", "kidnap_rescue") && GetCharacterShipType(PChar) != SHIP_NOTUSED) { LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "convoy_dispose_just_my_ship2"; LAi_ActorDialog(romance,PChar,"",5.0,5.0); // Exits to "convoy_goto_shipyard" or "convoy_dump_ship" } else { if(GetCompanionQuantity(PChar) > n) { LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "convoy_dispose_ships2"; LAi_ActorDialog(romance,PChar,"convoy_goto_shipyard",5.0,5.0); } else { Locations[FindLocation("Willemstad_town_3")].reload.l6.disable = 0; LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); } } break; case "convoy_dump_ship": Locations[FindLocation("Willemstad_town_3")].reload.l6.disable = 0; LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); break; case "romance_to_officer_mode": LAi_SetOfficerType(romance); break; case "Willemstad_residence": if(!LAi_IsDead(romance) && !CheckAttribute(PChar, "quest.spain_betrayal")) { Locations[FindLocation("Willemstad_townhall")].reload.l1.disable = 1; DisableFastTravel(true); ChangeCharacterAddressGroup(romance, "Willemstad_townhall", "goto", "goto1"); LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); } PChar.quest.original_name = PChar.name; if (CheckAttribute(PChar,"middlename") == true && PChar.middlename != "") { PChar.quest.original_middlename = PChar.middlename; PChar.middlename = ""; } PChar.quest.original_lastname = PChar.lastname; PChar.name = "Carlos"; PChar.lastname = "Ardenta"; characters[GetCharacterIndex("Hans Kloss")].dialog.CurrentNode = "ardent_convoy_fake_intro"; break; case "convoy_partner_intervenes": // Triggered by dialog with "Hans Kloss", governor of Curacao LAi_SetActorType(CharacterFromID("Hans Kloss")); LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "convoy_be_quiet"; LAi_ActorDialog(romance,PChar,"convoy_governor_appeased",5.0,5.0); break; case "convoy_governor_appeased": LAi_SetActorType(CharacterFromID("Hans Kloss")); Characters[GetCharacterIndex("Hans Kloss")].dialog.CurrentNode = "ardent_convoy_thats_different"; LAi_ActorDialog(CharacterFromID("Hans Kloss"),PChar,"convoy_partner_shows_letter",1.0,1.0); break; case "convoy_partner_shows_letter": LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "convoy_show_letter"; LAi_ActorDialog(romance,PChar,"convoy_governor_agrees",1.0,1.0); break; case "convoy_governor_agrees": LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); LAi_SetActorType(CharacterFromID("Hans Kloss")); Characters[GetCharacterIndex("Hans Kloss")].dialog.CurrentNode = "ardent_convoy_happy_to_comply"; LAi_ActorDialog(CharacterFromID("Hans Kloss"),PChar,"convoy_governor_agreed",5.0,5.0); break; case "convoy_governor_agreed": Locations[FindLocation("Willemstad_townhall")].reload.l1.disable = 0; DisableFastTravel(false); LAi_SetHuberStayType(CharacterFromID("Hans Kloss")); LAi_SetActorType(CharacterFromID("Dutch_sergeant")); LAi_ActorGoToLocation(characterFromID("Dutch_sergeant"), "reload", "reload1", "none", "", "", "", 30.0); PChar.quest.ardent_convoy = "search_ship"; Pchar.quest.convoy_leave_residence.win_condition.l1 = "ExitFromLocation"; PChar.quest.convoy_leave_residence.win_condition.l1.location = PChar.location; Pchar.quest.convoy_leave_residence.win_condition = "convoy_leave_residence"; break; case "convoy_leave_residence": PChar.name = PChar.quest.original_name; PChar.lastname = PChar.quest.original_lastname; LAi_SetOfficerType(romance); ChangeCharacterAddressGroup(CharacterFromID("Dutch_sergeant"), "Willemstad_port", "goto", "goto12"); LAi_SetGuardianType(characterFromID("Dutch_sergeant")); // Locations[FindLocation("Willemstad_port")].reload.l5.disable = 1; Pchar.quest.convoy_back_to_port.win_condition.l1 = "location"; Pchar.quest.convoy_back_to_port.win_condition.l1.location = "Willemstad_port"; Pchar.quest.convoy_back_to_port.win_condition = "convoy_back_to_port"; break; case "convoy_back_to_port": StartQuestMovie(true, true, false); DisableFastTravel(true); // LAi_SetOfficerType(romance); LAi_SetActorType(CharacterFromID("Dutch_sergeant")); characters[GetCharacterIndex("Dutch_sergeant")].Dialog.Filename = "guard_dialog.c"; Characters[GetCharacterIndex("Dutch_sergeant")].dialog.CurrentNode = "convoy_search"; LAi_ActorDialog(CharacterFromID("Dutch_sergeant"),PChar,"convoy_searchers_arrive",35.0,35.0); break; case "convoy_searchers_arrive": sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[HOLLAND].fantomModel.m1, "reload", "Falaise_de_fleur_location_01_02"); LAi_SetHP(sld, 180.0, 180.0); LAi_group_MoveCharacter(sld, "DOUWESEN_SOLDIERS"); LAi_SetActorType(sld); sld.id = "search_guard1"; sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[HOLLAND].fantomModel.m2, "reload", "Falaise_de_fleur_location_01_02"); LAi_SetHP(sld, 180.0, 180.0); LAi_group_MoveCharacter(sld, "DOUWESEN_SOLDIERS"); LAi_SetActorType(sld); sld.id = "search_guard2"; sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[HOLLAND].fantomModel.m1, "reload", "Falaise_de_fleur_location_01_02"); LAi_SetHP(sld, 180.0, 180.0); LAi_group_MoveCharacter(sld, "DOUWESEN_SOLDIERS"); LAi_SetActorType(sld); sld.id = "search_guard3"; sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[HOLLAND].fantomModel.m2, "reload", "Falaise_de_fleur_location_01_02"); LAi_SetHP(sld, 180.0, 180.0); LAi_group_MoveCharacter(sld, "DOUWESEN_SOLDIERS"); LAi_SetActorType(sld); sld.id = "search_guard4"; sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[HOLLAND].fantomModel.m1, "reload", "Falaise_de_fleur_location_01_02"); LAi_SetHP(sld, 180.0, 180.0); LAi_group_MoveCharacter(sld, "DOUWESEN_SOLDIERS"); LAi_SetActorType(sld); sld.id = "search_guard5"; sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[HOLLAND].fantomModel.m2, "reload", "Falaise_de_fleur_location_01_02"); LAi_SetHP(sld, 180.0, 180.0); LAi_group_MoveCharacter(sld, "DOUWESEN_SOLDIERS"); LAi_SetActorType(sld); sld.id = "search_guard6"; LAi_ActorGoToLocation(characterFromID("search_guard1"), "reload", "sea_back", "none", "", "", "", 90.0); LAi_ActorGoToLocation(characterFromID("search_guard2"), "reload", "sea_back", "none", "", "", "", 90.0); LAi_ActorGoToLocation(characterFromID("search_guard3"), "reload", "sea_back", "none", "", "", "", 90.0); LAi_ActorGoToLocation(characterFromID("search_guard4"), "reload", "sea_back", "none", "", "", "", 90.0); LAi_ActorGoToLocation(characterFromID("search_guard5"), "reload", "sea_back", "none", "", "", "", 90.0); LAi_ActorGoToLocation(characterFromID("search_guard6"), "reload", "sea_back", "none", "", "", "", 90.0); LAi_SetActorType(CharacterFromID("Dutch_sergeant")); LAi_ActorGoToLocation(characterFromID("Dutch_sergeant"), "reload", "sea_back", "none", "", "", "", 90.0); // Locations[FindLocation("Willemstad_port")].reload.l5.disable = 0; // LAi_SetOfficerType(romance); Locations[FindLocation("Quest_Seadogs")].vcskip = true; Pchar.quest.convoy_board_ship.win_condition.l1 = "locator"; Pchar.quest.convoy_board_ship.win_condition.l1.location = "Willemstad_port"; Pchar.quest.convoy_board_ship.win_condition.l1.locator_group = "reload"; Pchar.quest.convoy_board_ship.win_condition.l1.locator = "sea_back"; Pchar.quest.convoy_board_ship.win_condition = "convoy_board_ship"; break; case "convoy_board_ship": StoreOfficers(PChar.id); SetOfficersIndex(Pchar, 3, romanceidx); LAi_SetStayType(romance); ChangeCharacterAddressGroup(romance, "Quest_Seadogs", "rld", "loc2"); LAi_SetActorType(CharacterFromID("Dutch_sergeant")); ChangeCharacterAddress(CharacterFromID("Dutch_sergeant"), "None", ""); Characters[romanceidx].dialog.CurrentNode = "convoy_aboard_ship"; DoReloadCharacterToLocation("Quest_Seadogs", "reload", "reload2"); break; case "convoy_romance_removes_cloak": if (PChar.sex == "man") SetModelFromID(romance, "Lucia_1"); else SetModelFromID(romance, PChar.quest.romance_model); LAi_SetOfficerType(romance); LAi_SetGuardianType(characterFromID("Dutch_sergeant")); ChangeCharacterAddressGroup(CharacterFromID("Dutch_sergeant"), "Quest_Seadogs", "reload", "reload1"); DoQuestReloadToLocation("Quest_Seadogs", "goto", "goto2", "convoy_report_found_romance"); break; case "convoy_report_found_romance": LAi_SetActorType(CharacterFromID("Dutch_sergeant")); Characters[GetCharacterIndex("Dutch_sergeant")].dialog.CurrentNode = "convoy_found_romance"; LAi_ActorDialog(CharacterFromID("Dutch_sergeant"),PChar,"convoy_arrest_captain",5.0,5.0); break; case "convoy_arrest_captain": ChangeCharacterAddressGroup(CharacterFromID("Convoy_Captain1"), "Cabin2SJG", "rld", "startloc"); DoQuestReloadToLocation("Cabin2SJG", "reload", "reload1", "convoy_report_found_romance2"); break; case "convoy_report_found_romance2": DisableFastTravel(true); LAi_SetActorType(CharacterFromID("Convoy_Captain1")); Characters[GetCharacterIndex("Convoy_Captain1")].dialog.CurrentNode = "how_you_got_person_aboard"; LAi_ActorDialog(CharacterFromID("Convoy_Captain1"),PChar,"convoy_return_to_residence",5.0,5.0); break; case "convoy_return_to_residence": RestoreOfficers(PChar.id); LAi_SetOfficerType(romance); // LAi_SetActorType(romance); // LAi_ActorFollowEverywhere(romance, "", 5.0); ChangeCharacterAddressGroup(CharacterFromID("Dutch_sergeant"), "Willemstad_townhall", "goto", "goto2"); if (PChar.sex == "man") GiveModel2Player("Ardent_S", true); else GiveModel2Player("Ardent_SF", true); PChar.quest.original_name = PChar.name; if (CheckAttribute(PChar,"middlename") == true && PChar.middlename != "") { PChar.quest.original_middlename = PChar.middlename; PChar.middlename = ""; } PChar.quest.original_lastname = PChar.lastname; PChar.name = "Carlos"; PChar.lastname = "Ardenta"; DoQuestReloadToLocation("Willemstad_townhall", "reload", "reload1", "convoy_return_to_residence2"); break; case "convoy_return_to_residence2": // LAi_SetActorType(romance); // LAi_ActorFollowEverywhere(romance, "", 5.0); ChangeCharacterAddress(CharacterFromID("Convoy_Captain1"), "None", ""); AddPassenger(PChar, CharacterFromID("Convoy_Captain1"), 1); Characters[GetCharacterIndex("Hans Kloss")].dialog.CurrentNode = "ardent_convoy_successful"; EndQuestMovie(); DisableFastTravel(false); Pchar.quest.convoy_final_preparations.win_condition.l1 = "ExitFromLocation"; PChar.quest.convoy_final_preparations.win_condition.l1.location = "Willemstad_townhall"; Pchar.quest.convoy_final_preparations.win_condition = "convoy_final_preparations"; break; case "convoy_final_preparations": PChar.name = PChar.quest.original_name; PChar.lastname = PChar.quest.original_lastname; if (CheckAttribute(PChar,"quest.original_middlename")) { PChar.middlename = PChar.quest.original_middlename; DeleteQuestAttribute("original_middlename"); } DeleteQuestAttribute("original_firstname"); DeleteQuestAttribute("original_lastname"); if (CheckQuestAttribute("revenge_type", "kidnap_rescue")) LAi_QuestDelay("convoy_final_preparations2", 1.0); else { LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "convoy_choose_officer_first_time"; LAi_ActorDialog(romance,PChar,"",5.0,5.0); // Either exits to "convoy_romance_waits", or sets attribute PChar.quest.convoy_officer and exits to "convoy_final_preparations2" } break; case "convoy_romance_waits": LAi_SetStayType(romance); // characters[romanceidx].Dialog.Filename = "romance_dialog.c"; // Characters[romanceidx].dialog.CurrentNode = "convoy_officer_try_again"; break; case "convoy_final_preparations2": LAi_SetOfficerType(romance); if (CheckQuestAttribute("revenge_type", "kidnap_rescue")) { GiveShip2Character(PChar, "RN_WarGalleon", "Phaeton", -1, ENGLAND, false, true); AddCharacterGoods(PChar, GOOD_WHEAT, 100); AddCharacterGoods(PChar, GOOD_RUM, 50); // ExchangeCharacterShip(Pchar, characterFromID("Convoy_Captain1")); // You take the captured convoy ship Preprocessor_AddQuestData("ship", PChar.Ship.Name); AddQuestRecord("Convoy Strike", 17); Preprocessor_Remove("ship"); } else { ExchangeCharacterShip(Pchar, characterFromID("Javier Balboa")); // Use Santiago governor as store for your original ship GiveShip2Character(PChar, "RN_WarGalleon", "Phaeton", -1, ENGLAND, false, true); AddCharacterGoods(PChar, GOOD_WHEAT, 100); AddCharacterGoods(PChar, GOOD_RUM, 50); // ExchangeCharacterShip(Pchar, characterFromID("Convoy_Captain1")); // You take the captured convoy ship RemoveOfficersIndex(PChar, GetCharacterIndex(PChar.quest.convoy_officer)); if (HasSubStr(PChar.quest.convoy_officer, "Enc_Officer")) LAi_StoreFantom(CharacterFromId(PChar.quest.convoy_officer)); // Prevent character from being overwritten by another "Enc_Officer" RemovePassenger(pchar, characterFromID(PChar.quest.convoy_officer)); Preprocessor_AddQuestData("ship", PChar.Ship.Name); Preprocessor_AddQuestData("officer", GetMyFullName(characterFromID(PChar.quest.convoy_officer))); AddQuestRecord("Convoy Strike", 5); Preprocessor_Remove("officer"); Preprocessor_Remove("ship"); PChar.Ship.crew.quantity = MakeInt(GetMaxCrewQuantity(PChar) / 10); } // PChar.Ship.crew.quantity = MakeInt(GetMaxCrewQuantity(PChar) / 10); SetCompanionIndex(Pchar, 1, GetCharacterIndex("Convoy_Captain2")); SetCompanionIndex(Pchar, 2, GetCharacterIndex("Convoy_Captain3")); SetCompanionIndex(Pchar, 3, GetCharacterIndex("Convoy_Captain4")); SetCharacterRemovable(characterFromID("Convoy_Captain2"), false); SetCharacterRemovable(characterFromID("Convoy_Captain3"), false); SetCharacterRemovable(characterFromID("Convoy_Captain4"), false); AddCharacterGoods(PChar, GOOD_COFFEE, 1500); AddCharacterGoods(characterFromID("Convoy_Captain2"), GOOD_COFFEE, 1500); AddCharacterGoods(characterFromID("Convoy_Captain3"), GOOD_COFFEE, 2000); AddCharacterGoods(characterFromID("Convoy_Captain4"), GOOD_COFFEE, 2000); HoistFlag(ENGLAND); Pchar.quest.convoy_prepare_to_depart.win_condition.l1 = "location"; Pchar.quest.convoy_prepare_to_depart.win_condition.l1.location = "Willemstad_port"; Pchar.quest.convoy_prepare_to_depart.win_condition = "convoy_prepare_to_depart"; Pchar.quest.convoy_final_briefing.win_condition.l1 = "locator"; Pchar.quest.convoy_final_briefing.win_condition.l1.location = "Willemstad_port"; Pchar.quest.convoy_final_briefing.win_condition.l1.locator_group = "reload"; Pchar.quest.convoy_final_briefing.win_condition.l1.locator = "sea_back"; Pchar.quest.convoy_final_briefing.win_condition = "convoy_final_briefing"; break; case "convoy_prepare_to_depart": // LAi_SetOfficerType(romance); Pchar.quest.convoy_battle1.win_condition.l1 = "location"; Pchar.quest.convoy_battle1.win_condition.l1.location = ""; Pchar.quest.convoy_battle1.win_condition = "convoy_setup_battle"; Pchar.quest.convoy_battle2.win_condition.l1 = "location"; Pchar.quest.convoy_battle2.win_condition.l1.location = "Aruba"; Pchar.quest.convoy_battle2.win_condition = "convoy_setup_battle"; Pchar.quest.convoy_battle3.win_condition.l1 = "location"; Pchar.quest.convoy_battle3.win_condition.l1.location = "Douwesen"; Pchar.quest.convoy_battle3.win_condition = "convoy_setup_battle"; Pchar.quest.convoy_battle4.win_condition.l1 = "location"; Pchar.quest.convoy_battle4.win_condition.l1.location = "Colombia"; Pchar.quest.convoy_battle4.win_condition = "convoy_setup_battle"; Pchar.quest.convoy_battle5.win_condition.l1 = "location"; Pchar.quest.convoy_battle5.win_condition.l1.location = "Oxbay"; Pchar.quest.convoy_battle5.win_condition = "convoy_setup_battle"; Pchar.quest.convoy_battle6.win_condition.l1 = "location"; Pchar.quest.convoy_battle6.win_condition.l1.location = "Redmond"; Pchar.quest.convoy_battle6.win_condition = "convoy_setup_battle"; Pchar.quest.convoy_battle7.win_condition.l1 = "location"; Pchar.quest.convoy_battle7.win_condition.l1.location = "Cuba"; Pchar.quest.convoy_battle7.win_condition = "convoy_setup_battle"; break; case "convoy_prepare_to_depart_no_infiltrate": Pchar.quest.convoy_reset_kloss.win_condition.l1 = "ExitFromLocation"; PChar.quest.convoy_reset_kloss.win_condition.l1.location = "Willemstad_townhall"; Pchar.quest.convoy_reset_kloss.win_condition = "convoy_reset_kloss"; Pchar.quest.convoy_battle1a.win_condition.l1 = "location"; Pchar.quest.convoy_battle1a.win_condition.l1.location = "Redmond"; Pchar.quest.convoy_battle1a.win_condition = "convoy_setup_battle_no_infiltrate"; AddCharacterGoods(characterFromID("Convoy_Captain1"), GOOD_COFFEE, 1500); AddCharacterGoods(characterFromID("Convoy_Captain2"), GOOD_COFFEE, 1500); AddCharacterGoods(characterFromID("Convoy_Captain3"), GOOD_COFFEE, 2000); AddCharacterGoods(characterFromID("Convoy_Captain4"), GOOD_COFFEE, 2000); break; case "convoy_reset_kloss": if (CheckAttribute(PChar,"quest.original_name")) { PChar.name = PChar.quest.original_name; DeleteQuestAttribute("original_name"); } if (CheckAttribute(PChar,"quest.original_lastname")) { PChar.lastname = PChar.quest.original_lastname; DeleteQuestAttribute("original_lastname"); } if (CheckAttribute(PChar,"quest.original_middlename")) { PChar.middlename = PChar.quest.original_middlename; DeleteQuestAttribute("original_middlename"); } Characters[GetCharacterIndex("Hans Kloss")].dialog.CurrentNode = "First time"; break; case "convoy_final_briefing": SetModelFromID(romance, PChar.quest.romance_model); DeleteQuestAttribute("romance_model"); if (!isofficer(romance)) SetOfficersIndex(Pchar, 3, romanceidx); // Just in case you've somehow managed to replace Lucia / Edmundo ChangeCharacterAddressGroup(romance, GetCharacterShipCabin(PChar), "rld", "startloc"); DoQuestReloadToLocation(GetCharacterShipCabin(PChar), "reload", "reload1", "convoy_final_briefing2"); break; case "convoy_final_briefing2": if (PChar.sex == "woman") { GiveModel2Player("Ardent_F", true); logit("Finally! Out of that ill-fitting uniform and back into my proper clothes."); } LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "convoy_after_governor"; LAi_ActorDialog(romance,PChar,"convoy_final_briefing3",5.0,5.0); setCharacterShipLocation(characterFromID("Javier Balboa"), "Santiago_port"); break; case "convoy_final_briefing3": LAi_SetOfficerType(romance); QuestToSeaLogin_PrepareLoc("Curacao", "reload", "reload_1", false); QuestToSeaLogin_Launch(); // if(CheckAttribute(PChar, "quest.convoy_officer")) // { // AddPassenger(PChar, CharacterFromID(PChar.quest.convoy_officer), 0); // SetCharacterRemovable(characterFromID(PChar.quest.convoy_officer), false); // } Characters[GetCharacterIndex("Convoy_Captain2")].fantomtype = "trade"; character_SetCompanionEnemyEnable(characterFromID("Convoy_Captain2"), true); character_SetCompanionEnemyEnable(characterFromID("Convoy_Captain3"), true); character_SetCompanionEnemyEnable(characterFromID("Convoy_Captain4"), true); break; case "convoy_setup_battle": ChangeCharacterAddress(CharacterFromID("Dutch_sergeant"), "None", ""); LAi_SetOfficerType(romance); LAi_SetImmortal(romance, true); Pchar.quest.convoy_battle1.over = "yes"; Pchar.quest.convoy_battle2.over = "yes"; Pchar.quest.convoy_battle3.over = "yes"; Pchar.quest.convoy_battle4.over = "yes"; Pchar.quest.convoy_battle5.over = "yes"; Pchar.quest.convoy_battle6.over = "yes"; Pchar.quest.convoy_battle7.over = "yes"; bQuestDisableMapEnter = true; PChar.quest.convoy_battle_location = PChar.location; Island_SetReloadEnableGlobal(PChar.quest.convoy_battle_location, false); RemoveCharacterCompanion(Pchar, characterFromID("Convoy_Captain2")); SetCharacterRemovable(characterFromID("Convoy_Captain2"), true); RemoveCharacterCompanion(Pchar, characterFromID("Convoy_Captain3")); SetCharacterRemovable(characterFromID("Convoy_Captain3"), true); RemoveCharacterCompanion(Pchar, characterFromID("Convoy_Captain4")); SetCharacterRemovable(characterFromID("Convoy_Captain4"), true); SetCharacterRelationBoth(GetCharacterIndex("Convoy_Captain2"),GetMainCharacterIndex(),RELATION_ENEMY); SetCharacterRelationBoth(GetCharacterIndex("Convoy_Captain3"),GetMainCharacterIndex(),RELATION_ENEMY); SetCharacterRelationBoth(GetCharacterIndex("Convoy_Captain4"),GetMainCharacterIndex(),RELATION_ENEMY); Group_CreateGroup("Downing Convoy"); Group_AddCharacter("Downing Convoy", "Convoy_Captain2"); Group_AddCharacter("Downing Convoy", "Convoy_Captain3"); Group_AddCharacter("Downing Convoy", "Convoy_Captain4"); Group_SetGroupCommander("Downing Convoy", "Convoy_Captain2"); Group_SetAddress("Downing Convoy", Characters[GetMainCharacterIndex()].location, "", ""); if (Characters[GetMainCharacterIndex()].location == "") Sea_LoginGroupNow("Downing Convoy"); Group_SetPursuitGroup("Downing Convoy", PLAYER_GROUP); Group_SetTaskAttack("Downing Convoy", PLAYER_GROUP, true); Group_LockTask("Downing Convoy"); characters[GetCharacterIndex("Convoy_Captain2")].nosurrender = 2; // UpdateRelations(); SetRMRelation(characterFromID("Convoy_Captain2"), SPAIN, REL_WAR); SetRMRelation(characterFromID("Convoy_Captain3"), SPAIN, REL_WAR); SetRMRelation(characterFromID("Convoy_Captain4"), SPAIN, REL_WAR); SetNationRelationBoth(ENGLAND, SPAIN, RELATION_ENEMY); UpdateRelations(); HoistFlag(SPAIN); Characters[GetCharacterIndex("Convoy_Captain2")].recognized = true; Characters[GetCharacterIndex("Convoy_Captain3")].recognized = true; Characters[GetCharacterIndex("Convoy_Captain4")].recognized = true; Pchar.quest.convoy_battle_over.win_condition.l1 = "NPC_Death"; Pchar.quest.convoy_battle_over.win_condition.l1.character = "Convoy_Captain2"; Pchar.quest.convoy_battle_over.win_condition.l2 = "NPC_Death"; Pchar.quest.convoy_battle_over.win_condition.l2.character = "Convoy_Captain3"; Pchar.quest.convoy_battle_over.win_condition.l3 = "NPC_Death"; Pchar.quest.convoy_battle_over.win_condition.l3.character = "Convoy_Captain4"; Pchar.quest.convoy_battle_over.win_condition = "convoy_battle_over"; if(!CheckQuestAttribute("revenge_type", "kidnap_rescue")) { Pchar.quest.convoy_report_to_santiago.win_condition.l1 = "location"; PChar.quest.convoy_report_to_santiago.win_condition.l1.character = Pchar.id; Pchar.quest.convoy_report_to_santiago.win_condition.l1.location = "Santiago_townhall"; Pchar.quest.convoy_report_to_santiago.win_condition = "convoy_report_to_santiago"; } break; case "convoy_setup_battle_no_infiltrate": ChangeCharacterAddress(CharacterFromID("Dutch_sergeant"), "None", ""); if (PChar.sex == "woman" && PChar.model == "Ardent_SF") { GiveModel2Player("Ardent_F", true); logit("Finally! Out of that ill-fitting uniform and back into my proper clothes."); } bQuestDisableMapEnter = true; PChar.quest.convoy_battle_location = PChar.location; Island_SetReloadEnableGlobal(PChar.quest.convoy_battle_location, false); Group_CreateGroup("Downing Convoy"); Group_AddCharacter("Downing Convoy", "Convoy_Captain1"); Group_AddCharacter("Downing Convoy", "Convoy_Captain2"); Group_AddCharacter("Downing Convoy", "Convoy_Captain3"); Group_AddCharacter("Downing Convoy", "Convoy_Captain4"); Group_SetGroupCommander("Downing Convoy", "Convoy_Captain1"); Group_SetAddress("Downing Convoy", Characters[GetMainCharacterIndex()].location, "", ""); Sea_LoginGroupNow("Downing Convoy"); Group_SetPursuitGroup("Downing Convoy", PLAYER_GROUP); Group_SetTaskAttack("Downing Convoy", PLAYER_GROUP, true); Group_LockTask("Downing Convoy"); characters[GetCharacterIndex("Convoy_Captain1")].nosurrender = 2; characters[GetCharacterIndex("Convoy_Captain2")].nosurrender = 2; SetRMRelation(characterFromID("Convoy_Captain1"), SPAIN, REL_WAR); SetRMRelation(characterFromID("Convoy_Captain2"), SPAIN, REL_WAR); SetRMRelation(characterFromID("Convoy_Captain3"), SPAIN, REL_WAR); SetRMRelation(characterFromID("Convoy_Captain4"), SPAIN, REL_WAR); SetNationRelationBoth(ENGLAND, SPAIN, RELATION_ENEMY); HoistFlag(SPAIN); Pchar.quest.convoy_battle_over.win_condition.l1 = "NPC_Death"; Pchar.quest.convoy_battle_over.win_condition.l1.character = "Convoy_Captain1"; Pchar.quest.convoy_battle_over.win_condition.l2 = "NPC_Death"; Pchar.quest.convoy_battle_over.win_condition.l2.character = "Convoy_Captain2"; Pchar.quest.convoy_battle_over.win_condition.l3 = "NPC_Death"; Pchar.quest.convoy_battle_over.win_condition.l3.character = "Convoy_Captain3"; Pchar.quest.convoy_battle_over.win_condition.l4 = "NPC_Death"; Pchar.quest.convoy_battle_over.win_condition.l4.character = "Convoy_Captain4"; Pchar.quest.convoy_battle_over.win_condition = "convoy_battle_over"; break; case "convoy_battle_over": PChar.quest.ardent_convoy = "battle_over"; SetNationRelationBoth(ENGLAND, SPAIN, RELATION_FRIEND); bQuestDisableMapEnter = false; Island_SetReloadEnableGlobal(PChar.quest.convoy_battle_location, true); DeleteQuestAttribute("convoy_battle_location"); AddMoneyToCharacter(pchar, 400000 + rand(200000)); if(AUTO_SKILL_SYSTEM) { AddPartyExpChar(pchar, "Leadership", 5000); AddPartyExpChar(PChar, "", 500); AddPartyExpChar(pchar, "Sailing", 500); } else {AddPartyExp(pchar, 6000);} // if(CheckQuestAttribute("revenge_type", "kidnap_rescue") && !CheckQuestAttribute("kidnap_convoy", "true")) if(CheckQuestAttribute("revenge_type", "kidnap_rescue")) { if (LAi_IsDead(romance)) { Preprocessor_AddQuestData("romance", GetMyName(romance)); AddQuestRecord("Convoy Strike", 20); Preprocessor_Remove("romance"); } else { AddQuestRecord("Convoy Strike", 18); PChar.quest.convoy_romance_dead.over = "yes"; PChar.quest.romance_dead.win_condition.l1 = "NPC_Death"; PChar.quest.romance_dead.win_condition.l1.character = romance.id; PChar.quest.romance_dead.win_condition = "romance_dead"; } CloseQuestHeader("Convoy Strike"); SetCharacterRemovable(romance, true); } else { if(!LAi_IsDead(romance) && !CheckAttribute(PChar, "quest.spain_betrayal")) { LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); LAi_SetImmortal(romance, false); AddQuestRecord("Convoy Strike", 6); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "convoy_return"; // Exits to "convoy_get_ship_back" if you are in command of correct type of ship } else { if (LAi_IsDead(romance)) Preprocessor_AddQuestData("failure", GetMyName(romance) + "'s death"); else { Preprocessor_AddQuestData("failure", "back"); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "spain_betrayal"; } Preprocessor_AddQuestData("governor", GetMySimpleName(characterFromID("Javier Balboa"))); AddQuestRecord("Convoy Strike", 13); CloseQuestHeader("Convoy Strike"); Preprocessor_Remove("governor"); Preprocessor_Remove("failure"); } LAi_SetHuberStayType(CharacterFromID("Javier Balboa")); } PChar.quest.mona_attack_triggers.win_condition.l1 = "Timer"; PChar.quest.mona_attack_triggers.win_condition.l1.date.day = GetAddingDataDay(0, 1, 0); PChar.quest.mona_attack_triggers.win_condition.l1.date.month = GetAddingDataMonth(0, 1, 0); PChar.quest.mona_attack_triggers.win_condition.l1.date.year = GetAddingDataYear(0, 1, 0); PChar.quest.mona_attack_triggers.win_condition = "mona_attack_triggers"; break; case "convoy_report_to_santiago": ChangeCharacterAddressGroup(romance, "Santiago_townhall", "goto", "goto9"); RemoveOfficersIndex(pchar, romanceidx); LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); break; case "convoy_get_ship_back": AddQuestRecord("Convoy Strike", 7); if(CheckAttribute(PChar, "quest.convoy_officer")) { AddPassenger(PChar, CharacterFromID(PChar.quest.convoy_officer), 0); SetCharacterRemovable(characterFromID(PChar.quest.convoy_officer), true); } // if (CheckQuestAttribute("kidnap_convoy", "true")) DeleteQuestAttribute("kidnap_convoy"); ExchangeCharacterShip(Pchar, characterFromID("Javier Balboa")); // Captured ship goes to Santiago governor, you get your own ship LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "convoy_propose_trade"; LAi_ActorDialog(romance,PChar,"convoy_governor_agrees_trade",5.0,5.0); break; case "convoy_governor_agrees_trade": LAi_SetActorType(CharacterFromID("Javier Balboa")); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "convoy_interesting_idea"; LAi_ActorDialog(CharacterFromID("Javier Balboa"),PChar,"convoy_wait_a_day",5.0,5.0); break; case "convoy_wait_a_day": ChangeCharacterAddressGroup(romance, "Santiago_townhall", "goto", "goto9"); DoQuestReloadToLocation("Santiago_townhall", "goto", "goto8", "convoy_next_day_townhall"); break; case "convoy_next_day_townhall": WaitDate("", 0, 0, 1, 0, 0); SetCurrentTime(10.00, 0); LAi_SetActorType(CharacterFromID("Javier Balboa")); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "convoy_next_day"; LAi_ActorDialog(CharacterFromID("Javier Balboa"),PChar,"convoy_romance_asks_for_ship",1.0,1.0); break; case "convoy_romance_asks_for_ship": LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "convoy_ask_to_take_ship"; LAi_ActorDialog(romance,PChar,"convoy_governor_agrees_ship",5.0,5.0); break; case "convoy_governor_agrees_ship": LAi_SetActorType(CharacterFromID("Javier Balboa")); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "convoy_agree_ship"; LAi_ActorDialog(CharacterFromID("Javier Balboa"),PChar,"convoy_ready_for_trade_deal",1.0,1.0); break; case "convoy_ready_for_trade_deal": LAi_SetHuberStayType(CharacterFromID("Javier Balboa")); // if(!isofficer(romance)) SetOfficersIndex(Pchar, 3, romanceidx); // LAi_SetOfficerType(romance); Preprocessor_AddQuestData("ship", Characters[GetCharacterIndex("Javier Balboa")].Ship.Name); Preprocessor_AddQuestData("romance", GetMyName(romance)); AddQuestRecord("Convoy Strike", 8); Preprocessor_Remove("romance"); Preprocessor_Remove("ship"); RemoveOfficersIndex(pchar, romanceidx); RemovePassenger(pchar, romance); ExchangeCharacterShip(characterFromID("Javier Balboa"), romance); // Captured ship goes to "romance" setCharacterShipLocation(romance, "Santiago_port"); if(SetCompanionIndex(PChar,-1, romanceidx) == romanceidx) { Locations[FindLocation("Santiago_town_01")].reload.l2.disable = 1; // Lock the town exit, Locations[FindLocation("Santiago_port")].reload.l5.disable = 1; // the port exit, bQuestDisableSeaEnter = true; // and the sea. LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "convoy_free_slot"; LAi_ActorDialog(romance,PChar,"convoy_goto_Santiago_Shipyard",5.0,5.0); } else { // ExchangeCharacterShip(characterFromID("Javier Balboa"), romance); // Captured ship goes to "romance" if (HasSubStr(PChar.quest.convoy_officer, "Enc_Officer")) LAi_UnStoreFantom(CharacterFromID(PChar.quest.convoy_officer)); // Cancel protection DeleteQuestAttribute("convoy_officer"); LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); } PChar.quest.ardent_convoy = "trade_proposal"; Pchar.quest.Willemstad_residence2.win_condition.l1 = "location"; PChar.quest.Willemstad_residence2.win_condition.l1.character = Pchar.id; Pchar.quest.Willemstad_residence2.win_condition.l1.location = "Willemstad_townhall"; Pchar.quest.Willemstad_residence2.win_condition = "convoy_Willemstad_residence2"; break; case "convoy_goto_Santiago_Shipyard": LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); Pchar.quest.Santiago_Shipyard.win_condition.l1 = "location"; Pchar.quest.Santiago_Shipyard.win_condition.l1.location = "Santiago_shipyard"; Pchar.quest.Santiago_Shipyard.win_condition = "convoy_Santiago_Shipyard2"; break; case "convoy_Santiago_Shipyard2": Pchar.quest.back_in_Santiago_port.win_condition.l1 = "location"; Pchar.quest.back_in_Santiago_port.win_condition.l1.location = "Santiago_port"; Pchar.quest.back_in_Santiago_port.win_condition = "convoy_back_in_Santiago_port"; break; case "convoy_back_in_Santiago_port": if(SetCompanionIndex(PChar,-1, romanceidx) == romanceidx) { LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "convoy_free_slot2"; LAi_ActorDialog(romance,PChar,"convoy_goto_Santiago_Shipyard",5.0,5.0); } else { // ExchangeCharacterShip(characterFromID("Javier Balboa"), romance); // Captured ship goes to "romance" if (HasSubStr(PChar.quest.convoy_officer, "Enc_Officer")) LAi_UnStoreFantom(CharacterFromID(PChar.quest.convoy_officer)); // Cancel protection DeleteQuestAttribute("convoy_officer"); Locations[FindLocation("Santiago_town_01")].reload.l2.disable = 0; // Unlock the town exit, Locations[FindLocation("Santiago_port")].reload.l5.disable = 0; // the port exit, bQuestDisableSeaEnter = false; // and the sea. LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); } break; case "convoy_Willemstad_residence2": ChangeCharacterAddressGroup(romance, "Willemstad_townhall", "goto", "goto1"); LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); break; case "convoy_romance_interrupts_recognition": // Triggered by dialog with Hans Kloss, governor of Curacao LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "convoy_interrupt_recognition"; LAi_ActorDialog(romance,PChar,"convoy_give_ship_to_kloss",5.0,5.0); break; case "convoy_give_ship_to_kloss": LAi_SetActorType(CharacterFromID("Hans Kloss")); Characters[GetCharacterIndex("Hans Kloss")].dialog.CurrentNode = "ardent_convoy_receive_ship"; LAi_ActorDialog(CharacterFromID("Hans Kloss"),PChar,"convoy_give_trade_letter",5.0,5.0); RemoveCharacterCompanion(Pchar, romance); AddPassenger(PChar, romance, 0); SetOfficersIndex(Pchar, 3, romanceidx); DeleteAttribute(romance, "ship"); break; case "convoy_give_trade_letter": LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "convoy_give_trade_letter"; LAi_ActorDialog(romance,PChar,"convoy_farewell_to_kloss",5.0,5.0); break; case "convoy_farewell_to_kloss": LAi_SetActorType(CharacterFromID("Hans Kloss")); Characters[GetCharacterIndex("Hans Kloss")].dialog.CurrentNode = "ardent_convoy_trade_accepted"; LAi_ActorDialog(CharacterFromID("Hans Kloss"),PChar,"convoy_reset_kloss2",5.0,5.0); break; case "convoy_reset_kloss2": LAi_SetHuberStayType(CharacterFromID("Hans Kloss")); LAi_SetOfficerType(romance); AddQuestRecord("Convoy Strike", 9); PChar.quest.ardent_convoy = "return_from_trade"; Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "convoy_return_from_trade"; // When you talk to governor about trade deal, exits to "convoy_ending" or "convoy_ending_goodbye" Pchar.quest.convoy_santiago_residence_finale.win_condition.l1 = "location"; PChar.quest.convoy_santiago_residence_finale.win_condition.l1.character = Pchar.id; Pchar.quest.convoy_santiago_residence_finale.win_condition.l1.location = "Santiago_townhall"; Pchar.quest.convoy_santiago_residence_finale.win_condition = "convoy_santiago_residence_finale"; break; case "convoy_santiago_residence_finale": Locations[FindLocation("Santiago_townhall")].reload.l1.disable = 1; DisableFastTravel(true); ChangeCharacterAddressGroup(romance, "Santiago_townhall", "goto", "goto9"); LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); break; case "convoy_ending": // Triggered by dialog with "Javier Balboa" LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "convoy_flattery"; LAi_ActorDialog(romance,PChar,"convoy_ending2",5.0,5.0); break; case "convoy_ending2": Preprocessor_AddQuestData("fatherinlaw", GetMySimpleName(CharacterFromID("Javier Balboa"))); Preprocessor_AddQuestData("romance", GetMyName(romance)); AddQuestRecord("Convoy Strike", 10); Preprocessor_Remove("romance"); Preprocessor_Remove("fatherinlaw"); CloseQuestHeader("Convoy Strike"); if(AUTO_SKILL_SYSTEM) { AddPartyExpChar(pchar, "Leadership", 1000); AddPartyExpChar(PChar, "", 100); AddPartyExpChar(pchar, "Commerce", 100); } else {AddPartyExp(pchar, 1200);} LAi_SetHuberStayType(CharacterFromID("Javier Balboa")); LAi_SetOfficerType(romance); SetCharacterRemovable(romance, true); DeleteAttribute(PChar, "quest.ardent_convoy"); Locations[FindLocation("Santiago_townhall")].reload.l1.disable = 0; DisableFastTravel(false); PChar.quest.convoy_romance_dead.over = "yes"; PChar.quest.romance_dead.win_condition.l1 = "NPC_Death"; PChar.quest.romance_dead.win_condition.l1.character = romance.id; PChar.quest.romance_dead.win_condition = "romance_dead"; break; case "convoy_ending_goodbye": // Triggered by dialog with "Javier Balboa" LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "convoy_done_wrong"; LAi_ActorDialog(romance,PChar,"convoy_ending_goodbye2",5.0,5.0); break; case "convoy_ending_goodbye2": Locations[FindLocation("Santiago_townhall")].reload.l1.disable = 0; DisableFastTravel(false); SetCharacterRemovable(romance, true); RemoveOfficersIndex(PChar, romanceidx); RemovePassenger(PChar, romance); LAi_SetCitizenType(romance); if(CheckAttribute(characterFromID(PChar.quest.romance), "married") && characters[getCharacterIndex(PChar.quest.romance)].married == MR_MARRIED && characters[getCharacterIndex(PChar.quest.romance)].married.id == PChar.id) { characters[romanceidx].Dialog.Filename = "Gov MR_dialog.c"; characters[romanceidx].Dialog.CurrentNode = "First time"; } else { // LAi_SetActorType(romance); // LAi_ActorGoToLocation(romance, "reload", "reload1", "none", "", "", "", 10.0); Pchar.quest.convoy_ending_remove_romance.win_condition.l1 = "ExitFromLocation"; PChar.quest.convoy_ending_remove_romance.win_condition.l1.location = PChar.location; Pchar.quest.convoy_ending_remove_romance.win_condition = "convoy_ending_remove_romance"; } Preprocessor_AddQuestData("fatherinlaw", GetMySimpleName(CharacterFromID("Javier Balboa"))); Preprocessor_AddQuestData("romance", GetMyName(romance)); AddQuestRecord("Convoy Strike", 16); Preprocessor_Remove("romance"); Preprocessor_Remove("fatherinlaw"); CloseQuestHeader("Convoy Strike"); if(AUTO_SKILL_SYSTEM) { AddPartyExpChar(pchar, "Leadership", 1000); AddPartyExpChar(PChar, "", 100); AddPartyExpChar(pchar, "Commerce", 100); } else {AddPartyExp(pchar, 1200);} LAi_SetHuberStayType(CharacterFromID("Javier Balboa")); DeleteAttribute(PChar, "quest.ardent_convoy"); PChar.quest.convoy_romance_dead.over = "yes"; PChar.quest.romance_dead.win_condition.l1 = "NPC_Death"; PChar.quest.romance_dead.win_condition.l1.character = romance.id; PChar.quest.romance_dead.win_condition = "romance_dead"; break; case "convoy_ending_remove_romance": LAi_SetActorType(romance); ChangeCharacterAddress(romance, "None", ""); break; case "convoy_romance_dead": PChar.quest.betrayed_spain.over = "yes"; PChar.quest.betrayed_spain1.over = "yes"; if (CheckQuestAttribute("revenge_type", "kidnap_rescue")) { Preprocessor_AddQuestData("romance", GetMyName(romance)); AddQuestRecord("Convoy Strike", 19); Preprocessor_Remove("romance"); } else { Preprocessor_AddQuestData("romance", GetMyName(romance)); Preprocessor_AddQuestData("governor", GetMySimpleName(characterFromID("Javier Balboa"))); AddQuestRecord("Convoy Strike", 11); Preprocessor_Remove("governor"); Preprocessor_Remove("romance"); Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "romance_dead"; } break; case "romance_dead": PChar.quest.betrayed_spain.over = "yes"; PChar.quest.betrayed_spain1.over = "yes"; Characters[GetCharacterIndex("Javier Balboa")].dialog.CurrentNode = "romance_dead"; break; case "meet_Mary_Wood": if (!LAi_IsDead(characterFromID("Mary Wood")) && Characters[GetCharacterIndex("Mary Wood")].location == "Tortuga_Tavern") { LAi_ActorDialog(CharacterFromID("Mary Wood"),PChar,"",5.0,5.0); } else traceandlog("Mary Wood is not here"); break; case "mona_attack_triggers": PChar.quest.mona_attack_sanjuan.win_condition.l1 = "location"; // Check for arrival at San Juan PChar.quest.mona_attack_sanjuan.win_condition.l1.location = "Muelle_port"; PChar.quest.mona_attack_sanjuan.win_condition = "mona_attack_info_port"; PChar.quest.mona_attack_santodomingo.win_condition.l1 = "location"; // Check for arrival at Santo Domingo PChar.quest.mona_attack_santodomingo.win_condition.l1.location = "Santo_Domingo_port"; PChar.quest.mona_attack_santodomingo.win_condition = "mona_attack_info_port"; PChar.quest.mona_attack_tortuga.win_condition.l1 = "location"; // Check for arrival at Tortuga PChar.quest.mona_attack_tortuga.win_condition.l1.location = "Tortuga_port"; PChar.quest.mona_attack_tortuga.win_condition = "mona_attack_info_port"; PChar.quest.mona_attack_portroyale.win_condition.l1 = "location"; // Check for arrival at Port Royale PChar.quest.mona_attack_portroyale.win_condition.l1.location = "Redmond_port"; PChar.quest.mona_attack_portroyale.win_condition = "mona_attack_info_port"; PChar.quest.mona_attack_nevis.win_condition.l1 = "location"; // Check for arrival at Nevis Pirate PChar.quest.mona_attack_nevis.win_condition.l1.location = "QC_port"; PChar.quest.mona_attack_nevis.win_condition = "mona_attack_info_port"; PChar.quest.mona_attack_turks.win_condition.l1 = "location"; // Check for arrival at Turks Island PChar.quest.mona_attack_turks.win_condition.l1.location = "Turks_port"; PChar.quest.mona_attack_turks.win_condition = "mona_attack_info_port"; Locations[FindLocation("Tortuga_port")].vcskip = true; break; case "mona_attack_info_port": PChar.quest.mona_attack_sanjuan.over = "yes"; PChar.quest.mona_attack_santodomingo.over = "yes"; PChar.quest.mona_attack_tortuga.over = "yes"; PChar.quest.mona_attack_portroyale.over = "yes"; PChar.quest.mona_attack_nevis.over = "yes"; PChar.quest.mona_attack_turks.over = "yes"; switch(PChar.location) { case "Muelle_port": PChar.quest.mona_attack.pirate_locator = "goto9"; PChar.quest.mona_attack.tavern = "Muelle_Tavern"; PChar.quest.mona_attack.tavern_seat1_group = "candles"; PChar.quest.mona_attack.tavern_seat1_locator = "sit3"; PChar.quest.mona_attack.tavern_seat2_group = "sit"; PChar.quest.mona_attack.tavern_seat2_locator = "sit7"; PChar.quest.mona_attack.tavern_stand_locator = "goto6"; break; case "Santo_Domingo_port": PChar.quest.mona_attack.pirate_locator = "goto18"; PChar.quest.mona_attack.tavern = "Santo_Domingo_Tavern"; PChar.quest.mona_attack.tavern_seat1_group = "sit"; PChar.quest.mona_attack.tavern_seat1_locator = "sit12"; PChar.quest.mona_attack.tavern_seat2_group = "sit"; PChar.quest.mona_attack.tavern_seat2_locator = "sit13"; PChar.quest.mona_attack.tavern_stand_locator = "goto20"; break; case "Tortuga_port": PChar.quest.mona_attack.pirate_locator = "goto19"; PChar.quest.mona_attack.tavern = "Tortuga_Tavern"; PChar.quest.mona_attack.tavern_seat1_group = "sit"; PChar.quest.mona_attack.tavern_seat1_locator = "sit2"; PChar.quest.mona_attack.tavern_seat2_group = "sit"; PChar.quest.mona_attack.tavern_seat2_locator = "sit8"; PChar.quest.mona_attack.tavern_stand_locator = "goto2"; break; case "Redmond_port": PChar.quest.mona_attack.pirate_locator = "goto_17"; PChar.quest.mona_attack.tavern = "Redmond_Tavern"; PChar.quest.mona_attack.tavern_seat1_group = "sit"; PChar.quest.mona_attack.tavern_seat1_locator = "sit12"; PChar.quest.mona_attack.tavern_seat2_group = "sit"; PChar.quest.mona_attack.tavern_seat2_locator = "sit13"; PChar.quest.mona_attack.tavern_stand_locator = "goto20"; break; case "QC_port": PChar.quest.mona_attack.pirate_locator = "goto4"; PChar.quest.mona_attack.tavern = "QC_Tavern"; PChar.quest.mona_attack.tavern_seat1_group = "sit"; PChar.quest.mona_attack.tavern_seat1_locator = "sit4"; PChar.quest.mona_attack.tavern_seat2_group = "sit"; PChar.quest.mona_attack.tavern_seat2_locator = "sit8"; PChar.quest.mona_attack.tavern_stand_locator = "goto6"; // Locators standing by bar: goto/goto2, goto/goto3 break; case "Turks_port": PChar.quest.mona_attack.pirate_locator = "goto8"; PChar.quest.mona_attack.tavern = "Turks_Tavern"; PChar.quest.mona_attack.tavern_seat1_group = "sit"; PChar.quest.mona_attack.tavern_seat1_locator = "sit5"; PChar.quest.mona_attack.tavern_seat2_group = "candles"; PChar.quest.mona_attack.tavern_seat2_locator = "sit6"; PChar.quest.mona_attack.tavern_stand_locator = "goto1"; break; } StartQuestMovie(true, true, false); DisableFastTravel(true); DeleteAttribute(&Locations[FindLocation("Tortuga_port")],"vcskip"); Locations[FindLocation(PChar.quest.mona_attack.tavern)].vcskip = true; ChangeCharacterAddressGroup(characterfromID("Wilfred Roscoe"), PChar.location, "goto", PChar.quest.mona_attack.pirate_locator); LAi_SetActorType(characterfromID("Wilfred Roscoe")); Characters[GetCharacterIndex("Wilfred Roscoe")].dialog.CurrentNode = "mona_attack_meeting_in_port"; LAi_ActorDialog(characterfromID("Wilfred Roscoe"),PChar,"mona_attack_tavern_chat",30.0,30.0); break; case "mona_attack_tavern_chat": EndQuestMovie(); DisableFastTravel(false); if (PChar.location == "QC_port" && Characters[GetCharacterIndex("Armand Delacroix")].location == "QC_tavern") // If Armand Delacroix is already sitting in the tavern, you and Wilfred Roscoe need to stand by the bar { ChangeCharacterAddressGroup(characterFromID("Wilfred Roscoe"), "QC_tavern", "goto", "goto2"); DoQuestReloadToLocation("QC_tavern", "goto", "goto3", "mona_attack_tavern_chat2"); } else { ChangeCharacterAddressGroup(characterFromID("Wilfred Roscoe"), PChar.quest.mona_attack.tavern, PChar.quest.mona_attack.tavern_seat2_group, PChar.quest.mona_attack.tavern_seat2_locator); DoQuestReloadToLocation(PChar.quest.mona_attack.tavern, PChar.quest.mona_attack.tavern_seat1_group, PChar.quest.mona_attack.tavern_seat1_locator, "mona_attack_tavern_chat2"); } break; case "mona_attack_tavern_chat2": LAi_SetActorType(PChar); if (PChar.location != Characters[GetCharacterIndex("Armand Delacroix")].location) // If Armand Delacroix is sitting in the tavern then you and Wilfred Roscoe are not sitting { LAi_ActorSetSitMode(PChar); LAi_SetSitType(characterFromID("Wilfred Roscoe")); } Characters[GetCharacterIndex("Wilfred Roscoe")].dialog.CurrentNode = "mona_attack_tavern1"; LAi_ActorDialogNow(PChar, characterFromID("Wilfred Roscoe"), "mona_attack_end_tavern_chat", 1.0); break; case "mona_attack_end_tavern_chat": SetQuestHeader("Isla Mona Attack"); AddQuestRecord("Isla Mona Attack", 1); Islands[FindIsland("IslaMona")].smuggling_nation = FRANCE; // CaptureTownForNation("Khael Roa", FRANCE); LAi_SetPlayerType(PChar); if (PChar.location != Characters[GetCharacterIndex("Armand Delacroix")].location) ChangeCharacterAddressGroup(PChar, PChar.quest.mona_attack.tavern, "goto", PChar.quest.mona_attack.tavern_stand_locator); Pchar.quest.mona_attack_roscoe_leaves.win_condition.l1 = "ExitFromLocation"; PChar.quest.mona_attack_roscoe_leaves.win_condition.l1.location = PChar.location; Pchar.quest.mona_attack_roscoe_leaves.win_condition = "mona_attack_roscoe_leaves"; Pchar.quest.mona_attack_setup.win_condition.l1 = "location"; Pchar.quest.mona_attack_setup.win_condition.l1.location = "IslaMona"; Pchar.quest.mona_attack_setup.win_condition = "mona_attack_setup"; break; case "mona_attack_roscoe_leaves": LAi_SetActorType(characterFromID("Wilfred Roscoe")); ChangeCharacterAddress(characterFromID("Wilfred Roscoe"), "None", ""); DeleteAttribute(&Locations[FindLocation(PChar.quest.mona_attack.tavern)],"vcskip"); break; case "mona_attack_setup": for(n = 1; n <=20; n++) { ChangeCharacterAddress(characterFromID("Mona_patrol_" + n), "None", ""); } bQuestDisableMapEnter = true; // PChar.quest.mona_attack_battle_location = PChar.location; // Island_SetReloadEnableGlobal(PChar.quest.mona_attack_battle_location, false); Group_CreateGroup("French_frigate"); Group_AddCharacter("French_frigate", "French_Lieutenant"); Group_SetGroupCommander("French_frigate", "French_Lieutenant"); Group_SetPursuitGroup("French_frigate", PLAYER_GROUP); Group_SetTaskAttack("French_frigate", PLAYER_GROUP, true); Group_LockTask("French_frigate"); Group_SetAddress("French_frigate", "IslaMona", "Reload_1", "ship_2"); Sea_LoginGroupNow("French_frigate"); characters[GetCharacterIndex("French_Lieutenant")].nosurrender = 2; SetCharacterRelationBoth(GetCharacterIndex("French_Lieutenant"),GetMainCharacterIndex(),RELATION_ENEMY); Pchar.quest.mona_attack_frigate_beaten.win_condition.l1 = "NPC_death"; Pchar.quest.mona_attack_frigate_beaten.win_condition.l1.character = "French_Lieutenant"; Pchar.quest.mona_attack_frigate_beaten.win_condition = "mona_attack_frigate_beaten"; break; case "mona_attack_frigate_beaten": bQuestDisableMapEnter = false; // Island_SetReloadEnableGlobal(PChar.quest.mona_attack_battle_location, true); // DeleteQuestAttribute("mona_attack_battle_location"); AddQuestRecord("Isla Mona Attack", 2); PChar.quest.mona_attack_beach_battle.win_condition.l1 = "location"; PChar.quest.mona_attack_beach_battle.win_condition.l1.location = "IslaMona_port"; PChar.quest.mona_attack_beach_battle.win_condition = "mona_attack_beach_battle"; Locations[FindLocation("Quest_Arawak_Village")].locators_radius.goto.goto19 = 5.0; break; case "mona_attack_beach_battle": StartQuestMovie(true, true, false); DisableFastTravel(true); bQuestDisableSeaEnter = true; Locations[FindLocation("IslaMona_port")].reload.l2.disable = 1; sld = LAi_CreateFantomCharacter(false, 1, true, true, 0.25, Nations[FRANCE].fantomModel.m2, "goto", "goto1"); LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS"); GiveSoldierWeapon(sld, FRANCE); sld.id = "soldier1"; sld.nation = FRANCE; SetRandomNameToCharacter(sld); sld = LAi_CreateFantomCharacter(false, 1, true, true, 0.25, Nations[FRANCE].fantomModel.m3, "goto", "goto5"); LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS"); GiveSoldierWeapon(sld, FRANCE); sld.id = "soldier2"; sld.nation = FRANCE; SetRandomNameToCharacter(sld); sld = LAi_CreateFantomCharacter(false, 1, true, true, 0.25, Nations[FRANCE].fantomModel.m4, "goto", "goto3"); LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS"); GiveSoldierWeapon(sld, FRANCE); sld.id = "soldier3"; sld.nation = FRANCE; SetRandomNameToCharacter(sld); sld = LAi_CreateFantomCharacter(false, 1, true, true, 0.25, Nations[FRANCE].fantomModel.m5, "goto", "goto9"); LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS"); GiveSoldierWeapon(sld, FRANCE); sld.id = "soldier4"; sld.nation = FRANCE; SetRandomNameToCharacter(sld); LAi_group_SetRelation("FRANCE_SOLDIERS", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY); LAi_group_FightGroups("FRANCE_SOLDIERS", LAI_GROUP_PLAYER, true); LAi_group_SetCheck("FRANCE_SOLDIERS", "mona_attack_beach_fight_won"); break; case "mona_attack_beach_fight_won": EndQuestMovie(); Characters[GetCharacterIndex("Quest_Chief_Indian1")].dialog.CurrentNode = "what_have_you_done"; for(n = 3; n <=7; n++) { ChangeCharacterAddress(characterFromID("Quest_Indian" + n), "None", ""); } Locations[FindLocation("IslaMona_fort")].models.always.locators = "fort2_l_GR"; Pchar.quest.mona_attack_village_battle_setup.win_condition.l1 = "location"; Pchar.quest.mona_attack_village_battle_setup.win_condition.l1.location = "Quest_Arawak_Village"; PChar.quest.mona_attack_village_battle_setup.win_condition = "mona_attack_village_battle_setup"; Pchar.quest.mona_attack_fort_battle.win_condition.l1 = "location"; Pchar.quest.mona_attack_fort_battle.win_condition.l1.location = "IslaMona_fort"; PChar.quest.mona_attack_fort_battle.win_condition = "mona_attack_fort_battle"; break; case "mona_attack_village_battle_setup": StartQuestMovie(true, true, false); sld = LAi_CreateFantomCharacter(false, 1, true, true, 0.25, Nations[FRANCE].fantomModel.m2, "goto", "goto28"); LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS"); GiveSoldierWeapon(sld, FRANCE); sld.id = "soldier1"; sld.nation = FRANCE; SetRandomNameToCharacter(sld); sld = LAi_CreateFantomCharacter(false, 1, true, true, 0.25, Nations[FRANCE].fantomModel.m3, "goto", "goto39"); LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS"); GiveSoldierWeapon(sld, FRANCE); sld.id = "soldier2"; sld.nation = FRANCE; SetRandomNameToCharacter(sld); sld = LAi_CreateFantomCharacter(false, 1, true, true, 0.25, Nations[FRANCE].fantomModel.m4, "goto", "goto37"); LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS"); GiveSoldierWeapon(sld, FRANCE); sld.id = "soldier3"; sld.nation = FRANCE; SetRandomNameToCharacter(sld); sld = LAi_CreateFantomCharacter(false, 1, true, true, 0.25, Nations[FRANCE].fantomModel.m5, "goto", "goto23"); LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS"); GiveSoldierWeapon(sld, FRANCE); sld.id = "soldier4"; sld.nation = FRANCE; SetRandomNameToCharacter(sld); Pchar.quest.mona_attack_village_battle.win_condition.l1 = "locator"; Pchar.quest.mona_attack_village_battle.win_condition.l1.location = "Quest_Arawak_Village"; Pchar.quest.mona_attack_village_battle.win_condition.l1.locator_group = "goto"; Pchar.quest.mona_attack_village_battle.win_condition.l1.locator = "goto19"; PChar.quest.mona_attack_village_battle.win_condition = "mona_attack_village_battle"; break; case "mona_attack_village_battle": LAi_group_SetRelation("FRANCE_SOLDIERS", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY); LAi_group_FightGroups("FRANCE_SOLDIERS", LAI_GROUP_PLAYER, true); LAi_group_SetCheck("FRANCE_SOLDIERS", "mona_attack_village_battle_won"); break; case "mona_attack_village_battle_won": for(n = 3; n <=7; n++) { cc = n-2; if(n == 3 || n == 7) cc = 6; ChangeCharacterAddressGroup(characterFromID("Quest_Indian" + n), "Quest_Arawak_Village", "reload", "reload" + cc); } ChangeCharacterAddressGroup(characterFromID("Quest_Chief_Indian1"), "Quest_Arawak_Village", "reload", "reload5"); LAi_QuestDelay("mona_attack_village_battle_won2", 0.0); break; case "mona_attack_village_battle_won2": LAi_SetFightMode(PChar, false); LAi_type_actor_Reset(PChar); LAi_ActorWaitDialog(PChar, characterFromID("Quest_Chief_Indian1")); LAi_SetActorType(characterFromID("Quest_Chief_Indian1")); LAi_ActorDialog(characterFromID("Quest_Chief_Indian1"),PChar,"mona_attack_village_battle_won3",5.0,5.0); break; case "mona_attack_village_battle_won3": LAi_SetPlayerType(PChar); EndQuestMovie(); LAi_SetActorType(characterFromID("Quest_Chief_Indian1")); LAi_ActorGoToLocation(characterFromID("Quest_Chief_Indian1"), "reload", "reload5", "None", "", "", "", 10.0); Pchar.quest.mona_attack_reset_village.win_condition.l1 = "ExitFromLocation"; PChar.quest.mona_attack_reset_village.win_condition.l1.location = PChar.location; Pchar.quest.mona_attack_reset_village.win_condition = "mona_attack_reset_village"; break; case "mona_attack_reset_village": ChangeCharacterAddressGroup(characterFromID("Quest_Indian3"), "Quest_Arawak_Village", "goto", "goto11"); ChangeCharacterAddressGroup(characterFromID("Quest_Indian4"), "Quest_Arawak_Village", "goto", "goto37"); ChangeCharacterAddressGroup(characterFromID("Quest_Indian5"), "Quest_Arawak_Village", "goto", "goto8"); ChangeCharacterAddressGroup(characterFromID("Quest_Indian6"), "Quest_Arawak_Village", "goto", "goto43"); ChangeCharacterAddressGroup(characterFromID("Quest_Indian7"), "Quest_Arawak_Village", "goto", "goto9"); ChangeCharacterAddressGroup(characterFromID("Quest_Chief_Indian1"), "Quest_Indian_house", "goto", "goto2"); LAi_SetStayType(characterFromID("Quest_Chief_Indian1")); break; case "mona_attack_fort_battle": StartQuestMovie(true, true, false); sld = LAi_CreateFantomCharacter(false, 1, true, true, 0.25, Nations[FRANCE].fantomModel.m2, "rld", "loc4"); LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS"); GiveSoldierWeapon(sld, FRANCE); sld.id = "soldier1"; sld.nation = FRANCE; SetRandomNameToCharacter(sld); sld = LAi_CreateFantomCharacter(false, 1, true, true, 0.25, Nations[FRANCE].fantomModel.m3, "rld", "loc1"); LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS"); GiveSoldierWeapon(sld, FRANCE); sld.id = "soldier2"; sld.nation = FRANCE; SetRandomNameToCharacter(sld); sld = LAi_CreateFantomCharacter(false, 1, true, true, 0.25, Nations[FRANCE].fantomModel.m4, "rld", "loc5"); LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS"); GiveSoldierWeapon(sld, FRANCE); sld.id = "soldier3"; sld.nation = FRANCE; SetRandomNameToCharacter(sld); sld = LAi_CreateFantomCharacter(false, 1, true, true, 0.25, Nations[FRANCE].fantomModel.m5, "rld", "aloc0"); LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS"); GiveSoldierWeapon(sld, FRANCE); sld.id = "soldier4"; sld.nation = FRANCE; SetRandomNameToCharacter(sld); sld = LAi_CreateFantomCharacter(false, 1, true, true, 0.25, Nations[FRANCE].fantomModel.m5, "rld", "aloc3"); LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS"); GiveSoldierWeapon(sld, FRANCE); sld.id = "soldier5"; sld.nation = FRANCE; SetRandomNameToCharacter(sld); sld = LAi_CreateFantomCharacter(false, 1, true, true, 0.25, Nations[FRANCE].fantomModel.m5, "rld", "aloc4"); LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS"); GiveSoldierWeapon(sld, FRANCE); sld.id = "soldier6"; sld.nation = FRANCE; SetRandomNameToCharacter(sld); ChangeCharacterAddressGroup(characterFromID("French_Captain1"), "IslaMona_fort", "rld", "loc7"); LAi_group_MoveCharacter(characterFromID("French_Captain1"), "SPAIN_SOLDIERS"); // So he doesn't join in the fight LAi_SetStayType(characterFromID("French_Captain1")); LAi_SetImmortal(CharacterFromID("French_Captain1"), true); LAi_group_SetRelation("FRANCE_SOLDIERS", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY); LAi_group_FightGroups("FRANCE_SOLDIERS", LAI_GROUP_PLAYER, true); LAi_group_SetCheck("FRANCE_SOLDIERS", "mona_attack_fort_battle_won"); break; case "mona_attack_fort_battle_won": Characters[GetCharacterIndex("Quest_Chief_Indian1")].dialog.CurrentNode = "fort_taken"; // LAi_group_MoveCharacter(characterFromID("French_Captain1"), "FRANCE_SOLDIERS"); LAi_SetCivilianGuardianType(characterFromID("French_Captain1")); Characters[GetCharacterIndex("French_Captain1")].dialog.CurrentNode = "fort_surrender"; break; case "mona_attack_fort_battle_won2": // Triggered by dialog with "French_Captain1" EndQuestMovie(); AddQuestRecord("Isla Mona Attack", 4); if (GetCompanionQuantity(PChar) > 1) { cc = -1; for (n=1; n 0) { PChar.quest.mona_attack.fleet_commander = characters[cc].id; ch = CharacterFromID(PChar.quest.mona_attack.fleet_commander); ChangeCharacterAddressGroup(CharacterFromID(PChar.quest.mona_attack.fleet_commander), "IslaMona_port", "goto", "goto2"); LAi_SetStayType(ch); PChar.quest.normal_dialog = ch.Dialog.Filename; ch.Dialog.Filename = "crew_dialog.c"; ch.dialog.CurrentNode = "mona_attack_detach_fleet"; AddQuestRecord("Isla Mona Attack", 8); } } Pchar.quest.mona_attack_capture_captain1.win_condition.l1 = "ExitFromLocation"; PChar.quest.mona_attack_capture_captain1.win_condition.l1.location = PChar.location; Pchar.quest.mona_attack_capture_captain1.win_condition = "mona_attack_capture_captain1"; break; case "mona_attack_capture_captain1": ChangeCharacterAddress(characterFromID("French_Captain1"), "None", ""); AddPassenger(PChar, CharacterFromID("French_Captain1"), 1); LAi_SetImmortal(CharacterFromID("French_Captain1"), false); break; case "mona_attack_detach_fleet": // Triggered by dialog with a companion officer characters[GetCharacterIndex(PChar.quest.mona_attack.fleet_commander)].Dialog.Filename = PChar.quest.normal_dialog; LAi_SetCitizenType(characterFromID(PChar.quest.mona_attack.fleet_commander)); AddQuestRecord("Isla Mona Attack", 5); PChar.quest.mona_attack_detach_fleet2.win_condition.l1 = "ExitFromLocation"; PChar.quest.mona_attack_detach_fleet2.win_condition.l1.location = PChar.location; PChar.quest.mona_attack_detach_fleet2.win_condition = "mona_attack_detach_fleet2"; pchar.quest.mona_attack_rejoin_fleet.win_condition.l1 = "location"; PChar.quest.mona_attack_rejoin_fleet.win_condition.l1.location = "Santo_Domingo_port"; PChar.quest.mona_attack_rejoin_fleet.win_condition = "mona_attack_rejoin_fleet"; break; case "mona_attack_detach_fleet2": PChar.quest.mona_attack.original_fleet_size = GetCompanionQuantity(PChar); for (n=1; n 0) { PChar.quest.mona_attack.(temp) = characters[cc].id; if (HasSubStr(PChar.quest.mona_attack.(temp), "Enc_Officer")) LAi_StoreFantom(CharacterFromId(PChar.quest.mona_attack.(temp))); // Prevent character from being overwritten by another "Enc_Officer" RemoveCharacterCompanion(PChar, characters[cc]); setCharacterShipLocation(CharacterFromId(PChar.quest.mona_attack.(temp)), "Santo_Domingo_port"); } else PChar.quest.mona_attack.(temp) = "*NULL*"; } ChangeCharacterAddressGroup(CharacterFromID(PChar.quest.mona_attack.fleet_commander), "Santo_Domingo_port", "goto", "goto18"); break; case "mona_attack_return_to_fort": Pchar.quest.mona_attack_return_to_fort2.win_condition.l1 = "location"; Pchar.quest.mona_attack_return_to_fort2.win_condition.l1.location = "IslaMona_fort"; PChar.quest.mona_attack_return_to_fort2.win_condition = "mona_attack_return_to_fort2"; break; case "mona_attack_return_to_fort2": LAi_SetActorType(PChar); ChangeCharacterAddressGroup(PChar, "IslaMona_fort", "rld", "loc2"); LAi_Fade("mona_attack_return_to_fort3", "mona_attack_return_to_fort4"); break; case "mona_attack_return_to_fort3": LAi_ActorTurnToLocator(PChar, "rld", "loc0"); n = rand(5) + 1; WaitDate("", 0, 0, n, 0, 0); // cc = rand(99); // SetCurrentTime(11.0 + cc/100.0, 0); cc = rand(59); SetCurrentTime(11, cc); break; case "mona_attack_return_to_fort4": setCharacterShipLocation(CharacterFromId("French_Captain2"), "IslaMona_port"); setCharacterShipLocation(CharacterFromId("French_Captain3"), "IslaMona_port"); setCharacterShipLocation(CharacterFromId("French_Contre-Amiral"), "IslaMona_port"); LAi_SetPlayerType(PChar); sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, "Sailor16", "rld", "loc0"); LAi_SetHP(sld, 180.0, 180.0); LAi_SetImmortal(sld, true); sld.id = "temp_crewman"; sld.Dialog.Filename = "crew_dialog.c"; sld.dialog.CurrentNode = "mona_attack_french_on_way"; LAi_SetActorType(sld); LAi_ActorDialog(sld,PChar,"mona_attack_goto_pass",10.0,10.0); break; case "mona_attack_goto_pass": LAi_ActorGoToLocation(characterFromID("temp_crewman"), "reload", "reloadc1", "None", "", "", "", 30.0); setCharacterShipLocation(CharacterFromId("French_Captain2"), "IslaMona_port"); setCharacterShipLocation(CharacterFromId("French_Captain3"), "IslaMona_port"); setCharacterShipLocation(CharacterFromId("French_Contre-Amiral"), "IslaMona_port"); HoistFlag(FRANCE); Pchar.quest.mona_pass_battle_setup.win_condition.l1 = "location"; Pchar.quest.mona_pass_battle_setup.win_condition.l1.location = "IslaMona_passage"; PChar.quest.mona_pass_battle_setup.win_condition = "mona_attack_pass_battle_setup"; break; case "mona_attack_pass_battle_setup": StartQuestMovie(true, true, false); DisableFastTravel(true); for (n=1; n<7; n++) { temp = "m" + (rand(5) + 1); sld = LAi_CreateFantomCharacter(false, 1, true, true, 0.25, Nations[FRANCE].fantomModel.(temp), "reload", "reload2_back"); LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS"); GiveSoldierWeapon(sld, FRANCE); sld.id = "soldier" + n; sld.nation = FRANCE; SetRandomNameToCharacter(sld); } LAi_group_SetRelation("FRANCE_SOLDIERS", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY); LAi_group_FightGroups("FRANCE_SOLDIERS", LAI_GROUP_PLAYER, true); LAi_group_SetCheck("FRANCE_SOLDIERS", "mona_attack_pass_battle_won"); LAi_QuestDelay("mona_attack_pass_battle_second_group", 10.0); break; case "mona_attack_pass_battle_second_group": for (n=7; n<13; n++) { temp = "m" + (rand(5) + 1); sld = LAi_CreateFantomCharacter(false, 2, true, true, 0.25, Nations[FRANCE].fantomModel.(temp), "reload", "reload2_back"); LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS"); GiveSoldierWeapon(sld, FRANCE); sld.id = "soldier" + n; sld.nation = FRANCE; SetRandomNameToCharacter(sld); } LAi_group_SetRelation("FRANCE_SOLDIERS", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY); LAi_group_FightGroups("FRANCE_SOLDIERS", LAI_GROUP_PLAYER, true); LAi_QuestDelay("mona_attack_pass_battle_taino", 12.0); break; case "mona_attack_pass_battle_taino": for (n=1; n<7; n++) { cc = n-3; if (n < 4) temp = "Indian1_" + n; else temp = "Indian" + cc; sld = LAi_CreateFantomCharacter(false, 3, true, true, 0.25, temp, "reload", "reload2_back"); // sld = LAi_CreateFantomCharacterExOtAt(true, OFFIC_TYPE_GUARD,"isIndian","","", 10, true, 1.0, "Indian" + n, "reload", "reload2_back"); LAi_SetWarriorType(sld); LAi_group_MoveCharacter(sld, LAI_GROUP_PLAYER); TakeItemFromCharacter(sld, CheckCharacterEquipByGroup(sld, BLADE_ITEM_TYPE)); TakeItemFromCharacter(sld, CheckCharacterEquipByGroup(sld, GUN_ITEM_TYPE)); RemoveCharacterEquip(sld, BLADE_ITEM_TYPE); RemoveCharacterEquip(sld, GUN_ITEM_TYPE); TakenItems(sld, "bladearrows", 1 + rand(2)); GiveItem2Character(sld, "pistolbow"); GiveItem2Character(sld, "tomahawk"); EquipCharacterByItem(sld, "pistolbow"); sld.id = "Indian" + n; sld.name = "Indian"; sld.lastname = n; } LAi_group_SetRelation("FRANCE_SOLDIERS", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY); LAi_group_FightGroups("FRANCE_SOLDIERS", LAI_GROUP_PLAYER, true); break; case "mona_attack_pass_battle_won": EndQuestMovie(); LAi_SetFightMode(PChar, false); AddQuestRecord("Isla Mona Attack", 7); speaker = Get_Speaker(); if (speaker != "") { crewref = characterFromID(speaker); crewidx = GetCharacterIndex(speaker); PChar.quest.normal_dialog = characters[crewidx].Dialog.Filename; LAi_SetActorType(crewref); characters[crewidx].Dialog.Filename = "crew_dialog.c"; Characters[crewidx].Dialog.CurrentNode = "mona_attack_pass_battle_won"; LAi_ActorDialog(crewref, pchar, "mona_attack_reset_officer", 5.0, 5.0); } DisableFastTravel(false); bQuestDisableSeaEnter = false; Locations[FindLocation("IslaMona_port")].reload.l2.disable = 0; Islands[FindIsland("IslaMona")].smuggling_nation = PIRATE; // CaptureTownForNation("Khael Roa", PIRATE); Pchar.quest.mona_attack_return_to_village.win_condition.l1 = "location"; Pchar.quest.mona_attack_return_to_village.win_condition.l1.location = "Quest_Arawak_Village"; PChar.quest.mona_attack_return_to_village.win_condition = "mona_attack_return_to_village"; Pchar.quest.mona_attack_port_encounter.win_condition.l1 = "location"; Pchar.quest.mona_attack_port_encounter.win_condition.l1.location = "IslaMona_port"; PChar.quest.mona_attack_port_encounter.win_condition = "mona_attack_port_encounter"; PChar.quest.mona_attack_getuniform.win_condition.l1 = "ExitFromLocation"; PChar.quest.mona_attack_getuniform.win_condition.l1.location = PChar.location; PChar.quest.mona_attack_getuniform.win_condition = "mona_attack_getuniform"; break; case "mona_attack_reset_officer": speaker = Get_Speaker(); if (speaker != "") { crewref = characterFromID(speaker); crewidx = GetCharacterIndex(speaker); characters[crewidx].Dialog.Filename = PChar.quest.normal_dialog; LAi_SetOfficerType(CharacterFromId(characters[crewidx].id)); StoreOfficers(PChar.id); } break; case "mona_attack_getuniform": if (PChar.sex == "man") GiveModel2Player("Ardent_Fr", true); else { GiveModel2Player("Ardent_FrF", true); logit("Again I have to wear a man's uniform. Better than letting the French see me in my usual outfit, I suppose..."); } break; case "mona_attack_return_to_village": ChangeCharacterAddressGroup(characterFromID("Quest_Chief_Indian1"), "Quest_Arawak_Village", "reload", "reload5"); Pchar.quest.mona_attack_return_to_village2.win_condition.l1 = "locator"; Pchar.quest.mona_attack_return_to_village2.win_condition.l1.location = "Quest_Arawak_Village"; Pchar.quest.mona_attack_return_to_village2.win_condition.l1.locator_group = "goto"; Pchar.quest.mona_attack_return_to_village2.win_condition.l1.locator = "goto19"; PChar.quest.mona_attack_return_to_village2.win_condition = "mona_attack_return_to_village2"; break; case "mona_attack_return_to_village2": if (PChar.model == "Ardent_Fr" || PChar.model == "Ardent_FrF") { LAi_SetActorType(characterFromID("Quest_Chief_Indian1")); Characters[GetCharacterIndex("Quest_Chief_Indian1")].dialog.CurrentNode = "dont_attack"; LAi_ActorDialogNow(characterFromID("Quest_Chief_Indian1"),PChar,"mona_attack_return_to_village3",1.0); } else LAi_QuestDelay("mona_attack_return_to_village3", 1.0); break; case "mona_attack_return_to_village3": LAi_SetActorType(characterFromID("Quest_Chief_Indian1")); if (PChar.model == "Ardent_Fr" || PChar.model == "Ardent_FrF") Characters[GetCharacterIndex("Quest_Chief_Indian1")].dialog.CurrentNode = "why_you_in_uniform"; else Characters[GetCharacterIndex("Quest_Chief_Indian1")].dialog.CurrentNode = "after_the_battle"; LAi_ActorDialog(characterFromID("Quest_Chief_Indian1"),PChar,"mona_attack_chief_goes_home",10.0,10.0); break; case "mona_attack_chief_goes_home": LAi_ActorGoToLocation(characterFromID("Quest_Chief_Indian1"), "reload", "reload5", "None", "", "", "", 10.0); PChar.quest.mona_attack_detach_fleet2.win_condition.l1 = "ExitFromLocation"; PChar.quest.mona_attack_detach_fleet2.win_condition.l1.location = PChar.location; PChar.quest.mona_attack_detach_fleet2.win_condition = "mona_attack_chief_goes_home2"; break; case "mona_attack_chief_goes_home2": ChangeCharacterAddressGroup(characterFromID("Quest_Chief_Indian1"), "Quest_Indian_house", "goto", "goto2"); LAi_SetStayType(characterFromID("Quest_Chief_Indian1")); Characters[GetCharacterIndex("Quest_Chief_Indian1")].dialog.CurrentNode = "First time"; break; case "mona_attack_port_encounter": StartQuestMovie(true, true, false); DisableFastTravel(true); SetCompanionIndex(Pchar, 1, GetCharacterIndex("French_Contre-Amiral")); SetCompanionIndex(Pchar, 2, GetCharacterIndex("French_Captain2")); SetCompanionIndex(Pchar, 3, GetCharacterIndex("French_Captain3")); SetCharacterRemovable(characterFromID("French_Contre-Amiral"), false); SetCharacterRemovable(characterFromID("French_Captain2"), false); SetCharacterRemovable(characterFromID("French_Captain3"), false); Characters[GetCharacterIndex("French_Contre-Amiral")].Flags.UseNavalFlag = true; Characters[GetCharacterIndex("French_Captain2")].Flags.UseNavalFlag = true; Characters[GetCharacterIndex("French_Captain3")].Flags.UseNavalFlag = true; Characters[GetCharacterIndex("French_Contre-Amiral")].professionalnavy = FRANCE; PChar.Flags.UseNavalFlag = true; temp = "m" + (rand(5) + 1); sld = LAi_CreateFantomCharacter(false, 2, true, true, 0.25, Nations[FRANCE].fantomModel.(temp), "goto", "goto2"); LAi_SetHP(sld, 180.0, 180.0); LAi_SetImmortal(sld, true); sld.id = "French_fleet_officer"; LAi_SetActorType(sld); sld.Dialog.Filename = "guard_dialog.c"; sld.dialog.CurrentNode = "mona_attack_are_you_captain"; if (GetOfficersQuantity(PChar) > 0) sld.dialog.CurrentNode = "mona_attack_who_are_they"; if (PChar.model != "Ardent_Fr" && PChar.model != "Ardent_FrF") sld.dialog.CurrentNode = "mona_attack_what_no_uniform"; LAi_ActorDialog(sld,PChar,"mona_attack_ready_for_flagship",30.0,30.0); break; case "mona_attack_ready_for_flagship": EndQuestMovie(); DisableFastTravel(false); // Locations[FindLocation("Cabin1")].models.always.locators = "cap_ld_GR"; Pchar.quest.mona_attack_go_to_flagship.win_condition.l1 = "locator"; Pchar.quest.mona_attack_go_to_flagship.win_condition.l1.location = "IslaMona_port"; Pchar.quest.mona_attack_go_to_flagship.win_condition.l1.locator_group = "reload"; Pchar.quest.mona_attack_go_to_flagship.win_condition.l1.locator = "boat"; PChar.quest.mona_attack_go_to_flagship.win_condition = "mona_attack_go_to_flagship"; break; case "mona_attack_go_to_flagship": ChangeCharacterAddressGroup(characterFromID("French_Captain2"), "Cabin1", "box", "weaponslocker"); ChangeCharacterAddressGroup(characterFromID("French_Captain3"), "Cabin1", "goto", "goto1"); ChangeCharacterAddressGroup(characterFromID("French_Contre-Amiral"), "Cabin1", "rld", "aloc1"); ChangeCharacterAddressGroup(villain, "Cabin1", "rld", "startloc"); DoQuestReloadToLocation("Cabin1", "reload", "reload1", "mona_attack_go_to_flagship2"); break; case "mona_attack_go_to_flagship2": LAi_SetActorType(PChar); LAi_ActorGoToLocator(PChar, "rld", "loc1", "mona_attack_go_to_flagship3", 15.0); break; case "mona_attack_go_to_flagship3": LAi_SetActorType(villain); LAi_ActorGoToLocator(villain, "reload", "reload1", "", 15.0); LAi_type_actor_Reset(PChar); LAi_ActorWaitDialog(PChar, characterFromID("French_Contre-Amiral")); LAi_SetActorType(characterFromID("French_Contre-Amiral")); Characters[GetCharacterIndex("French_Contre-Amiral")].Dialog.Filename = "French_Contre-Amiral_dialog.c"; if (PChar.model != "Ardent_Fr" && PChar.model != "Ardent_FrF") { Characters[GetCharacterIndex("French_Contre-Amiral")].dialog.CurrentNode = "spy_caught"; LAi_ActorDialog(characterFromID("French_Contre-Amiral"),PChar,"hung at dawn",5.0,5.0); } else { Characters[GetCharacterIndex("French_Contre-Amiral")].dialog.CurrentNode = "who_are_you"; LAi_ActorDialog(characterFromID("French_Contre-Amiral"),PChar,"",5.0,5.0); // Exits to "mona_attack_villain_recognises" or "mona_attack_return_to_ship" } break; case "mona_attack_villain_recognises": LAi_type_actor_Reset(PChar); LAi_ActorWaitDialog(PChar, villain); LAi_SetActorType(villain); Characters[villainidx].dialog.CurrentNode = "mona_attack_recognised"; LAi_ActorDialog(villain,PChar,"mona_attack_villain_pacified",10.0,10.0); break; case "mona_attack_villain_pacified": LAi_type_actor_Reset(PChar); LAi_ActorWaitDialog(PChar, characterFromID("French_Contre-Amiral")); LAi_SetActorType(characterFromID("French_Contre-Amiral")); Characters[GetCharacterIndex("French_Contre-Amiral")].dialog.CurrentNode = "on_to_business"; LAi_ActorDialog(characterFromID("French_Contre-Amiral"),PChar,"",5.0,5.0); // Exits to "mona_attack_return_to_ship" break; case "mona_attack_return_to_ship": AddQuestRecord("Isla Mona Attack", 11); SetQuestHeader("Treachery"); Preprocessor_AddQuestData("villain", GetMySimpleName(villain)); AddQuestRecord("Treachery", 1); Preprocessor_Remove("villain"); LAi_SetPlayerType(PChar); if (PChar.sex == "woman" && PChar.model == "Ardent_FrF") { PChar.quest.mona_attack_helen_changes_back.win_condition.l1 = "SeaEnter"; PChar.quest.mona_attack_helen_changes_back.win_condition = "mona_attack_helen_changes_back"; } QuestToSeaLogin_PrepareLoc("IslaMona", "reload", "reload_1", false); QuestToSeaLogin_Launch(); character_SetCompanionEnemyEnable(characterFromID("French_Captain2"), true); character_SetCompanionEnemyEnable(characterFromID("French_Captain3"), true); character_SetCompanionEnemyEnable(characterFromID("French_Contre-Amiral"), true); characters[GetCharacterIndex("French_Contre-Amiral")].nosurrender = 2; ChangeCharacterAddressGroup(characterFromID("Quest_Chief_Indian1"), "Quest_Indian_house", "goto", "goto2"); LAi_SetStayType(characterFromID("Quest_Chief_Indian1")); Characters[GetCharacterIndex("Quest_Chief_Indian1")].dialog.CurrentNode = "First time"; RestoreOfficers(PChar.id); PChar.QuestsCheck = true; // Force quest checks to be made every minute. Island_SetReloadEnableLocal("Hispaniola", "reload_2", false); // Disable entry to Boca de Yuman so you can only enter Santo Domingo by sea // Pchar.quest.mona_attack_leave_french_fleet.win_condition.l1 = "MapEnter"; Pchar.quest.mona_attack_leave_french_fleet.win_condition.l1 = "Time"; Pchar.quest.mona_attack_leave_french_fleet.win_condition.l1.time = DAY_TIME_NIGHT; PChar.quest.mona_attack_leave_french_fleet.win_condition = "mona_attack_leave_french_fleet"; Pchar.quest.mona_attack_defeat_French_fleet.win_condition.l1 = "NPC_Death"; Pchar.quest.mona_attack_defeat_French_fleet.win_condition.l1.character = "French_Captain2"; Pchar.quest.mona_attack_defeat_French_fleet.win_condition.l2 = "NPC_Death"; Pchar.quest.mona_attack_defeat_French_fleet.win_condition.l2.character = "French_Captain3"; Pchar.quest.mona_attack_defeat_French_fleet.win_condition.l3 = "NPC_Death"; Pchar.quest.mona_attack_defeat_French_fleet.win_condition.l3.character = "French_Contre-Amiral"; Pchar.quest.mona_attack_defeat_French_fleet.win_condition = "mona_attack_defeat_French_fleet"; Pchar.quest.mona_attack_Martinique.win_condition.l1 = "location"; Pchar.quest.mona_attack_Martinique.win_condition.l1.location = "Falaise_de_fleur_port_01"; PChar.quest.mona_attack_Martinique.win_condition = "mona_attack_french_port"; Pchar.quest.mona_attack_Port_au_Prince.win_condition.l1 = "location"; Pchar.quest.mona_attack_Port_au_Prince.win_condition.l1.location = "PoPrince_Port"; PChar.quest.mona_attack_Port_au_Prince.win_condition = "mona_attack_french_port"; Pchar.quest.mona_attack_Tortuga.win_condition.l1 = "location"; Pchar.quest.mona_attack_Tortuga.win_condition.l1.location = "Tortuga_port"; PChar.quest.mona_attack_Tortuga.win_condition = "mona_attack_french_port"; Pchar.quest.mona_attack_Guadeloupe.win_condition.l1 = "location"; Pchar.quest.mona_attack_Guadeloupe.win_condition.l1.location = "Guadeloupe_Port"; PChar.quest.mona_attack_Guadeloupe.win_condition = "mona_attack_french_port"; Pchar.quest.mona_attack_Marigot.win_condition.l1 = "location"; Pchar.quest.mona_attack_Marigot.win_condition.l1.location = "Marigot_port"; PChar.quest.mona_attack_Marigot.win_condition = "mona_attack_french_port"; PChar.quest.ardent_treachery_status = "planned"; PChar.quest.treachery_invasion_happens.win_condition.l1 = "Timer"; PChar.quest.treachery_invasion_happens.win_condition.l1.date.day = GetAddingDataDay(0, 1, 0); PChar.quest.treachery_invasion_happens.win_condition.l1.date.month = GetAddingDataMonth(0, 1, 0); PChar.quest.treachery_invasion_happens.win_condition.l1.date.year = GetAddingDataYear(0, 1, 0); /* PChar.quest.treachery_invasion_happens.win_condition.l1.date.day = GetAddingDataDay(0, 0, 3); // Trigger Port Royale invasion early for test purposes PChar.quest.treachery_invasion_happens.win_condition.l1.date.month = GetAddingDataMonth(0, 0, 3); PChar.quest.treachery_invasion_happens.win_condition.l1.date.year = GetAddingDataYear(0, 0, 3); */ PChar.quest.treachery_invasion_happens.win_condition = "treachery_invasion_happens"; LAi_QuestDelay("frenchuniform_checks_setup", 0.0); break; case "mona_attack_helen_changes_back": GiveModel2Player("Ardent_F", true); logit("Back to my own ship and back to my own clothes!"); break; case "mona_attack_leave_french_fleet": Pchar.quest.mona_attack_Martinique.over = "yes"; Pchar.quest.mona_attack_Port_au_Prince.over = "yes"; Pchar.quest.mona_attack_Tortuga.over = "yes"; Pchar.quest.mona_attack_Guadeloupe.over = "yes"; Pchar.quest.mona_attack_Marigot.over = "yes"; DeleteAttribute(PChar, "QuestsCheck"); // Restore quest checks to being made less often to restore 3D sailing performance Island_SetReloadEnableLocal("Hispaniola", "reload_2", true); // Boca de Yuman re-opened SetCharacterRemovable(characterFromID("French_Contre-Amiral"), true); SetCharacterRemovable(characterFromID("French_Captain2"), true); SetCharacterRemovable(characterFromID("French_Captain3"), true); RemoveCharacterCompanion(PChar, characterFromID("French_Captain2")); RemoveCharacterCompanion(PChar, characterFromID("French_Captain3")); RemoveCharacterCompanion(PChar, characterFromID("French_Contre-Amiral")); Group_CreateGroup("French Fleet1"); Group_AddCharacter("French Fleet1", "French_Captain2"); Group_AddCharacter("French Fleet1", "French_Captain3"); Group_AddCharacter("French Fleet1", "French_Contre-Amiral"); Group_SetGroupCommander("French Fleet1", "French_Contre-Amiral"); Group_SetAddress("French Fleet1", Characters[GetMainCharacterIndex()].location, "", ""); if (Characters[GetMainCharacterIndex()].location == "") Sea_LoginGroupNow("French Fleet1"); Group_SetTaskAttack("French Fleet1", PLAYER_GROUP, true); Group_LockTask("French Fleet1"); /* SetRMRelation(characterFromID("French_Captain2"), SPAIN, REL_WAR); SetRMRelation(characterFromID("French_Captain3"), SPAIN, REL_WAR); SetRMRelation(characterFromID("French_Contre-Amiral"), SPAIN, REL_WAR); SetRMRelation(characterFromID("French_Contre-Amiral"), ENGLAND, REL_WAR); SetRMRelation(characterFromID("French_Contre-Amiral"), HOLLAND, REL_WAR); SetRMRelation(characterFromID("French_Contre-Amiral"), PORTUGAL, REL_WAR); SetRMRelation(characterFromID("French_Contre-Amiral"), PIRATE, REL_WAR); UpdateRelations(); */ RefreshBattleInterface(true); DeleteAttribute(PChar, "Flags.UseNavalFlag"); if (!CheckAttribute(PChar, "quest.mona_attack.fleet_commander")) { AddQuestRecord("Isla Mona Attack", 12); CloseQuestHeader("Isla Mona Attack"); } else AddQuestRecord("Isla Mona Attack", 13); break; case "mona_attack_defeat_French_fleet": Pchar.quest.mona_attack_Martinique.over = "yes"; Pchar.quest.mona_attack_Port_au_Prince.over = "yes"; Pchar.quest.mona_attack_Tortuga.over = "yes"; Pchar.quest.mona_attack_Guadeloupe.over = "yes"; Pchar.quest.mona_attack_Marigot.over = "yes"; PChar.quest.mona_attack_leave_french_fleet.over = "yes"; DeleteAttribute(PChar, "Flags.UseNavalFlag"); DeleteAttribute(PChar, "QuestsCheck"); // Restore quest checks to being made less often to restore 3D sailing performance Island_SetReloadEnableLocal("Hispaniola", "reload_2", true); // Boca de Yuman re-opened if (!CheckAttribute(PChar, "quest.mona_attack.fleet_commander")) { AddQuestRecord("Isla Mona Attack", 15); CloseQuestHeader("Isla Mona Attack"); } else AddQuestRecord("Isla Mona Attack", 16); break; case "mona_attack_french_port": Pchar.quest.mona_attack_Martinique.over = "yes"; Pchar.quest.mona_attack_Port_au_Prince.over = "yes"; Pchar.quest.mona_attack_Tortuga.over = "yes"; Pchar.quest.mona_attack_Guadeloupe.over = "yes"; Pchar.quest.mona_attack_Marigot.over = "yes"; PChar.quest.mona_attack_leave_french_fleet.over = "yes"; PChar.quest.mona_attack_defeat_French_fleet.over = "yes"; SetCharacterRemovable(characterFromID("French_Contre-Amiral"), true); SetCharacterRemovable(characterFromID("French_Captain2"), true); SetCharacterRemovable(characterFromID("French_Captain3"), true); RemoveCharacterCompanion(PChar, characterFromID("French_Captain2")); RemoveCharacterCompanion(PChar, characterFromID("French_Captain3")); RemoveCharacterCompanion(PChar, characterFromID("French_Contre-Amiral")); DeleteAttribute(PChar, "QuestsCheck"); // Restore quest checks to being made less often to restore 3D sailing performance Island_SetReloadEnableLocal("Hispaniola", "reload_2", true); // Boca de Yuman re-opened DeleteAttribute(PChar, "Flags.UseNavalFlag"); // iForceDetectionFalseFlag = 1; switch(PChar.location) { case "Falaise_de_fleur_port_01": ch = characterFromID("FalaiseDeFleur Commander"); break; case "PoPrince_Port": ch = characterFromID("Port au Prince Commander"); break; case "Tortuga_port": ch = characterFromID("Tortuga Commander"); break; case "Guadeloupe_Port": ch = characterFromID("Pointe a Pitre Commander"); break; case "Marigot_port": ch = characterFromID("Marigot Commander"); break; } ch.PlayerNation = GetCurrentFlag(); ch.PlayerShip = GetCharacterShipModel(PChar); ch.recognized = true; // Trace("Ardent: The " + GetMyShipNameShow(ch) + " will remember us as " + GetNationDescByType(sti(ch.PlayerNation)) + " in a " + ch.PlayerShip); Pchar.quest.mona_attack_leave_French_port.win_condition.l1 = "MapEnter"; Pchar.quest.mona_attack_leave_French_port.win_condition = "mona_attack_leave_French_port"; break; case "mona_attack_leave_French_port": iForceDetectionFalseFlag = 0; break; case "mona_attack_rejoin_fleet": Pchar.quest.mona_attack_Martinique.over = "yes"; Pchar.quest.mona_attack_Port_au_Prince.over = "yes"; Pchar.quest.mona_attack_Tortuga.over = "yes"; Pchar.quest.mona_attack_Guadeloupe.over = "yes"; Pchar.quest.mona_attack_Marigot.over = "yes"; PChar.quest.mona_attack_leave_french_fleet.over = "yes"; PChar.quest.mona_attack_defeat_French_fleet.over = "yes"; StartQuestMovie(true, true, false); DisableFastTravel(true); ch = CharacterFromID(PChar.quest.mona_attack.fleet_commander); PChar.quest.normal_dialog = ch.Dialog.Filename; ch.Dialog.Filename = "crew_dialog.c"; ch.dialog.CurrentNode = "mona_attack_rejoin_fleet"; LAi_SetActorType(ch); LAi_ActorDialog(ch,PChar,"",30.0,30.0); // Exits to "mona_attack_goto_shipyard" or "mona_attack_rejoin_fleet2" break; case "mona_attack_rejoin_fleet2": EndQuestMovie(); DisableFastTravel(false); for (n=1; n 0) PChar.quest.hunt.(temp) = characters[cc].id; else PChar.quest.hunt.(temp) = "*NULL*"; } StorePassengers(PChar.id); PChar.isnotcaptain = true; // You're not a captain now, you're a prisoner if (CheckQuestAttribute("hunt_romance_on_ship", "true")) { LAi_SetActorType(romance); ChangeCharacterAddressGroup(romance, "hold1", "rld", "loc1"); } RemoveCharacterEquip(PChar, GUN_ITEM_TYPE); RemoveCharacterEquip(PChar, BLADE_ITEM_TYPE); TempRemoveItems(PChar); GiveItem2Character(PChar, "bladeX4"); EquipCharacterByItem(PChar, "bladeX4"); StartQuestMovie(true, true, false); DisableFastTravel(true); LAi_SetActorType(PChar); LAi_ActorSetSitMode(PChar); // LAi_type_actor_Reset(PChar); LAi_ActorWaitDialog(PChar, villain); LAi_SetActorType(villain); Characters[villainidx].dialog.CurrentNode = "hunt_with_villain_in_hold"; LAi_ActorDialog(villain,PChar,"",5.0,5.0); // Exits to "hunt_romance_joins_villain" or "hunt_villain_leaves_hold" break; case "hunt_romance_joins_villain": LAi_ActorSetSitMode(PChar); LAi_ActorWaitDialog(PChar, romance); LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "hunt_join_villain"; LAi_ActorDialog(romance,PChar,"hunt_that_how_it_is",5.0,5.0); break; case "hunt_that_how_it_is": LAi_ActorSetSitMode(PChar); LAi_ActorWaitDialog(PChar, villain); LAi_SetActorType(villain); Characters[villainidx].dialog.CurrentNode = "hunt_that_how_it_is"; LAi_ActorDialog(villain,PChar,"hunt_villain_leaves_hold",5.0,5.0); break; case "hunt_villain_leaves_hold": Preprocessor_AddQuestData("villain", GetMySimpleName(villain)); if (CheckQuestAttribute("hunt_romance_on_ship", "true")) { Preprocessor_AddQuestData("romance", GetMySimpleName(romance)); Preprocessor_AddQuestData("pronoun", XI_ConvertString(GetMyPronounObj(characterFromID(PChar.quest.villain)))); AddQuestRecord("Villain_Hunt", 16); Preprocessor_Remove("pronoun"); Preprocessor_Remove("romance"); } else { AddQuestRecord("Villain_Hunt", 15); } Preprocessor_Remove("villain"); LAi_SetActorType(villain); LAi_ActorGoToLocation(villain, "reload", "reload1", "None", "", "", "hunt_hold_time_passes", 20.0); if (Characters[romanceidx].location == PChar.location) { LAi_SetActorType(romance); LAi_ActorGoToLocation(romance, "reload", "reload1", "None", "", "", "", 20.0); } break; case "hunt_hold_time_passes": WaitDate("", 0, 0, 10 + rand(5), 0, 0); PChar.location.from_sea = "PoPrince_Port"; SetFleetInTown(GetTownIDFromLocID(pchar.location.from_sea), "PChar"); LAi_QuestDelay("hunt_still_stuck_in_hold", 2.0); break; case "hunt_still_stuck_in_hold": DoQuestReloadToLocation("hold1", "rld", "prison4", "hunt_setup_hold_escape"); break; case "hunt_setup_hold_escape": LAi_ActorSetSitMode(PChar); for (n=1; n<3; n++) { temp = "m" + (rand(5) + 1); sld = LAi_CreateFantomCharacter(false, 1, true, true, 0.25, Nations[PIRATE].fantomModel.(temp), "reload", "reload" + n); sld.id = "Hold guard " + n; sld.nation = ENGLAND; SetRandomNameToCharacter(sld); LAi_SetActorType(sld); } if (CheckQuestAttribute("hunt_romance_on_ship", "true")) { LAi_SetActorType(romance); ChangeCharacterAddressGroup(romance, "hold1", "rld", "loc1"); LAi_QuestDelay("hunt_romance_rescue", 0.0); } else { LAi_SetActorType(CharacterFromID("Steven Seagull")); ChangeCharacterAddressGroup(CharacterFromID("Steven Seagull"), "hold1", "rld", "loc1"); LAi_QuestDelay("hunt_seagull_rescue", 0.0); } break; case "hunt_romance_rescue": PlaySound("OBJECTS\VOICES\DEAD\male\dead1.wav"); Lai_KillCharacter(CharacterFromID("Hold guard 1")); LAi_QuestDelay("hunt_romance_rescue2", 1.0); break; case "hunt_romance_rescue2": LAi_ActorSetSitMode(PChar); LAi_ActorWaitDialog(PChar, romance); LAi_SetActorType(romance); Characters[romanceidx].dialog.CurrentNode = "hunt_release_you"; LAi_ActorDialog(romance,PChar,"hunt_romance_rescue3",5.0,5.0); break; case "hunt_romance_rescue3": LAi_SetPlayerType(PChar); Characters[romanceidx].dialog.CurrentNode = "hunt_take_knife"; LAi_ActorDialog(romance,PChar,"hunt_release_player",5.0,5.0); break; case "hunt_seagull_rescue": PlaySound("OBJECTS\DUEL\chalice.wav"); Lai_KillCharacter(CharacterFromID("Hold guard 1")); LAi_QuestDelay("hunt_seagull_rescue2", 1.0); break; case "hunt_seagull_rescue2": LAi_ActorSetSitMode(PChar); LAi_ActorWaitDialog(PChar, CharacterFromID("Steven Seagull")); LAi_SetActorType(CharacterFromID("Steven Seagull")); characters[GetCharacterIndex("Steven Seagull")].Dialog.Filename = "crew_dialog.c"; characters[GetCharacterIndex("Steven Seagull")].dialog.CurrentNode = "hunt_release_you"; LAi_ActorDialog(CharacterFromID("Steven Seagull"),PChar,"hunt_seagull_rescue3",5.0,5.0); break; case "hunt_seagull_rescue3": LAi_SetPlayerType(PChar); Characters[GetCharacterIndex("Steven Seagull")].dialog.CurrentNode = "hunt_take_knife"; LAi_ActorDialog(CharacterFromID("Steven Seagull"),PChar,"hunt_release_player",5.0,5.0); break; case "hunt_release_player": if (CheckQuestAttribute("hunt_romance_on_ship", "true")) LAi_SetCitizenType(romance); else LAi_SetCitizenType(CharacterFromID("Steven Seagull")); LAi_SetActorType(characterFromID("Hold guard 2")); LAi_ActorAttack(characterfromID("Hold guard 2"), PChar, ""); Pchar.quest.hunt_second_guard_beaten.win_condition.l1 = "NPC_death"; Pchar.quest.hunt_second_guard_beaten.win_condition.l1.character = "Hold guard 2"; Pchar.quest.hunt_second_guard_beaten.win_condition = "hunt_second_guard_beaten"; break; case "hunt_second_guard_beaten": LAi_SetFightMode(PChar, false); if (CheckQuestAttribute("hunt_romance_on_ship", "true")) { LAi_SetActorType(romance); Characters[romanceidx].dialog.currentNode = "hunt_explain_deceit"; LAi_ActorDialog(romance,PChar,"hunt_find_equipment",5.0,5.0); } else { LAi_SetActorType(CharacterFromID("Steven Seagull")); characters[GetCharacterIndex("Steven Seagull")].dialog.CurrentNode = "hunt_well_done"; LAi_ActorDialog(CharacterFromID("Steven Seagull"),PChar,"hunt_find_equipment",5.0,5.0); } break; case "hunt_find_equipment": Pchar.quest.hunt_get_equipment.win_condition.l1 = "locator"; Pchar.quest.hunt_get_equipment.win_condition.l1.location = PChar.location; Pchar.quest.hunt_get_equipment.win_condition.l1.locator_group = "box"; Pchar.quest.hunt_get_equipment.win_condition.l1.locator = "box1"; PChar.quest.hunt_get_equipment.win_condition = "hunt_get_equipment"; break; case "hunt_get_equipment": RestoreTempRemovedItems(PChar); PlayStereoSound("interface\important_item.wav"); logit("You found your equipment. Equip some of it!"); EndQuestMovie(); DisableFastTravel(true); PChar.vcskip = "true"; Pchar.quest.hunt_deck_battle_setup.win_condition.l1 = "locator"; Pchar.quest.hunt_deck_battle_setup.win_condition.l1.location = PChar.location; Pchar.quest.hunt_deck_battle_setup.win_condition.l1.locator_group = "reload"; Pchar.quest.hunt_deck_battle_setup.win_condition.l1.locator = "reload1"; PChar.quest.hunt_deck_battle_setup.win_condition = "hunt_go_up_to_deck"; break; case "hunt_go_up_to_deck": if (CheckQuestAttribute("hunt_romance_on_ship", "true")) { LAi_SetActorType(romance); LAi_ActorFollowEverywhere(romance, "", 10.0); ChangeCharacterAddressGroup(romance, GetCharacterShipQDeck(PChar), "rld", "startloc"); } DoQuestReloadToLocation(GetCharacterShipQDeck(PChar), "reload", "reload1", "hunt_deck_battle_setup"); break; case "hunt_deck_battle_setup": StartQuestMovie(true, true, false); DeleteAttribute(PChar, "vcskip"); if (CheckQuestAttribute("hunt_romance_on_ship", "true")) SetOfficersIndex(Pchar, 3, romanceidx); for (n=1; n<5; n++) { temp = "m" + (rand(5) + 1); sld = LAi_CreateFantomCharacter(false, 1, true, true, 0.25, Nations[PIRATE].fantomModel.(temp), "", ""); sld.id = "Deck crew " + n; sld.nation = ENGLAND; SetRandomNameToCharacter(sld); LAi_SetWarriorType(sld); LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS"); } LAi_group_SetRelation("FRANCE_SOLDIERS", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY); LAi_group_FightGroups("FRANCE_SOLDIERS", LAI_GROUP_PLAYER, true); LAi_group_SetCheck("FRANCE_SOLDIERS", "hunt_deck_battle_won"); break; case "hunt_deck_battle_won": EndQuestMovie(); DisableFastTravel(true); DoQuestReloadToLocation("PoPrince_Port", "reload", "reload2_back", "hunt_port_au_prince_arrival"); break; case "hunt_port_au_prince_arrival": LAi_SetFightMode(PChar, false); Locations[FindLocation("PoPrince_Port")].reload.l4.disable = 1; // Lock ship bQuestDisableSeaEnter = true; Locations[FindLocation("Buccaneers_Camp")].reload.l4.disable = 0; // Unlock forger's house - not needed if Lucia or Edmundo is with you but allow it anyway PChar.quest.ardent_hunt_status = "need_forger"; if (isofficer(romance)) { LAi_SetActorType(romance); Characters[romanceidx].dialog.currentNode = "hunt_rescue_crew_how"; LAi_ActorDialog(romance,PChar,"hunt_port_au_prince_arrival2",5.0,5.0); } else { Pchar.dialog.CurrentNode = "hunt_how_to_save_crew"; LAi_SetActorType(PChar); LAi_ActorSelfDialog(PChar, "hunt_port_au_prince_arrival2_no_romance"); } break; case "hunt_port_au_prince_arrival2": LAi_SetOfficerType(romance); SetCharacterRemovable(romance, false); LAi_SetImmortal(romance, true); Preprocessor_AddQuestData("villain", GetMySimpleName(villain)); Preprocessor_AddQuestData("romance", GetMySimpleName(romance)); Preprocessor_AddQuestData("pronoun", XI_ConvertString(GetMyPronounSubj(characterFromID(PChar.quest.romance)))); if (PChar.sex == "man") Preprocessor_AddQuestData("pronoun3", XI_ConvertString("her")); else Preprocessor_AddQuestData("pronoun3", XI_ConvertString("his")); Preprocessor_AddQuestData("villain_pronoun", XI_ConvertString(GetMyPronounObj(characterFromID(PChar.quest.villain)))); AddQuestRecord("Villain_Hunt", 18); Preprocessor_Remove("villain_pronoun"); Preprocessor_Remove("pronoun3"); Preprocessor_Remove("pronoun"); Preprocessor_Remove("romance"); Preprocessor_Remove("villain"); LAi_QuestDelay("hunt_port_au_prince_arrival3", 0.0); break; case "hunt_port_au_prince_arrival2_no_romance": Preprocessor_AddQuestData("villain", GetMySimpleName(villain)); AddQuestRecord("Villain_Hunt", 17); Preprocessor_Remove("villain"); LAi_SetPlayerType(PChar); LAi_QuestDelay("hunt_port_au_prince_arrival3", 0.0); break; case "hunt_port_au_prince_arrival3": Locations[FindLocation("PoPrince_town")].locators_radius.officers.reload10_3 = 2.5; Pchar.quest.hunt_found_backdoor.win_condition.l1 = "locator"; Pchar.quest.hunt_found_backdoor.win_condition.l1.location = "PoPrince_town"; Pchar.quest.hunt_found_backdoor.win_condition.l1.locator_group = "officers"; Pchar.quest.hunt_found_backdoor.win_condition.l1.locator = "reload10_3"; Pchar.quest.hunt_found_backdoor.win_condition = "hunt_found_backdoor"; i = GetRMRelationType(GetRMRelation(PChar,FRANCE)); if (i != RELATION_FRIEND) { PChar.quest.hunt_signature_from_governor.win_condition.l1 = "relation"; if (i == RELATION_ENEMY) PChar.quest.hunt_signature_from_governor.win_condition.l1.relation = "Neutral"; else PChar.quest.hunt_signature_from_governor.win_condition.l1.relation = "Friendly"; PChar.quest.hunt_signature_from_governor.win_condition.l1.nation = "FRANCE"; PChar.quest.hunt_signature_from_governor.win_condition.l2 = "location"; PChar.quest.hunt_signature_from_governor.win_condition.l2.location = "PoPrince_townhall"; PChar.quest.hunt_signature_from_governor.win_condition = "hunt_signature_from_governor"; } LAi_QuestDelay("hunt_fort_setup", 0.0); break; case "hunt_signature_from_governor": Pchar.quest.hunt_found_backdoor.over = "yes"; i = GetRMRelationType(GetRMRelation(PChar,FRANCE)); if (i == RELATION_NEUTRAL) { AddQuestRecord("Villain_Hunt", 27); PChar.quest.hunt_found_document = "pardon"; } if (i == RELATION_FRIEND) { AddQuestRecord("Villain_Hunt", 28); PChar.quest.hunt_found_document = "Letter or Marque"; } if (i != RELATION_NEUTRAL && i != RELATION_FRIEND) // If this ever happens, I want to know why! - GR { AddQuestRecord("Villain_Hunt", 29); PChar.quest.hunt_found_document = "document"; } if (isofficer(romance)) Characters[romanceidx].dialog.currentNode = "hunt_consider_forgery"; break; case "hunt_found_backdoor": LAi_SetActorType(PChar); LAi_ActorTurnToLocator(PChar, "reload", "reload20"); LAi_QuestDelay("hunt_found_backdoor2", 3.0); break; case "hunt_found_backdoor2": if (isofficer(romance)) { LAi_ActorWaitDialog(PChar, romance); LAi_SetActorType(romance); Characters[romanceidx].dialog.currentNode = "hunt_seen_backdoor"; LAi_ActorDialog(romance,PChar,"hunt_found_backdoor3",25.0,25.0); } else { Pchar.dialog.CurrentNode = "hunt_residence_backdoor"; LAi_SetActorType(PChar); LAi_ActorSelfDialog(PChar, "hunt_found_backdoor3"); } break; case "hunt_found_backdoor3": if (isofficer(romance)) LAi_SetOfficerType(romance); LAi_SetPlayerType(PChar); Locations[FindLocation("PoPrince_town")].locators_radius.officers.reload10_3 = 1.0; Pchar.quest.hunt_unlock_backdoor.win_condition.l1 = "locator"; Pchar.quest.hunt_unlock_backdoor.win_condition.l1.location = "PoPrince_town"; Pchar.quest.hunt_unlock_backdoor.win_condition.l1.locator_group = "reload"; Pchar.quest.hunt_unlock_backdoor.win_condition.l1.locator = "reload20"; Pchar.quest.hunt_unlock_backdoor.win_condition.l2 = "Time"; Pchar.quest.hunt_unlock_backdoor.win_condition.l2.time = DAY_TIME_NIGHT; Pchar.quest.hunt_unlock_backdoor.win_condition = "hunt_unlock_backdoor"; break; case "hunt_unlock_backdoor": logit("The lock on this door must date back to the time when this town was Spanish."); logit("It opens with the same key that you used to escape from Havana prison!"); TakeItemFromCharacter(PChar, "key3"); // Key will not be needed again, so dump it to tidy inventory PlaySound("PEOPLE\lockpick2.wav"); Locations[FindLocation("PoPrince_town")].reload.l40.disable = false; Locations[FindLocation("PoPrince_archive")].locators_radius.sit.sit1 = 1.8; Pchar.quest.hunt_got_autograph_archive.win_condition.l1 = "locator"; Pchar.quest.hunt_got_autograph_archive.win_condition.l1.location = "PoPrince_archive"; Pchar.quest.hunt_got_autograph_archive.win_condition.l1.locator_group = "sit"; Pchar.quest.hunt_got_autograph_archive.win_condition.l1.locator = "sit1"; Pchar.quest.hunt_got_autograph_archive.win_condition = "hunt_got_autograph_archive"; break; case "hunt_got_autograph_archive": // LAi_Fade("hunt_got_autograph", "hunt_been_to_archive"); LAi_QuestDelay("hunt_got_autograph", 0.1); LAi_QuestDelay("hunt_been_to_archive", 0.1); break; case "hunt_been_to_archive": Pchar.dialog.CurrentNode = "hunt_found_signature"; LAi_SetActorType(PChar); LAi_ActorSelfDialog(PChar, "player_back"); AddQuestRecord("Villain_Hunt", 24); if (isofficer(romance)) { PChar.quest.hunt_romance_says_goto_tavern.win_condition.l1 = "location"; PChar.quest.hunt_romance_says_goto_tavern.win_condition.l1.location = "PoPrince_town"; PChar.quest.hunt_romance_says_goto_tavern.win_condition = "hunt_romance_says_goto_tavern"; } Locations[FindLocation("PoPrince_town")].reload.l40.label = "Archives"; locations[FindLocation("PoPrince_archive")].id.label = "Archives"; break; case "hunt_got_autograph": PChar.quest.hunt_found_document = "document"; PChar.quest.hunt_signature_from_governor.over = "yes"; break; case "hunt_romance_says_goto_tavern": Locations[FindLocation("PoPrince_town")].reload.l40.disable = 1; LAi_SetActorType(romance); ChangeCharacterAddressGroup(romance, "PoPrince_town", "reload", "reload9"); LAi_ActorTurnToLocator(romance, "reload", "reload20"); LAi_QuestDelay("hunt_romance_says_goto_tavern2", 0.1); break; case "hunt_romance_says_goto_tavern2": LAi_SetActorType(PChar); LAi_ActorWaitDialog(PChar, romance); Characters[romanceidx].dialog.currentNode = "hunt_did_you_get_it"; LAi_ActorDialogNow(romance, PChar, "",0.3); // Exits to "hunt_with_romance_to_tavern" break; case "hunt_with_romance_to_tavern": Locations[FindLocation("PoPrince_town")].reload.l40.disable = 0; LAi_SetPlayerType(PChar); // LAi_SetActorType(romance); // LAi_ActorFollowEverywhere(romance, "", 10.0); LAi_SetOfficerType(romance); PChar.quest.hunt_romance_forges_papers.win_condition.l1 = "location"; PChar.quest.hunt_romance_forges_papers.win_condition.l1.location = "PoPrince_tavern_upstairs"; PChar.quest.hunt_romance_forges_papers.win_condition = "hunt_romance_forges_papers"; break; case "hunt_romance_forges_papers": DisableFastTravel(true); ChangeCharacterAddressGroup(romance, "PoPrince_tavern_upstairs", "goto", "goto2"); ChangeCharacterAddressGroup(PChar, "PoPrince_tavern_upstairs", "goto", "goto4"); LAi_SetActorType(PChar); LAi_ActorWaitDialog(PChar, romance); LAi_SetActorType(romance); Characters[romanceidx].dialog.currentNode = "hunt_document_done"; LAi_ActorDialog(romance,PChar,"hunt_romance_forges_papers_done",5.0,5.0); break; case "hunt_romance_forges_papers_done": GiveItem2Character(PChar, "fake_fort_release"); AddQuestRecord("Villain_Hunt", 20); PChar.quest.hunt_document_type = "transfer"; PChar.quest.ardent_hunt_status = "got_release_document"; // DisableFastTravel(false); LAi_SetPlayerType(PChar); LAi_SetOfficerType(romance); SetCharacterRemovable(romance, true); LAi_SetImmortal(romance, false); PChar.quest.hunt_change_into_uniform.win_condition.l1 = "ExitFromLocation"; PChar.quest.hunt_change_into_uniform.win_condition.l1.location = PChar.location; PChar.quest.hunt_change_into_uniform.win_condition = "hunt_change_into_uniform"; break; case "hunt_change_into_uniform": if (PChar.sex == "man") SetModelFromID(PChar, "Ardent_Fr"); else { SetModelFromID(PChar, "Ardent_FrF"); Pchar.quest.hunt_helen_changes_back.win_condition.l1 = "location"; Pchar.quest.hunt_helen_changes_back.win_condition.l1.location = "Hispaniola"; PChar.quest.hunt_helen_changes_back.win_condition = "hunt_helen_changes_back"; Pchar.quest.hunt_helen_changes_back_deck.win_condition.l1 = "location"; Pchar.quest.hunt_helen_changes_back_deck.win_condition.l1.location = GetCharacterShipQDeck(PChar); PChar.quest.hunt_helen_changes_back_deck.win_condition = "hunt_helen_changes_back"; } break; case "hunt_helen_changes_back": Pchar.quest.hunt_helen_changes_back.over = "yes"; Pchar.quest.hunt_helen_changes_back_deck.over = "yes"; if (PChar.sex == "woman" && PChar.model == "Ardent_FrF") SetModelFromID(PChar, "Ardent_F"); break; case "hunt_prepare_forger": // Triggered by dialog with Florentin Destot, Buccaneer Camp tavernkeeper Characters[GetCharacterIndex("Pablo Escriva")].dialog.currentNode = "ask_for_document"; Locations[FindLocation("Buccaneers_Camp")].reload.l4.disable = 0; break; case "hunt_forger_come_back_tomorrow": // Triggered by dialog with Pablo Escriva AddQuestRecord("Villain_Hunt", 26); PChar.quest.hunt_forger_next_day.win_condition.l1 = "Timer"; PChar.quest.hunt_forger_next_day.win_condition.l1.date.day = GetAddingDataDay(0, 0, 1); PChar.quest.hunt_forger_next_day.win_condition.l1.date.month = GetAddingDataMonth(0, 0, 1); PChar.quest.hunt_forger_next_day.win_condition.l1.date.year = GetAddingDataYear(0, 0, 1); PChar.quest.hunt_forger_next_day.win_condition = "hunt_forger_next_day"; break; case "hunt_forger_next_day": Characters[GetCharacterIndex("Pablo Escriva")].dialog.currentNode = "hunt_document_done"; break; case "hunt_forger_document_done": GiveItem2Character(PChar, "fake_fort_release"); PChar.quest.ardent_hunt_status = "got_release_document"; DeleteQuestAttribute("hunt_document_price"); DeleteQuestAttribute("hunt_found_document"); if (CheckQuestAttribute("hunt_document_type", "requisition")) { AddQuestRecord("Villain_Hunt", 25); } else { AddQuestRecord("Villain_Hunt", 20); PChar.quest.hunt_change_into_uniform.win_condition.l1 = "ExitFromLocation"; PChar.quest.hunt_change_into_uniform.win_condition.l1.location = PChar.location; PChar.quest.hunt_change_into_uniform.win_condition = "hunt_change_into_uniform"; } break; case "hunt_fort_setup": Locations[FindLocation("PoPrince_fakefort3")].vcskip = true; i = 0; PChar.quest.speaker = ""; for (n=1; n 10) break; } } ChangeCharacterAddressGroup(CharacterFromID("Ralph Partridge"), "PoPrince_fakefort3", "rld", "loc11"); LAi_SetCitizenType(CharacterFromID("Ralph Partridge")); ChangeCharacterAddressGroup(CharacterFromID("Coper Blumberger"), "PoPrince_fakefort3", "rld", "loc12"); LAi_SetCitizenType(CharacterFromID("Coper Blumberger")); ChangeCharacterAddressGroup(CharacterFromID("Amtónio Guajira"), "PoPrince_fakefort3", "rld", "loc13"); LAi_SetCitizenType(CharacterFromID("Amtónio Guajira")); RemoveCharacterEquip(CharacterFromID("Ralph Partridge"), BLADE_ITEM_TYPE); RemoveCharacterEquip(CharacterFromID("Coper Blumberger"), BLADE_ITEM_TYPE); RemoveCharacterEquip(CharacterFromID("Amtónio Guajira"), BLADE_ITEM_TYPE); TempRemoveItems(CharacterFromID("Ralph Partridge")); TempRemoveItems(CharacterFromID("Coper Blumberger")); TempRemoveItems(CharacterFromID("Amtónio Guajira")); if (PChar.quest.speaker == "") PChar.quest.speaker = "Ralph Partridge"; ChangeCharacterAddressGroup(characterFromID("Fort_guard"), "PoPrince_fakefort3", "goto", "goto4"); characters[GetCharacterIndex("Fort_guard")].Dialog.Filename = "guard_dialog.c"; characters[GetCharacterIndex("Fort_guard")].dialog.CurrentNode = "hunt_rescue_crew_from_prison"; Pchar.quest.hunt_rescue_crew_from_prison.win_condition.l1 = "location"; Pchar.quest.hunt_rescue_crew_from_prison.win_condition.l1.location = "PoPrince_fakefort3"; PChar.quest.hunt_rescue_crew_from_prison.win_condition = "hunt_rescue_crew_from_prison"; break; case "hunt_rescue_crew_from_prison": GiveSoldierWeapon(CharacterFromID("Fort_guard"), FRANCE); LAi_SetFightMode(PChar, false); LAi_LocationFightDisable(&Locations[FindLocation("PoPrince_fakefort3")], true); StartQuestMovie(true, true, false); LAi_SetActorType(characterfromID("Fort_guard")); LAi_ActorTurnToLocator(characterfromID("Fort_guard"), "reload", "reloadc1"); LAi_SetStayType(characterfromID("Fort_guard")); crewidx = GetCharacterIndex(PChar.quest.speaker); crewref = CharacterFromID(PChar.quest.speaker); PChar.quest.normal_dialog = characters[crewidx].Dialog.Filename; LAi_SetActorType(crewref); characters[crewidx].Dialog.Filename = "crew_dialog.c"; characters[crewidx].dialog.CurrentNode = "hunt_rescue_crew_from_prison"; LAi_ActorDialog(crewref,PChar,"hunt_rescue_crew_from_prison2",60.0,60.0); break; case "hunt_rescue_crew_from_prison2": LAi_SetCitizenType(CharacterFromID(PChar.quest.speaker)); characters[GetCharacterIndex(PChar.quest.speaker)].Dialog.Filename = PChar.quest.normal_dialog; LAi_SetActorType(characterfromID("Fort_guard")); characters[GetCharacterIndex("Fort_guard")].Dialog.Filename = "guard_dialog.c"; characters[GetCharacterIndex("Fort_guard")].dialog.CurrentNode = "hunt_fort_what_business"; LAi_ActorDialog(characterfromID("Fort_guard"),PChar,"",60.0,60.0); // Exits to "hunt_fort_crew_released" or "hunt_fort_fight" break; case "hunt_fort_fight": Pchar.quest.hunt_found_backdoor.over = "yes"; // In case you'd started down the forgery route and then switched to the fight route PChar.quest.hunt_signature_from_governor.over = "yes"; LAi_LocationFightDisable(&Locations[FindLocation("PoPrince_fakefort3")], false); LAi_ActorAttack(characterfromID("Fort_guard"), PChar, ""); Pchar.quest.hunt_fort_violent_escape.win_condition.l1 = "NPC_death"; Pchar.quest.hunt_fort_violent_escape.win_condition.l1.character = "Fort_guard"; Pchar.quest.hunt_fort_violent_escape.win_condition = "hunt_fort_violent_escape"; break; case "hunt_fort_violent_escape": LAi_SetFightMode(PChar, false); LAi_LocationFightDisable(&Locations[FindLocation("PoPrince_fakefort3")], true); crewidx = GetCharacterIndex(PChar.quest.speaker); crewref = CharacterFromID(PChar.quest.speaker); PChar.quest.normal_dialog = characters[crewidx].Dialog.Filename; LAi_SetActorType(crewref); characters[crewidx].Dialog.Filename = "crew_dialog.c"; characters[crewidx].dialog.CurrentNode = "hunt_rescue_crew_what_now"; LAi_ActorDialog(crewref,PChar,"hunt_fort_violent_escape2",60.0,60.0); break; case "hunt_fort_violent_escape2": characters[GetCharacterIndex(PChar.quest.speaker)].Dialog.Filename = PChar.quest.normal_dialog; LAi_LocationFightDisable(&Locations[FindLocation("PoPrince_fakefort3")], false); EndQuestMovie(); RestorePassengers(PChar.id); PChar.quest.hunt_fort_alarm.win_condition.l1 = "ExitFromLocation"; PChar.quest.hunt_fort_alarm.win_condition.l1.location = PChar.location; PChar.quest.hunt_fort_alarm.win_condition = "hunt_fort_alarm"; Pchar.quest.hunt_fort_to_town.win_condition.l1 = "location"; Pchar.quest.hunt_fort_to_town.win_condition.l1.location = "PoPrince_town"; PChar.quest.hunt_fort_to_town.win_condition = "hunt_out_of_fort"; Pchar.quest.hunt_fort_to_jungle.win_condition.l1 = "location"; Pchar.quest.hunt_fort_to_jungle.win_condition.l1.location = "Hispaniola_Jungle_06"; PChar.quest.hunt_fort_to_jungle.win_condition = "hunt_out_of_fort"; break; case "hunt_fort_alarm": if (PChar.location != "PoPrince_town" && PChar.location != "Hispaniola_Jungle_06") { PlaySound("AMBIENT\TOWN\Alarm.wav"); LAi_group_SetRelation("FRANCE_SOLDIERS", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY); LAi_group_FightGroups("FRANCE_SOLDIERS", LAI_GROUP_PLAYER, true); } LAi_QuestDelay("hunt_fort_alarm2", 0.0); break; case "hunt_fort_alarm2": DeleteQuestAttribute("hunt_fort_alarm"); if (PChar.location != "PoPrince_town" && PChar.location != "Hispaniola_Jungle_06") { PChar.quest.hunt_fort_alarm.win_condition.l1 = "ExitFromLocation"; PChar.quest.hunt_fort_alarm.win_condition.l1.location = PChar.location; PChar.quest.hunt_fort_alarm.win_condition = "hunt_fort_alarm"; } break; case "hunt_fort_crew_released": LAi_LocationFightDisable(&Locations[FindLocation("PoPrince_fakefort3")], false); RestorePassengers(PChar.id); EndQuestMovie(); TakeItemFromCharacter(PChar, "fake_fort_release"); for (n=1; n 0) { AddQuestRecord("Villain_Hunt", 22); } else { AddQuestRecord("Villain_Hunt", 21); } } Preprocessor_Remove("villain"); if (PChar.quest.speaker != "Ralph Partridge") { crewidx = GetCharacterIndex(PChar.quest.speaker); crewref = CharacterFromID(PChar.quest.speaker); PChar.quest.normal_dialog = characters[crewidx].Dialog.Filename; characters[crewidx].Dialog.Filename = "crew_dialog.c"; characters[crewidx].dialog.CurrentNode = "hunt_rescue_glad_to_be_out"; LAi_SetActorType(crewref); LAi_ActorDialog(crewref,PChar,"hunt_out_of_fort2",10.0,10.0); } else DeleteQuestAttribute("speaker"); DeleteAttribute(PChar, "isnotcaptain"); DeleteQuestAttribute("hunt_document_type"); DeleteQuestAttribute("hunt_found_document"); if (CheckCharacterItem(PChar, "fake_fort_release")) TakeItemFromCharacter(PChar, "fake_fort_release"); if(AUTO_SKILL_SYSTEM) { AddPartyExpChar(pchar, "Leadership", 1500); AddPartyExpChar(PChar, "", 150); AddPartyExpChar(pchar, "Sneak", 150); } else {AddPartyExp(pchar, 1800);} Pchar.quest.hunt_back_to_sea.win_condition.l1 = "location"; Pchar.quest.hunt_back_to_sea.win_condition.l1.location = "Hispaniola"; PChar.quest.hunt_back_to_sea.win_condition = "hunt_back_to_ship"; Pchar.quest.hunt_back_on_deck.win_condition.l1 = "location"; Pchar.quest.hunt_back_on_deck.win_condition.l1.location = GetCharacterShipQDeck(PChar); PChar.quest.hunt_back_on_deck.win_condition = "hunt_back_to_ship"; break; case "hunt_out_of_fort2": LAi_SetOfficerType(CharacterFromId(PChar.quest.speaker)); characters[GetCharacterIndex(PChar.quest.speaker)].Dialog.Filename = PChar.quest.normal_dialog; DeleteQuestAttribute("speaker"); break; case "hunt_back_to_ship": Pchar.quest.hunt_back_to_sea.over = "yes"; Pchar.quest.hunt_back_on_deck.over = "yes"; CloseQuestHeader("Villain_Hunt"); for (n=1; n