//Load into prison
case "to_turks_prison_load":
Locations[FindLocation("Fake_Turks_prison")].vcskip = true;
DoQuestReloadToLocation("Fake_Turks_prison", "goto", "goto16" ,"_");
DisableFastTravel(true);
//spawn npcs
ChangeCharacterAddressGroup(CharacterFromID("prison_guard_captain"),"Fake_Turks_prison","officers","reload1_1");
ChangeCharacterAddressGroup(CharacterFromID("turks_prison_guard1"),"Fake_Turks_prison","goto","goto14");
ChangeCharacterAddressGroup(CharacterFromID("Atwood Paddley"),"Fake_Turks_prison","goto","goto9");
ChangeCharacterAddressGroup(CharacterFromID("Pirates_1"),"Fake_Turks_prison","officers","reload1_2");
ChangeCharacterAddressGroup(CharacterFromID("Pirates_2"),"Fake_Turks_prison","goto","goto13");
ChangeCharacterAddressGroup(CharacterFromID("Pirates_3"),"Fake_Turks_prison","goto","goto18");
ChangeCharacterAddressGroup(CharacterFromID("Pirates_4"),"Fake_Turks_prison","goto","goto21");
//Talk to captain again in prison
LAi_SetActorType(characterfromID("prison_guard_captain"));
LAi_ActorDialog(characterFromID("prison_guard_captain"),PChar,"",1.0,1.0);
Characters[GetCharacterIndex("prison_guard_captain")].dialog.currentnode = "turks_prison_inside";
Characters[GetCharacterIndex("Atwood Paddley")].dialog.currentnode = "turks_prison";
break;
//Player Choise 1 - surrender
//Walk me to cell
case "turks_prison_captured_walk":
//Disable always run switch
AlwaysRunToggle = false;
//Here goes walk to Atwood cell locators and fade pchar into cell locator
break;
//Player Choise 2 - fight
//Shoot captain kill him
case "turks_prison_figh_guards":
LAi_SetActorType(pchar);
LAi_ActorAttack(pchar,characterfromID("prison_guard_captain"), "");
LAi_QuestDelay("kill_prioson_captain", 2.7);
break;
case "kill_prioson_captain":
LAi_SetStayType(pchar);
Lai_KillCharacter(characterfromID("prison_guard_captain"));
LAi_QuestDelay("fight_prepare", 2.0);
break;
//Draw sword again TODO: Maake player keep the blade drawn
case "fight_prepare":
LAi_SetPlayerType(pchar);
LAi_SetFightMode(pchar, true);
LAi_SetImmortal(pchar, true); //REMOVE LATER WHEN QUEST DONE!!
LAi_QuestDelay("prison_guards_attack1", 0.2);
break;
//First 3 Guards attack player
case "prison_guards_attack1":
LAi_SetActorType(characterfromID("Pirates_1"));
LAi_SetActorType(characterfromID("Pirates_3"));
LAi_SetActorType(characterfromID("turks_prison_guard1"));
LAi_ActorAttack(characterfromID("turks_prison_guard1"),pchar, "");
LAi_ActorAttack(characterfromID("Pirates_1"),pchar, "");
LAi_ActorAttack(characterfromID("Pirates_3"),pchar, "");
PChar.quest.KilledFighting.win_condition.l1 = "NPC_Death";
PChar.quest.KilledFighting.win_condition.l1.character = PChar.id;
PChar.quest.KilledFighting.win_condition = "KilledFighting";
pchar.quest.prison_guards_attack2_self.win_condition.l1 = "locator";
pchar.quest.prison_guards_attack2_self.win_condition.l1.location = "Fake_Turks_prison";
pchar.quest.prison_guards_attack2_self.win_condition.l1.locator_group = "merchant";
pchar.quest.prison_guards_attack2_self.win_condition.l1.locator = "reload13";
pchar.quest.prison_guards_attack2_self.win_condition = "prison_guards_attack2_self";
break;
//Talk to self when reaching locator, think where to find Atwood
case "prison_guards_attack2_self":
LAi_SetActorType(Pchar);
Pchar.Temp.self.dialog = Pchar.dialog.currentnode;
Pchar.dialog.currentnode = "At_turks_talk_self1";
LAi_ActorSelfDialog(Pchar, "player_back");
break;
//Set other 2 guards to attack pchar
case "prison_guards_attack2":
LAi_SetPlayerType(pchar);
LAi_SetActorType(characterfromID("Pirates_2"));
LAi_SetActorType(characterfromID("Pirates_4"));
LAi_ActorAttack(characterfromID("Pirates_2"),pchar, "");
LAi_ActorAttack(characterfromID("Pirates_4"),pchar, "");
PChar.quest.KilledFighting.win_condition.l1 = "NPC_Death";
PChar.quest.KilledFighting.win_condition.l1.character = PChar.id;
PChar.quest.KilledFighting.win_condition = "KilledFighting";
break;
//Talk to self after meeting Atwood (hear guards coming!)
case "after_atwood_talk_self":
LAi_SetActorType(Pchar);
Pchar.Temp.self.dialog = Pchar.dialog.currentnode;
Pchar.dialog.currentnode = "Turks_talk_self1_after_atwood";
LAi_ActorSelfDialog(Pchar, "player_back");
break;
//After talk self auto run to coffin's room
case "after_atwood_coffin":
AlwaysRunToggle = true;
LAi_SetActorType(pchar);
Lai_ActorGoToLocator(pchar, "reload", "reload10", "prepare_guards_move", -1);
//pchar.quest.prepare_guards_move.win_condition.l1 = "locator";
//pchar.quest.prepare_guards_move.win_condition.l1.location = "Fake_Turks_prison";
//pchar.quest.prepare_guards_move.win_condition.l1.locator_group = "reload";
//pchar.quest.prepare_guards_move.win_condition.l1.locator = "reload10";
//pchar.quest.prepare_guards_move.win_condition = "prepare_guards_move"; //Make this prepare_loc_coffin_self_dia
break;
//TODO add this and move resert guard functions here
//Next to coffin room talk self, explain to self coffins in room so player understands
case "prepare_loc_coffin_self_dia":
LAi_SetActorType(Pchar);
Pchar.Temp.self.dialog = Pchar.dialog.currentnode;
Pchar.dialog.currentnode = "Turks_talk_self1_after_atwood";
LAi_ActorSelfDialog(Pchar, "player_back");
break;
//Reset the guards here for now // later move to locators goes here
case "prepare_guards_move":
LAi_type_actor_Reset(characterFromID("Pirates_1"));
LAi_type_actor_Reset(characterFromID("Pirates_4"));
ChangeCharacterAddress(characterFromID("Pirates_1"), "none", "");
ChangeCharacterAddress(characterFromID("Pirates_4"), "none", "");
//Fade screen next quest / get in coffin
LAi_Fade("escape_in_coffin", "");
break;
//Set the camera outside cell to emulate player in coffin, move guards into scene for last dialogue
//Less visible jus in case
case "escape_in_coffin":
//Set camera pos to locator
LAi_ActorSetSitMode(pchar);
locx = stf(loadedLocation.locators.camera.camera12.x);
locy = stf(loadedLocation.locators.camera.camera12.y);
locz = stf(loadedLocation.locators.camera.camera12.z);
locCameraToPos(locx, locy, locz, false);
//Guards spawn and go to scene/dialog prep
LAi_SetActorType(characterfromID("Pirates_1"));
LAi_SetActorType(characterfromID("Pirates_4"));
LAi_ActorGoToLocator(characterFromID("Pirates_1"), "reload", "reload10", "", 1);
LAi_ActorGoToLocator(characterFromID("Pirates_4"), "Goto", "Goto13", "", 1);
LAi_ActorTurnToCharacter(characterFromID("Pirates_1"), characterFromID("Pirates_4"));
LAi_ActorWaitDialog(characterFromID("Pirates_1"), characterFromID("Pirates_4"));
LAi_ActorDialog(characterFromID("Pirates_1"), characterFromID("Pirates_4"), "", 5.0, 5.0);
break;