float fMeetBlackPearlFirstTime = 0; // KK
int logined = 1; // added by MAXIMUS [choose character mod]

void BothQuestComplete(string sQuestName)
{
	ref PChar, NPChar, sld;
	PChar = GetMainCharacter();
// KK -->
	int i;
	int iNation = 0;
	string QDeck = "";

	string loadPort = "";
	string loadTown = "";
	string loadTavern = "";
	string loadStore = "";
	string loadShipyard = "";
	string questRecord = "";
	string rldLocator = "";
	string gotoLocator = "";
	string sitLocator = "";
	string gotoGroup = "";
	string goLocator = "";
// <-- KK

	//trace ("ÏÐÎÂÅÐßÅÒÑß ÊÂÅÑÒ " + sQuestName);
	switch(sQuestName)
	{

		////////////////////////////////////////////////////////////////////////
		//  Êâåñò ïðî ïðîêëÿòûå ìîíåòêè
		////////////////////////////////////////////////////////////////////////
	
		case "Story_CursedCoinsStarted":
// -->SJG
			if (!CheckCharacterItem(Pchar,"Chest"))
			{
				GiveItem2Character(Pchar,"Chest");
			}
// <--SJG
			Locations[FindLocation("Redmond_town_01")].locators_radius.goto.goto17 = 5.0;

			ChangeCharacterAddressGroup(CharacterFromID("Cursed_Pirate_01"), "Redmond_town_01", "goto", "goto54");
			ChangeCharacterAddressGroup(CharacterFromID("Cursed_Pirate_02"), "Redmond_town_01", "goto", "goto55");
			
			Pchar.quest.Story_CursedCoinsEncounter.win_condition.l1 = "locator";
			Pchar.quest.Story_CursedCoinsEncounter.win_condition.l1.location = "Redmond_town_01";
			Pchar.quest.Story_CursedCoinsEncounter.win_condition.l1.locator_group = "goto";
			Pchar.quest.Story_CursedCoinsEncounter.win_condition.l1.locator = "goto17";
			Pchar.quest.Story_CursedCoinsEncounter.win_condition = "Story_CursedCoinsEncounter";
		break;

		case "Story_CursedCoinsEncounter":
			LAi_SetActorType(Pchar);
			LAi_SetActorType(CharacterFromID("Cursed_Pirate_01"));
			LAi_SetActorType(CharacterFromID("Cursed_Pirate_02"));
			LAi_ActorTurnToCharacter(Pchar, CharacterFromID("Cursed_Pirate_01"));
			LAi_ActorWaitDialog(Pchar, CharacterFromID("Cursed_Pirate_01"));
			LAi_ActorDialog(CharacterFromID("Cursed_Pirate_01"), PChar, "", 20.0, 1.0);
			LAi_ActorFollow(CharacterFromID("Cursed_Pirate_02"), PChar, "", 30.0);
			LAi_group_MoveCharacter(CharacterFromID("Cursed_Pirate_01"), "CURSED_PIRATES");
			LAi_group_MoveCharacter(CharacterFromID("Cursed_Pirate_02"), "CURSED_PIRATES");

			LAi_group_SetRelation("ENGLAND_SOLDIERS", LAI_GROUP_PLAYER, LAI_GROUP_NEITRAL);
			LAi_group_SetAlarmReaction("ENGLAND_SOLDIERS", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY, LAI_GROUP_FRIEND);
		break;
	
		case "Story_CursedCoinsGiveOutChest":
			LAi_SetPlayerType(Pchar);
			LAi_SetActorType(CharacterFromID("Cursed_Pirate_01"));
			LAi_SetActorType(CharacterFromID("Cursed_Pirate_02"));
			Characters[GetCharacterIndex("Cursed_Pirate_01")].location = "None";
			Characters[GetCharacterIndex("Cursed_Pirate_02")].location = "None";
			LAi_ActorRunToLocation(CharacterFromID("Cursed_Pirate_01"), "Reload", "Reload_2_4_back", "None", "", "", "", 120);
			LAi_ActorRunToLocation(CharacterFromID("Cursed_Pirate_02"), "Reload", "Reload_2_4_back", "None", "", "", "", 120);

			LAi_group_SetAlarmReaction("ENGLAND_SOLDIERS", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY, LAI_GROUP_FRIEND);
			LAi_group_SetRelation("ENGLAND_SOLDIERS", LAI_GROUP_PLAYER, LAI_GROUP_FRIEND);
		break;
	
		case "Story_CursedCoinsFirstFightWithPirates":
			LAi_SetPlayerType(Pchar);
			LAi_QuestDelay("Story_CursedCoinsImmortalPirates", 7.0);
			LAi_group_MoveCharacter(CharacterFromID("Cursed_Pirate_01"), "CURSED_PIRATES");
			LAi_group_MoveCharacter(CharacterFromID("Cursed_Pirate_02"), "CURSED_PIRATES");
			LAi_group_FightGroups("CURSED_PIRATES", LAI_GROUP_PLAYER, true);
		break;
	
		case "Story_CursedCoinsImmortalPirates":
			LAi_SetActorType(Pchar);
			LAi_SetActorType(CharacterFromID("Cursed_Pirate_01"));
			LAi_SetActorType(CharacterFromID("Cursed_Pirate_02"));
	
			LAi_type_actor_Reset(CharacterFromID("Cursed_Pirate_01"));
			LAi_type_actor_Reset(CharacterFromID("Cursed_Pirate_02"));
			
			Characters[GetCharacterIndex("Cursed_Pirate_01")].Dialog.CurrentNode = "We_are_immortal";
			LAi_ActorWaitDialog(Pchar, CharacterFromID("Cursed_Pirate_01"));
			LAi_ActorDialog(CharacterFromID("Cursed_Pirate_01"), PChar, "Story_CursedCoinsCloseQuestMovie", 20.0, 1.0);
		break;

		case "Story_CursedCoinsCloseQuestMovie":
			EndQuestMovie();TrackQuestMovie("end","Story_CursedCoinsCloseQuestMovie");
		break;
	
		case "Story_CursedCoinsFightPiratesAgain":
			StartQuestMovie(true, true, false);TrackQuestMovie("start","Story_CursedCoinsFightPiratesAgain");
			LAi_SetPlayerType(Pchar);
			Characters[getCharacterIndex("Cursed_Pirate_01")].skill.fencing = 10;
			Characters[getCharacterIndex("Cursed_Pirate_02")].skill.fencing = 10;
			LAi_group_MoveCharacter(CharacterFromID("Cursed_Pirate_01"), "CURSED_PIRATES");
			LAi_group_MoveCharacter(CharacterFromID("Cursed_Pirate_02"), "CURSED_PIRATES");
			LAi_group_FightGroups("CURSED_PIRATES", LAI_GROUP_PLAYER, true);
		break;
	
		case "Seen_Black_Pearl":
			Log_SetStringToLog(QUEST_MESSAGE7);
			
			Group_CreateGroup("Big Boss");
			Group_AddCharacter("Big Boss", "Barbossa");
			Group_SetGroupCommander("Big Boss", "Barbossa");
			Group_SetPursuitGroup("Big Boss", PLAYER_GROUP);
			Group_SetAddress("Big Boss", "FalaiseDeFleur", "", "");
			Group_SetTaskMove("Big Boss", 10000, 10000);
			Group_LockTask("Big Boss");
			
			SetCharacterRelationBoth(GetCharacterIndex("Barbossa"),GetMainCharacterIndex(),RELATION_FRIEND);
// KK -->
			// prevent companions from attacking Black Pearl (for now)
			for(i = 0; i < 4; i++) {
				if (GetCompanionIndex(PChar, i) >= 0 && GetRemovable(GetCharacter(GetCompanionIndex(PChar, i))))
				{
					SetCharacterRelationBoth(GetCharacterIndex("Barbossa"),GetCompanionIndex(PChar, i),RELATION_FRIEND);
				}
			}
// <-- KK
			UpdateRelations();
// KK -->
			if (ENABLE_FLAGS == 1) {
				fMeetBlackPearlFirstTime = GetRMRelation(pchar, PIRATE);
				SetRMRelation(pchar, PIRATE, REL_NEUTRAL);

				// prevent companions from attacking Black Pearl (for now)
				for(i = 0; i < 4; i++) {
					if (GetCompanionIndex(PChar, i) >= 0 && GetRemovable(GetCharacter(GetCompanionIndex(PChar, i))))
					{
						SetRMRelation(GetCharacter(GetCompanionIndex(PChar, i)), PIRATE, REL_NEUTRAL);
					}
				}

				iForceDetectionFalseFlag = -1;
			}
// <-- KK
			
			pchar.quest.seen_black_pearl_away1.win_condition.l1 = "MapEnter";
			pchar.quest.seen_black_pearl_away1.win_condition = "seen_black_pearl_away";
			
			pchar.quest.seen_black_pearl_away2.win_condition.l1 = "location";
			pchar.quest.seen_black_pearl_away2.win_condition.l1.location = "Falaise_De_Fleur_port_01";
			pchar.quest.seen_black_pearl_away2.win_condition = "seen_black_pearl_away";
			
			pchar.quest.seen_black_pearl_away3.win_condition.l1 = "location";
			pchar.quest.seen_black_pearl_away3.win_condition.l1.location = "Falaise_De_Fleur_shore_01";
			pchar.quest.seen_black_pearl_away3.win_condition = "seen_black_pearl_away";
		break;
		
		case "seen_black_pearl_away":
// KK -->
			if (ENABLE_FLAGS == 1) {
				SetRMRelation(pchar, PIRATE, fMeetBlackPearlFirstTime);

				// companions shouldn't like Pirates
				for(i = 0; i < 4; i++) {
					if (GetCompanionIndex(PChar, i) >= 0 && GetRemovable(GetCharacter(GetCompanionIndex(PChar, i))))
					{
						SetRMRelation(GetCharacter(GetCompanionIndex(PChar, i)), PIRATE, fMeetBlackPearlFirstTime);
					}
				}

				iForceDetectionFalseFlag = 0;
			}
// <-- KK
			pchar.quest.seen_black_pearl_away2.over = "yes";
			pchar.quest.seen_black_pearl_away3.over = "yes";
			Group_SetAddress("Big Boss", "none", "", "");
			pchar.quest.seen_black_pearl_away1.over = "yes";
			pchar.quest.seen_black_pearl_away2.over = "yes";
			pchar.quest.seen_black_pearl_away3.over = "yes";
		break;
	
		case "about_ruby":
			pchar.quest.Carpenter.over = "yes";
			pchar.quest.Carpenter1.over = "yes";

			SetCharacterToNearLocatorFromMe("Gordon Carpenter", 10);
			LAi_SetActorType(CharacterFromID("Gordon Carpenter"));
			LAi_ActorDialog(CharacterFromID("Gordon Carpenter"), Pchar, "", 1.0, 1.0);
		break;
	
		case "talk_about_ruby":
			LAi_Fade("talk_about_ruby1", "talk_about_ruby2");
		break;
	
		case "talk_about_ruby1":
			DoQuestReloadToLocation("Falaise_De_Fleur_tavern", "sit", "sit4", "");
			ChangeCharacterAddressGroup(CharacterFromID("Gordon Carpenter"), "Falaise_De_Fleur_tavern", "sit", "sit8");
			LAi_SetActorType(Pchar);
			LAi_ActorSetSitMode(Pchar);
			LAi_SetActorType(CharacterFromID("Gordon Carpenter"));
			LAi_ActorSetSitMode(CharacterFromID("Gordon Carpenter"));
		break;
	
		case "talk_about_ruby2":
			Lai_ActorWaitDialog(Pchar, CharacterFromID("Gordon Carpenter"));
			LAi_ActorDialog(CharacterFromID("Gordon Carpenter"), Pchar, "", 1.0, 1.0);
		break;

		case "Story_CursedCoinsFinished":
			LAI_SetPlayerType(Pchar);
			DoReloadCharacterToLocation("Falaise_De_Fleur_tavern", "goto", "goto3");
			Characters[GetCharacterIndex("Gordon Carpenter")].location = "None";

			SafePortLeave(); // KK

			CloseQuestHeader("chest");
		break;

		case "Story_CursedCoinsShit":
			Lai_SetActorType(CharacterFromID("Henry Peat"));
			LAi_ActorSetSitMode(CharacterFromID("Henry Peat"));
		break;

		case "Story_CursedCoinsPeatSilent":
			AddQuestRecord("Chest", 6);
			LAi_CharacterDisableDialog(CharacterFromID("Henry Peat"));
		break;

		// NK 05-07-14 to disable model selection while in tut -->
		case "EnableModelSelect":
			DeleteAttribute(&PChar, "DisableModelSelect");
			break;

// KK ----- Start Adventure -->

		case "StartAdventure":
			if (CheckQuestAttribute("Tut_start", "complete")) break;

			if (PChar.location == "Tutorial_Deck") break;

			PChar.Quest.Tut_Start.over = "yes";
			PChar.quest.Tut_start = "complete";
		// TIH -->
			switch (LanguageGetLanguage()) {
				case "Polish":
					PostVideoAndQuest("Invasion_pol",1,"After_French_Invasion_Of_Oxbay");
				break;
				// default:
					PostVideoAndQuest("Invasion",1,"After_French_Invasion_Of_Oxbay");
			}
		// TIH <--
		break;

		case "After_French_Invasion_Of_Oxbay":
			if (SILEHARD_SHIP_NAME != "") characters[GetCharacterIndex("Robert Christopher Silehard")].Ship.Name = SILEHARD_SHIP_NAME;
			characters[GetCharacterIndex("Robert Christopher Silehard")].Dialog.CurrentNode = "AtRedmondAfterInvasion";

			GiveItem2Character(Pchar, "bladeX4");

			TakeNItems(PChar, "blade1", 1);
			TakeNItems(PChar, "pistol1", 1);
			TakeNItems(PChar, "spyglass2", 1);
			TakeNItems(PChar, "potion1", 2);
			AddMoneyToCharacter(PChar, 1000);

			EquipCharacterbyItem(Pchar, "blade1");
			EquipCharacterbyItem(Pchar, "pistol1");
			EquipCharacterbyItem(Pchar, "Spyglass2");

			SetCharacterGoods(PChar, CharGood1, 0);
			SetCharacterGoods(PChar, CharGood2, 0);

   //JRH ammo mod --->
			if (ENABLE_AMMOMOD) {	// LDH change
				Locations[FindLocation("Tutorial_Deck")].WeaponsLocker.items.gunpowder = 6;
				Locations[FindLocation("Tutorial_Deck")].WeaponsLocker.items.pistolbullets = 6;

				if(CheckCharacterItem(Pchar, "gunpowder") > 0) TakenItems(Pchar, "gunpowder", -12);
				if(CheckCharacterItem(Pchar, "gunpowder") == 0) TakenItems(Pchar, "gunpowder", 6);
				if(CheckCharacterItem(Pchar, "pistolbullets") > 0) TakenItems(Pchar, "pistolbullets", -12);
				if(CheckCharacterItem(Pchar, "pistolbullets") == 0) TakenItems(Pchar, "pistolbullets", 6);
			}
   //JRH ammo mod <---

			SetCrewQuantity(PChar, GetMaxCrewQuantity(PChar));

			PChar.ship.HP = GetCharacterShipHP(PChar);
			PChar.ship.SP = GetCharacterShipSP(PChar);

			Locations[FindLocation("Redmond_port")].locators_radius.goto.goto18 = 3.0;

			PChar.quest.StartAdventure = "begin";

			LAi_QuestDelay("begining", 0.0);
			LAi_QuestDelay("TavernSitWaiting", 0.0);

			SetQuestHeader("EscapedFromOxbay");
			AddQuestRecord("EscapedFromOxbay", 1);
			CloseQuestHeader("EscapedFromOxbay");

			LAi_SetPlayerType(PChar);

			trace("Started without tutorial.");
		break;
// <-- KK

//Tutorial

		case "Tut_start":
// KK -->
			PChar.quest.Tut_start.over = "yes";
			PChar.quest.Tut_start = "complete";
			PChar.quest.StartAdventure = "complete";

			if (characters[GetCharacterIndex("Malcolm Hatcher")].location != "none") break;

			if (SILEHARD_SHIP_NAME != "") characters[GetCharacterIndex("Robert Christopher Silehard")].Ship.Name = SILEHARD_SHIP_NAME;
// <-- KK

			PChar.DisableModelSelect = true;
			PChar.quest.EnableModelSelect.win_condition.l1 = "ExitFromLocation";
			PChar.quest.EnableModelSelect.win_condition.l1.location = PChar.location;
			PChar.quest.EnableModelSelect.win_condition = "EnableModelSelect";
			// NK <--
			SetNextWeather("Blue Sky"); // JRH

			locDisableUpdateTime = true;

			PChar.quest.tutorial.Spyglass = 1;
			PChar.alwaysshowitems.SpyGlass2 = true; // fix for quest items like spyglass2. 05-04-21

			//StartQuestMovie(true, false, false);
// KK -->
			if (USE_PROPER_TUTORIAL_DECK == 1) {
				switch (GetCharacterShipCabin(PChar)) {
					case "Cabin_none":
						ChangeCharacterAddressGroup(CharacterFromID("Malcolm Hatcher"), "Tutorial_Deck", "rld", "startloc");
						Locations[FindLocation("Tutorial_Deck")].box1.items.blade1 = 1;
				break;
					case "Tutorial_Deck":
						ChangeCharacterAddressGroup(CharacterFromID("Malcolm Hatcher"), "Tutorial_Deck", "goto", "goto2");
					break;
					// default
						ChangeCharacterAddressGroup(CharacterFromID("Malcolm Hatcher"), "Tutorial_Deck", "reload", "reload1");
						Locations[FindLocation("Tutorial_Deck")].box1.items.blade1 = 1;
				}
			} else {
				ChangeCharacterAddressGroup(CharacterFromID("Malcolm Hatcher"), "Tutorial_Deck", "goto", "goto2");
			}
			Locations[FindLocation("Tutorial_Deck")].reload.l1.disable = true;
// <-- KK

			LAi_SetWarriorTypeNoGroup(CharacterFromID("Malcolm Hatcher"));
			LAi_group_MoveCharacter(CharacterFromID("Malcolm Hatcher"), "tutorial");
			LAi_group_SetAlarmReaction("tutorial", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY, LAI_GROUP_ENEMY);
			LAi_SetImmortal(CharacterFromID("Malcolm Hatcher"), false);
// KK -->
			if (USE_PROPER_TUTORIAL_DECK == 1 && GetCharacterShipCabin(PChar) == "Cabin_none")
				Characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "OnMalcolmShip";
			else
				Characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "start";
// <-- KK

			if(!EVIL_STORMY_START)
			{
			locations[FindLocation(Pchar.location)].box1.items.pistol1 = 1;
			locations[FindLocation(Pchar.location)].box1.items.spyglass1 = 1;
			}

			if (ENABLE_AMMOMOD) {
				Locations[FindLocation("Tutorial_Deck")].WeaponsLocker.items.gunpowder = 6;
				Locations[FindLocation("Tutorial_Deck")].WeaponsLocker.items.pistolbullets = 6;

				if(CheckCharacterItem(Pchar, "gunpowder") > 0) TakenItems(Pchar, "gunpowder", -12);
				if(CheckCharacterItem(Pchar, "pistolbullets") > 0) TakenItems(Pchar, "pistolbullets", -12);
				locations[FindLocation(Pchar.location)].box1.items.gunpowder = 6;
				locations[FindLocation(Pchar.location)].box1.items.pistolbullets = 6;
			}

			if(!EVIL_STORMY_START)
			{
			locations[FindLocation(Pchar.location)].box1.items.potion1 = 2;
			locations[FindLocation(Pchar.location)].box1.money = 1000;
			}
			locations[FindLocation(Pchar.location)].box1 = Items_MakeTime(0, 0, 1, 2003);

// added by MAXIMUS [choose character mod] -->
// KK -->
			loadPort = "Oxbay_port";
			loadTown = "Oxbay_town";
			loadTavern = "Oxbay_tavern";
			loadStore = "Oxbay_store";
			loadShipyard = "Oxbay_shipyard";
			questRecord = "Tutorial_AppearedOnIsland";
			rldLocator = "reload2";
			gotoLocator = "goto18";
			sitLocator = "sit5";
// <-- KK
			switch(sti(PChar.nation))
			{
				case ENGLAND: 
					loadPort = "Oxbay_port";
					gotoLocator = "goto18";
					Preprocessor_Add("island", XI_ConvertString(FindTownName("Oxbay"))); // KK
				break;
				case FRANCE: 
					loadPort = "Falaise_de_fleur_port_01";
					gotoLocator = "goto18";
					Preprocessor_Add("island", XI_ConvertString(FindTownName("Falaise de Fleur"))); // KK
				break;
				case SPAIN: 
					loadPort = "Muelle_port";
					gotoLocator = "goto6";
					Preprocessor_Add("island", XI_ConvertString(FindTownName("Isla Muelle"))); // KK
				break;
				case PIRATE: 
					loadPort = "QC_port";
					gotoLocator = "goto18";
					Preprocessor_Add("island", XI_ConvertString(FindTownName("Quebradas Costillas"))); // KK
					TakeNItems(CharacterFromID("Peter Blowhorn"), "spyglass2", 1); // KK
				break;
				case HOLLAND: 
					loadPort = "Douwesen_port";
					gotoLocator = "goto15";
					Preprocessor_Add("island", XI_ConvertString(FindTownName("Douwesen"))); // KK
				break;
				case PORTUGAL: 
					loadPort = "Conceicao_port";
					gotoLocator = "goto13";
					Preprocessor_Add("island", XI_ConvertString(FindTownName("Conceicao"))); // KK
				break;
				// TIH --> defaults added (mimics ENGLAND) Aug27'06
				// default:
					loadPort = "Oxbay_port";
					gotoLocator = "goto18";
					Preprocessor_Add("island", XI_ConvertString(FindTownName("Oxbay"))); // KK
				// TIH <--
			}
			Locations[FindLocation(loadPort)].locators_radius.goto.(gotoLocator) = 3.0;
			SetQuestHeader(questRecord);
			AddQuestRecord(questRecord, 1);
			Preprocessor_Remove("island"); // KK
// added by MAXIMUS [choose character mod] <--

			Pchar.quest.Tut_KillTutor.win_condition.l1 = "NPC_Death";
			Pchar.quest.Tut_KillTutor.win_condition.l1.character = "Malcolm Hatcher";
			PChar.quest.Tut_KillTutor.win_condition = "Tut_KillTutor";

			LAi_QuestDelay("Tut_start1", 3)
			GiveItem2Character(Pchar, "bladeX4");	// PB: Gives you your fists
			EquipCharacterbyItem(Pchar, "bladeX4");	// PB: Equips them

			/*
			GiveItem2Character(Pchar, "giveitm");	// PB: Gives you any item you might want to test when you start a new game
													//     Replace "giveitm" with the item you want to be given (find names in initItems.c), and remove the / and *, and the * and /
			*/
// KK -->
			trace("Started with tutorial.");

			LAi_SetActorType(PChar);
			LAi_SetActorType(CharacterFromID("Malcolm Hatcher"));
			if (USE_PROPER_TUTORIAL_DECK == 1 && GetCharacterShipCabin(PChar) == "Cabin_none")
			LAi_ActorFollow(PChar, CharacterFromID("Malcolm Hatcher"), "", 1.5);
			LAi_ActorFollow(CharacterFromID("Malcolm Hatcher"), PChar, "DialogWithMalcolmStart", 1.5);
// <-- KK
		break;

// KK -->
		case "DialogWithMalcolmStart":
			LAi_type_actor_Reset(PChar);
			LAi_ActorWaitDialog(PChar, CharacterFromID("Malcolm Hatcher"));
			LAi_ActorDialog(CharacterFromID("Malcolm Hatcher"), PChar, "", 1.0, 1.0);
			LAi_SetPlayerType(PChar);
		break;
// <-- KK

		// 05-04-06 now do while still loading so we get nice reloadprogress update stuff...case "do_reinit": SD_Reinit(); break; // NK

		case "Tut_KillTutor":
			Log_SetStringToLog(QUEST_MESSAGE8);
			Log_SetStringToLog(QUEST_MESSAGE9);
			ChangeCharacterReputation(Pchar, -10);

			Pchar.quest.Tut_RewardForKillingTutor.win_condition.l1 = "rank";
			Pchar.quest.Tut_RewardForKillingTutor.win_condition.l1.character = Pchar.id;
			Pchar.quest.Tut_RewardForKillingTutor.win_condition.l1.value = 6;
			Pchar.quest.Tut_RewardForKillingTutor.win_condition.l1.operation = ">=";
			pchar.quest.Tut_RewardForKillingTutor.win_condition.l2 = "location";
			pchar.quest.Tut_RewardForKillingTutor.win_condition.l2.location = "QC_Pirate_house";
			PChar.quest.Tut_RewardForKillingTutor.win_condition = "Tut_RewardForKillingTutor";

			if(Pchar.location == "Tutorial_Deck")
			{
				Lai_QuestDelay("Tut_SkipTutorialOnShip", 2.0);
			}
	
// added by MAXIMUS [choose character mod] -->
			loadPort = "Oxbay_port";
			loadTavern = "Oxbay_tavern";
			loadStore = "Oxbay_store";
			loadShipyard = "Oxbay_shipyard";
			questRecord = "Tutorial_AppearedOnIsland";
			switch(sti(PChar.nation))
			{
				case ENGLAND: 
					loadPort = "Oxbay_port";
					loadTavern = "Oxbay_tavern";
					loadStore = "Oxbay_store";
					loadShipyard = "Oxbay_shipyard";
					Preprocessor_Add("island", XI_ConvertString(FindTownName("Oxbay"))); // KK
				break;
				case FRANCE: 
					loadPort = "Falaise_de_fleur_port_01";
					loadTavern = "Falaise_de_fleur_tavern";
					loadStore = "Falaise_de_Fleur_store";
					loadShipyard = "Falaise_de_fleur_shipyard";
					Preprocessor_Add("island", XI_ConvertString(FindTownName("Falaise de Fleur"))); // KK
				break;
				case SPAIN: 
					loadPort = "Muelle_port";
					loadTavern = "Muelle_Tavern";
					loadStore = "Muelle_Store";
					loadShipyard = "Muelle_Shipyard";
					Preprocessor_Add("island", XI_ConvertString(FindTownName("Isla Muelle"))); // KK
				break;
				case PIRATE: 
					loadPort = "QC_port";
					loadTavern = "QC_Tavern";
					loadStore = "QC_store";
					loadShipyard = "QC_Shipyard";
					Preprocessor_Add("island", XI_ConvertString(FindTownName("Quebradas Costillas"))); // KK
				break;
				case HOLLAND: 
					loadPort = "Douwesen_port";
					loadTavern = "Douwesen_tavern";
					loadStore = "Douwesen_Store";
					loadShipyard = "Douwesen_shipyard";
					Preprocessor_Add("island", XI_ConvertString(FindTownName("Douwesen"))); // KK
				break;
				case PORTUGAL: 
					loadPort = "Conceicao_port";
					loadTavern = "Conceicao_Tavern";
					loadStore = "Conceicao_Store";
					loadShipyard = "Conceicao_Shipyard";
					Preprocessor_Add("island", XI_ConvertString(FindTownName("Conceicao"))); // KK
				break;
				// TIH --> defaults added (mimics ENGLAND) Aug27'06
				// default:
					loadPort = "Oxbay_port";
					loadTavern = "Oxbay_tavern";
					loadStore = "Oxbay_store";
					loadShipyard = "Oxbay_shipyard";
					Preprocessor_Add("island", XI_ConvertString(FindTownName("Oxbay"))); // KK
				// TIH <--
			}
// added by MAXIMUS [choose character mod] <--

			if(Pchar.location == loadPort)
			{
				Lai_QuestDelay("Tut_SkipTutorialInPort", 2.0);
			}
			if(Pchar.location == loadPort || Pchar.location == loadTavern || Pchar.location == loadStore || Pchar.location == loadShipyard)
			{
				Lai_QuestDelay("Tut_SkipTutorialInTown", 2.0);
			}
		break;

		case "Tut_RewardForKillingTutor":
			Log_SetStringToLog(QUEST_MESSAGE10); 
			Log_SetStringToLog(QUEST_MESSAGE11);

			TakeNItems(Pchar,"blade23", 1);
		break;
		
		case "Tut_start1":
			// 05-04-06 now do while still loading so we get nice reloadprogress update stuff...SD_Reinit(); // NK
			Lai_SetCheckMinHP(CharacterFromID("Malcolm Hatcher"), LAi_GetCharacterHP(characterFromID("Malcolm Hatcher"))-1.0, false, "Tut_HatcherAttacksAndKills"); // NK // KK
			Lai_SetActorTypeNoGroup(CharacterFromID("Malcolm Hatcher"));
			LAi_ActorTurnToCharacter(CharacterFromID("Malcolm Hatcher"), pchar);
			LAi_ActorDialog(CharacterFromID("Malcolm Hatcher"), PChar, "", 5.0, 1.0);
		break;
	
		case "Tut_TakeStuff":
			LAi_SetWarriorTypeNoGroup(CharacterFromID("Malcolm Hatcher"));
			LAi_warrior_SetStay(CharacterFromID("Malcolm Hatcher"), true);
			LAi_warrior_DialogEnable(CharacterFromID("Malcolm Hatcher"), true);
		break;

		case "Tut_HatcherAttacksAndKills":
			LAi_SetActorType(CharacterFromID("Malcolm Hatcher"));
			LAi_type_actor_Reset(CharacterFromID("Malcolm Hatcher"));
			LAi_ActorAttack(CharacterFromID("Malcolm Hatcher"), Pchar, "");
		break;

		case "Tut_WalkToSwordplayPlace":
			LAi_SetFightMode(PChar, false);
			LAi_LockFightMode(Pchar, true);

// KK -->
			if (GetCharacterShipCabin(PChar) != "Cabin_none")
				QDeck = GetCharacterShipQDeck(PChar);
			else
				QDeck = GetCharacterShipQDeck(CharacterFromID("Malcolm Hatcher"));

			Locations[FindLocation("Tutorial_Deck")].reload.l1.disable = 0;
			Locations[FindLocation(QDeck)].reload.l6.go = "";
			Locations[FindLocation(QDeck)].reload.l6.label = "";
			LAi_SetActorTypeNoGroup(CharacterFromID("Malcolm Hatcher"));
			LAi_ActorGoToLocation(CharacterFromID("Malcolm Hatcher"), "reload", "reload1", QDeck, "goto", "goto1", "", 60);

			PChar.quest.Tut_ToTheDeck.win_condition.l1 = "location";
			PChar.quest.Tut_ToTheDeck.win_condition.l1.character = PChar.id;
			PChar.quest.Tut_ToTheDeck.win_condition.l1.location = QDeck;
			PChar.quest.Tut_ToTheDeck.win_condition.l2 = "location";
			PChar.quest.Tut_ToTheDeck.win_condition.l2.character = "Malcolm Hatcher";
			PChar.quest.Tut_ToTheDeck.win_condition.l2.location = QDeck;
			PChar.quest.Tut_ToTheDeck.win_condition = "Tut_ToTheDeck";
// <-- KK
		break;

// KK -->
		case "Tut_ToTheDeck":
			LAi_SetActorTypeNoGroup(Pchar);
			LAi_SetActorType(PChar);
			LAi_SetActorType(CharacterFromID("Malcolm Hatcher"));
			LAi_ActorGoToLocator(PChar, "goto", "goto2", "Tut_ToTheDeckAndTalk", 10);
		break;

		case "Tut_ToTheDeckAndTalk":
			LAi_ActorFollow(PChar, CharacterFromID("Malcolm Hatcher"), "DialogWithMalcolmStart", 1.5);
		break;
// <-- KK

		case "Tut_StartFirstSwordplay":
			Characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "NowHitMe";
			Lai_SetPlayerType(PChar);
			LAi_ActorDialog(CharacterFromID("Malcolm Hatcher"), PChar, "", 5.0, 1.0);
		break;

		case "Tut_FirstMeleeFight":
			LAi_LockFightMode(Pchar, false);
			LAi_ActorWaitDialog(CharacterFromID("Malcolm Hatcher"), Pchar);
			LAi_SetHP(CharacterFromID("Malcolm Hatcher"), 400.0, 400.0);
			Lai_SetCheckMinHP(CharacterFromID("Malcolm Hatcher"), 0.75*LAi_GetCharacterHP(characterFromID("Malcolm Hatcher")), true, "Tut_NowFightWithMight"); // KK
		break;

		case "Tut_NowFightWithMight":
			LAi_type_actor_Reset(CharacterFromID("Malcolm Hatcher"));
			LAi_SetActorType(PChar);
			LAi_SetFightMode(PChar, false);
			LAi_type_actor_Reset(Pchar);
			LAi_ActorWaitDialog(PChar, CharacterFromID("Malcolm Hatcher"));
			Characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "HurtEnough";			
			LAi_ActorDialog(CharacterFromID("Malcolm Hatcher"), PChar, "", 1.0, 1.0);		
		//	Lai_QuestDelay("Tut_ReturnPlayer", 2.0);
		break;

		case "Tut_ReturnPlayer":
			LAi_SetPlayerType(Pchar);
		break;

		case "Tut_StartSeriousFight":
			Lai_SetImmortal(CharacterFromID("Malcolm Hatcher"), false);
			Characters[GetCharacterIndex("Malcolm Hatcher")].skill.Fencing = 1;		
			LAi_SetHP(CharacterFromID("Malcolm Hatcher"), 400.0, 400.0);
			LAi_SetHP(PChar, 400.0, 400.0);
			LAi_SetFightMode(PChar, true);
			LAi_SetActorTypeNoGroup(CharacterFromID("Malcolm Hatcher"));
			LAi_ActorAttack(CharacterFromID("Malcolm Hatcher"), Pchar, "");

			Lai_SetCheckMinHP(Pchar, 0.5*LAi_GetCharacterHP(PChar), false, "SeriousFightFinished"); // KK
			Lai_SetCheckMinHP(CharacterFromID("Malcolm Hatcher"), 0.5*LAi_GetCharacterHP(characterFromID("Malcolm Hatcher")), true, "SeriousFightFinished"); // KK
		break;

		case "SeriousFightFinished":
			LAi_RemoveCheckMinHP(CharacterFromID("Malcolm Hatcher"));
			LAi_RemoveCheckMinHP(Pchar);

			LAi_type_actor_Reset(CharacterFromID("Malcolm Hatcher"));

			LAi_SetActorTypeNoGroup(PChar);
			Lai_ActorWaitDialog(Pchar, CharacterFromID("Malcolm Hatcher"));
			LAi_SetFightMode(PChar, false);

			Lai_QuestDelay("Tut_ReturnPlayer", 1.5);
			
			Characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "SeriousStopped";
			LAi_ActorDialog(CharacterFromID("Malcolm Hatcher"), PChar, "", 1.0, 1.0);

			LAi_group_SetRelation(LAI_GROUP_PLAYER, "tutorial", LAI_GROUP_FRIEND);
		break;

		case "Tut_StartSeriousFightAgain":
			Lai_SetImmortal(CharacterFromID("Malcolm Hatcher"), false);
			Characters[GetCharacterIndex("Malcolm Hatcher")].skill.Fencing = 1;		
			LAi_SetHP(CharacterFromID("Malcolm Hatcher"), 400.0, 400.0);
			LAi_SetHP(PChar, 400.0, 400.0);
			LAi_SetFightMode(PChar, true);
			LAi_SetActorTypeNoGroup(CharacterFromID("Malcolm Hatcher"));
			LAi_ActorAttack(CharacterFromID("Malcolm Hatcher"), Pchar, "");

			Lai_SetCheckMinHP(Pchar, 0.5*LAi_GetCharacterHP(PChar), false, "SeriousFightFinishedAgain"); // KK
			Lai_SetCheckMinHP(CharacterFromID("Malcolm Hatcher"), 0.5*LAi_GetCharacterHP(characterFromID("Malcolm Hatcher")), true, "SeriousFightFinishedAgain"); // KK

		break;

		case "SeriousFightFinishedAgain":
			LAi_RemoveCheckMinHP(CharacterFromID("Malcolm Hatcher"));
			LAi_RemoveCheckMinHP(Pchar);

			LAi_type_actor_Reset(CharacterFromID("Malcolm Hatcher"));

			LAi_SetActorTypeNoGroup(PChar);
			Lai_ActorWaitDialog(Pchar, CharacterFromID("Malcolm Hatcher"));
			LAi_SetFightMode(PChar, false);

			Lai_QuestDelay("Tut_ReturnPlayer", 1.5);

			LAi_group_SetRelation(LAI_GROUP_PLAYER, "tutorial", LAI_GROUP_FRIEND);
			
			Characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "SeriousStoppedAgain";
			LAi_ActorDialog(CharacterFromID("Malcolm Hatcher"), PChar, "", 1.0, 1.0);
		break;

		case "Tut_PlayerDistributeSkills":
//NK -->
			LAi_SetImmortal(CharacterFromID("Malcolm Hatcher"), false);
// NK <-- 
			LAi_SetWarriorTypeNoGroup(CharacterFromID("Malcolm Hatcher"));
			LAi_warrior_SetStay(CharacterFromID("Malcolm Hatcher"), true);
			LAi_warrior_DialogEnable(CharacterFromID("Malcolm Hatcher"), true);			
		break;

		case "Tut_ReloadToOxbayPort":
			EquipCharacterbyItem(Pchar, "Spyglass1"); // NK
			ResetHP(&PChar); // NK 05-07-03 - LAi_SetHP(PChar, LAI_DEFAULT_HP + sti(PChar.rank) * 5, LAI_DEFAULT_HP+ sti(PChar.rank) * 5); //NK
			LAi_SetHP(CharacterFromID("Malcolm Hatcher"), 120.0, 120.0);
			LAi_group_SetAlarm("tutorial", LAI_GROUP_PLAYER, 0.0);
			LAi_group_SetRelation("tutorial", LAI_GROUP_PLAYER, LAI_GROUP_FRIEND);

			LAi_RemoveCheckMinHP(CharacterFromID("Malcolm Hatcher"));//ccc

			SetQuestHeader("Tutorial_SpyGlass");
			AddQuestRecord("Tutorial_SpyGlass", 1);

			Pchar.quest.Tut_BuySpyGlass.win_condition.l1 = "item";
			Pchar.quest.Tut_BuySpyGlass.win_condition.l1.character = Pchar.id;
			Pchar.quest.Tut_BuySpyGlass.win_condition.l1.item = "SpyGlass2";
			Pchar.quest.Tut_BuySpyGlass.win_condition = "Tut_BuySpyGlass";
			Pchar.quest.Tut_BuySpyGlass.fail_condition = "Tut_BuySpyGlass";

			// TIH --> alternative win conditions Spe3'06
			Pchar.quest.Tut_BuySpyGlass3.win_condition.l1 = "item";
			Pchar.quest.Tut_BuySpyGlass3.win_condition.l1.character = Pchar.id;
			Pchar.quest.Tut_BuySpyGlass3.win_condition.l1.item = "SpyGlass3";
			Pchar.quest.Tut_BuySpyGlass3.win_condition = "Tut_BuySpyGlass";
			Pchar.quest.Tut_BuySpyGlass4.win_condition.l1 = "item";
			Pchar.quest.Tut_BuySpyGlass4.win_condition.l1.character = Pchar.id;
			Pchar.quest.Tut_BuySpyGlass4.win_condition.l1.item = "SpyGlass4";
			Pchar.quest.Tut_BuySpyGlass4.win_condition = "Tut_BuySpyGlass";
			// TIH <--

// KK -->
			if (GetCargoGoods(PChar, CharGood1) > 0 || GetCargoGoods(PChar, CharGood2) > 0) {
				SetQuestHeader("Tutorial_Store");
				loadStore = "";
				if (GetCargoGoods(PChar, CharGood1) > 0) loadStore = strlower(XI_ConvertString(Goods[CharGood1].name));
				if (CharGood1 != CharGood2) {
					if (GetCargoGoods(PChar, CharGood1) > 0 && GetCargoGoods(PChar, CharGood2) > 0) loadStore += " " + XI_ConvertString("and");
					if (GetCargoGoods(PChar, CharGood2) > 0) loadStore += " " + strlower(XI_ConvertString(Goods[CharGood2].name));
				}
				Preprocessor_Add("goods",  loadStore);
				AddQuestRecord("Tutorial_Store", 1);
				Preprocessor_Remove("goods");

				if (GetCargoGoods(PChar, CharGood1) > 0) {
					Pchar.quest.Tut_SellGoods.win_condition.l1 = "goods";
					Pchar.quest.Tut_SellGoods.win_condition.l1.character = Pchar.id;
					Pchar.quest.Tut_SellGoods.win_condition.l1.goods = CharGood1;
					Pchar.quest.Tut_SellGoods.win_condition.l1.quantity = "0";
					Pchar.quest.Tut_SellGoods.win_condition.l1.operation = "=";
					Pchar.quest.Tut_SellGoods.win_condition = "Tut_SellGoods";
					Pchar.quest.Tut_SellGoods.fail_condition = "Tut_SellGoods";
				}
				if (GetCargoGoods(PChar, CharGood2) > 0) {
					Pchar.quest.Tut_SellGoods.win_condition.l2 = "goods";
					Pchar.quest.Tut_SellGoods.win_condition.l2.character = Pchar.id;
					Pchar.quest.Tut_SellGoods.win_condition.l2.goods = CharGood2;
					Pchar.quest.Tut_SellGoods.win_condition.l2.quantity = "0";
					Pchar.quest.Tut_SellGoods.win_condition.l2.operation = "=";
					Pchar.quest.Tut_SellGoods.win_condition = "Tut_SellGoods";
					Pchar.quest.Tut_SellGoods.fail_condition = "Tut_SellGoods";
				}
			}
// <-- KK

			/*Pchar.quest.Tut_SellGoods.win_condition.l1 = "goods";
			Pchar.quest.Tut_SellGoods.win_condition.l1.character = Pchar.id;
			Pchar.quest.Tut_SellGoods.win_condition.l1.goods = CharGood1;//GOOD_CHOCOLATE;
			Pchar.quest.Tut_SellGoods.win_condition.l1.quantity = "0";
			Pchar.quest.Tut_SellGoods.win_condition.l1.operation = "=";
			Pchar.quest.Tut_SellGoods.win_condition.l2 = "goods";
			Pchar.quest.Tut_SellGoods.win_condition.l2.character = Pchar.id;
			Pchar.quest.Tut_SellGoods.win_condition.l2.goods = CharGood2;//GOOD_LEATHER;
			Pchar.quest.Tut_SellGoods.win_condition.l2.quantity = "0";
			Pchar.quest.Tut_SellGoods.win_condition.l2.operation = "=";
			Pchar.quest.Tut_SellGoods.win_condition = "Tut_SellGoods";
			Pchar.quest.Tut_SellGoods.fail_condition = "Tut_SellGoods";*/

			SetQuestHeader("Tutorial_Shipyard");
			AddQuestRecord("Tutorial_Shipyard", 1);

			Pchar.quest.Tut_RepairShip.win_condition.l1 = "Ship_HP";
			Pchar.quest.Tut_RepairShip.win_condition.l1.character = Pchar.id;
//NK -->
			Pchar.quest.Tut_RepairShip.win_condition.l1.quantity = GetCharacterShipHP(Pchar);
// NK <-- 
			Pchar.quest.Tut_RepairShip.win_condition.l1.operation = ">=";
			Pchar.quest.Tut_RepairShip.win_condition = "Tut_RepairShip";
			Pchar.quest.Tut_RepairShip.fail_condition = "Tut_RepairShip";

			SetQuestHeader("Tutorial_Tavern");
			AddQuestRecord("Tutorial_Tavern", 1);

			Pchar.quest.Tut_HireCrew.win_condition.l1 = "Crew_Space";
			Pchar.quest.Tut_HireCrew.win_condition.l1.character = Pchar.id;
			Pchar.quest.Tut_HireCrew.win_condition.l1.quantity = "0";
			Pchar.quest.Tut_HireCrew.win_condition.l1.operation = "=";
			Pchar.quest.Tut_HireCrew.win_condition = "Tut_HireCrew";
			Pchar.quest.Tut_HireCrew.fail_condition = "Tut_HireCrew";
	
// added by MAXIMUS [choose character mod] -->
			loadPort = "Oxbay_port";
			rldLocator = "reload2";

			switch(sti(PChar.nation))
			{
				case ENGLAND: 
					loadPort = "Oxbay_port";
					rldLocator = "reload2";
					Locations[FindLocation(loadPort)].reload.l2.disable = 1;
				break;
				case FRANCE: 
					loadPort = "Falaise_de_fleur_port_01";
					rldLocator = "sea";
					Locations[FindLocation(loadPort)].reload.l2.disable = 1;
					Locations[FindLocation(loadPort)].reload.l5.disable = 1;
					Locations[FindLocation(loadPort)].reload.l6.disable = 1;
				break;
				case SPAIN: 
					loadPort = "Muelle_port";
					rldLocator = "reload3"; // KK
					Locations[FindLocation(loadPort)].reload.l2.disable = 1;
					Locations[FindLocation(loadPort)].reload.l5.disable = 1;
				break;
				case PIRATE: 
					loadPort = "QC_port";
					rldLocator = "reload1";
					Locations[FindLocation(loadPort)].reload.l2.disable = 1;
				break;
				case HOLLAND: 
					loadPort = "Douwesen_port";
					rldLocator = "reload2";
					Locations[FindLocation(loadPort)].reload.l2.disable = 1;
					Locations[FindLocation(loadPort)].reload.l5.disable = 1;
				break;
				case PORTUGAL: 
					loadPort = "Conceicao_port";
					rldLocator = "reload2";
				break;
				// TIH --> defaults added (mimics ENGLAND) Aug27'06
				// default:
					loadPort = "Oxbay_port";
					rldLocator = "reload2";
					Locations[FindLocation(loadPort)].reload.l2.disable = 1;
				// TIH <--
			}

			Locations[FindLocation(loadPort)].reload.l1.disable = 1;
			Locations[FindLocation(loadPort)].reload.l3.disable = 1;
			Locations[FindLocation(loadPort)].reload.l4.disable = 1;

			bDisableFastReload = 1;
// KK -->
			PlaceFleetNearShore(loadPort);

			LAi_SetActorTypeNoGroup(CharacterFromID("Malcolm Hatcher")); //JA 4DEC06 need to set him back to actor before he can walk off.
			LAi_ActorGoToLocation(CharacterFromID("Malcolm Hatcher"), "reload", "boatr", loadPort, "officers", rldLocator + "_1", "Tut_RowToPort", 10);

			PChar.quest.Tut_StartTalkInPort.win_condition.l1 = "location";
			PChar.quest.Tut_StartTalkInPort.win_condition.l1.character = PChar.id;
			PChar.quest.Tut_StartTalkInPort.win_condition.l1.location = loadPort;
			PChar.quest.Tut_StartTalkInPort.win_condition.l2 = "location";
			PChar.quest.Tut_StartTalkInPort.win_condition.l2.character = "Malcolm Hatcher";
			PChar.quest.Tut_StartTalkInPort.win_condition.l2.location = loadPort;
			PChar.quest.Tut_StartTalkInPort.win_condition = "Tut_StartTalkInPort";

			Locations[FindLocation(loadPort)].vcskip = true;
// <-- KK
// added by MAXIMUS [choose character mod] <--
		break;

// KK -->
		case "Tut_WalkThroughQDeck":
			if (GetCharacterShipCabin(PChar) != "Cabin_none")
				QDeck = GetCharacterShipQDeck(PChar);
			else
				QDeck = GetCharacterShipQDeck(CharacterFromID("Malcolm Hatcher"));

			Locations[FindLocation("Tutorial_Deck")].reload.l1.disable = 0;
			LAi_SetActorTypeNoGroup(CharacterFromID("Malcolm Hatcher"));
			LAi_ActorGoToLocation(CharacterFromID("Malcolm Hatcher"), "reload", "reload1", QDeck, "goto", "goto3", "", 60);
			PChar.quest.Tut_WalkOnQDeck.win_condition.l1 = "location";
			PChar.quest.Tut_WalkOnQDeck.win_condition.l1.character = PChar.id;
			PChar.quest.Tut_WalkOnQDeck.win_condition.l1.location = QDeck;
			PChar.quest.Tut_WalkOnQDeck.win_condition = "Tut_WalkOnQDeck";
		break;

		case "Tut_WalkOnQDeck":
			LAi_QuestDelay("Tut_ReloadToOxbayPort", 0.0);
		break;

		case "Tut_RowToPort":
			Locations[FindLoadedLocation()].reload.l4.disable = 0;
			Locations[FindLoadedLocation()].reload.l5.disable = 0;
		break;
// <-- KK

		case "Tut_BuySpyGlass":
			// TIH --> alternative methods for completion finished Sep3'06
			Pchar.quest.Tut_BuySpyGlass.over = "yes";
			Pchar.quest.Tut_BuySpyGlass3.over = "yes";
			Pchar.quest.Tut_BuySpyGlass4.over = "yes";
			// TIH <--
			DeleteAttribute(Pchar, "quest.tutorial.Spyglass");
			DeleteAttribute(PChar,"alwaysshowitems.SpyGlass2"); // fix for quest items like spyglass2. 05-04-21
			AddQuestRecord("Tutorial_SpyGlass", 2);
			CloseQuestHeader("Tutorial_SpyGlass");
		break;

		case "Tut_SellGoods":
			AddQuestRecord("Tutorial_Store", 2);
			CloseQuestHeader("Tutorial_Store");
		break;

		case "Tut_RepairShip":
			AddQuestRecord("Tutorial_Shipyard", 2);
			CloseQuestHeader("Tutorial_Shipyard");
		break;

		case "Tut_HireCrew":
			AddQuestRecord("Tutorial_Tavern", 2);
			CloseQuestHeader("Tutorial_Tavern");
		break;

		case "Tut_StartTalkInPort":
			StartQuestMovie(true, false, false);TrackQuestMovie("start","Tut_StartTalkInPort");

// added by MAXIMUS [choose character mod] -->
			loadPort = "Oxbay_port";
			gotoLocator = "goto18";
			gotoGroup = "goto"; // KK
			switch(sti(PChar.nation))
			{
				case ENGLAND: gotoLocator = "goto18"; loadPort = "Oxbay_port"; break;
				case FRANCE: gotoLocator = "goto1"; loadPort = "Falaise_de_fleur_port_01"; break; // KK
				case SPAIN: gotoLocator = "goto6"; loadPort = "Muelle_port"; break;
				case PIRATE: gotoGroup = "reload"; gotoLocator = "goto4"; loadPort = "QC_port"; break;
				case HOLLAND: gotoLocator = "goto15"; loadPort = "Douwesen_port"; break;
				case PORTUGAL: gotoLocator = "goto13"; loadPort = "Conceicao_port"; break;
				case PERSONAL_NATION: gotoLocator = "goto18"; loadPort = "Oxbay_port"; break; // KK
			}

			Locations[FindLocation(loadPort)].locators_radius.(gotoGroup).(gotoLocator) = 2.0;
// added by MAXIMUS [choose character mod] <--

			LAi_SetActorTypeNoGroup(CharacterFromID("Malcolm Hatcher"));
// KK -->
			switch (sti(PChar.nation)) {
				case FRANCE:
					Characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "ToFdFCenter";
				break;
				case PIRATE:
					Characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "ToQCTown";
				break;
				// default:
					Characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "NowLetsBuyASpyglass";
			}
// <-- KK
			LAi_SetFightMode(PChar, false);
			LAi_LockFightMode(Pchar, true);
			LAi_SetActorType(PChar);
			LAi_ActorFollow(CharacterFromID("Malcolm Hatcher"), PChar, "DialogWithMalcolmStart", 2.0); // KK
			DeleteAttribute(Locations[FindLoadedLocation()], "vcskip"); // KK
			// KK LAi_ActorDialog(CharacterFromID("Malcolm Hatcher"), PChar, "", 6.0, 1.0);
		break;

		case "Tut_GuideToSpyglass":

// added by MAXIMUS [choose character mod] -->
			loadPort = "Oxbay_port";
			gotoLocator = "goto18";
			gotoGroup = "goto";
			switch(sti(PChar.nation))
			{
				case ENGLAND: gotoLocator = "goto18"; loadPort = "Oxbay_port"; break;
				case FRANCE: gotoGroup = "reload"; gotoLocator = "Falaise_de_fleur_location_01_02"; loadPort = "Falaise_de_fleur_port_01"; break; // KK
				case SPAIN: gotoLocator = "goto6"; loadPort = "Muelle_port"; break;
				case PIRATE: gotoGroup = "reload"; gotoLocator = "reload3_back"; loadPort = "QC_port"; break;
				case HOLLAND: gotoLocator = "goto15"; loadPort = "Douwesen_port"; break;
				case PORTUGAL: gotoLocator = "goto13"; loadPort = "Conceicao_port"; break;
				case PERSONAL_NATION: gotoLocator = "goto18"; loadPort = "Oxbay_port"; break; // KK
			}
// added by MAXIMUS [choose character mod] <--

// KK -->
			switch (sti(PChar.nation))
			{
				case FRANCE:
					LAi_ActorGoToLocation(CharacterFromID("Malcolm Hatcher"), gotoGroup, gotoLocator, "Falaise_de_fleur_location_02", "officers", "Falaise_de_fleur_location_02_01_1", "Tut_OpenFdFEntrance", 1000);
					PChar.quest.Tut_ToFdFSuburb.win_condition.l1 = "location";
					PChar.quest.Tut_ToFdFSuburb.win_condition.l1.character = PChar.id;
					PChar.quest.Tut_ToFdFSuburb.win_condition.l1.location = "Falaise_de_fleur_location_02";
					PChar.quest.Tut_ToFdFSuburb.win_condition = "Tut_ToFdFSuburb";

					characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "NowLetsBuyASpyglass";
				break;
				case PIRATE:
					LAi_ActorGoToLocation(CharacterFromID("Malcolm Hatcher"), gotoGroup, gotoLocator, "QC_town_exit", "goto", "goto12", "Tut_OpenQCJungle", 100);
					PChar.quest.Tut_ToQCJungle.win_condition.l1 = "location";
					PChar.quest.Tut_ToQCJungle.win_condition.l1.character = PChar.id;
					PChar.quest.Tut_ToQCJungle.win_condition.l1.location = "QC_town_exit";
					PChar.quest.Tut_ToQCJungle.win_condition = "Tut_ToQCJungle";

					characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "NoStallsOnQC";
				break; 
				// default:
					LAi_ActorgoToLocator(CharacterFromID("Malcolm Hatcher"), gotoGroup, gotoLocator, "TurnToPlayer", 0);

					pchar.quest.Tut_ToTheTown.win_condition.l1 = "locator";
					pchar.quest.Tut_ToTheTown.win_condition.l1.character = PChar.id;
					pchar.quest.Tut_ToTheTown.win_condition.l1.location = loadPort;
					pchar.quest.Tut_ToTheTown.win_condition.l1.locator_group = gotoGroup;
					pchar.quest.Tut_ToTheTown.win_condition.l1.locator = gotoLocator;
					pchar.quest.Tut_ToTheTown.win_condition.l2 = "locator";
					pchar.quest.Tut_ToTheTown.win_condition.l2.character = "Malcolm Hatcher";
					pchar.quest.Tut_ToTheTown.win_condition.l2.location = loadPort;
					pchar.quest.Tut_ToTheTown.win_condition.l2.locator_group = gotoGroup;
					pchar.quest.Tut_ToTheTown.win_condition.l2.locator = gotoLocator;
					pchar.quest.Tut_ToTheTown.win_condition = "Tut_ToTheTown";
			}
// <-- KK
		break;

		case "TurnToPlayer":
			LAi_ActorTurnToCharacter(CharacterFromID("Malcolm Hatcher"), PChar);
		break;

		case "Tut_ToTheTown":
			switch(sti(PChar.nation))
			{
				case FRANCE:
					LAi_ActorGoToLocator(CharacterFromID("Malcolm Hatcher"), "goto", "locator11", "Tut_FollowTheSpyglass", 50.); // KK
				break;
				case PIRATE:
					LAi_QuestDelay("Tut_MalcolmShowsTheStore", 0.0); // KK
				break;
				pchar.quest.Tut_FollowTheSpyglass.win_condition = "Tut_FollowTheSpyglass";
			}
		break;

// KK -->
		case "Tut_ToFdFSuburb":
			LAi_ActorGoToLocation(CharacterFromID("Malcolm Hatcher"), "reload", "Falaise_de_fleur_location_02_03", "Falaise_de_fleur_location_03", "officers", "Falaise_de_fleur_location_03_02_1", "Tut_OpenFdFSuburbsGate", 1000);
			Locations[FindLocation("Falaise_de_fleur_location_02")].reload.l1.disable = 1;
			Locations[FindLocation("Falaise_de_fleur_location_02")].reload.l2.disable = 1;
			Locations[FindLocation("Falaise_de_fleur_location_02")].reload.l3.disable = 1;
			Locations[FindLocation("Falaise_de_fleur_location_02")].reload.l4.disable = 1;
			Locations[FindLocation("Falaise_de_fleur_location_02")].reload.l5.disable = 1;
			pchar.quest.Tut_ToFdFCenter.win_condition.l1 = "location";
			pchar.quest.Tut_ToFdFCenter.win_condition.l1.character = pchar.id;
			pchar.quest.Tut_ToFdFCenter.win_condition.l1.location = "Falaise_de_fleur_location_03";
			pchar.quest.Tut_ToFdFCenter.win_condition = "Tut_ToFdFCenter";
		break;

		case "Tut_OpenFdFEntrance":
			EndQuestMovie();TrackQuestMovie("end","Tut_OpenFdFEntrance");
			Locations[FindLocation("Falaise_de_fleur_port_01")].reload.l1.disable = 0;
		break;

		case "Tut_OpenFdFSuburbsGate":
			Locations[FindLocation("Falaise_de_fleur_location_02")].reload.l1.disable = 0;
			Locations[FindLocation("Falaise_de_fleur_location_02")].reload.l2.disable = 0;
			Locations[FindLocation("Falaise_de_fleur_location_02")].reload.l3.disable = 0;
			Locations[FindLocation("Falaise_de_fleur_location_02")].reload.l4.disable = 0;
			Locations[FindLocation("Falaise_de_fleur_location_02")].reload.l5.disable = 0;
		break;

		case "Tut_ToFdFCenter":
			Locations[FindLocation("Falaise_de_fleur_location_03")].reload.l1.disable = 1;
			Locations[FindLocation("Falaise_de_fleur_location_03")].reload.l3.disable = 1;
			Locations[FindLocation("Falaise_de_fleur_location_03")].reload.l2.disable = 1;
			Locations[FindLocation("Falaise_de_fleur_location_03")].reload.l4.disable = 1;
			Locations[FindLocation("Falaise_de_fleur_location_03")].reload.l5.disable = 1;
			Locations[FindLocation("Falaise_de_fleur_location_03")].reload.l6.disable = 1;
			Locations[FindLocation("Falaise_de_fleur_location_03")].reload.l7.disable = 1;
			Locations[FindLocation("Falaise_de_fleur_location_03")].reload.l8.disable = 1;
			Locations[FindLocation("Falaise_de_fleur_location_03")].reload.l9.disable = 1;
			Locations[FindLocation("Falaise_de_fleur_location_03")].reload.l10.disable = 1;
			Locations[FindLocation("Falaise_de_fleur_location_03")].reload.l11.disable = 1;
			Locations[FindLocation("Falaise_de_fleur_location_03")].reload.l12.disable = 1;

			characters[GetCharacterIndex("Patric Cardone")].Dialog.Filename = "Item Trader_dialog.c";

			LAi_SetActorType(PChar);
			LAi_SetActorType(CharacterFromID("Malcolm Hatcher"));
			LAi_ActorFollow(PChar, CharacterFromID("Malcolm Hatcher"), "", 1.5);
			LAi_ActorFollow(CharacterFromID("Malcolm Hatcher"), PChar, "DialogWithMalcolmStart", 1.5);
		break;

		case "Tut_OpenQCJungle":
			EndQuestMovie();TrackQuestMovie("end","Tut_OpenQCJungle");
			Locations[FindLocation("QC_port")].reload.l1.disable = 0;
			Locations[FindLocation("QC_port")].reload.l4.disable = 0;
		break;

		case "Tut_ToQCJungle":
			LAi_ActorGoToLocation(CharacterFromID("Malcolm Hatcher"), "reload", "Reload1", "QC_town", "officers", "reload1_1", "Tut_OpenQCGate", 1000);
			Locations[FindLocation("QC_town_exit")].reload.l1.disable = 1;
			Locations[FindLocation("QC_town_exit")].reload.l2.disable = 1;
			Locations[FindLocation("QC_town_exit")].reload.l3.disable = 1;
			Locations[FindLocation("QC_town_exit")].reload.l4.disable = 1;
			Locations[FindLocation("QC_town_exit")].reload.l5.disable = 1;
			Locations[FindLocation("QC_town_exit")].reload.l6.disable = 1;
			pchar.quest.Tut_ToQCTown.win_condition.l1 = "location";
			pchar.quest.Tut_ToQCTown.win_condition.l1.character = pchar.id;
			pchar.quest.Tut_ToQCTown.win_condition.l1.location = "QC_town";
			pchar.quest.Tut_ToQCTown.win_condition = "Tut_ToQCTown";
		break;

		case "Tut_OpenQCGate":
			Locations[FindLocation("QC_town_exit")].reload.l1.disable = 0;
			Locations[FindLocation("QC_town_exit")].reload.l2.disable = 0;
			Locations[FindLocation("QC_town_exit")].reload.l3.disable = 0;
			Locations[FindLocation("QC_town_exit")].reload.l4.disable = 0;
			Locations[FindLocation("QC_town_exit")].reload.l5.disable = 0;
			Locations[FindLocation("QC_town_exit")].reload.l6.disable = 0;
		break;

		case "Tut_ToQCTown":
			Locations[FindLocation("QC_town")].reload.l1.disable = 1;
			Locations[FindLocation("QC_town")].reload.l2.disable = 1;
			Locations[FindLocation("QC_town")].reload.l3.disable = 1;
			Locations[FindLocation("QC_town")].reload.l4.disable = 1;
			Locations[FindLocation("QC_town")].reload.l5.disable = 1;
			Locations[FindLocation("QC_town")].reload.l6.disable = 1;
			Locations[FindLocation("QC_town")].reload.l7.disable = 1;

			LAi_SetActorType(PChar);
			LAi_SetActorType(CharacterFromID("Malcolm Hatcher"));
			LAi_ActorFollow(PChar, CharacterFromID("Malcolm Hatcher"), "", 1.5);
			LAi_ActorFollow(CharacterFromID("Malcolm Hatcher"), PChar, "DialogWithMalcolmStart", 1.5);
		break;
// <-- KK

		case "FuckTheSpyGlass": 
			LAi_type_actor_Reset(CharacterFromID("Malcolm Hatcher"));
			Lai_SetActorTypeNoGroup(Pchar);
			LAi_ActorWaitDialog(Pchar, CharacterFromID("Malcolm Hatcher"));
			Characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "ContinueWithoutSpyglass";
			LAi_ActorDialog(CharacterFromID("Malcolm Hatcher"), PChar, "", 3.0, 1.0);
		break;

		case "Tut_FollowTheSpyglass":
			LAi_type_actor_Reset(CharacterFromID("Malcolm Hatcher"));
			Lai_SetActorTypeNoGroup(Pchar);
			LAi_ActorWaitDialog(Pchar, CharacterFromID("Malcolm Hatcher"));
			Characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "HereAretheTraders";
			LAi_ActorDialog(CharacterFromID("Malcolm Hatcher"), PChar, "", 3.0, 1.0);
		break;

		case "Tut_SoBuyTheFuckingGlass":
			Lai_SetPlayerType(Pchar);
			LAi_SetWarriorTypeNoGroup(CharacterFromID("Malcolm Hatcher"));
			LAi_warrior_SetStay(CharacterFromID("Malcolm Hatcher"), true);
			LAi_warrior_DialogEnable(CharacterFromID("Malcolm Hatcher"), true);
			if (sti(PChar.nation) == FRANCE) LAi_ActorGoToLocator(CharacterFromID("Malcolm Hatcher"), "goto", "locator11", "", 1000); // KK
		break;

		case "Tut_ReloadToOxbay":
			LAi_SetActorTypeNoGroup(CharacterFromID("Malcolm Hatcher"));

// added by MAXIMUS [choose character mod] -->
			loadTown = "Oxbay_town";
			rldLocator = "Reload1";
			gotoLocator = "Goto38";
			switch(sti(PChar.nation))
			{
				case ENGLAND:
					loadTown = "Oxbay_town"; 
					rldLocator = "Reload1"; 
					gotoLocator = "goto38"; 
				break;
				case FRANCE:
					loadTown = "Falaise_de_fleur_location_04"; 
					rldLocator = "Falaise_de_fleur_location_03_04"; 
					gotoLocator = "locator8";
				break;
				case SPAIN:
					loadTown = "Muelle_town_01"; 
					rldLocator = "reload2"; 
					gotoLocator = "goto30"; 
				break;
// KK -->
				/*case PIRATE:
					loadTown = "QC_town"; 
					rldLocator = "reload1"; 
					gotoLocator = "goto3"; 
					pchar.quest.Tut_ReloadToOxbayTown = "tutorial_delay";
					Lai_SetPlayerType(Pchar);
				break;*/
// <-- KK
				case HOLLAND:
					loadTown = "Douwesen_town"; 
					rldLocator = "reload3"; 
					gotoLocator = "goto3"; 
				break;
				case PORTUGAL:
					loadTown = "Conceicao_town"; 
					rldLocator = "reload1"; 
					gotoLocator = "goto4"; 
				break;
// KK -->
				case PERSONAL_NATION:
					loadTown = "Oxbay_town"; 
					rldLocator = "Reload1"; 
					gotoLocator = "goto38"; 
				break;
// <-- KK
			}
// added by MAXIMUS [choose character mod] <--

			LAi_ActorgoToLocation(CharacterFromID("Malcolm Hatcher"), "Reload", rldLocator, loadTown, "goto", gotoLocator, "Tut_TownOpened", 0);
			EndQuestMovie();TrackQuestMovie("end","Tut_ReloadToOxbay");

			pchar.quest.Tut_ReloadToOxbayTown.win_condition.l1 = "location";
			pchar.quest.Tut_ReloadToOxbayTown.win_condition.l1.location = loadTown;
			pchar.quest.Tut_ReloadToOxbayTown.win_condition = "Tut_ReloadPlayerToOxbayTown";
		break;

		case "Tut_TownOpened":
// added by MAXIMUS [choose character mod] -->
			loadPort = "Oxbay_port";
			rldLocator = "Reload1";
			switch(sti(PChar.nation))
			{
				case ENGLAND: rldLocator = "Reload1"; loadPort = "Oxbay_port"; break;
				case FRANCE: rldLocator = "Falaise_de_fleur_location_03_04"; loadPort = "Falaise_de_fleur_location_03"; break;
				case SPAIN: rldLocator = "Reload2"; loadPort = "Muelle_port"; break;
				case PIRATE: rldLocator = "Reload1"; loadPort = "QC_town_exit"; break;
				case HOLLAND: rldLocator = "Reload3"; loadPort = "Douwesen_port"; break;
				case PORTUGAL: rldLocator = "Reload1"; loadPort = "Conceicao_port"; break;
				case PERSONAL_NATION: rldLocator = "Reload1"; loadPort = "Oxbay_port"; break; // KK
			}
// added by MAXIMUS [choose character mod] <--
			chrEnableReloadLocator(loadPort, rldLocator, true);
		break;

		case "Tut_ReloadPlayerToOxbayTown":
			Characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "NowGoTotheStore";
			LAi_ActorDialog(CharacterFromID("Malcolm Hatcher"), PChar, "", 3.0, 1.0);
// added by MAXIMUS [choose character mod] -->
			loadPort = "Oxbay_port";
			switch(sti(PChar.nation))
			{
				case ENGLAND: loadPort = "Oxbay_port"; Locations[FindLocation(loadPort)].reload.l2.disable = 0; break;
				case FRANCE: 
					loadPort = "Falaise_de_fleur_port_01"; 

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;
					Locations[FindLocation(loadPort)].reload.l5.disable = 0;
					Locations[FindLocation(loadPort)].reload.l6.disable = 0;
				break;
				case SPAIN: 
					loadPort = "Muelle_port"; 

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;
					Locations[FindLocation(loadPort)].reload.l5.disable = 0;
				break;
				case PIRATE: loadPort = "QC_port"; Locations[FindLocation(loadPort)].reload.l2.disable = 0;	break;
				case HOLLAND: 
					loadPort = "Douwesen_port";

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;
					Locations[FindLocation(loadPort)].reload.l5.disable = 0; 
				break;
				case PORTUGAL: loadPort = "Conceicao_port"; break;
				case PERSONAL_NATION: loadPort = "Oxbay_port"; Locations[FindLocation(loadPort)].reload.l2.disable = 0; break; // KK
			}

			Locations[FindLocation(loadPort)].reload.l1.disable = 0;
			Locations[FindLocation(loadPort)].reload.l3.disable = 0;
			Locations[FindLocation(loadPort)].reload.l4.disable = 0;
// added by MAXIMUS [choose character mod] <--
		break;
	
		case "Tut_MalcolmShowsTheStore":
// added by MAXIMUS [choose character mod] -->
			loadTown = "Oxbay_town";
			loadStore = "Oxbay_store";
			rldLocator = "Reload15";
			gotoLocator = "locator6";
			switch(sti(PChar.nation))
			{
				case ENGLAND:
					loadTown = "Oxbay_town";
					loadStore = "Oxbay_store";
					rldLocator = "Reload15";
					gotoLocator = "locator6";

					Locations[FindLocation(loadTown)].reload.l5.disable = 1;
					Locations[FindLocation(loadTown)].reload.l6.disable = 1;
					Locations[FindLocation(loadTown)].reload.l7.disable = 1;
					Locations[FindLocation(loadTown)].reload.l8.disable = 1;
					Locations[FindLocation(loadTown)].reload.l9.disable = 1;
					Locations[FindLocation(loadTown)].reload.l10.disable = 1;
					Locations[FindLocation(loadTown)].reload.l11.disable = 1;
					Locations[FindLocation(loadTown)].reload.l12.disable = 1;
					Locations[FindLocation(loadTown)].reload.l13.disable = 1;
					Locations[FindLocation(loadTown)].reload.l14.disable = 1;
				break;
				case FRANCE:
					loadTown = "Falaise_de_fleur_location_04"; 
					loadStore = "Falaise_de_Fleur_store"; 
					rldLocator = "Falaise_de_fleur_store"; 
					gotoLocator = "goto3"; 
				break;
				case SPAIN:
					loadTown = "Muelle_town_01"; 
					loadStore = "Muelle_Store";
					rldLocator = "reload8"; // KK
					gotoLocator = "locator5"; 

					Locations[FindLocation(loadTown)].reload.l5.disable = 1;
					Locations[FindLocation(loadTown)].reload.l6.disable = 1;
					Locations[FindLocation(loadTown)].reload.l7.disable = 1;
					Locations[FindLocation(loadTown)].reload.l8.disable = 1;
					Locations[FindLocation(loadTown)].reload.l9.disable = 1;
					Locations[FindLocation(loadTown)].reload.l10.disable = 1;
					Locations[FindLocation(loadTown)].reload.l11.disable = 1;
					Locations[FindLocation(loadTown)].reload.l12.disable = 1;
					Locations[FindLocation(loadTown)].reload.l13.disable = 1;
					Locations[FindLocation(loadTown)].reload.l14.disable = 1;
					Locations[FindLocation(loadTown)].reload.l15.disable = 1;
					Locations[FindLocation(loadTown)].reload.l16.disable = 1;
					Locations[FindLocation(loadTown)].reload.l17.disable = 1;
					Locations[FindLocation(loadTown)].reload.l18.disable = 1;
					Locations[FindLocation(loadTown)].reload.l19.disable = 1;
				break;
				case PIRATE:
					loadTown = "QC_town";
					loadStore = "QC_store";
					rldLocator = "reload5";
					gotoLocator = "locator7";

					Locations[FindLocation(loadTown)].reload.l5.disable = 1;
					Locations[FindLocation(loadTown)].reload.l6.disable = 1;
					Locations[FindLocation(loadTown)].reload.l7.disable = 1;
				break;
				case HOLLAND: 
					loadTown = "Douwesen_town";
					loadStore = "Douwesen_Store";
					rldLocator = "reload4";
					gotoLocator = "goto5";

					Locations[FindLocation(loadTown)].reload.l5.disable = 1;
					Locations[FindLocation(loadTown)].reload.l6.disable = 1;
					Locations[FindLocation(loadTown)].reload.l7.disable = 1;
					Locations[FindLocation(loadTown)].reload.l8.disable = 1;
					Locations[FindLocation(loadTown)].reload.l9.disable = 1;
					Locations[FindLocation(loadTown)].reload.l10.disable = 1;
					Locations[FindLocation(loadTown)].reload.l11.disable = 1;
				break;
				case PORTUGAL:
					loadTown = "Conceicao_town";
					loadStore = "Conceicao_Store";
					rldLocator = "reload18";
					gotoLocator = "goto6";

					Locations[FindLocation(loadTown)].reload.l5.disable = 1;
					Locations[FindLocation(loadTown)].reload.l6.disable = 1;
					Locations[FindLocation(loadTown)].reload.l7.disable = 1;
					Locations[FindLocation(loadTown)].reload.l8.disable = 1;
					Locations[FindLocation(loadTown)].reload.l9.disable = 1;
					Locations[FindLocation(loadTown)].reload.l10.disable = 1;
					Locations[FindLocation(loadTown)].reload.l11.disable = 1;
					Locations[FindLocation(loadTown)].reload.l12.disable = 1;
				break;
				// TIH --> defaults added (mimics ENGLAND) Aug27'06
				// default:
					Locations[FindLocation(loadTown)].reload.l5.disable = 1;
					Locations[FindLocation(loadTown)].reload.l6.disable = 1;
					Locations[FindLocation(loadTown)].reload.l7.disable = 1;
					Locations[FindLocation(loadTown)].reload.l8.disable = 1;
					Locations[FindLocation(loadTown)].reload.l9.disable = 1;
					Locations[FindLocation(loadTown)].reload.l10.disable = 1;
					Locations[FindLocation(loadTown)].reload.l11.disable = 1;
					Locations[FindLocation(loadTown)].reload.l12.disable = 1;
					Locations[FindLocation(loadTown)].reload.l13.disable = 1;
					Locations[FindLocation(loadTown)].reload.l14.disable = 1;
				// TIH <--
			}

			Locations[FindLocation(loadTown)].reload.l1.disable = 1;
			Locations[FindLocation(loadTown)].reload.l2.disable = 1;
			Locations[FindLocation(loadTown)].reload.l3.disable = 1;
			Locations[FindLocation(loadTown)].reload.l4.disable = 1;

			LAi_ActorgoToLocation(CharacterFromID("Malcolm Hatcher"), "Reload", rldLocator, loadStore, "goto", gotoLocator, "tut_StoreOpened", 0);

			pchar.quest.Tut_PlayerEntersTheStore.win_condition.l1 = "location";
			pchar.quest.Tut_PlayerEntersTheStore.win_condition.l1.location = loadStore;
// added by MAXIMUS [choose character mod] <--
			pchar.quest.Tut_PlayerEntersTheStore.win_condition = "Tut_PlayerEntersTheStore";
			pchar.skipstoretime = true; // NK 04-11-15
		break;

		case "tut_StoreOpened":
// added by MAXIMUS [choose character mod] -->
			loadTown = "Oxbay_town";
			rldLocator = "reload15";
			switch(sti(PChar.nation))
			{
				case ENGLAND: rldLocator = "reload15"; loadTown = "Oxbay_town"; break;
				case FRANCE: rldLocator = "Falaise_de_fleur_store"; loadTown = "Falaise_de_fleur_location_04"; break;
				case SPAIN: rldLocator = "reload8"; loadTown = "Muelle_town_01"; break;
				case PIRATE: rldLocator = "reload5"; loadTown = "QC_town"; break;
				case HOLLAND: rldLocator = "reload4"; loadTown = "Douwesen_town"; break;
				case PORTUGAL: rldLocator = "reload18"; loadTown = "Conceicao_town"; break;
				case PERSONAL_NATION: rldLocator = "reload15"; loadTown = "Oxbay_town"; break; // KK
			}

			chrEnableReloadLocator(loadTown, rldLocator, true);
// added by MAXIMUS [choose character mod] <--
		break;

		case "Tut_PlayerEntersTheStore":
// added by MAXIMUS [choose character mod] -->
			loadStore = "Oxbay_store";
			rldLocator = "locator2";
			switch(sti(PChar.nation))
			{
				case ENGLAND: rldLocator = "locator2"; loadStore = "Oxbay_store"; break;
				case FRANCE: rldLocator = "reload1"; loadStore = "Falaise_de_Fleur_store"; break;
				case SPAIN: rldLocator = "locator2"; loadStore = "Muelle_Store"; break;
				case PIRATE: rldLocator = "locator2"; loadStore = "QC_store"; break;
				case HOLLAND: rldLocator = "reload1"; loadStore = "Douwesen_Store"; break;
				case PORTUGAL: rldLocator = "reload1"; loadStore = "Conceicao_Store"; break;
				case PERSONAL_NATION: rldLocator = "locator2"; loadStore = "Oxbay_store"; break; // KK
			}
			chrEnableReloadLocator(loadStore, rldLocator, false);
// added by MAXIMUS [choose character mod] <--

			Characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "MoreDetailsOnTrade";
			LAi_ActorDialog(CharacterFromID("Malcolm Hatcher"), PChar, "", 3.0, 1.0);
		break;

		case "Tut_StartTrading":
// added by MAXIMUS [choose character mod] -->
			loadTown = "Oxbay_town";
			rldLocator = "locator2";
			gotoLocator = "goto26";
			switch(sti(PChar.nation))
			{
				case ENGLAND: rldLocator = "locator2"; loadTown = "Oxbay_town"; gotoLocator = "goto26"; break;
				case FRANCE: rldLocator = "reload1"; loadTown = "Falaise_de_fleur_location_04"; gotoLocator = "locator12"; break;
				case SPAIN: rldLocator = "locator2"; loadTown = "Muelle_town_01"; gotoLocator = "goto52"; break;
				case PIRATE: rldLocator = "locator2"; loadTown = "QC_town"; gotoLocator = "goto7"; break;
				case HOLLAND: rldLocator = "reload1"; loadTown = "Douwesen_town"; gotoLocator = "goto35"; break;
				case PORTUGAL: rldLocator = "reload1"; loadTown = "Conceicao_town"; gotoLocator = "goto4"; break;
				case PERSONAL_NATION: rldLocator = "locator2"; loadTown = "Oxbay_town"; gotoLocator = "goto26"; break; // KK
			}
// added by MAXIMUS [choose character mod] <--
			LAi_ActorGoToLocation(CharacterFromID("Malcolm Hatcher"), "Reload", rldLocator, loadTown, "goto", gotoLocator, "Tut_FreeFromStore", 0);
			
			pchar.quest.Tut_ToOxbayAfterTrading.win_condition.l1 = "location";
			pchar.quest.Tut_ToOxbayAfterTrading.win_condition.l1.location = loadTown;
			pchar.quest.Tut_ToOxbayAfterTrading.win_condition = "Tut_ToOxbayAfterTrading";
		break;

		case "Tut_FreeFromStore":
// added by MAXIMUS [choose character mod] -->
			loadStore = "Oxbay_store";
			rldLocator = "locator2";
			switch(sti(PChar.nation))
			{
				case ENGLAND: rldLocator = "locator2"; loadStore = "Oxbay_store"; break;
				case FRANCE: rldLocator = "reload1"; loadStore = "Falaise_de_Fleur_store"; break;
				case SPAIN: rldLocator = "locator2"; loadStore = "Muelle_Store"; break;
				case PIRATE: rldLocator = "locator2"; loadStore = "QC_store"; break;
				case HOLLAND: rldLocator = "reload1"; loadStore = "Douwesen_Store"; break;
				case PORTUGAL: rldLocator = "reload1"; loadStore = "Conceicao_Store"; break;
				case PERSONAL_NATION: rldLocator = "locator2"; loadStore = "Oxbay_store"; break; // KK
			}
// added by MAXIMUS [choose character mod] <--
			chrEnableReloadLocator(loadStore, rldLocator, true);
		break;
			
		case "Tut_ToOxbayAfterTrading":
			DeleteAttribute(pchar,"skipstoretime"); // NK 04-11-15
			LAi_SetFightMode(PChar, false);
			Characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "GoodsSoldInStore";
			LAi_ActorDialog(CharacterFromID("Malcolm Hatcher"), PChar, "", 3.0, 1.0);
// added by MAXIMUS [choose character mod] -->
			loadTown = "Oxbay_town";
			switch(sti(PChar.nation))
			{
				case ENGLAND:
					loadTown = "Oxbay_town";

					Locations[FindLocation(loadTown)].reload.l5.disable = 1;
					Locations[FindLocation(loadTown)].reload.l6.disable = 1;
					Locations[FindLocation(loadTown)].reload.l7.disable = 1;
					Locations[FindLocation(loadTown)].reload.l8.disable = 1;
					Locations[FindLocation(loadTown)].reload.l9.disable = 1;
					Locations[FindLocation(loadTown)].reload.l10.disable = 1;
					Locations[FindLocation(loadTown)].reload.l11.disable = 1;
					Locations[FindLocation(loadTown)].reload.l12.disable = 1;
					Locations[FindLocation(loadTown)].reload.l13.disable = 1;
					Locations[FindLocation(loadTown)].reload.l14.disable = 1;
				break;

				case FRANCE:
					loadTown = "Falaise_de_fleur_location_04";
				break;

				case SPAIN:
					loadTown = "Muelle_town_01";

					Locations[FindLocation(loadTown)].reload.l5.disable = 1;
					Locations[FindLocation(loadTown)].reload.l6.disable = 1;
					Locations[FindLocation(loadTown)].reload.l7.disable = 1;
					Locations[FindLocation(loadTown)].reload.l8.disable = 1;
					Locations[FindLocation(loadTown)].reload.l9.disable = 1;
					Locations[FindLocation(loadTown)].reload.l10.disable = 1;
					Locations[FindLocation(loadTown)].reload.l11.disable = 1;
					Locations[FindLocation(loadTown)].reload.l12.disable = 1;
					Locations[FindLocation(loadTown)].reload.l13.disable = 1;
					Locations[FindLocation(loadTown)].reload.l14.disable = 1;
					Locations[FindLocation(loadTown)].reload.l15.disable = 1;
					Locations[FindLocation(loadTown)].reload.l16.disable = 1;
					Locations[FindLocation(loadTown)].reload.l17.disable = 1;
					Locations[FindLocation(loadTown)].reload.l18.disable = 1;
					Locations[FindLocation(loadTown)].reload.l19.disable = 1;
				break;

				case PIRATE:
					loadTown = "QC_town";

					Locations[FindLocation(loadTown)].reload.l5.disable = 1;
					Locations[FindLocation(loadTown)].reload.l6.disable = 1;
					Locations[FindLocation(loadTown)].reload.l7.disable = 1;
				break;

				case HOLLAND:
					loadTown = "Douwesen_town";

					Locations[FindLocation(loadTown)].reload.l5.disable = 1;
					Locations[FindLocation(loadTown)].reload.l6.disable = 1;
					Locations[FindLocation(loadTown)].reload.l7.disable = 1;
					Locations[FindLocation(loadTown)].reload.l8.disable = 1;
					Locations[FindLocation(loadTown)].reload.l9.disable = 1;
					Locations[FindLocation(loadTown)].reload.l10.disable = 1;
					Locations[FindLocation(loadTown)].reload.l11.disable = 1;
				break;

				case PORTUGAL:
					loadTown = "Conceicao_town";

					Locations[FindLocation(loadTown)].reload.l5.disable = 1;
					Locations[FindLocation(loadTown)].reload.l6.disable = 1;
					Locations[FindLocation(loadTown)].reload.l7.disable = 1;
					Locations[FindLocation(loadTown)].reload.l8.disable = 1;
					Locations[FindLocation(loadTown)].reload.l9.disable = 1;
					Locations[FindLocation(loadTown)].reload.l10.disable = 1;
					Locations[FindLocation(loadTown)].reload.l11.disable = 1;
					Locations[FindLocation(loadTown)].reload.l12.disable = 1;
				break;
				// TIH --> defaults added (mimics ENGLAND) Aug27'06
				// default:
					Locations[FindLocation(loadTown)].reload.l5.disable = 1;
					Locations[FindLocation(loadTown)].reload.l6.disable = 1;
					Locations[FindLocation(loadTown)].reload.l7.disable = 1;
					Locations[FindLocation(loadTown)].reload.l8.disable = 1;
					Locations[FindLocation(loadTown)].reload.l9.disable = 1;
					Locations[FindLocation(loadTown)].reload.l10.disable = 1;
					Locations[FindLocation(loadTown)].reload.l11.disable = 1;
					Locations[FindLocation(loadTown)].reload.l12.disable = 1;
					Locations[FindLocation(loadTown)].reload.l13.disable = 1;
					Locations[FindLocation(loadTown)].reload.l14.disable = 1;
				// TIH <--
			}

			Locations[FindLocation(loadTown)].reload.l1.disable = 1;
			Locations[FindLocation(loadTown)].reload.l2.disable = 1;
			Locations[FindLocation(loadTown)].reload.l3.disable = 1;
			Locations[FindLocation(loadTown)].reload.l4.disable = 1;
// added by MAXIMUS [choose character mod] <--
		break;

		case "BackToTown":
			switch(sti(PChar.nation))
			{
				case FRANCE:
// KK -->
					LAi_ActorGoToLocation(CharacterFromID("Malcolm Hatcher"), "reload", "Falaise_de_fleur_location_04_03", "Falaise_de_fleur_location_03", "officers", "Falaise_de_fleur_location_03_04_1", "OpenFdFCenterGates", 1000);
					PChar.quest.GoToFdFTavern.win_condition.l1 = "location";
					PChar.quest.GoToFdFTavern.win_condition.l1.character = PChar.id;
					PChar.quest.GoToFdFTavern.win_condition.l1.location = "Falaise_de_fleur_location_03";
					PChar.quest.GoToFdFTavern.win_condition = "GoToFdFTavern";
// <-- KK
				break;
				pchar.quest.GoToTavern.win_condition = "GoToTavern";
			}
		break;

// KK -->
		case "OpenFdFCenterGates":
			Locations[FindLocation("Falaise_de_fleur_location_04")].reload.l1.disable = 0;
		break;

		case "GoToFdFTavern":
			characters[GetCharacterIndex("Patric Cardone")].Dialog.Filename = "patric cardone_dialog.c";
			LAi_QuestDelay("GoToTavern", 0.0);// "0." is bad, use something legit
		break;
// <-- KK

		case "GoToTavern":
			loadTown = "Oxbay_town";
			loadTavern = "Oxbay_tavern";
			rldLocator = "Reload13"; 
			gotoLocator = "goto20";
			switch(sti(PChar.nation))
			{
				case ENGLAND: loadTown = "Oxbay_town"; rldLocator = "Reload13"; loadTavern = "Oxbay_tavern"; gotoLocator = "goto20"; break;
				case FRANCE: 
					loadTown = "Falaise_de_fleur_location_03"; 
					rldLocator = "Falaise_de_fleur_tavern"; 
					loadTavern = "Falaise_de_fleur_tavern"; 
					gotoLocator = "goto4"; 

					Locations[FindLocation(loadTown)].reload.l1.disable = 1;
					Locations[FindLocation(loadTown)].reload.l2.disable = 1;
					Locations[FindLocation(loadTown)].reload.l3.disable = 1;
					Locations[FindLocation(loadTown)].reload.l4.disable = 1;
					Locations[FindLocation(loadTown)].reload.l5.disable = 1;
					Locations[FindLocation(loadTown)].reload.l6.disable = 1;
					Locations[FindLocation(loadTown)].reload.l7.disable = 1;
					Locations[FindLocation(loadTown)].reload.l8.disable = 1;
					Locations[FindLocation(loadTown)].reload.l9.disable = 1;
					Locations[FindLocation(loadTown)].reload.l10.disable = 1;
					Locations[FindLocation(loadTown)].reload.l11.disable = 1;
					Locations[FindLocation(loadTown)].reload.l12.disable = 1;
				break;
				case SPAIN: loadTown = "Muelle_town_01"; rldLocator = "reload14"; loadTavern = "Muelle_Tavern"; gotoLocator = "goto6"; break;
				case PIRATE: loadTown = "QC_town"; rldLocator = "reload2"; loadTavern = "QC_Tavern"; gotoLocator = "goto6"; break;
				case HOLLAND: loadTown = "Douwesen_town"; rldLocator = "reload3"; loadTavern = "Douwesen_tavern"; gotoLocator = "goto4"; break;
				case PORTUGAL: loadTown = "Conceicao_town"; rldLocator = "reload4"; loadTavern = "Conceicao_Tavern"; gotoLocator = "goto6"; break;
				case PERSONAL_NATION: loadTown = "Oxbay_town"; rldLocator = "Reload13"; loadTavern = "Oxbay_tavern"; gotoLocator = "goto20"; break; // KK
			}

			LAi_ActorgoToLocation(CharacterFromID("Malcolm Hatcher"), "Reload", rldLocator, loadTavern, "goto", gotoLocator, "Tut_TavernOpened", 0);

			pchar.quest.Tut_ToTavernForCrew.win_condition.l1 = "location";
			pchar.quest.Tut_ToTavernForCrew.win_condition.l1.location = loadTavern;
			pchar.quest.Tut_ToTavernForCrew.win_condition = "Tut_ToTavernForCrew";
		break;

		case "Tut_MalcolmLeadsToTavern":
			pchar.quest.BackToTown.win_condition = "BackToTown";
		break;

		case "Tut_TavernOpened":
// added by MAXIMUS [choose character mod] -->
			loadTown = "Oxbay_town";
			rldLocator = "reload13";
			switch(sti(PChar.nation))
			{
				case ENGLAND: rldLocator = "reload13"; loadTown = "Oxbay_town"; break;
				case FRANCE: rldLocator = "Falaise_de_fleur_tavern"; loadTown = "Falaise_de_fleur_location_03"; break;
				case SPAIN: rldLocator = "reload14"; loadTown = "Muelle_town_01"; break;
				case PIRATE: rldLocator = "reload2"; loadTown = "QC_town"; break;
				case HOLLAND: rldLocator = "reload3"; loadTown = "Douwesen_town"; break;
				case PORTUGAL: rldLocator = "reload4"; loadTown = "Conceicao_town"; break;
				case PERSONAL_NATION: rldLocator = "reload13"; loadTown = "Oxbay_town"; break; // KK
			}
// added by MAXIMUS [choose character mod] <--
			chrEnableReloadLocator(loadTown, rldLocator, true);
		break;

		case "Tut_ToTavernForCrew":
// added by MAXIMUS [choose character mod] -->
			loadTavern = "Oxbay_tavern";
			rldLocator = "reload1";
			switch(sti(PChar.nation))
			{
				case ENGLAND: rldLocator = "reload1"; loadTavern = "Oxbay_tavern"; break;
				case FRANCE: rldLocator = "reload1"; loadPort = "Falaise_de_fleur_tavern"; break;
				case SPAIN: rldLocator = "reload1"; loadTavern = "Muelle_Tavern"; break;
				case PIRATE: rldLocator = "reload1"; loadTavern = "QC_Tavern"; break;
				case HOLLAND: rldLocator = "reload1"; loadTavern = "Douwesen_tavern"; break;
				case PORTUGAL: rldLocator = "reload1"; loadTavern = "Conceicao_Tavern"; break;
				case PERSONAL_NATION: rldLocator = "reload1"; loadTavern = "Oxbay_tavern"; break; // KK
			}
// added by MAXIMUS [choose character mod] <--
			chrEnableReloadLocator(loadTavern, rldLocator, false);
			Characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "CrewHiringInTavern";
			LAi_ActorDialog(CharacterFromID("Malcolm Hatcher"), PChar, "", 3.0, 1.0);
		break;

		case "Tut_MalcolmLeavesTavern":
// added by MAXIMUS [choose character mod] -->
			loadTown = "Oxbay_town";
			rldLocator = "Reload1";
			gotoLocator = "goto41";
			switch(sti(PChar.nation))
			{
				case ENGLAND: rldLocator = "Reload1"; loadTown = "Oxbay_town"; gotoLocator = "goto41"; break;
				case FRANCE: rldLocator = "Reload1"; loadTown = "Falaise_de_fleur_location_03"; gotoLocator = "locator9"; break;
				case SPAIN: rldLocator = "Reload1"; loadTown = "Muelle_town_01"; gotoLocator = "goto93"; break;
				case PIRATE: rldLocator = "Reload1"; loadTown = "QC_town"; gotoLocator = "goto12"; break;
				case HOLLAND: rldLocator = "Reload1"; loadTown = "Douwesen_town"; gotoLocator = "goto33"; break;
				case PORTUGAL: rldLocator = "Reload1"; loadTown = "Conceicao_town"; gotoLocator = "goto4"; break;
				case PERSONAL_NATION: rldLocator = "Reload1"; loadTown = "Oxbay_town"; gotoLocator = "goto41"; break; // KK
			}
// added by MAXIMUS [choose character mod] <--
			LAi_ActorGoToLocation(CharacterFromID("Malcolm Hatcher"), "Reload", rldLocator, loadTown, "goto", gotoLocator, "Tut_FreeFromTavern", 0);
			
			pchar.quest.Tut_ToOxbayAfterHiring.win_condition.l1 = "location";
			pchar.quest.Tut_ToOxbayAfterHiring.win_condition.l1.location = loadTown;
			pchar.quest.Tut_ToOxbayAfterHiring.win_condition = "Tut_ToOxbayAfterHiring";
		break;

		case "Tut_FreeFromTavern":
// added by MAXIMUS [choose character mod] -->
			loadTavern = "Oxbay_tavern";
			rldLocator = "Reload1";
			switch(sti(PChar.nation))
			{
				case ENGLAND: rldLocator = "Reload1"; loadTavern = "Oxbay_tavern"; break;
				case FRANCE: rldLocator = "Reload1"; loadTavern = "Falaise_de_fleur_tavern"; break;
				case SPAIN: rldLocator = "Reload1"; loadTavern = "Muelle_Tavern"; break;
				case PIRATE: rldLocator = "Reload1"; loadTavern = "QC_Tavern"; break;
				case HOLLAND: rldLocator = "Reload1"; loadTavern = "Douwesen_tavern"; break;
				case PORTUGAL: rldLocator = "Reload1"; loadTavern = "Conceicao_Tavern"; break;
				case PERSONAL_NATION: rldLocator = "Reload1"; loadTavern = "Oxbay_tavern"; break; // KK
			}
// added by MAXIMUS [choose character mod] <--
			chrEnableReloadLocator(loadTavern, rldLocator, true);
		break;

		case "Tut_ToOxbayAfterHiring":
			LAi_SetFightMode(PChar, false);
			Characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "CrewHiredintavern";
			LAi_ActorDialog(CharacterFromID("Malcolm Hatcher"), PChar, "", 0, 1.0);
// added by MAXIMUS [choose character mod] -->
			loadTown = "Oxbay_town";
			switch(sti(PChar.nation))
			{
				case ENGLAND:
					loadTown = "Oxbay_town";

					Locations[FindLocation(loadTown)].reload.l8.disable = 1;
					Locations[FindLocation(loadTown)].reload.l9.disable = 1;
					Locations[FindLocation(loadTown)].reload.l10.disable = 1;
					Locations[FindLocation(loadTown)].reload.l11.disable = 1;
					Locations[FindLocation(loadTown)].reload.l12.disable = 1;
					Locations[FindLocation(loadTown)].reload.l13.disable = 1;
					Locations[FindLocation(loadTown)].reload.l14.disable = 1;
				break;
				case FRANCE:
					loadTown = "Falaise_de_fleur_location_03";

					Locations[FindLocation(loadTown)].reload.l8.disable = 1;
					Locations[FindLocation(loadTown)].reload.l9.disable = 1;
					Locations[FindLocation(loadTown)].reload.l10.disable = 1;
					Locations[FindLocation(loadTown)].reload.l11.disable = 1;
					Locations[FindLocation(loadTown)].reload.l12.disable = 1;
				break;
				case SPAIN:
					loadTown = "Muelle_town_01";

					Locations[FindLocation(loadTown)].reload.l8.disable = 1;
					Locations[FindLocation(loadTown)].reload.l9.disable = 1;
					Locations[FindLocation(loadTown)].reload.l10.disable = 1;
					Locations[FindLocation(loadTown)].reload.l11.disable = 1;
					Locations[FindLocation(loadTown)].reload.l12.disable = 1;
					Locations[FindLocation(loadTown)].reload.l13.disable = 1;
					Locations[FindLocation(loadTown)].reload.l14.disable = 1;
					Locations[FindLocation(loadTown)].reload.l15.disable = 1;
					Locations[FindLocation(loadTown)].reload.l16.disable = 1;
					Locations[FindLocation(loadTown)].reload.l17.disable = 1;
					Locations[FindLocation(loadTown)].reload.l18.disable = 1;
					Locations[FindLocation(loadTown)].reload.l19.disable = 1;
				break;
				case PIRATE:
					loadTown = "QC_town";
				break;
				case HOLLAND:
					loadTown = "Douwesen_town";

					Locations[FindLocation(loadTown)].reload.l8.disable = 1;
					Locations[FindLocation(loadTown)].reload.l9.disable = 1;
					Locations[FindLocation(loadTown)].reload.l10.disable = 1;
					Locations[FindLocation(loadTown)].reload.l11.disable = 1;
				break;
				case PORTUGAL:
					loadTown = "Conceicao_town";

					Locations[FindLocation(loadTown)].reload.l8.disable = 1;
					Locations[FindLocation(loadTown)].reload.l9.disable = 1;
					Locations[FindLocation(loadTown)].reload.l10.disable = 1;
					Locations[FindLocation(loadTown)].reload.l11.disable = 1;
					Locations[FindLocation(loadTown)].reload.l12.disable = 1;
				break;
				// TIH --> defaults added (mimics ENGLAND) Aug27'06
				// default:
					Locations[FindLocation(loadTown)].reload.l8.disable = 1;
					Locations[FindLocation(loadTown)].reload.l9.disable = 1;
					Locations[FindLocation(loadTown)].reload.l10.disable = 1;
					Locations[FindLocation(loadTown)].reload.l11.disable = 1;
					Locations[FindLocation(loadTown)].reload.l12.disable = 1;
					Locations[FindLocation(loadTown)].reload.l13.disable = 1;
					Locations[FindLocation(loadTown)].reload.l14.disable = 1;
				// TIH <--
			}

			Locations[FindLocation(loadTown)].reload.l1.disable = 1;
			Locations[FindLocation(loadTown)].reload.l2.disable = 1;
			Locations[FindLocation(loadTown)].reload.l3.disable = 1;
			Locations[FindLocation(loadTown)].reload.l4.disable = 1;
			Locations[FindLocation(loadTown)].reload.l5.disable = 1;
			Locations[FindLocation(loadTown)].reload.l6.disable = 1;
			Locations[FindLocation(loadTown)].reload.l7.disable = 1;
// added by MAXIMUS [choose character mod] <--
		break;


		case "Tut_BooGoForShipyard":
// added by MAXIMUS [choose character mod] -->
			loadTown = "Oxbay_town"; 
			loadShipyard = "Oxbay_shipyard";
			rldLocator = "Reload3";
			gotoLocator = "goto1";
			switch(sti(PChar.nation))
			{
				case ENGLAND: loadTown = "Oxbay_town"; rldLocator = "Reload3"; loadShipyard = "Oxbay_shipyard"; gotoLocator = "goto1"; break;
				case FRANCE: loadTown = "Falaise_de_fleur_location_03"; rldLocator = "Falaise_de_fleur_shipyard"; loadShipyard = "Falaise_de_fleur_shipyard"; gotoLocator = "goto7"; break;
				case SPAIN: loadTown = "Muelle_town_01"; rldLocator = "reload17"; loadShipyard = "Muelle_Shipyard"; gotoLocator = "goto7"; break;
				case PIRATE: loadTown = "QC_town"; rldLocator = "Reload4"; loadShipyard = "QC_Shipyard"; gotoLocator = "goto7"; break;
				case HOLLAND: loadTown = "Douwesen_town"; rldLocator = "reload11"; loadShipyard = "Douwesen_shipyard"; gotoLocator = "goto1"; break;
				case PORTUGAL: loadTown = "Conceicao_town"; rldLocator = "reload13"; loadShipyard = "Conceicao_Shipyard"; gotoLocator = "goto4"; break;
				case PERSONAL_NATION: loadTown = "Oxbay_town"; rldLocator = "Reload3"; loadShipyard = "Oxbay_shipyard"; gotoLocator = "goto1"; break; // KK
			}
// added by MAXIMUS [choose character mod] <--
			LAi_ActorgoToLocation(CharacterFromID("Malcolm Hatcher"), "Reload", rldLocator, loadShipyard, "goto", gotoLocator, "Tut_ShipyardOpened", 0);
			
			pchar.quest.Tut_ToShipyardForRepairs.win_condition.l1 = "location";
			pchar.quest.Tut_ToShipyardForRepairs.win_condition.l1.location = loadShipyard;
			pchar.quest.Tut_ToShipyardForRepairs.win_condition = "Tut_ToShipyardForRepairs";
		break;

		case "Tut_ShipyardOpened":
// added by MAXIMUS [choose character mod] -->
			loadTown = "Oxbay_town";
			rldLocator = "Reload3";
			switch(sti(PChar.nation))
			{
				case ENGLAND: rldLocator = "Reload3"; loadTown = "Oxbay_town"; break;
				case FRANCE: rldLocator = "Falaise_de_fleur_shipyard"; loadTown = "Falaise_de_fleur_location_03"; break;
				case SPAIN: rldLocator = "reload17"; loadTown = "Muelle_town_01"; break;
				case PIRATE: rldLocator = "Reload4"; loadTown = "QC_town"; break;
				case HOLLAND: rldLocator = "reload11"; loadTown = "Douwesen_town"; break;
				case PORTUGAL: rldLocator = "reload13"; loadTown = "Conceicao_town"; break;
				case PERSONAL_NATION: rldLocator = "Reload3"; loadTown = "Oxbay_town"; break; // KK
			}
// added by MAXIMUS [choose character mod] <--
			//Locations[FindLocation("Oxbay_town")].reload.l7.disable = 0;
			chrEnableReloadLocator(loadTown, rldLocator, true);
		break;

		case "Tut_ToShipyardForRepairs":
// added by MAXIMUS [choose character mod] -->
			loadShipyard = "Oxbay_shipyard";
			rldLocator = "reload1";
			switch(sti(PChar.nation))
			{
				case ENGLAND: rldLocator = "reload1"; loadShipyard = "Oxbay_shipyard"; break;
				case FRANCE: rldLocator = "locator2"; loadShipyard = "Falaise_de_fleur_shipyard"; break;
				case SPAIN: rldLocator = "locator2"; loadShipyard = "Muelle_Shipyard"; break;
				case PIRATE: rldLocator = "locator2"; loadShipyard = "QC_Shipyard"; break;
				case HOLLAND: rldLocator = "reload1"; loadShipyard = "Douwesen_shipyard"; break;
				case PORTUGAL: rldLocator = "reload1"; loadShipyard = "Conceicao_Shipyard"; break;
				case PERSONAL_NATION: rldLocator = "reload1"; loadShipyard = "Oxbay_shipyard"; break; // KK
			}
// added by MAXIMUS [choose character mod] <--
			chrEnableReloadLocator(loadShipyard, rldLocator, false);
			Characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "ShipRepairing";
			LAi_ActorDialog(CharacterFromID("Malcolm Hatcher"), PChar, "", 3.0, 1.0);
		break;

		case "Tut_MalcolmLeavesShipyard":
// added by MAXIMUS [choose character mod] -->
			loadTown = "Oxbay_town";
			rldLocator = "reload1";
			gotoLocator = "goto23";
			switch(sti(PChar.nation))
			{
				case ENGLAND: rldLocator = "reload1"; loadTown = "Oxbay_town"; gotoLocator = "goto23"; break;
				case FRANCE: rldLocator = "locator2"; loadTown = "Falaise_de_fleur_location_03"; gotoLocator = "locator7"; break;
				case SPAIN: rldLocator = "locator2"; loadTown = "Muelle_town_01"; gotoLocator = "goto89"; break;
				case PIRATE: rldLocator = "locator2"; loadTown = "QC_town"; gotoLocator = "goto5"; break;
				case HOLLAND: rldLocator = "reload1"; loadTown = "Douwesen_town"; gotoLocator = "goto5"; break;
				case PORTUGAL: rldLocator = "reload1"; loadTown = "Conceicao_town"; gotoLocator = "goto11"; break;
				case PERSONAL_NATION: rldLocator = "reload1"; loadTown = "Oxbay_town"; gotoLocator = "goto23"; break; // KK
			}
// added by MAXIMUS [choose character mod] <--
			LAi_ActorGoToLocation(CharacterFromID("Malcolm Hatcher"), "Reload", rldLocator, loadTown, "goto", gotoLocator, "Tut_FreeFromShipyard", 0);
			
			pchar.quest.Tut_ToOxbayAfterFixing.win_condition.l1 = "location";
			pchar.quest.Tut_ToOxbayAfterFixing.win_condition.l1.location = loadTown;
			pchar.quest.Tut_ToOxbayAfterFixing.win_condition = "Tut_ToOxbayAfterFixing";
		break;

		case "Tut_FreeFromShipyard":
// added by MAXIMUS [choose character mod] -->
			loadShipyard = "Oxbay_shipyard";
			rldLocator = "reload1";
			switch(sti(PChar.nation))
			{
				case ENGLAND: rldLocator = "reload1"; loadShipyard = "Oxbay_shipyard"; break;
				case FRANCE: rldLocator = "locator2"; loadShipyard = "Falaise_de_fleur_shipyard"; break;
				case SPAIN: rldLocator = "locator2"; loadShipyard = "Muelle_Shipyard"; break;
				case PIRATE: rldLocator = "locator2"; loadShipyard = "QC_Shipyard"; break;
				case HOLLAND: rldLocator = "reload1"; loadShipyard = "Douwesen_shipyard"; break;
				case PORTUGAL: rldLocator = "reload1"; loadShipyard = "Conceicao_Shipyard"; break;
				case PERSONAL_NATION: rldLocator = "reload1"; loadShipyard = "Oxbay_shipyard"; break; // KK
			}
// added by MAXIMUS [choose character mod] <--
			chrEnableReloadLocator(loadShipyard, rldLocator, true);
		break;

		case "Tut_ToOxbayAfterFixing":
			Pchar.quest.Tut_KillTutor.over = "yes";
			locDisableUpdateTime = false;
			Characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "FinalStage";
			LAi_ActorDialog(CharacterFromID("Malcolm Hatcher"), PChar, "Tut_ReturnPlayer", 4.0, 1.0);
		break;

		case "Tut_SkipTutorialOnShip":
			DeleteAttribute(&PChar,"vcskip"); // NK 04-06

			locDisableUpdateTime = false;
			LAi_LockFightMode(Pchar, false);
			EndQuestMovie();
			TrackQuestMovie("end","Tut_SkipTutorialOnShip");
			LAi_RemoveCheckMinHP(CharacterFromID("Malcolm Hatcher"));
			LAi_RemoveCheckMinHP(Pchar);

			ResetHP(&PChar); // NK 05-07-03 - LAi_SetHP(PChar, LAI_DEFAULT_HP + sti(PChar.rank) * 5, LAI_DEFAULT_HP + sti(PChar.rank) * 5); //NK
			LAi_SetHP(CharacterFromID("Malcolm Hatcher"), 120.0, 120.0);
			LAi_group_SetAlarm("tutorial", LAI_GROUP_PLAYER, 0.0);
			LAi_group_SetRelation("tutorial", LAI_GROUP_PLAYER, LAI_GROUP_FRIEND);
			// boal 10.09.03 fix tutor bug -->
			LAi_SetActorTypeNoGroup(CharacterFromID("Malcolm Hatcher"));
			// boal <--

// added by MAXIMUS [choose character mod] -->
			loadPort = "Oxbay_port";
			questRecord = "Tutorial_AppearedOnIsland";
			loadTown = "Oxbay_town";
			gotoGroup = "goto";
			gotoLocator = "goto18";
			switch(sti(PChar.nation))
			{
				case ENGLAND:
					loadPort = "Oxbay_port";
				break;

				case FRANCE:
					loadPort = "Falaise_de_fleur_port_01";
					gotoLocator = "goto12";
				break;

				case SPAIN:
					loadPort = "Muelle_port";
					gotoLocator = "goto6";
				break;

				case PIRATE:
					loadPort = "QC_port";
					gotoGroup = "reload"; 
					gotoLocator = "reload3_back";
				break;

				case HOLLAND:
					loadPort = "Douwesen_port";
					gotoLocator = "goto15";
				break;

				case PORTUGAL:
					loadPort = "Conceicao_port";
					gotoLocator = "goto13";
				break;

// KK -->
				case PERSONAL_NATION:
					loadPort = "Oxbay_port";
				break;
// <-- KK
			}
			Locations[FindLocation(loadPort)].locators_radius.(gotoGroup).(gotoLocator) = 0.5;
			CloseQuestHeader(questRecord);
// added by MAXIMUS [choose character mod] <--

			if(CheckCharacterItem(Pchar, "blade1") == 0) GiveItem2Character(Pchar, "blade1");
			if(makeint(Pchar.money) == 1000) AddMoneyToCharacter(Pchar, 1000);

			if(CheckCharacterItem(Pchar, "Spyglass1") == 0) GiveItem2Character(Pchar, "Spyglass1");
				
			if(CheckCharacterItem(Pchar, "pistol1") == 0) GiveItem2Character(Pchar, "pistol1");
/*
ccc special weapons assembly kit: if you skip tutorial you get all new weapons for testing:
PB: Section commented out
			GiveItem2Character(Pchar, "pistolbbuss");	// ccc
			GiveItem2Character(Pchar, "bladeX1");		// ccc
			GiveItem2Character(Pchar, "bladeX2");		// ccc
			GiveItem2Character(Pchar, "bladeX3");		// ccc
			TakenItems(Pchar, "pistolpdart", 4);		// ccc
			TakenItems(Pchar, "pistolgrenade", 4);		// ccc
			TakenItems(Pchar, "pistolgas", 4);		// ccc
			TakenItems(Pchar, "pistolrock", 4);		// ccc
			TakenItems(Pchar, "pistolstink", 4);		// ccc
ccc special weapons assembly kit end
*/
			if(CheckCharacterItem(Pchar, "potion1") == 0) TakenItems(Pchar, "potion1", 2);

			EquipCharacterbyItem(Pchar, "blade1");
			EquipCharacterbyItem(Pchar, "Spyglass1");
			EquipCharacterbyItem(Pchar, "pistol1");

	
		     //JRH ammo mod --->
			if (ENABLE_AMMOMOD) {	// LDH change
				if(CheckCharacterItem(Pchar, "gunpowder") > 0) TakenItems(Pchar, "gunpowder", -12);
				if(CheckCharacterItem(Pchar, "gunpowder") == 0) TakenItems(Pchar, "gunpowder", 6);
				if(CheckCharacterItem(Pchar, "pistolbullets") > 0) TakenItems(Pchar, "pistolbullets", -12);
				if(CheckCharacterItem(Pchar, "pistolbullets") == 0) TakenItems(Pchar, "pistolbullets", 6);
			}
		     //JRH ammo mod <---

// KK -->
			AddMoneyToCharacter(PChar, 1000);

			locations[FindLocation("Tutorial_Deck")].box1.items.blade1 = 0;
			locations[FindLocation("Tutorial_Deck")].box1.items.pistol1 = 0;
			locations[FindLocation("Tutorial_Deck")].box1.items.spyglass1 = 0;

			if (ENABLE_AMMOMOD) {
				locations[FindLocation("Tutorial_Deck")].box1.items.gunpowder = 0;
				locations[FindLocation("Tutorial_Deck")].box1.items.pistolbullets = 0;
			}

			locations[FindLocation("Tutorial_Deck")].box1.items.potion1 = 0;
			locations[FindLocation("Tutorial_Deck")].box1.money = 0;

			QDeck = BOARDER_SPAREBLADE;
			if (CheckAttribute(Locations[FindLocation("Tutorial_Deck")], "WeaponsLocker.items." + QDeck) == false || Locations[FindLocation("Tutorial_Deck")].WeaponsLocker.items.(QDeck) < 12)
				Locations[FindLocation("Tutorial_Deck")].WeaponsLocker.items.(QDeck) = 12;
// <-- KK

// added by MAXIMUS [choose character mod] -->
			loadPort = "Oxbay_port"; 
			rldLocator = "reload2"; 

			switch(sti(PChar.nation))
			{
				case ENGLAND:
					loadPort = "Oxbay_port"; 
					rldLocator = "reload2";
				break;

				case FRANCE:
					loadPort = "Falaise_de_fleur_port_01"; 
					loadTown = "Falaise_de_fleur_location_03";
					gotoLocator = "goto12";
					rldLocator = "sea"; 
				break;

				case SPAIN:
					loadPort = "Muelle_port"; 
					loadTown = "Muelle_town_01";
					gotoLocator = "goto6";
					rldLocator = "reload3"; 
				break;

				case PIRATE:
					loadPort = "QC_port";
					loadTown = "QC_town";
					gotoGroup = "reload"; 
					gotoLocator = "reload3_back";
					rldLocator = "reload1"; 
				break;

				case HOLLAND:
					loadPort = "Douwesen_port"; 
					loadTown = "Douwesen_town";
					gotoLocator = "goto15";
					rldLocator = "reload2"; 
				break;

				case PORTUGAL:
					loadPort = "Conceicao_port";
					loadTown = "Conceicao_town";
					gotoLocator = "goto13";
					rldLocator = "reload2"; 
				break;

				case PERSONAL_NATION: // KK
					loadPort = "Oxbay_port"; 
					rldLocator = "reload2";
				break;
			}

// KK -->
			PChar.quest.TavernSitWaiting.win_condition.l1 = "ExitFromLocation";
			PChar.quest.TavernSitWaiting.win_condition.l1.character = PChar.id;
			PChar.quest.TavernSitWaiting.win_condition.l1.location = PChar.location;
			PChar.quest.TavernSitWaiting.win_condition = "TavernSitWaiting";

			LAi_QuestDelay("begining", 0.0);// "0." is bad, use something legit
			Pchar.quest.Begining.over = "yes";
			PlaceFleetNearShore(loadPort);

			if (GetCharacterShipCabin(PChar) != "Cabin_none") {
				QDeck = GetCharacterShipQDeck(PChar);
				if (PChar.location == QDeck)
					rldLocator = "boatr";
				else
					rldLocator = "reload1";
				characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.TempNode = "Exit";
				characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "Exit";
				characters[GetCharacterIndex("Malcolm Hatcher")].condition = "reload";//MAXIMUS
				LAi_SetActorType(CharacterFromID("Malcolm Hatcher"));
				LAi_ActorGoToLocation(CharacterFromID("Malcolm Hatcher"), "reload", rldLocator, "none", "", "", "", 50);
			} else {
				characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "SkipTutorialOnShip";
				LAi_SetStayType(CharacterFromID("Malcolm Hatcher"));
				QDeck = GetCharacterShipQDeck(CharacterFromID("Malcolm Hatcher"));
			}
			Locations[FindLocation("Tutorial_Deck")].reload.l1.disable = 0;
			Locations[FindLocation(QDeck)].reload.l4.disable = 0;
			Locations[FindLocation(QDeck)].reload.l5.disable = 0;
			Locations[FindLocation(QDeck)].reload.l6.go = "Sea";
			Locations[FindLocation(QDeck)].reload.l6.label = "Sea.";

			Locations[FindLocation("Tutorial_Deck")].box1.money = makeint(0);
			Locations[FindLocation("Tutorial_Deck")].box1.items.blade1 = 0;
			Locations[FindLocation("Tutorial_Deck")].box1.items.pistol1 = 0;
			Locations[FindLocation("Tutorial_Deck")].box1.items.spyglass1 = 0;
			Locations[FindLocation("Tutorial_Deck")].box1.items.gunpowder = 0;
			Locations[FindLocation("Tutorial_Deck")].box1.items.pistolbullets = 0;
// <-- KK

			SetQuestHeader("Tutorial_SpyGlass");
			AddQuestRecord("Tutorial_SpyGlass", 1);

			Pchar.quest.Tut_BuySpyGlass.win_condition.l1 = "item";
			Pchar.quest.Tut_BuySpyGlass.win_condition.l1.character = Pchar.id;
			Pchar.quest.Tut_BuySpyGlass.win_condition.l1.item = "SpyGlass2";
			Pchar.quest.Tut_BuySpyGlass.win_condition = "Tut_BuySpyGlass";
			Pchar.quest.Tut_BuySpyGlass.fail_condition = "Tut_BuySpyGlass";

			// TIH --> alternative win conditions Spe3'06
			Pchar.quest.Tut_BuySpyGlass3.win_condition.l1 = "item";
			Pchar.quest.Tut_BuySpyGlass3.win_condition.l1.character = Pchar.id;
			Pchar.quest.Tut_BuySpyGlass3.win_condition.l1.item = "SpyGlass3";
			Pchar.quest.Tut_BuySpyGlass3.win_condition = "Tut_BuySpyGlass";
			Pchar.quest.Tut_BuySpyGlass4.win_condition.l1 = "item";
			Pchar.quest.Tut_BuySpyGlass4.win_condition.l1.character = Pchar.id;
			Pchar.quest.Tut_BuySpyGlass4.win_condition.l1.item = "SpyGlass4";
			Pchar.quest.Tut_BuySpyGlass4.win_condition = "Tut_BuySpyGlass";
			// TIH <--

// KK -->
			if (GetCargoGoods(PChar, CharGood1) > 0 || GetCargoGoods(PChar, CharGood2) > 0) {
				SetQuestHeader("Tutorial_Store");
				loadStore = "";
				if (GetCargoGoods(PChar, CharGood1) > 0) loadStore = strlower(XI_ConvertString(Goods[CharGood1].name));
				if (CharGood1 != CharGood2) {
					if (GetCargoGoods(PChar, CharGood1) > 0 && GetCargoGoods(PChar, CharGood2) > 0) loadStore += " " + XI_ConvertString("and");
					if (GetCargoGoods(PChar, CharGood2) > 0) loadStore += " " + strlower(XI_ConvertString(Goods[CharGood2].name));
				}
				Preprocessor_Add("goods",  loadStore);
				AddQuestRecord("Tutorial_Store", 1);
				Preprocessor_Remove("goods");

				if (GetCargoGoods(PChar, CharGood1) > 0) {
					Pchar.quest.Tut_SellGoods.win_condition.l1 = "goods";
					Pchar.quest.Tut_SellGoods.win_condition.l1.character = Pchar.id;
					Pchar.quest.Tut_SellGoods.win_condition.l1.goods = CharGood1;
					Pchar.quest.Tut_SellGoods.win_condition.l1.quantity = "0";
					Pchar.quest.Tut_SellGoods.win_condition.l1.operation = "=";
					Pchar.quest.Tut_SellGoods.win_condition = "Tut_SellGoods";
					Pchar.quest.Tut_SellGoods.fail_condition = "Tut_SellGoods";
				}
				if (GetCargoGoods(PChar, CharGood2) > 0) {
					Pchar.quest.Tut_SellGoods.win_condition.l2 = "goods";
					Pchar.quest.Tut_SellGoods.win_condition.l2.character = Pchar.id;
					Pchar.quest.Tut_SellGoods.win_condition.l2.goods = CharGood2;
					Pchar.quest.Tut_SellGoods.win_condition.l2.quantity = "0";
					Pchar.quest.Tut_SellGoods.win_condition.l2.operation = "=";
					Pchar.quest.Tut_SellGoods.win_condition = "Tut_SellGoods";
					Pchar.quest.Tut_SellGoods.fail_condition = "Tut_SellGoods";
				}
			}
// <-- KK

			SetQuestHeader("Tutorial_Shipyard");
			AddQuestRecord("Tutorial_Shipyard", 1);

			Pchar.quest.Tut_RepairShip.win_condition.l1 = "Ship_HP";
			Pchar.quest.Tut_RepairShip.win_condition.l1.character = Pchar.id;
//NK -->
			Pchar.quest.Tut_RepairShip.win_condition.l1.quantity = GetCurrentShipHP(Pchar);
// NK <-- 
			Pchar.quest.Tut_RepairShip.win_condition.l1.operation = ">"; // TIH so when HP increases instead (if they bought a new ship)
		//	Pchar.quest.Tut_RepairShip.win_condition.l1.operation = "=";
			Pchar.quest.Tut_RepairShip.win_condition = "Tut_RepairShip";
			Pchar.quest.Tut_RepairShip.fail_condition = "Tut_RepairShip";

			SetQuestHeader("Tutorial_Tavern");
			AddQuestRecord("Tutorial_Tavern", 1);

			Pchar.quest.Tut_HireCrew.win_condition.l1 = "Crew_Space";
			Pchar.quest.Tut_HireCrew.win_condition.l1.character = Pchar.id;
			Pchar.quest.Tut_HireCrew.win_condition.l1.quantity = "0";
			Pchar.quest.Tut_HireCrew.win_condition.l1.operation = "=";
			Pchar.quest.Tut_HireCrew.win_condition = "Tut_HireCrew";
			Pchar.quest.Tut_HireCrew.fail_condition = "Tut_HireCrew";

			Pchar.quest.Tut_KillTutor.over = "yes";
			// NK -->
// added by MAXIMUS [choose character mod] -->
			loadTown = "Oxbay_town";
			loadPort = "Oxbay_port";
			gotoGroup = "goto";
			gotoLocator = "goto18";
			switch(sti(PChar.nation))
			{
				case ENGLAND:
					loadTown = "Oxbay_town";
					loadPort = "Oxbay_port";
					gotoLocator = "goto18";

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;

					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
					Locations[FindLocation(loadTown)].reload.l12.disable = 0;
					Locations[FindLocation(loadTown)].reload.l13.disable = 0;
					Locations[FindLocation(loadTown)].reload.l14.disable = 0;
				break;
				case FRANCE:
					loadTown = "Falaise_de_fleur_location_03";
					loadPort = "Falaise_de_fleur_port_01";
					gotoLocator = "goto12";

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;
					Locations[FindLocation(loadPort)].reload.l5.disable = 0;
					Locations[FindLocation(loadPort)].reload.l6.disable = 0;

					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
					Locations[FindLocation(loadTown)].reload.l12.disable = 0;

					Locations[FindLocation("Falaise_de_fleur_location_04")].reload.l1.disable = 0;
					Locations[FindLocation("Falaise_de_fleur_location_04")].reload.l2.disable = 0;
					Locations[FindLocation("Falaise_de_fleur_location_04")].reload.l3.disable = 0;
					Locations[FindLocation("Falaise_de_fleur_location_04")].reload.l4.disable = 0;
				break;
				case SPAIN:
					loadTown = "Muelle_town_01";
					loadPort = "Muelle_port";
					gotoLocator = "goto6";

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;
					Locations[FindLocation(loadPort)].reload.l5.disable = 0;

					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
					Locations[FindLocation(loadTown)].reload.l12.disable = 0;
					Locations[FindLocation(loadTown)].reload.l13.disable = 0;
					Locations[FindLocation(loadTown)].reload.l14.disable = 0;
					Locations[FindLocation(loadTown)].reload.l15.disable = 0;
					Locations[FindLocation(loadTown)].reload.l16.disable = 0;
					Locations[FindLocation(loadTown)].reload.l17.disable = 0;
					Locations[FindLocation(loadTown)].reload.l18.disable = 0;
					Locations[FindLocation(loadTown)].reload.l19.disable = 0;
				break;
				case PIRATE:
					loadTown = "QC_town";
					loadPort = "QC_port";
					gotoGroup = "reload"; 
					gotoLocator = "reload3_back";

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;

					Locations[FindLocation("QC_town_exit")].reload.l1.disable = 0;
					Locations[FindLocation("QC_town_exit")].reload.l2.disable = 0;
					Locations[FindLocation("QC_town_exit")].reload.l3.disable = 0;
					Locations[FindLocation("QC_town_exit")].reload.l4.disable = 0;
					Locations[FindLocation("QC_town_exit")].reload.l5.disable = 0;
					Locations[FindLocation("QC_town_exit")].reload.l6.disable = 0;
				break;
				case HOLLAND:
					loadTown = "Douwesen_town";
					loadPort = "Douwesen_port";
					gotoLocator = "goto15";

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;
					Locations[FindLocation(loadPort)].reload.l5.disable = 0;

					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
				break;
				case PORTUGAL:
					loadTown = "Conceicao_town";
					loadPort = "Conceicao_port";
					gotoLocator = "goto13";

					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
					Locations[FindLocation(loadTown)].reload.l12.disable = 0;
				break;
				// TIH --> defaults added (mimics ENGLAND) Aug27'06
				// default:
					Locations[FindLocation(loadPort)].reload.l2.disable = 0;
					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
					Locations[FindLocation(loadTown)].reload.l12.disable = 0;
					Locations[FindLocation(loadTown)].reload.l13.disable = 0;
					Locations[FindLocation(loadTown)].reload.l14.disable = 0;
				// TIH <--
			}

			Locations[FindLocation(loadPort)].reload.l1.disable = 0;
			Locations[FindLocation(loadPort)].reload.l3.disable = 0;
			Locations[FindLocation(loadPort)].reload.l4.disable = 0;

			Locations[FindLocation(loadTown)].reload.l1.disable = 0;
			if(CheckAttribute(Locations[FindLocation(loadTown)].reload,"l2")) Locations[FindLocation(loadTown)].reload.l2.disable = 0;
			Locations[FindLocation(loadTown)].reload.l3.disable = 0;
			Locations[FindLocation(loadTown)].reload.l4.disable = 0;
			Locations[FindLocation(loadTown)].reload.l5.disable = 0;
			Locations[FindLocation(loadTown)].reload.l6.disable = 0;
			Locations[FindLocation(loadTown)].reload.l7.disable = 0;

			Locations[FindLocation(loadPort)].locators_radius.(gotoGroup).(gotoLocator) = 0.5;
// added by MAXIMUS [choose character mod] <--

			Locations[FindLocation("Tutorial_Deck")].reload.l1.disable = 0; // KK
		break;


// ccc Stormy Start mod 
// in Malcolm's dialog you can choose to skip the whole Oxbay tutorial. Instead the storm will drive you to some other coast where the game will start.

// Diamond Evil Stormy Start mod
// an optional add-on to CCC's original Stormy Start mod, designed to make the early-game more challenging

		case "stormystart":	// this case terminates and clears the original gamestart
			LAi_QuestDelay("begining", 0.0);	// the quest "begining" originally runs if you appear in Oxbay
			Pchar.quest.Begining.over = "yes";	// Now we must run and close it from here

			// this section is the remainder of the case "Tut_SkipTutorialOnShip" which terminates the tutorial

			DeleteAttribute(&PChar,"vcskip"); // NK 04-06

			locDisableUpdateTime = false;
			LAi_LockFightMode(Pchar, false);
			EndQuestMovie();TrackQuestMovie("end","stormystart");
			//LAi_RemoveCheckMinHP(CharacterFromID("Malcolm Hatcher"));
			LAi_RemoveCheckMinHP(Pchar);

			ResetHP(&PChar); // NK 05-07-03 - LAi_SetHP(PChar, LAI_DEFAULT_HP + sti(PChar.rank) * 5, LAI_DEFAULT_HP + sti(PChar.rank) * 5); //NK

			Pchar.quest.Tut_KillTutor.over = "yes";

			// NK --> This section opens doors which were closed for tutorial

// added by MAXIMUS [choose character mod] -->
			loadTown = "Oxbay_town";
			loadPort = "Oxbay_port";
			questRecord = "Tutorial_AppearedOnIsland";
			gotoGroup = "goto";
			gotoLocator = "goto18";
			switch(sti(PChar.nation))
			{
				case ENGLAND:
					loadTown = "Oxbay_town";
					loadPort = "Oxbay_port";

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;

					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
					Locations[FindLocation(loadTown)].reload.l12.disable = 0;
					Locations[FindLocation(loadTown)].reload.l13.disable = 0;
					Locations[FindLocation(loadTown)].reload.l14.disable = 0;
				break;
				case FRANCE:
					loadTown = "Falaise_de_fleur_location_03"; 
					loadPort = "Falaise_de_fleur_port_01";

					gotoLocator = "goto12";

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;
					Locations[FindLocation(loadPort)].reload.l5.disable = 0;
					Locations[FindLocation(loadPort)].reload.l6.disable = 0;

					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
					Locations[FindLocation(loadTown)].reload.l12.disable = 0;
					
					Locations[FindLocation("Falaise_de_fleur_location_04")].reload.l8.disable = 0;
					Locations[FindLocation("Falaise_de_fleur_location_04")].reload.l9.disable = 0;
					Locations[FindLocation("Falaise_de_fleur_location_04")].reload.l10.disable = 0;
					Locations[FindLocation("Falaise_de_fleur_location_04")].reload.l11.disable = 0;
				break;
				case SPAIN:
					loadTown = "Muelle_town_01"; 
					loadPort = "Muelle_port";
					gotoLocator = "goto6";

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;
					Locations[FindLocation(loadPort)].reload.l5.disable = 0;

					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
					Locations[FindLocation(loadTown)].reload.l12.disable = 0;
					Locations[FindLocation(loadTown)].reload.l13.disable = 0;
					Locations[FindLocation(loadTown)].reload.l14.disable = 0;
					Locations[FindLocation(loadTown)].reload.l15.disable = 0;
					Locations[FindLocation(loadTown)].reload.l16.disable = 0;
					Locations[FindLocation(loadTown)].reload.l17.disable = 0;
					Locations[FindLocation(loadTown)].reload.l18.disable = 0;
					Locations[FindLocation(loadTown)].reload.l19.disable = 0;
				break;
				case PIRATE:
					loadTown = "QC_town"; 
					loadPort = "QC_port";
					gotoGroup = "reload"; 
					gotoLocator = "reload3_back";

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;

					Locations[FindLocation("QC_town_exit")].reload.l1.disable = 0;
					Locations[FindLocation("QC_town_exit")].reload.l2.disable = 0;
					Locations[FindLocation("QC_town_exit")].reload.l3.disable = 0;
					Locations[FindLocation("QC_town_exit")].reload.l4.disable = 0;
					Locations[FindLocation("QC_town_exit")].reload.l5.disable = 0;
					Locations[FindLocation("QC_town_exit")].reload.l6.disable = 0;
				break;
				case HOLLAND:
					loadTown = "Douwesen_town"; 
					loadPort = "Douwesen_port";
					gotoLocator = "goto15";

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;
					Locations[FindLocation(loadPort)].reload.l5.disable = 0;

					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
				break;
				case PORTUGAL:
					loadTown = "Conceicao_town";
					loadPort = "Conceicao_port";
					gotoLocator = "goto13";

					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
					Locations[FindLocation(loadTown)].reload.l12.disable = 0;
				break;
				// TIH --> defaults added (mimics ENGLAND) Aug27'06
				// default:
					Locations[FindLocation(loadPort)].reload.l2.disable = 0;
					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
					Locations[FindLocation(loadTown)].reload.l12.disable = 0;
					Locations[FindLocation(loadTown)].reload.l13.disable = 0;
					Locations[FindLocation(loadTown)].reload.l14.disable = 0;
				// TIH <--
			}

			Locations[FindLocation(loadPort)].reload.l1.disable = 0;
			Locations[FindLocation(loadPort)].reload.l3.disable = 0;
			Locations[FindLocation(loadPort)].reload.l4.disable = 0;

			Locations[FindLocation(loadTown)].reload.l1.disable = 0;
			Locations[FindLocation(loadTown)].reload.l2.disable = 0;
			Locations[FindLocation(loadTown)].reload.l3.disable = 0;
			Locations[FindLocation(loadTown)].reload.l4.disable = 0;
			Locations[FindLocation(loadTown)].reload.l5.disable = 0;
			Locations[FindLocation(loadTown)].reload.l6.disable = 0;
			Locations[FindLocation(loadTown)].reload.l7.disable = 0;

			Locations[FindLocation(loadPort)].locators_radius.(gotoGroup).(gotoLocator) = 0.5;

			CloseQuestHeader(questRecord);
// added by MAXIMUS [choose character mod] <--

			LAi_QuestDelay("TavernSitWaiting",1.0);
				// lets Malcolm disappear

			LAi_QuestDelay("stormystart2", 2.0);	// starts the next case
		break;


		case "stormystart2":	// this case is only seperate to show the video uninterrupted
			bMainMenuLaunchAfterVideo = true; //TIH - makes black screen after movie, not cabin scene
			PostVideoAndQuest("storm",1, "stormystart3"); //TIH - time adjustment	// starts the next case
		break;


		case "stormystart3":	// casts you ashore at a random beach with random resources
			
			SetCharacterGoods(pchar, CharGood1, 0); // dumps your cargo // KK
			SetCharacterGoods(pchar, CharGood2, 0); // KK

			if(Pchar.model == "Animists1" )
			{Pchar.model = "blaze";  // sets playermodel instead of "bathrobe"
			 facemaker(pchar);}

			if(EVIL_STORMY_START)
			{
			TakenItems(Pchar, "pistolrock", rand(3));
			GiveItem2Character(Pchar, "Spyglass1");

			pchar.ship.hp = GetCharacterShipHP(pchar) * rand(4)/10 +10;	// stormdamage to ship
			SetCrewQuantity(Pchar, GetCrewQuantity(pchar) * 0 +1);	// stormdamage to crew
			}
			else
			{
			pchar.ship.hp = GetCharacterShipHP(pchar) * rand(6)/10 +10;	// stormdamage to ship
			SetCrewQuantity(Pchar, GetCrewQuantity(pchar) * rand(6)/10 +1 );	// stormdamage to crew

			// next section gives you a random amount of money and equipment
			GiveItem2Character(Pchar, "blade"+ (1+ rand(9)) );				// gives you blade1, blade2... or blade10
			EquipCharacterByItem(pchar, FindCharacterItemByGroup(pchar,BLADE_ITEM_TYPE));	// PB: equips your blade
			GiveItem2Character(Pchar, "PISTOL"+ (1+ rand(1)) );				// PB: added to give you a default pistol too
			EquipCharacterByItem(pchar, FindCharacterItemByGroup(pchar,GUN_ITEM_TYPE));	// PB: equips your pistol
			GiveItem2Character(Pchar, "Spyglass" + (1+rand(2)) );
			EquipCharacterByItem(pchar, FindCharacterItemByGroup(pchar,SPYGLASS_ITEM_TYPE));// PB: equips your spyglass
			AddMoneyToCharacter(Pchar, rand(4000));
			GiveItem2Character(Pchar, "Jewelry" + (1+rand(9)) );
			GiveItem2Character(Pchar, "Mineral" + (1+rand(2)) );
			TakenItems(Pchar, "potion1", 1 + rand(2));

     		// ccc special weapons, SW assembly kit must be installed !
			TakenItems(Pchar, "pistolbbuss", rand(1));	
			TakenItems(Pchar, "bladeX1", rand(1));
			TakenItems(Pchar, "bladeX2", rand(1));
			TakenItems(Pchar, "bladeX3", 1);
			TakenItems(Pchar, "pistolpdart", rand(3));
			TakenItems(Pchar, "pistolgrenade", rand(3));
			TakenItems(Pchar, "pistolgas", rand(3));
			TakenItems(Pchar, "pistolrock", rand(3));
			TakenItems(Pchar, "pistolstink", rand(3));

		    //JRH ammo mod --->
			if (ENABLE_AMMOMOD)
			  {	// LDH change
				TakenItems(Pchar, "gunpowder", 3 + rand(3));
				if(CheckCharacterItem(Pchar,"pistolbbuss") )
				{
					TakenItems(Pchar, "pistolgrapes", 3 + rand(3));	
					RemoveCharacterEquip(Pchar, GUN_ITEM_TYPE );
					EquipCharacterByItem(Pchar, "pistolbbuss");					
				}
				else
				{
					TakenItems(Pchar, "pistolbullets", 3 + rand(3));
				}
			  }
			}
		    //JRH ammo mod <---

			SetNextWeather("Day Storm");	// Sets stormy weather


			switch(rand(STORMY_START_CHOICES) )	// ccc mar 06  New islands / PB: Make BuildSettings toggle
			{
				case 0:
					DoQuestReloadToLocation("Douwesen_shore_01", "reload", "reload1" ,"");	
					PlaceFleetNearShore("Douwesen_shore_01"); // KK
					if(EVIL_STORMY_START)
					{
					AddCharacterGoods(pchar, GOOD_LINEN, makeint(2));	// contraband
					}
					else
					{
					AddCharacterGoods(pchar, GOOD_LINEN, makeint(20 + rand(20)));	// contraband
					}
				break;

				case 1:
					DoQuestReloadToLocation("Conceicao_shore_01", "reload", "reload1" ,"");
					PlaceFleetNearShore("Conceicao_shore_01"); // KK
					if(EVIL_STORMY_START)
					{
					AddCharacterGoods(pchar, GOOD_WINE, makeint(2));
					}
					else
					{
					AddCharacterGoods(pchar, GOOD_WINE, makeint(10 + rand(20)));
					}
				break;

				case 2:
					DoQuestReloadToLocation("Falaise_de_fleur_shore", "reload", "reload1" ,"");
					PlaceFleetNearShore("Falaise_de_fleur_shore"); // KK
					if(EVIL_STORMY_START)
					{
					AddCharacterGoods(pchar, GOOD_SANDAL, makeint(2));
					}
					else
					{
					AddCharacterGoods(pchar, GOOD_SANDAL, makeint(5 + rand(10)));
					}
				break;

				case 3:
					DoQuestReloadToLocation("Muelle_shore", "reload", "reload3" ,"");
					PlaceFleetNearShore("Muelle_shore"); // KK
					if(EVIL_STORMY_START)
					{
					AddCharacterGoods(pchar, GOOD_SILK, makeint(2));
					}
					else
					{
					AddCharacterGoods(pchar, GOOD_SILK, makeint(10 + rand(20)));
					}
				break;

				case 4:
					DoQuestReloadToLocation("QC_port", "reload", "reload1" ,"");
					PlaceFleetNearShore("QC_port"); // KK
					if(EVIL_STORMY_START)
					{
					AddCharacterGoods(pchar, GOOD_RUM, makeint(2));
					}
					else
					{
					AddCharacterGoods(pchar, GOOD_RUM, makeint(20 + rand(20)));
					}
				break;

				case 5:
					DoQuestReloadToLocation("Redmond_shore_01", "reload", "reload1" ,"");
					PlaceFleetNearShore("Redmond_shore_01"); // KK
					if(EVIL_STORMY_START)
					{
					AddCharacterGoods(pchar, GOOD_COFFEE, makeint(2));
					}
					else
					{
					AddCharacterGoods(pchar, GOOD_COFFEE, makeint(10 + rand(20)));
					}
				break;

				case 6:
					DoQuestReloadToLocation("Redmond_shore_02", "reload", "reload1" ,"");
					PlaceFleetNearShore("Redmond_shore_01"); // KK
					if(EVIL_STORMY_START)
					{
					AddCharacterGoods(pchar, GOOD_COFFEE, makeint(2));
					}
					else
					{
					AddCharacterGoods(pchar, GOOD_COFFEE, makeint(10 + rand(20)));
					}
				break;

				case 7:
					DoQuestReloadToLocation("Douwesen_shore_02", "reload", "reload1" ,"");	
					PlaceFleetNearShore("Douwesen_shore_01"); // KK
					if(EVIL_STORMY_START)
					{
					AddCharacterGoods(pchar, GOOD_LINEN, makeint(2));
					}
					else
					{
					AddCharacterGoods(pchar, GOOD_LINEN, makeint(20 + rand(20)));
					}
				break;

				case 8:
					DoQuestReloadToLocation("Conceicao_shore_02", "reload", "see" ,"");
					PlaceFleetNearShore("Conceicao_shore_01"); // KK
					if(EVIL_STORMY_START)
					{
					AddCharacterGoods(pchar, GOOD_WINE, makeint(2));
					}
					else
					{
					AddCharacterGoods(pchar, GOOD_WINE, makeint(10 + rand(20)));
					}
				break;

				case 9:
					DoQuestReloadToLocation("Antigua_shore", "reload", "reload1" ,"");
					PlaceFleetNearShore("Antigua_shore"); // KK
					if(EVIL_STORMY_START)
					{
					AddCharacterGoods(pchar, GOOD_WHEAT, makeint(2));
					}
					else
					{
					AddCharacterGoods(pchar, GOOD_WHEAT, makeint(10 + rand(20)));
					}
				break;

				case 10:
					DoQuestReloadToLocation("Cayman_Shore_02", "reload", "see" ,""); // ccc Nov06, was wrong,"reload2";
					PlaceFleetNearShore("Cayman_Shore_02"); // KK
					if(EVIL_STORMY_START)
					{
					AddCharacterGoods(pchar, GOOD_COFFEE, makeint(2));
					}
					else
					{
					AddCharacterGoods(pchar, GOOD_COFFEE, makeint(10 + rand(20)));
					}
				break;

				case 11:
					DoQuestReloadToLocation("Cayman_Shore_01", "reload", "reload1" ,"");
					PlaceFleetNearShore("Cayman_Shore_03"); // KK
					if(EVIL_STORMY_START)
					{
					AddCharacterGoods(pchar, GOOD_PAPRIKA, makeint(2));
					}
					else
					{
					AddCharacterGoods(pchar, GOOD_PAPRIKA, makeint(10 + rand(20)));
					}
				break;

				case 12:
					DoQuestReloadToLocation("Hispaniola_shore_01", "reload", "reload1" ,"");
					PlaceFleetNearShore("Hispaniola_shore_01"); // KK
					if(EVIL_STORMY_START)
					{
					AddCharacterGoods(pchar, GOOD_ALE, makeint(2));
					}
					else
					{
					AddCharacterGoods(pchar, GOOD_ALE, makeint(10 + rand(20)));
					}
				break;

				case 13:
					DoQuestReloadToLocation("Hispaniola_shore_02", "reload", "reload1" ,"");
					PlaceFleetNearShore("Hispaniola_shore_03"); // KK
					if(EVIL_STORMY_START)
					{
					AddCharacterGoods(pchar, GOOD_TOBACCO, makeint(2));
					}
					else
					{
					AddCharacterGoods(pchar, GOOD_TOBACCO, makeint(10 + rand(20)));
					}
				break;

				case 14:
					DoQuestReloadToLocation("Cuba_shore_01", "reload", "reload1" ,"");
					PlaceFleetNearShore("Cuba_shore_01"); // KK
					if(EVIL_STORMY_START)
					{
					AddCharacterGoods(pchar, GOOD_TOBACCO, makeint(2));
					}
					else
					{
					AddCharacterGoods(pchar, GOOD_TOBACCO, makeint(10 + rand(20)));
					}
				break;

				case 15:
					DoQuestReloadToLocation("Guadeloupe_shore_01", "reload", "see" ,"");
					PlaceFleetNearShore("Guadeloupe_shore_01"); // KK
					if(EVIL_STORMY_START)
					{
					AddCharacterGoods(pchar, GOOD_SANDAL, makeint(2));
					}
					else
					{
					AddCharacterGoods(pchar, GOOD_SANDAL, makeint(10 + rand(20)));
					}
				break;

				case 16:
					DoQuestReloadToLocation("SaintMartin_shore_01", "reload", "reload1" ,"");
					PlaceFleetNearShore("SaintMartin_shore_01"); // KK
					if(EVIL_STORMY_START)
					{
					AddCharacterGoods(pchar, GOOD_WHEAT, makeint(2));
					}
					else
					{
					AddCharacterGoods(pchar, GOOD_WHEAT, makeint(10 + rand(20)));
					}
				break;

				case 17:
					DoQuestReloadToLocation("SaintMartin_shore_02", "reload", "see" ,"");
					PlaceFleetNearShore("SaintMartin_shore_01"); // KK
					if(EVIL_STORMY_START)
					{
					AddCharacterGoods(pchar, GOOD_WHEAT, makeint(2));
					}
					else
					{
					AddCharacterGoods(pchar, GOOD_WHEAT, makeint(10 + rand(20)));
					}
				break;

				case 18:
					DoQuestReloadToLocation("Oxbay_shore_02", "reload", "reload1" ,"");
					PlaceFleetNearShore("Oxbay_shore_01"); // KK (separated from ship)
					if(EVIL_STORMY_START)
					{
					AddCharacterGoods(pchar, GOOD_COFFEE, makeint(2));
					}
					else
					{
					AddCharacterGoods(pchar, GOOD_COFFEE, makeint(10 + rand(20)));
					}
				break;

				case 19:
					DoQuestReloadToLocation("Oxbay_shore_01", "reload", "see" ,"");
					PlaceFleetNearShore("Oxbay_shore_01"); // KK
					if(EVIL_STORMY_START)
					{
					AddCharacterGoods(pchar, GOOD_COFFEE, makeint(2));
					}
					else
					{
					AddCharacterGoods(pchar, GOOD_COFFEE, makeint(10 + rand(20)));
					}
				break;

				case 20:
					DoQuestReloadToLocation("KhaelRoa_port", "reload", "reload1" ,"");
					PlaceFleetNearShore("KhaelRoa_port"); // KK
					if(EVIL_STORMY_START)
					{
					AddCharacterGoods(pchar, GOOD_WHEAT, makeint(2));
					}
					else
					{
					AddCharacterGoods(pchar, GOOD_WHEAT, makeint(20 + rand(20)));
					}
				break;
			}

			SetRMRelation(PChar, 2+makeint(rand(3)), REL_WAR); // ccc random enemy // KK

			SetQuestHeader("StormyStart");
			AddQuestRecord("StormyStart", 1);
			CloseQuestHeader("StormyStart");

			PostEvent("DoInfoShower",500,"s","");	//TIH - clears black screen

			// end of "stormystart" additions
		break;
// ccc end stormy start mod

			// NK -->
		case "Tut_Malcolm_to_rest":
// added by MAXIMUS [choose character mod] -->
			loadTown = "Oxbay_town";
			loadTavern = "Oxbay_tavern";
			switch(sti(PChar.nation))
			{
				case ENGLAND: loadTown = "Oxbay_town"; loadTavern = "Oxbay_tavern"; break;
				case FRANCE: loadTown = "Falaise_de_fleur_location_03"; loadTavern = "Falaise_de_fleur_tavern"; break;
				case SPAIN: loadTown = "Muelle_town_01"; loadTavern = "Muelle_Tavern"; break;
				case PIRATE: loadTown = "QC_town"; loadTavern = "QC_Tavern"; break;
				case HOLLAND: loadTown = "Douwesen_town"; loadTavern = "Douwesen_tavern"; break;
				case PORTUGAL: loadTown = "Conceicao_town"; loadTavern = "Conceicao_Tavern"; break;
				case PERSONAL_NATION: loadTown = "Oxbay_town"; loadTavern = "Oxbay_tavern"; break; // KK
			}
			goLocator = "goto" + logined; // KK
			logined++; // KK
			ChangeCharacterAddressGroup(CharacterFromID("Malcolm Hatcher"), loadTown, "goto", goLocator);
// added by MAXIMUS [choose character mod] <--

			LAi_QuestDelay("TavernSitWaiting",0);
		break;
			// NK <--

// KK -->
		case "Tut_SkipTutorialInPort":
			rldLocator = "Reload1";
			switch(sti(PChar.nation))
			{
				case ENGLAND:
					rldLocator = "reload1";
				break;

				case FRANCE:
					rldLocator = "Falaise_de_fleur_location_01_02";
				break;

				case SPAIN:
					rldLocator = "reload2";
				break;

				case PIRATE:
					rldLocator = "Reload3";
				break;

				case HOLLAND:
					rldLocator = "Reload3"; 
				break;

				case PORTUGAL:
					rldLocator = "reload1";
				break;

				case PERSONAL_NATION: // KK 
					rldLocator = "reload1";
				break;
			}

			LAi_SetActorType(CharacterFromID("Malcolm Hatcher"));
			LAi_ActorGoToLocator(CharacterFromID("Malcolm Hatcher"), "reload", rldLocator, "Tut_SkipTutorialInPort_AfterMalcolmGone", 0);
		break;
// <-- KK

		case "Tut_SkipTutorialInPort_AfterMalcolmGone": // KK
			DeleteAttribute(&PChar,"vcskip"); // NK 04-06

			LAi_LockFightMode(Pchar, false);

// added by MAXIMUS [choose character mod] -->
			loadTown = "Oxbay_town";
			loadPort = "Oxbay_port";
			gotoGroup = "goto";
			gotoLocator = "goto18";
			rldLocator = "Reload1";
			questRecord = "Tutorial_AppearedOnIsland";
			switch(sti(PChar.nation))
			{
				case ENGLAND:
					loadTown = "Oxbay_town";
					loadPort = "Oxbay_port";
					rldLocator = "reload1";
					switch(PChar.location)
					{
						case "Oxbay_port": rldLocator = "reload1"; break;
						case "Oxbay_town": rldLocator = "reload13"; break;
					}

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;

					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
					Locations[FindLocation(loadTown)].reload.l12.disable = 0;
					Locations[FindLocation(loadTown)].reload.l13.disable = 0;
					Locations[FindLocation(loadTown)].reload.l14.disable = 0;
				break;
				
				case FRANCE:
					loadTown = "Falaise_de_fleur_location_03";
					loadPort = "Falaise_de_fleur_port_01";
					gotoLocator = "goto12";
					rldLocator = "Falaise_de_fleur_location_01_02";
					switch(PChar.location)
					{
						case "Falaise_de_fleur_port_01": rldLocator = "Falaise_de_fleur_location_01_02"; break;
						case "Falaise_de_fleur_location_03": rldLocator = "Falaise_de_fleur_tavern"; break;
						case "Falaise_de_fleur_location_04": rldLocator = "Falaise_de_fleur_location_04_03"; break;
					}

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;
					Locations[FindLocation(loadPort)].reload.l5.disable = 0;
					Locations[FindLocation(loadPort)].reload.l6.disable = 0;

					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
					Locations[FindLocation(loadTown)].reload.l12.disable = 0;
					
					Locations[FindLocation("Falaise_de_fleur_location_04")].reload.l8.disable = 0;
					Locations[FindLocation("Falaise_de_fleur_location_04")].reload.l9.disable = 0;
					Locations[FindLocation("Falaise_de_fleur_location_04")].reload.l10.disable = 0;
					Locations[FindLocation("Falaise_de_fleur_location_04")].reload.l11.disable = 0;
					
					LAi_QuestDelay("begining", 0.0); 
					Pchar.quest.Begining.over = "yes";
				break;

				case SPAIN:
					loadTown = "Muelle_town_01";
					loadPort = "Muelle_port";
					gotoLocator = "goto6";
					rldLocator = "reload2";
					switch(PChar.location)
					{
						case "Muelle_port": rldLocator = "reload2"; break;
						case "Muelle_town_01": rldLocator = "reload14"; break;
					}

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;
					Locations[FindLocation(loadPort)].reload.l5.disable = 0;

					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
					Locations[FindLocation(loadTown)].reload.l12.disable = 0;
					Locations[FindLocation(loadTown)].reload.l13.disable = 0;
					Locations[FindLocation(loadTown)].reload.l14.disable = 0;
					Locations[FindLocation(loadTown)].reload.l15.disable = 0;
					Locations[FindLocation(loadTown)].reload.l16.disable = 0;
					Locations[FindLocation(loadTown)].reload.l17.disable = 0;
					Locations[FindLocation(loadTown)].reload.l18.disable = 0;
					Locations[FindLocation(loadTown)].reload.l19.disable = 0;
					
					LAi_QuestDelay("begining", 0.0); 
					Pchar.quest.Begining.over = "yes";
				break;
				
				case PIRATE:
					loadTown = "QC_town";
					loadPort = "QC_port";
					gotoGroup = "reload"; 
					gotoLocator = "reload3_back";
					rldLocator = "Reload3";
					switch(PChar.location)
					{
						case "QC_port": rldLocator = "reload3"; break;
						case "QC_town": rldLocator = "reload2"; break;
						case "QC_town_exit": rldLocator = "Reload1"; break;
					}

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;

					Locations[FindLocation("QC_town_exit")].reload.l1.disable = 0;
					Locations[FindLocation("QC_town_exit")].reload.l2.disable = 0;
					Locations[FindLocation("QC_town_exit")].reload.l3.disable = 0;
					Locations[FindLocation("QC_town_exit")].reload.l4.disable = 0;
					Locations[FindLocation("QC_town_exit")].reload.l5.disable = 0;
					Locations[FindLocation("QC_town_exit")].reload.l6.disable = 0;
					
					LAi_QuestDelay("begining", 0.0); 
					Pchar.quest.Begining.over = "yes";
				break;

				case HOLLAND:
					loadTown = "Douwesen_town";
					loadPort = "Douwesen_port"; 
					gotoLocator = "goto15"; 
					rldLocator = "Reload3"; 

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;
					Locations[FindLocation(loadPort)].reload.l5.disable = 0;

					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;

					LAi_QuestDelay("begining", 0.0); 
					Pchar.quest.Begining.over = "yes";
				break;

				case PORTUGAL:
					loadTown = "Conceicao_town";
					loadPort = "Conceicao_port";
					gotoLocator = "goto13";
					rldLocator = "reload1";
					switch(PChar.location)
					{
						case "Conceicao_port": rldLocator = "reload1"; break;
						case "Conceicao_town": rldLocator = "reload4"; break;
					}

					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
					Locations[FindLocation(loadTown)].reload.l12.disable = 0;

					LAi_QuestDelay("begining", 0.0); 
					Pchar.quest.Begining.over = "yes";
				break;
				// TIH --> defaults added (mimics ENGLAND) Aug27'06
				// default:
					switch(PChar.location)
					{
						case "Oxbay_port": rldLocator = "reload1"; break;
						case "Oxbay_town": rldLocator = "reload13"; break;
					}
					Locations[FindLocation(loadPort)].reload.l2.disable = 0;
					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
					Locations[FindLocation(loadTown)].reload.l12.disable = 0;
					Locations[FindLocation(loadTown)].reload.l13.disable = 0;
					Locations[FindLocation(loadTown)].reload.l14.disable = 0;
				// TIH <--
			}
			PlaceFleetNearShore(loadPort); // KK

			Locations[FindLocation(loadPort)].reload.l1.disable = 0;
			Locations[FindLocation(loadPort)].reload.l3.disable = 0;
			Locations[FindLocation(loadPort)].reload.l4.disable = 0;

			Locations[FindLocation(loadTown)].reload.l1.disable = 0;
			Locations[FindLocation(loadTown)].reload.l2.disable = 0;
			Locations[FindLocation(loadTown)].reload.l3.disable = 0;
			Locations[FindLocation(loadTown)].reload.l4.disable = 0;
			Locations[FindLocation(loadTown)].reload.l5.disable = 0;
			Locations[FindLocation(loadTown)].reload.l6.disable = 0;
			Locations[FindLocation(loadTown)].reload.l7.disable = 0;

			Locations[FindLocation(loadPort)].locators_radius.(gotoGroup).(gotoLocator) = 0.5;
// added by MAXIMUS [choose character mod] <--
			LAi_QuestDelay("TavernSitWaiting", 0); // KK

			EndQuestMovie();
			locDisableUpdateTime = false;
			LAi_RemoveCheckMinHP(CharacterFromID("Malcolm Hatcher"));
			LAi_RemoveCheckMinHP(Pchar);

			pchar.quest.Tut_FollowTheSpyglass.over = "yes";
			pchar.quest.Tut_ReloadToOxbayTown.over = "yes";

			CloseQuestHeader(questRecord);

			Pchar.quest.Tut_KillTutor.over = "yes";
		break;

// added by MAXIMUS [choose character mod] -->
		case "TavernSitWaiting":
// KK -->
			loadTown = GetTownIDFromLocID(PChar.location);
			loadTavern = FindTownTavern(PChar.location);
			if (loadTown == "" || loadTavern == "") {
				loadTavern = "Oxbay_tavern";
				switch(sti(PChar.nation))
				{
					case ENGLAND: loadTown = "Oxbay"; loadTavern = "Oxbay_tavern"; break;
					case FRANCE: loadTown = "Falaise de Fleur"; loadTavern = "Falaise_de_fleur_tavern"; break;
					case SPAIN: loadTown = "Isla Muelle"; loadTavern = "Muelle_Tavern"; break;
					case PIRATE: loadTown = "Quebradas Costillas"; loadTavern = "QC_Tavern"; break;
					case HOLLAND: loadTown = "Douwesen"; loadTavern = "Douwesen_tavern"; break;
					case PORTUGAL: loadTown = "Conceicao"; loadTavern = "Conceicao_Tavern"; break;
					case PERSONAL_NATION: loadTown = "Oxbay"; loadTavern = "Oxbay_tavern"; break;
				}
			}
			ChangeCharacterAddressGroup(CharacterFromID("Malcolm Hatcher"), loadTavern, "sit", "sit13");
			LAi_SetSitType(CharacterFromID("Malcolm Hatcher"));
			characters[GetCharacterIndex("Malcolm Hatcher")].Dialog.CurrentNode = "Questions";
			LAi_group_MoveCharacter(CharacterFromID("Malcolm Hatcher"), Towns[GetTownIndex(loadTown)].laigroup + "_CITIZENS");

			if (sti(PChar.nation) == PIRATE) {
				PChar.quest.Install_Voysey_And_Blythe.win_condition.l1 = "location";
				PChar.quest.Install_Voysey_And_Blythe.win_condition.l1.character = PChar.id;
				PChar.quest.Install_Voysey_And_Blythe.win_condition.l1.location = "QC_town_exit";
				PChar.quest.Install_Voysey_And_Blythe.win_condition = "Install_Voysey_And_Blythe";
			} else {
				LAi_QuestDelay("Install_Voysey_And_Blythe", 0.0);
			}

			ALLOW_NATION_CHANGE = 1;
			bChangeNation = true;
// <-- KK
			bDisableFastReload = 0;
// added by MAXIMUS [choose character mod] <--
		break;

// KK -->
		case "Tut_SkipTutorialInTown":
			rldLocator = "Reload1";
			switch(sti(PChar.nation))
			{
				case ENGLAND:
					rldLocator = "reload1";
					switch(PChar.location)
					{
						case "Oxbay_port": rldLocator = "reload1"; break;
						case "Oxbay_town": rldLocator = "reload13"; break;
					}
				break;

				case FRANCE:
					rldLocator = "Falaise_de_fleur_location_01_02";
					switch(PChar.location)
					{
						case "Falaise_de_fleur_port_01": rldLocator = "Falaise_de_fleur_location_01_02"; break;
						case "Falaise_de_fleur_location_03": rldLocator = "Falaise_de_fleur_tavern"; break;
						case "Falaise_de_fleur_location_04": rldLocator = "Falaise_de_fleur_location_04_03"; break;
					}
				break;

				case SPAIN:
					rldLocator = "reload2";
					switch(PChar.location)
					{
						case "Muelle_port": rldLocator = "reload2"; break;
						case "Muelle_town_01": rldLocator = "reload14"; break;
					}
				break;

				case PIRATE:
					rldLocator = "Reload3";
					switch(PChar.location)
					{
						case "QC_port": rldLocator = "reload3"; break;
						case "QC_town": rldLocator = "reload2"; break;
						case "QC_town_exit": rldLocator = "Reload1"; break;
					}
				break;

				case HOLLAND:
					rldLocator = "Reload3"; 
				break;

				case PORTUGAL:
					rldLocator = "reload1";
					switch(PChar.location)
					{
						case "Conceicao_port": rldLocator = "reload1"; break;
						case "Conceicao_town": rldLocator = "reload4"; break;
					}
				break;

				case PERSONAL_NATION: // KK
					rldLocator = "reload1";
					switch(PChar.location)
					{
						case "Oxbay_port": rldLocator = "reload1"; break;
						case "Oxbay_town": rldLocator = "reload13"; break;
					}
				break;
			}

			LAi_SetActorType(CharacterFromID("Malcolm Hatcher"));
			LAi_ActorGoToLocator(CharacterFromID("Malcolm Hatcher"), "reload", rldLocator, "Tut_SkipTutorialInTown_AfterMalcolmGone", 0);
		break;
// <-- KK

		case "Tut_SkipTutorialInTown_AfterMalcolmGone":
			DeleteAttribute(&PChar,"vcskip"); // NK 04-06

			LAi_LockFightMode(Pchar, false);

// added by MAXIMUS [choose character mod] -->
			loadTown = "Oxbay_town";
			loadPort = "Oxbay_port";
			gotoGroup = "goto";
			gotoLocator = "goto18";
			rldLocator = "Reload1";
			questRecord = "Tutorial_AppearedOnIsland";
			switch(sti(PChar.nation))
			{
				case ENGLAND:
					loadTown = "Oxbay_town";
					loadPort = "Oxbay_port";
					rldLocator = "reload1";
					switch(PChar.location)
					{
						case "Oxbay_port": rldLocator = "reload1"; break;
						case "Oxbay_town": rldLocator = "reload13"; break;
					}

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;

					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
					Locations[FindLocation(loadTown)].reload.l12.disable = 0;
					Locations[FindLocation(loadTown)].reload.l13.disable = 0;
					Locations[FindLocation(loadTown)].reload.l14.disable = 0;
				break;
				
				case FRANCE:
					loadTown = "Falaise_de_fleur_location_03";
					loadPort = "Falaise_de_fleur_port_01";
					gotoLocator = "goto12";
					rldLocator = "Falaise_de_fleur_location_01_02";
					switch(PChar.location)
					{
						case "Falaise_de_fleur_port_01": rldLocator = "Falaise_de_fleur_location_01_02"; break;
						case "Falaise_de_fleur_location_03": rldLocator = "Falaise_de_fleur_tavern"; break;
						case "Falaise_de_fleur_location_04": rldLocator = "Falaise_de_fleur_location_04_03"; break;
					}

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;
					Locations[FindLocation(loadPort)].reload.l5.disable = 0;
					Locations[FindLocation(loadPort)].reload.l6.disable = 0;

					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
					Locations[FindLocation(loadTown)].reload.l12.disable = 0;
					
					Locations[FindLocation("Falaise_de_fleur_location_04")].reload.l8.disable = 0;
					Locations[FindLocation("Falaise_de_fleur_location_04")].reload.l9.disable = 0;
					Locations[FindLocation("Falaise_de_fleur_location_04")].reload.l10.disable = 0;
					Locations[FindLocation("Falaise_de_fleur_location_04")].reload.l11.disable = 0;
				break;

				case SPAIN:
					loadTown = "Muelle_town_01";
					loadPort = "Muelle_port";
					gotoLocator = "goto6";
					rldLocator = "reload2";
					switch(PChar.location)
					{
						case "Muelle_port": rldLocator = "reload2"; break;
						case "Muelle_town_01": rldLocator = "reload14"; break;
					}

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;
					Locations[FindLocation(loadPort)].reload.l5.disable = 0;

					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
					Locations[FindLocation(loadTown)].reload.l12.disable = 0;
					Locations[FindLocation(loadTown)].reload.l13.disable = 0;
					Locations[FindLocation(loadTown)].reload.l14.disable = 0;
					Locations[FindLocation(loadTown)].reload.l15.disable = 0;
					Locations[FindLocation(loadTown)].reload.l16.disable = 0;
					Locations[FindLocation(loadTown)].reload.l17.disable = 0;
					Locations[FindLocation(loadTown)].reload.l18.disable = 0;
					Locations[FindLocation(loadTown)].reload.l19.disable = 0;
				break;
				
				case PIRATE:
					loadTown = "QC_town";
					loadPort = "QC_port";
					gotoGroup = "reload"; 
					gotoLocator = "reload3_back";
					rldLocator = "Reload3";
					switch(PChar.location)
					{
						case "QC_port": rldLocator = "reload3"; break;
						case "QC_town": rldLocator = "reload2"; break;
						case "QC_town_exit": rldLocator = "Reload1"; break;
					}

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;

					Locations[FindLocation("QC_town_exit")].reload.l1.disable = 0;
					Locations[FindLocation("QC_town_exit")].reload.l2.disable = 0;
					Locations[FindLocation("QC_town_exit")].reload.l3.disable = 0;
					Locations[FindLocation("QC_town_exit")].reload.l4.disable = 0;
					Locations[FindLocation("QC_town_exit")].reload.l5.disable = 0;
					Locations[FindLocation("QC_town_exit")].reload.l6.disable = 0;
				break;

				case HOLLAND:
					loadTown = "Douwesen_town";
					loadPort = "Douwesen_port"; 
					gotoLocator = "goto15"; 
					rldLocator = "Reload3"; 

					Locations[FindLocation(loadPort)].reload.l2.disable = 0;
					Locations[FindLocation(loadPort)].reload.l5.disable = 0;

					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
				break;

				case PORTUGAL:
					loadTown = "Conceicao_town";
					loadPort = "Conceicao_port";
					gotoLocator = "goto13";
					rldLocator = "reload1";
					switch(PChar.location)
					{
						case "Conceicao_port": rldLocator = "reload1"; break;
						case "Conceicao_town": rldLocator = "reload4"; break;
					}

					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
					Locations[FindLocation(loadTown)].reload.l12.disable = 0;
				break;
				// TIH --> defaults added (mimics ENGLAND) Aug27'06
				// default:
					switch(PChar.location)
					{
						case "Oxbay_port": rldLocator = "reload1"; break;
						case "Oxbay_town": rldLocator = "reload13"; break;
					}
					Locations[FindLocation(loadPort)].reload.l2.disable = 0;
					Locations[FindLocation(loadTown)].reload.l8.disable = 0;
					Locations[FindLocation(loadTown)].reload.l9.disable = 0;
					Locations[FindLocation(loadTown)].reload.l10.disable = 0;
					Locations[FindLocation(loadTown)].reload.l11.disable = 0;
					Locations[FindLocation(loadTown)].reload.l12.disable = 0;
					Locations[FindLocation(loadTown)].reload.l13.disable = 0;
					Locations[FindLocation(loadTown)].reload.l14.disable = 0;
				// TIH <--
			}

// KK -->
			LAi_QuestDelay("begining", 0.0);
			Pchar.quest.Begining.over = "yes";
			SetFleetInTown(GetTownIDFromLocID(loadPort), "pchar");
// <-- KK

			Locations[FindLocation(loadPort)].reload.l1.disable = 0;
			Locations[FindLocation(loadPort)].reload.l3.disable = 0;
			Locations[FindLocation(loadPort)].reload.l4.disable = 0;

			Locations[FindLocation(loadTown)].reload.l1.disable = 0;
			Locations[FindLocation(loadTown)].reload.l2.disable = 0;
			Locations[FindLocation(loadTown)].reload.l3.disable = 0;
			Locations[FindLocation(loadTown)].reload.l4.disable = 0;
			Locations[FindLocation(loadTown)].reload.l5.disable = 0;
			Locations[FindLocation(loadTown)].reload.l6.disable = 0;
			Locations[FindLocation(loadTown)].reload.l7.disable = 0;

// KK -->
			if (GetCharacterShipCabin(PChar) != "Cabin_none")
				QDeck = GetCharacterShipQDeck(PChar);
			else
				QDeck = GetCharacterShipQDeck(CharacterFromID("Malcolm Hatcher"));
			Locations[FindLocation(QDeck)].reload.l6.go = "Sea";
			Locations[FindLocation(QDeck)].reload.l6.label = "Sea.";
// <-- KK

			Locations[FindLocation(loadPort)].locators_radius.(gotoGroup).(gotoLocator) = 0.5;
// added by MAXIMUS [choose character mod] <--
			LAi_QuestDelay("TavernSitWaiting", 0.0); // KK

//			LAi_QuestDelay("Tut_Malcolm_to_rest",500); // NK ditto
			EndQuestMovie();
			locDisableUpdateTime = false;
			LAi_RemoveCheckMinHP(CharacterFromID("Malcolm Hatcher"));
			LAi_RemoveCheckMinHP(Pchar);

			CloseQuestHeader(questRecord);
// added by MAXIMUS [choose character mod] <--

			Pchar.quest.Tut_KillTutor.over = "yes";
		break;

		////////////////////////////////////////////////////////////////////////
		//  ÇÀÉÌÛ - ÎÃÐÀÍÈ×ÅÍÈÅ ÏÎ ÂÐÅÌÅÍÈ
		////////////////////////////////////////////////////////////////////////

		case "Loans_Redmond":

			ChangeCharacterReputation(Pchar, -20);
			Characters[GetCharacterIndex("Redmond Usurer")].Dialog.CurrentNode = "DeadMotherfucker";

			NPChar = CharacterFromID("Usurer_Avenger01");

			//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat6";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger01"));
			SetBaseShipData(NPChar);

			Group_CreateGroup("Usurer_Avenger");
			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger01");
			Group_SetGroupCommander("Usurer_Avenger", "Usurer_Avenger01");


			NPChar = CharacterFromID("Usurer_Avenger02");

		//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat3";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);
			SetRandomNameToShip(characterFromID("Usurer_Avenger02"));
			SetBaseShipData(NPChar);

			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger02");


			NPChar = CharacterFromID("Usurer_Avenger03");

		//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat4";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetBaseShipData(NPChar);
			SetRandomNameToShip(characterFromID("Usurer_Avenger03"));
			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger03");

			SetCharacterRelationBoth(GetCharacterIndex("Usurer_Avenger01"),GetMainCharacterIndex(),RELATION_ENEMY);	
			Group_SetTaskAttack("Usurer_Avenger", PLAYER_GROUP);
			Group_LockTask("Usurer_Avenger");

			Encounter_SetQuestMapEncounter("Usurer_Avenger", ENCOUNTER_WAR, true, 50);
		
		break;

		case "Loans_Oxbay":

			ChangeCharacterReputation(Pchar, -20);

			Characters[GetCharacterIndex("Oxbay Usurer")].Dialog.CurrentNode = "DeadMotherfucker";

			NPChar = CharacterFromID("Usurer_Avenger01");

			//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat6";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger01"));
			SetBaseShipData(NPChar);

			Group_CreateGroup("Usurer_Avenger");
			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger01");
			Group_SetGroupCommander("Usurer_Avenger", "Usurer_Avenger01");


			NPChar = CharacterFromID("Usurer_Avenger02");

		//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat3";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger02"));
			SetBaseShipData(NPChar);

			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger02");


			NPChar = CharacterFromID("Usurer_Avenger03");

		//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat4";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger03"));
			SetBaseShipData(NPChar);

			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger03");

			SetCharacterRelationBoth(GetCharacterIndex("Usurer_Avenger01"),GetMainCharacterIndex(),RELATION_ENEMY);	
			Group_SetTaskAttack("Usurer_Avenger", PLAYER_GROUP);
			Group_LockTask("Usurer_Avenger");

			Encounter_SetQuestMapEncounter("Usurer_Avenger", ENCOUNTER_WAR, true, 50);	
		break;

		case "Loans_Greenford":
			Characters[GetCharacterIndex("Greenford Usurer")].Dialog.CurrentNode = "DeadMotherfucker";

			ChangeCharacterReputation(Pchar, -20);

			NPChar = CharacterFromID("Usurer_Avenger01");

			//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat6";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger01"));
			SetBaseShipData(NPChar);

			Group_CreateGroup("Usurer_Avenger");
			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger01");
			Group_SetGroupCommander("Usurer_Avenger", "Usurer_Avenger01");


			NPChar = CharacterFromID("Usurer_Avenger02");

		//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat3";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger02"));
			SetBaseShipData(NPChar);

			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger02");


			NPChar = CharacterFromID("Usurer_Avenger03");

		//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat4";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger03"));
			SetBaseShipData(NPChar);

			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger03");

			SetCharacterRelationBoth(GetCharacterIndex("Usurer_Avenger01"),GetMainCharacterIndex(),RELATION_ENEMY);	
			Group_SetTaskAttack("Usurer_Avenger", PLAYER_GROUP);
			Group_LockTask("Usurer_Avenger");

			Encounter_SetQuestMapEncounter("Usurer_Avenger", ENCOUNTER_WAR, true, 50);	
		break;

		case "Loans_FalaiseDeFleur":
			Characters[GetCharacterIndex("FF Usurer")].Dialog.CurrentNode = "DeadMotherfucker";

			ChangeCharacterReputation(Pchar, -20);

			NPChar = CharacterFromID("Usurer_Avenger01");

			//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat6";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger01"));
			SetBaseShipData(NPChar);

			Group_CreateGroup("Usurer_Avenger");
			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger01");
			Group_SetGroupCommander("Usurer_Avenger", "Usurer_Avenger01");


			NPChar = CharacterFromID("Usurer_Avenger02");

		//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat3";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger02"));
			SetBaseShipData(NPChar);

			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger02");


			NPChar = CharacterFromID("Usurer_Avenger03");

		//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat4";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger03"));
			SetBaseShipData(NPChar);

			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger03");

			SetCharacterRelationBoth(GetCharacterIndex("Usurer_Avenger01"),GetMainCharacterIndex(),RELATION_ENEMY);	
			Group_SetTaskAttack("Usurer_Avenger", PLAYER_GROUP);
			Group_LockTask("Usurer_Avenger");

			Encounter_SetQuestMapEncounter("Usurer_Avenger", ENCOUNTER_WAR, true, 50);	
		break;

		case "Loans_Conceicao":
			Characters[GetCharacterIndex("Conceicao Usurer")].Dialog.CurrentNode = "DeadMotherfucker";

			ChangeCharacterReputation(Pchar, -20);

			NPChar = CharacterFromID("Usurer_Avenger01");

			//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat6";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger01"));
			SetBaseShipData(NPChar);

			Group_CreateGroup("Usurer_Avenger");
			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger01");
			Group_SetGroupCommander("Usurer_Avenger", "Usurer_Avenger01");


			NPChar = CharacterFromID("Usurer_Avenger02");

		//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat3";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger02"));
			SetBaseShipData(NPChar);

			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger02");


			NPChar = CharacterFromID("Usurer_Avenger03");

		//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat4";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger03"));
			SetBaseShipData(NPChar);

			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger03");

			SetCharacterRelationBoth(GetCharacterIndex("Usurer_Avenger01"),GetMainCharacterIndex(),RELATION_ENEMY);	
			Group_SetTaskAttack("Usurer_Avenger", PLAYER_GROUP);
			Group_LockTask("Usurer_Avenger");

			Encounter_SetQuestMapEncounter("Usurer_Avenger", ENCOUNTER_WAR, true, 50);	
		break;

		case "Loans_Douwesen":
			Characters[GetCharacterIndex("Douwesen Usurer")].Dialog.CurrentNode = "DeadMotherfucker";

			ChangeCharacterReputation(Pchar, -20);

			NPChar = CharacterFromID("Usurer_Avenger01");

			//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat6";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger01"));
			SetBaseShipData(NPChar);

			Group_CreateGroup("Usurer_Avenger");
			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger01");
			Group_SetGroupCommander("Usurer_Avenger", "Usurer_Avenger01");


			NPChar = CharacterFromID("Usurer_Avenger02");

		//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat3";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger02"));
			SetBaseShipData(NPChar);

			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger02");


			NPChar = CharacterFromID("Usurer_Avenger03");

		//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat4";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger03"));
			SetBaseShipData(NPChar);

			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger03");

			SetCharacterRelationBoth(GetCharacterIndex("Usurer_Avenger01"),GetMainCharacterIndex(),RELATION_ENEMY);	
			Group_SetTaskAttack("Usurer_Avenger", PLAYER_GROUP);
			Group_LockTask("Usurer_Avenger");

			Encounter_SetQuestMapEncounter("Usurer_Avenger", ENCOUNTER_WAR, true, 50);
		break;

		case "Loans_Muelle":
			Characters[GetCharacterIndex("Muelle Usurer")].Dialog.CurrentNode = "DeadMotherfucker";

			ChangeCharacterReputation(Pchar, -20);

			NPChar = CharacterFromID("Usurer_Avenger01");

			//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat6";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger01"));
			SetBaseShipData(NPChar);

			Group_CreateGroup("Usurer_Avenger");
			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger01");
			Group_SetGroupCommander("Usurer_Avenger", "Usurer_Avenger01");


			NPChar = CharacterFromID("Usurer_Avenger02");

		//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat3";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger02"));
			SetBaseShipData(NPChar);

			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger02");


			NPChar = CharacterFromID("Usurer_Avenger03");

		//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat4";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger03"));
			SetBaseShipData(NPChar);

			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger03");

			SetCharacterRelationBoth(GetCharacterIndex("Usurer_Avenger01"),GetMainCharacterIndex(),RELATION_ENEMY);	
			Group_SetTaskAttack("Usurer_Avenger", PLAYER_GROUP);
			Group_LockTask("Usurer_Avenger");

			Encounter_SetQuestMapEncounter("Usurer_Avenger", ENCOUNTER_WAR, true, 50);	
		break;

		case "Loans_QC":
			Characters[GetCharacterIndex("QC Usurer")].Dialog.CurrentNode = "DeadMotherfucker";

			ChangeCharacterReputation(Pchar, -20);

			NPChar = CharacterFromID("Usurer_Avenger01");

			//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat6";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger01"));
			SetBaseShipData(NPChar);

			Group_CreateGroup("Usurer_Avenger");
			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger01");
			Group_SetGroupCommander("Usurer_Avenger", "Usurer_Avenger01");


			NPChar = CharacterFromID("Usurer_Avenger02");

		//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat3";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger02"));
			SetBaseShipData(NPChar);

			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger02");


			NPChar = CharacterFromID("Usurer_Avenger03");

		//Ïðîñòàíîâêà ïàðàìåòðîâ êàïèòàíàì-ïðåñëåäîâàòåëÿì
			NPChar.act.hp = 120;
			NPChar.nation =  PIRATE;
			SetRandomNameToCharacter(NPChar);
			NPChar.rank = makeint(Pchar.rank) - 2 + Rand(4);
			NPChar.experience = CalculateExperienceFromRank(sti(NPChar.rank));
			NPChar.model = "pirat4";

			CalculateAppropriateSkills(NPChar);	

			SelectCoastalGuardShip(NPChar);

			SetRandomNameToShip(characterFromID("Usurer_Avenger03"));
			SetBaseShipData(NPChar);

			Group_addCharacter("Usurer_Avenger", "Usurer_Avenger03");

			SetCharacterRelationBoth(GetCharacterIndex("Usurer_Avenger01"),GetMainCharacterIndex(),RELATION_ENEMY);	
			Group_SetTaskAttack("Usurer_Avenger", PLAYER_GROUP);
			Group_LockTask("Usurer_Avenger");

			Encounter_SetQuestMapEncounter("Usurer_Avenger", ENCOUNTER_WAR, true, 50);
		break;




		////////////////////////////////////////////////////////////////////////
		//  Ñëóæåáíûé êâåñò êîíòðàáàíäèñòîâ - îãðàíè÷åíèå ïî âðåìåíè
		////////////////////////////////////////////////////////////////////////

		case "Rand_Smuggling": // this occurs if you fail to show up for the smuggling
			Pchar.quests.contraband.relation = makeint(Pchar.quests.contraband.relation) - 10;
			RemoveSmugglersFromShore();
		break;

		case "Rand_SmugglingRemove":
			ChangeCharacterAddressGroup(CharacterFromID("Rand_Smug01"), "None", "", "");
			ChangeCharacterAddressGroup(CharacterFromID("Rand_Smug02"), "None", "", "");
			ChangeCharacterAddressGroup(CharacterFromID("Rand_Smug03"), "None", "", "");			
		break;


		//Ïîñòàíîâêà ñòðàæíèêîâ â ëîêàöèþ ïåðåäà÷è êîíòðàáàíäèñòîâ
		case "Rand_ContrabandInterruption":

			//trace("ÏÎßÂËÅÍÈÅ ÁÅÐÅÃÎÂÎÉ ÑÒÐÀÆÈ: " + sld.id);

			//LAi_CreateFantomCharacter(0, "soldier_eng", "", "");
						
			

			/*NK*/ sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.75, SelectSoldierModelbyLocationNation(Pchar.location, "Soldier"), "", "");
			Pchar.quest.contraband.SoldierIDX2 = sld.index;			
			LAi_SetActorType(sld);
			LAi_group_MoveCharacter(sld, "CoastalGuards");
			// NK - sld.skill.Fencing = makeint(Pchar.skill.Fencing) - 2 + Rand(4);
			LAi_ActorFollow(sld, Pchar, "", 120);

			/*NK*/ sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.75, SelectSoldierModelbyLocationNation(Pchar.location, "Soldier"), "", "");
			Pchar.quest.contraband.SoldierIDX3 = sld.index;
			LAi_SetActorType(sld);
			LAi_group_MoveCharacter(sld, "CoastalGuards");
			// NK - sld.skill.Fencing = makeint(Pchar.skill.Fencing) - 2 + Rand(4);
			LAi_ActorFollow(sld, Pchar, "", 120);

			/*NK*/ sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.75, SelectSoldierModelbyLocationNation(Pchar.location, "Soldier"), "", "");
			Pchar.quest.contraband.SoldierIDX4 = sld.index;
			LAi_SetActorType(sld);
			LAi_group_MoveCharacter(sld, "CoastalGuards");
			// NK - sld.skill.Fencing = makeint(Pchar.skill.Fencing) - 2 + Rand(4);
			LAi_ActorFollow(sld, Pchar, "", 120);

			/*NK*/ sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.75, SelectSoldierModelbyLocationNation(Pchar.location, "Soldier"), "", "");
			Pchar.quest.contraband.SoldierIDX5 = sld.index;
			LAi_SetActorType(sld);
			LAi_group_MoveCharacter(sld, "CoastalGuards");
			// NK - sld.skill.Fencing = makeint(Pchar.skill.Fencing) - 2 + Rand(4);
			LAi_ActorFollow(sld, Pchar, "", 120);

			/*NK*/ sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.75, SelectSoldierModelbyLocationNation(Pchar.location, "Soldier"), "", "");
			Pchar.quest.contraband.SoldierIDX6 = sld.index;
			LAi_SetActorType(sld);
			LAi_group_MoveCharacter(sld, "CoastalGuards");
			// NK - sld.skill.Fencing = makeint(Pchar.skill.Fencing) - 2 + Rand(4);
			LAi_ActorFollow(sld, Pchar, "", 120);


			// ccc stormy start; coastguard officer creation moved here so that he catches you first
			/*NK*/ sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.75, SelectSoldierModelbyLocationNation(Pchar.location, "Officer"), "", "");
			Pchar.quest.contraband.SoldierIDX1 = sld.index;
		//	Log_SetstringToLog("Èíäåêñ ññûëêè íà ïåðâîãî ñîëäàòà(ôàíòîìà): " + sld.index);
			//Pchar.quest.contraband.SoldierIDX1 = getCharacterIndex(sld.id);
			LAi_SetActorType(sld);
			LAi_group_MoveCharacter(sld, "CoastalGuards");
			sld.Dialog.Filename = "Coastal Guards_dialog.c";
			sld.Dialog.CurrentNode = "First time";
			// NK - sld.skill.Fencing = makeint(Pchar.skill.Fencing) - 1 + Rand(4);
		//	Log_SetstringToLog("Èíäåêñ ïåðâîãî ñîëäàòà: " + Pchar.quest.contraband.SoldierIDX1);

			trace("ÏÎßÂËÅÍÈÅ ÁÅÐÅÃÎÂÎÉ ÑÒÐÀÆÈ: " + sld.id);
			LAi_ActorDialog(sld, Pchar, "", 120, 0);

			SetCoastalGuardPursuit();

			Lai_QuestDelay("Rand_CoastalPatrolAppear", 1.0);
		/*	Pchar.quest.Rand_ContrabandInterruptionAtSea.win_condition.l1 = "location";
			Pchar.quest.Rand_ContrabandInterruptionAtSea.win_condition.l1.character = PChar.id;
			Pchar.quest.Rand_ContrabandInterruptionAtSea.win_condition.l1.location = Islands[GetCharacterCurrentIsland(pchar)].id;
			Pchar.quest.Rand_ContrabandInterruptionAtSea.win_condition = "Rand_ContrabandInterruptionAtSea";*/
		break;

		case "Rand_CoastalPatrolAppear":			  
			Trace("QUEST Rand_CoastalPatrolAppear reports: Soldier Idx = " + Pchar.quest.contraband.SoldierIDX1);
			// StartQuestMovie(true, true, true);
			// ccc stormy start; so that you can run from coastguards   LAi_SetActorTypeNoGroup(Pchar);
			// ccc LAi_ActorTurnToCharacter(Pchar, &Characters[makeint(Pchar.quest.contraband.SoldierIDX1)]);
			// ccc LAi_ActorWaitDialog(Pchar, &Characters[makeint(Pchar.quest.contraband.SoldierIDX1)]); 
			LAi_LocationFightDisable(&Locations[FindLocation(pchar.location)], true);
			// ccc so that guard can challenge you

			// TIH --> fix the broken combat settings if you 'ran' from the gaurds Jul25'06
			pchar.cleanlocidx = FindLocation(pchar.location);
			Pchar.quest.Rand_ContrabandInterruptionCleanup.win_condition.l1 = "location";
			Pchar.quest.Rand_ContrabandInterruptionCleanup.win_condition.l1.character = PChar.id;
			Pchar.quest.Rand_ContrabandInterruptionCleanup.win_condition.l1.location = Islands[GetCharacterCurrentIsland(pchar)].id;
			Pchar.quest.Rand_ContrabandInterruptionCleanup.win_condition = "Rand_ContrabandInterruptionCleanup";
			/* // MapEnter is a good catch situation as well... but not as cool
			Pchar.quest.Rand_ContrabandInterruptionCleanup.win_condition.l1 = "MapEnter";
			Pchar.quest.Rand_ContrabandInterruptionCleanup.win_condition = "Rand_ContrabandInterruptionCleanup";
			*/
			// TIH <--

			//LAi_SetPlayerType(Pchar);
		break;

		// TIH --> fix the broken combat settings if you 'ran' from the gaurds Jul25'06
		case "Rand_ContrabandInterruptionCleanup":
			// if the player DID run away screaming like a little wuss, we do cleanup because the dialog never happened
			if ( CheckAttribute( &Locations[sti(pchar.cleanlocidx)],"noFight" ) ) {
				LAi_LocationFightDisable(&Locations[sti(pchar.cleanlocidx)], false);
				Pchar.quest.Rand_ContrabandInterruptionAtSeaEnded.win_condition.l1 = "MapEnter";
				Pchar.quest.Rand_ContrabandInterruptionAtSeaEnded.win_condition = "Rand_ContrabandInterruptionAtSeaEnded";
				//Pchar.quest.Rand_Smuggling.over = "yes";	// dont need to do this, it should have happened already
				//RemoveSmugglersFromShore();				// dont need to do this, it should have happened already
				// fantom soldiers are automatically removed (they are fantoms)
			}
			DeleteAttribute(pchar,"cleanlocidx");
		break;
		// TIH <--

		case "Rand_ContrabandInterruptionAtSeaEnded":
			StopCoastalGuardPursuit();
		break;

		





////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////LAND ENCOUNTERS QUESTS///////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////


//------------------------------------------RAIDERS----------------------------------------------------
		case "LandEnc_RaidersLogin":
			LAi_group_SetRelation("ENC_RAIDERS_GROUP", LAI_GROUP_PLAYER, LAI_GROUP_NEITRAL);

			LAi_SetCheckMinHP(characterFromID("Enc_Char1"), (LAi_GetCharacterHP(CharacterFromID("Enc_Char1")) - 1), false, "LandEnc_RaidersFight");
			LAi_SetCheckMinHP(characterFromID("Enc_Char2"), (LAi_GetCharacterHP(CharacterFromID("Enc_Char2")) - 1), false, "LandEnc_RaidersFight");
			LAi_SetCheckMinHP(characterFromID("Enc_Char3"), (LAi_GetCharacterHP(CharacterFromID("Enc_Char3")) - 1), false, "LandEnc_RaidersFight");
			LAi_SetCheckMinHP(characterFromID("Enc_Char4"), (LAi_GetCharacterHP(CharacterFromID("Enc_Char4")) - 1), false, "LandEnc_RaidersFight");
		break;


		case "LandEnc_RaidersStart":
			LAi_SetActorType(CharacterFromID("Enc_Char1"));
			LAi_SetActorType(CharacterFromID("Enc_Char2"));
			LAi_SetActorType(CharacterFromID("Enc_Char3"));
			LAi_SetActorType(CharacterFromID("Enc_Char4"));

			LAi_group_MoveCharacter(CharacterFromID("Enc_Char1"), "ENC_RAIDERS_GROUP");
			LAi_group_MoveCharacter(CharacterFromID("Enc_Char2"), "ENC_RAIDERS_GROUP");
			LAi_group_MoveCharacter(CharacterFromID("Enc_Char3"), "ENC_RAIDERS_GROUP");
			LAi_group_MoveCharacter(CharacterFromID("Enc_Char4"), "ENC_RAIDERS_GROUP");

			LAi_SetCheckMinHP(characterFromID("Enc_Char1"), (LAi_GetCharacterHP(CharacterFromID("Enc_Char1")) - 1), false, "LandEnc_RaidersFight");
			LAi_SetCheckMinHP(characterFromID("Enc_Char2"), (LAi_GetCharacterHP(CharacterFromID("Enc_Char2")) - 1), false, "LandEnc_RaidersFight");
			LAi_SetCheckMinHP(characterFromID("Enc_Char3"), (LAi_GetCharacterHP(CharacterFromID("Enc_Char3")) - 1), false, "LandEnc_RaidersFight");
			LAi_SetCheckMinHP(characterFromID("Enc_Char4"), (LAi_GetCharacterHP(CharacterFromID("Enc_Char4")) - 1), false, "LandEnc_RaidersFight");
			
			LAi_ActorDialog(CharacterFromID("Enc_Char1"), Pchar, "", 10, 0);
			LAi_ActorDialog(CharacterFromID("Enc_Char2"), Pchar, "", 10, 0);
			LAi_ActorDialog(CharacterFromID("Enc_Char3"), Pchar, "", 10, 0);
			LAi_ActorDialog(CharacterFromID("Enc_Char4"), Pchar, "", 10, 0);

			if(CheckAttribute(Pchar, "quest.LandEnc_StartingQuest1")) pchar.quest.LandEnc_StartingQuest1.over = "yes";
			if(CheckAttribute(Pchar, "quest.LandEnc_StartingQuest2")) pchar.quest.LandEnc_StartingQuest2.over = "yes";
			if(CheckAttribute(Pchar, "quest.LandEnc_StartingQuest3")) pchar.quest.LandEnc_StartingQuest3.over = "yes";

			LAi_SetFightMode(PChar, false);
			LAi_LockFightMode(Pchar, true);
		break;

		case "LandEnc_RaidersFight":
			LAi_LockFightMode(Pchar, false);

			LAi_RemoveCheckMinHP(characterFromID("Enc_Char1"));
			LAi_RemoveCheckMinHP(characterFromID("Enc_Char2"));
			LAi_RemoveCheckMinHP(characterFromID("Enc_Char3"));
			LAi_RemoveCheckMinHP(characterFromID("Enc_Char4"));

			LAi_type_actor_Reset(CharacterFromID("Enc_Char1"));
			LAi_type_actor_Reset(CharacterFromID("Enc_Char2"));
			LAi_type_actor_Reset(CharacterFromID("Enc_Char3"));
			LAi_type_actor_Reset(CharacterFromID("Enc_Char4"));

			LAi_SetWarriorTypeNoGroup(CharacterFromID("Enc_Char1"));
			LAi_SetWarriorTypeNoGroup(CharacterFromID("Enc_Char2"));
			LAi_SetWarriorTypeNoGroup(CharacterFromID("Enc_Char3"));
			LAi_SetWarriorTypeNoGroup(CharacterFromID("Enc_Char4"));

			LAi_group_MoveCharacter(CharacterFromID("Enc_Char1"), "ENC_RAIDERS_GROUP");
			LAi_group_MoveCharacter(CharacterFromID("Enc_Char2"), "ENC_RAIDERS_GROUP");
			LAi_group_MoveCharacter(CharacterFromID("Enc_Char3"), "ENC_RAIDERS_GROUP");
			LAi_group_MoveCharacter(CharacterFromID("Enc_Char4"), "ENC_RAIDERS_GROUP");

			if(CheckAttribute(Pchar, "quest.LandEnc_StartingQuest1")) pchar.quest.LandEnc_StartingQuest1.over = "yes";
			if(CheckAttribute(Pchar, "quest.LandEnc_StartingQuest2")) pchar.quest.LandEnc_StartingQuest2.over = "yes";
			if(CheckAttribute(Pchar, "quest.LandEnc_StartingQuest3")) pchar.quest.LandEnc_StartingQuest3.over = "yes";

			LAi_group_FightGroups("ENC_RAIDERS_GROUP", LAI_GROUP_PLAYER, false);
		break;

		case "LandEnc_RaidersRunAway":
			LAi_LockFightMode(Pchar, false);

			LAi_type_actor_Reset(CharacterFromID("Enc_Char1"));
			LAi_type_actor_Reset(CharacterFromID("Enc_Char2"));
			LAi_type_actor_Reset(CharacterFromID("Enc_Char3"));
			LAi_type_actor_Reset(CharacterFromID("Enc_Char4"));

			LAi_ActorAfraid(CharacterFromID("Enc_Char1"), Pchar, true);
			LAi_ActorAfraid(CharacterFromID("Enc_Char2"), Pchar, true);
			LAi_ActorAfraid(CharacterFromID("Enc_Char3"), Pchar, true);
			LAi_ActorAfraid(CharacterFromID("Enc_Char4"), Pchar, true);

			if(CheckAttribute(Pchar, "quest.LandEnc_StartingQuest1")) pchar.quest.LandEnc_StartingQuest1.over = "yes";
			if(CheckAttribute(Pchar, "quest.LandEnc_StartingQuest2")) pchar.quest.LandEnc_StartingQuest2.over = "yes";
			if(CheckAttribute(Pchar, "quest.LandEnc_StartingQuest3")) pchar.quest.LandEnc_StartingQuest3.over = "yes";

			Characters[GetCharacterIndex("Enc_Char1")].Dialog.CurrentNode = "GetTheHellOut";
			Characters[GetCharacterIndex("Enc_Char2")].Dialog.CurrentNode = "GetTheHellOut";
			Characters[GetCharacterIndex("Enc_Char3")].Dialog.CurrentNode = "GetTheHellOut";
			Characters[GetCharacterIndex("Enc_Char4")].Dialog.CurrentNode = "GetTheHellOut";
		break;

		case "LandEnc_RaidersNoFight":
			LAi_LockFightMode(Pchar, false);

			LAi_type_actor_Reset(CharacterFromID("Enc_Char1"));
			LAi_type_actor_Reset(CharacterFromID("Enc_Char2"));
			LAi_type_actor_Reset(CharacterFromID("Enc_Char3"));
			LAi_type_actor_Reset(CharacterFromID("Enc_Char4"));

			LAi_SetWarriorTypeNoGroup(CharacterFromID("Enc_Char1"));
			LAi_SetWarriorTypeNoGroup(CharacterFromID("Enc_Char2"));
			LAi_SetWarriorTypeNoGroup(CharacterFromID("Enc_Char3"));
			LAi_SetWarriorTypeNoGroup(CharacterFromID("Enc_Char4"));

			LAi_warrior_DialogEnable(CharacterFromID("Enc_Char1"), true);
			LAi_warrior_DialogEnable(CharacterFromID("Enc_Char2"), true);
			LAi_warrior_DialogEnable(CharacterFromID("Enc_Char3"), true);
			LAi_warrior_DialogEnable(CharacterFromID("Enc_Char4"), true);

			if(CheckAttribute(Pchar, "quest.LandEnc_StartingQuest1")) pchar.quest.LandEnc_StartingQuest1.over = "yes";
			if(CheckAttribute(Pchar, "quest.LandEnc_StartingQuest2")) pchar.quest.LandEnc_StartingQuest2.over = "yes";
			if(CheckAttribute(Pchar, "quest.LandEnc_StartingQuest3")) pchar.quest.LandEnc_StartingQuest3.over = "yes";

			Characters[GetCharacterIndex("Enc_Char1")].Dialog.CurrentNode = "GetLost";
			Characters[GetCharacterIndex("Enc_Char2")].Dialog.CurrentNode = "GetLost";
			Characters[GetCharacterIndex("Enc_Char3")].Dialog.CurrentNode = "GetLost";
			Characters[GetCharacterIndex("Enc_Char4")].Dialog.CurrentNode = "GetLost";
		break;

		case "LandEnc_RaidersRobbed":
			LAi_LockFightMode(Pchar, false);

			LAi_type_actor_Reset(CharacterFromID("Enc_Char1"));
			LAi_type_actor_Reset(CharacterFromID("Enc_Char2"));
			LAi_type_actor_Reset(CharacterFromID("Enc_Char3"));
			LAi_type_actor_Reset(CharacterFromID("Enc_Char4"));

			LAi_SetWarriorTypeNoGroup(CharacterFromID("Enc_Char1"));
			LAi_SetWarriorTypeNoGroup(CharacterFromID("Enc_Char2"));
			LAi_SetWarriorTypeNoGroup(CharacterFromID("Enc_Char3"));
			LAi_SetWarriorTypeNoGroup(CharacterFromID("Enc_Char4"));

			LAi_warrior_DialogEnable(CharacterFromID("Enc_Char1"), true);
			LAi_warrior_DialogEnable(CharacterFromID("Enc_Char2"), true);
			LAi_warrior_DialogEnable(CharacterFromID("Enc_Char3"), true);
			LAi_warrior_DialogEnable(CharacterFromID("Enc_Char4"), true);

			if(CheckAttribute(Pchar, "quest.LandEnc_StartingQuest1")) pchar.quest.LandEnc_StartingQuest1.over = "yes";
			if(CheckAttribute(Pchar, "quest.LandEnc_StartingQuest2")) pchar.quest.LandEnc_StartingQuest2.over = "yes";
			if(CheckAttribute(Pchar, "quest.LandEnc_StartingQuest3")) pchar.quest.LandEnc_StartingQuest3.over = "yes";

			Characters[GetCharacterIndex("Enc_Char1")].Dialog.CurrentNode = "OnceAgain";
			Characters[GetCharacterIndex("Enc_Char2")].Dialog.CurrentNode = "OnceAgain";
			Characters[GetCharacterIndex("Enc_Char3")].Dialog.CurrentNode = "OnceAgain";
			Characters[GetCharacterIndex("Enc_Char4")].Dialog.CurrentNode = "OnceAgain";
		break;


//------------------------------------------RAPERS----------------------------------------------------

// Viper - Rapers MOD Start
		case "LandEnc_RapersLogin":

			Characters[GetCharacterIndex("Enc_Char2")].nodisarm = 1; // PB: Disable disarming
			Characters[GetCharacterIndex("Enc_Char3")].nodisarm = 1; // PB: Disable disarming
			Characters[GetCharacterIndex("Enc_Char4")].nodisarm = 1; // PB: Disable disarming

			LAi_group_SetRelation("ENC_RAIDERS_GROUP", LAI_GROUP_PLAYER, LAI_GROUP_NEITRAL);

			LAi_SetCheckMinHP(characterFromID("Enc_Char2"), (LAi_GetCharacterHP(CharacterFromID("Enc_Char2")) - 1), false, "LandEnc_RapersFight");
			LAi_SetCheckMinHP(characterFromID("Enc_Char3"), (LAi_GetCharacterHP(CharacterFromID("Enc_Char3")) - 1), false, "LandEnc_RapersFight");
			LAi_SetCheckMinHP(characterFromID("Enc_Char4"), (LAi_GetCharacterHP(CharacterFromID("Enc_Char4")) - 1), false, "LandEnc_RapersFight");

			LAi_QuestDelay("LandEnc_RapersPursue", 1); // NK was 5
		break;

		case "LandEnc_RapersPursue":
			LAi_SetActorType(CharacterFromID("Enc_Char1"));
			LAi_SetActorType(CharacterFromID("Enc_Char2"));
			LAi_SetActorType(CharacterFromID("Enc_Char3"));
			LAi_SetActorType(CharacterFromID("Enc_Char4"));

			//Ïðè ïåðâîì ïîäõîäå èëè èñòå÷åíèè âðåìåíè ñðàáîòàåò êâåñò
			LAi_ActorAfraid(CharacterFromID("Enc_Char1"), CharacterFromID("Enc_Char2"), true);
			LAi_ActorFollow(CharacterFromID("Enc_Char2"), CharacterFromID("Enc_Char1"), "", 240);
			LAi_ActorFollow(CharacterFromID("Enc_Char3"), CharacterFromID("Enc_Char1"), "", 240);
			LAi_ActorFollow(CharacterFromID("Enc_Char4"), CharacterFromID("Enc_Char1"), "", 240);

			LAi_ActorDialog(CharacterFromID("Enc_Char1"), Pchar, "", 45, 0);

			if(CheckAttribute(Pchar, "quest.LandEnc_StartingQuest1")) pchar.quest.LandEnc_StartingQuest1.over = "yes";
			if(CheckAttribute(Pchar, "quest.LandEnc_StartingQuest2")) pchar.quest.LandEnc_StartingQuest2.over = "yes";
			if(CheckAttribute(Pchar, "quest.LandEnc_StartingQuest3")) pchar.quest.LandEnc_StartingQuest3.over = "yes";
		break;
// Viper - Rapers MOD End

		case "LandEnc_RapersTalk":
			LAi_SetActorType(CharacterFromID("Enc_Char2"));
			LAi_SetActorType(CharacterFromID("Enc_Char3"));
			LAi_SetActorType(CharacterFromID("Enc_Char4"));

			LAi_ActorAfraid(CharacterFromID("Enc_Char1"), CharacterFromID("Enc_Char2"), true);

			LAi_SetCheckMinHP(characterFromID("Enc_Char2"), (LAi_GetCharacterHP(CharacterFromID("Enc_Char2")) - 1), false, "LandEnc_RapersFight");
			LAi_SetCheckMinHP(characterFromID("Enc_Char3"), (LAi_GetCharacterHP(CharacterFromID("Enc_Char3")) - 1), false, "LandEnc_RapersFight");
			LAi_SetCheckMinHP(characterFromID("Enc_Char4"), (LAi_GetCharacterHP(CharacterFromID("Enc_Char4")) - 1), false, "LandEnc_RapersFight");

			LAi_ActorDialog(CharacterFromID("Enc_Char2"), Pchar, "", 1, 0);
			LAi_ActorDialog(CharacterFromID("Enc_Char3"), Pchar, "", 1, 0);
			LAi_ActorDialog(CharacterFromID("Enc_Char4"), Pchar, "", 1, 0);
		break;

		case "LandEnc_RapersFight":
			LAi_RemoveCheckMinHP(characterFromID("Enc_Char2"));
			LAi_RemoveCheckMinHP(characterFromID("Enc_Char3"));
			LAi_RemoveCheckMinHP(characterFromID("Enc_Char4"));

			LAi_SetWarriorType(CharacterFromID("Enc_Char2"));
			LAi_SetWarriorType(CharacterFromID("Enc_Char3"));
			LAi_SetWarriorType(CharacterFromID("Enc_Char4"));

			LAi_group_MoveCharacter(CharacterFromID("Enc_Char2"), "ENC_RAPERS_GROUP");
			LAi_group_MoveCharacter(CharacterFromID("Enc_Char3"), "ENC_RAPERS_GROUP");
			LAi_group_MoveCharacter(CharacterFromID("Enc_Char4"), "ENC_RAPERS_GROUP");

			Pchar.quest.LandEnc_KillAllRapers.win_condition.l1 = "NPC_Death";
			Pchar.quest.LandEnc_KillAllRapers.win_condition.l1.character = "Enc_Char2";
			Pchar.quest.LandEnc_KillAllRapers.win_condition.l2 = "NPC_Death";
			Pchar.quest.LandEnc_KillAllRapers.win_condition.l2.character = "Enc_Char3";
			Pchar.quest.LandEnc_KillAllRapers.win_condition.l3 = "NPC_Death";
			Pchar.quest.LandEnc_KillAllRapers.win_condition.l3.character = "Enc_Char4";
			PChar.quest.LandEnc_KillAllRapers.win_condition = "LandEnc_KillAllRapers";

			LAi_ActorAfraid(CharacterFromID("Enc_Char1"), CharacterFromID("Enc_Char2"), true);

			LAi_group_FightGroups("ENC_RAPERS_GROUP", LAI_GROUP_PLAYER, false);
		break;

		case "LandEnc_RapersNoFight":

			ChangeCharacterReputation(PChar, -5); // NK - Pchar.reputation = makeint(Pchar.reputation) - 5;

			LAi_ActorAfraid(CharacterFromID("Enc_Char1"), CharacterFromID("Enc_Char2"), true);

			LAi_ActorFollow(CharacterFromID("Enc_Char2"), CharacterFromID("Enc_Char1"), "", -1);
			LAi_ActorFollow(CharacterFromID("Enc_Char3"), CharacterFromID("Enc_Char1"), "", -1);
			LAi_ActorFollow(CharacterFromID("Enc_Char4"), CharacterFromID("Enc_Char1"), "", -1);

		break;

		case "LandEnc_KillAllRapers":
			//Pchar.reputation = makeint(Pchar.reputation) + 5;
			if(AUTO_SKILL_SYSTEM) { AddPartyExpChar(pchar, "Leadership", makeint(Pchar.rank)*100); }
			else { AddPartyExp(pchar, makeint(Pchar.rank)*100); }
			LAi_type_actor_Reset(CharacterFromID("Enc_Char1"));
			Characters[GetCharacterIndex("Enc_Char1")].Dialog.CurrentNode = "ThanksForHelp";
			LAi_ActorDialog(CharacterFromID("Enc_Char1"), Pchar, "", 15, 0);

		break;

//------------------------------------------OFFICER----------------------------------------------------

		case "LandEnc_OfficerHired":
		// This action is still used by the following applications:
		// 		Enc_fort_dialog.c
		// 		Enc_Officer_dialog.c
		// This is NO LONGER used by the following:
		// 		Cabinfight_dialog.c
		// 		Prisoned_dialog.c

			int freeidx = FindFreeRandomOfficer(); // NK do once
			if(freeidx != -1)
			{
				Pchar.quest.FreeRandomOfficerIdx = Characters[freeidx].index;
				Pchar.quest.FreeRandomOfficerID = Characters[makeint(Pchar.quest.FreeRandomOfficerIdx)].id;
				
				trace("Free Random Officer IDX is " + Pchar.quest.FreeRandomOfficerIdx + " and he has id  " + Pchar.quest.FreeRandomOfficerID);
	
				CopyAttributes(&Characters[makeint(Pchar.quest.FreeRandomOfficerIdx)], &Characters[makeint(Pchar.quest.HiringOfficerIDX)]);
				
				Characters[makeint(Pchar.quest.FreeRandomOfficerIdx)].index = Pchar.quest.FreeRandomOfficerIdx;
				Characters[makeint(Pchar.quest.FreeRandomOfficerIdx)].id = Pchar.quest.FreeRandomOfficerID;
// added by MAXIMUS [for placing new officer in empty slot (default for some officers)] -->
				int ofNum = 3;
				switch(Characters[makeint(Pchar.quest.FreeRandomOfficerIdx)].quest.officertype)
				{
					case OFFIC_TYPE_FIRSTMATE: ofNum = 1; break;
					case OFFIC_TYPE_BOATSWAIN: ofNum = 2; break;
					case OFFIC_TYPE_NAVIGATOR: ofNum = 3; break;
				}				
				SetOfficersIndex(Pchar, ofNum, makeint(Pchar.quest.FreeRandomOfficerIdx));
// added by MAXIMUS [for placing new officer in empty slot (default for some officers)] <--

				Characters[makeint(Pchar.quest.FreeRandomOfficerIdx)].location = "None";
				
			/*	Pchar.quest.LandEnc_OfficerJoined.win_condition.l1 = "ExitFromLocation";
				Pchar.quest.LandEnc_OfficerJoined.win_condition.l1.location = Pchar.location;
				Pchar.quest.LandEnc_OfficerJoined.win_condition = "LandEnc_OfficerJoined";*/

				// TIH --> move any money they may have into their wealth, so MC cant steal their money Oct31'06
				ref NewOfficer = GetCharacter(sti(Pchar.quest.FreeRandomOfficerIdx));
				// this is copied from the TIH_OfficerHiredProcess function
				// since this questaction has yet to be converted to use that function
				if (CheckAttribute(NewOfficer,"money") && sti(NewOfficer.money) > 0)
				{
					if (!CheckAttribute(NewOfficer,"wealth")) { NewOfficer.wealth = 0; } // set if not set
					NewOfficer.wealth = makeint(sti(NewOfficer.wealth) + sti(NewOfficer.money)); // merge together into wealth
					NewOfficer.money = 0; // clear out their money now that its moved
				}
				// TIH <--

				LAi_Fade("LandEnc_OfficerJoined", "");
			}
			else
			{
				Log_SetStringToLog(QUEST_MESSAGE12);
				DeleteAttribute(Pchar, "quest.FreeRandomOfficerIdx");
				DeleteAttribute(Pchar, "quest.FreeRandomOfficerID");
			}
		break;

		case "LandEnc_OfficerJoined":

			characters[makeint(Pchar.quest.FreeRandomOfficerIdx)].Dialog.CurrentNode = "hired";
			// boal 05.09.03 offecer need to go to abordage -->
			characters[makeint(Pchar.quest.FreeRandomOfficerIdx)].AbordageMode = makeint(1);
			// boal 05.09.03 offecer need to go to abordage <--
			ChangeCharacterAddressGroup(&Characters[makeint(Pchar.quest.HiringOfficerIDX)], "None", "", "");

// changed by MAXIMUS [for captains of captured ships] -->
			if(bAbordageStarted) PlaceCharacter(characterFromID(Pchar.quest.FreeRandomOfficerID), "rld", Pchar.location);
			else PlaceCharacter(characterFromID(Pchar.quest.FreeRandomOfficerID), "goto", Pchar.location);
// changed by MAXIMUS [for captains of captured ships] -->

			DialogMain(characterFromID(Pchar.quest.FreeRandomOfficerID)); // added by MAXIMUS

			DeleteAttribute(Pchar, "quest.FreeRandomOfficerIdx");
			DeleteAttribute(Pchar, "quest.FreeRandomOfficerID");
			DeleteAttribute(Pchar, "quest.HiringOfficerIDX");
// added by MAXIMUS [for officers icons updates after new officer hire] -->
			PostEvent(EVENT_CHANGE_OFFICERS, 500);//MAXIMUS: officers-icons fixed
// added by MAXIMUS [for officers icons updates after new officer hire] <--
		break;

		case "LandEnc_OfficerFired":
			RemovePassenger(Pchar, &Characters[makeint(Pchar.quest.FiringOfficerIDX)]);			
			LAi_SetCitizenType(&Characters[makeint(Pchar.quest.FiringOfficerIDX)]);
			Characters[makeint(Pchar.quest.FiringOfficerIDX)].Dialog.CurrentNode = "Fired";
			Characters[makeint(Pchar.quest.FiringOfficerIDX)].location = "none";
			
			DeleteAttribute(Pchar, "quest.FiringOfficerIDX");
			BLI_UpdateOfficers();
		break;

		// SA (NK bugfix 04-09-06) -->
		case "LandEnc_OfficerFiredGood":
			RemovePassenger(Pchar, &Characters[makeint(Pchar.quest.FiringOfficerIDX)]);			
			LAi_SetCitizenType(&Characters[makeint(Pchar.quest.FiringOfficerIDX)]);
			Characters[makeint(Pchar.quest.FiringOfficerIDX)].Dialog.CurrentNode = "Departed";
			// Maybe we should change this? But doing so would mean we'd have to keep the slot open...
			Characters[makeint(Pchar.quest.FiringOfficerIDX)].location = "none";
			
			DeleteAttribute(Pchar, "quest.FiringOfficerIDX");
			BLI_UpdateOfficers();
		break;
		// SA <--

		// SA (NK bugfix 04-09-06) -->
		case "LandEnc_OfficerFiredGoodPayed":
			NPChar = GetCharacter(sti(Pchar.quest.FiringOfficerIDX));
			int PayOwed = 0;
			if(CheckAttribute(NPChar,"quest.OfficerPayOwed")) PayOwed += sti(NPChar.quest.OfficerPayOwed);
			if (GetCharacterMoney(PChar) < PayOwed) PayOwed = GetCharacterMoney(PChar);

			AddMoneyToCharacter(Pchar,-PayOwed);
			AddWealthToCharacter(&NPChar, PayOwed);
			NPChar.quest.OfficerPayOwed = 0;

			RemovePassenger(Pchar, &Characters[makeint(Pchar.quest.FiringOfficerIDX)]);			
			LAi_SetCitizenType(&Characters[makeint(Pchar.quest.FiringOfficerIDX)]);
			Characters[makeint(Pchar.quest.FiringOfficerIDX)].Dialog.CurrentNode = "Departed";
			// Maybe we should change this? But doing so would mean we'd have to keep the slot open...
			Characters[makeint(Pchar.quest.FiringOfficerIDX)].location = "none";

			DeleteAttribute(Pchar, "quest.FiringOfficerIDX");
			BLI_UpdateOfficers();
		break;
		// SA <--

		// boal 05.09.03 offecer need to go to abordage -->
		case "Boal_LandEnc_OfficerStay":
			SetCharacterTask_Stay(Characters[makeint(Pchar.quest.HiringOfficerIDX)]);
			DeleteAttribute(Pchar, "quest.HiringOfficerIDX");
		break;
		// boal 05.09.03 offecer need to go to abordage <--

//------------------------------------------END OFFICER------------------------------------------------

		// NK -->
		case "NK_FightMonstersEvent":
			/*LAi_group_FightGroups(LAI_GROUP_MONSTERS, PLAYER_GROUP, false);

			for(int i = 0; i < 32; i++)
			{
				chr = &Characters[LOC_FANTOM_CHARACTERS + i];
				if(!CheckAttribute(chr,"chr_ai.group")) continue;
				if(chr.chr_ai.group == LAI_GROUP_MONSTERS)
				{
					EnableEquip(chr, BLADE_ITEM_TYPE, true);
					EquipCharacterByItem(chr, FindCharacterItemByGroup(chr, BLADE_ITEM_TYPE));
					ExecuteCharacterEquip(chr);
					if(CheckAttribute(chr,"patroltype"))
					{
						LAi_type_patrol_Init(chr);
					}
					LAi_SetWarriorType(chr);
					LAi_warrior_SetStay(chr, true);
				}
			}*/
		break;
		// NK <--
		// MAXIMUS =================================== Prisoners and Captived Captains Section =================================== >
		case "Surrendered_Captain_Dialog":
			LAi_SetPlayerType(PChar);
		break;

		int p, _curCharIdx;
		aref pRef; makearef(pRef,PChar.Fellows.Passengers);
		string PsgAttrName;
		ref cptChar;

		case "Surrendered_Captain_Poor":
			for(p=0; p<GetPassengersQuantity(PChar); p++)
			{
				PsgAttrName = "id"+(p+1);
				_curCharIdx = sti(pRef.(PsgAttrName));
				cptChar = GetCharacter(_curCharIdx);
				if(CheckAttribute(cptChar,"prisoned"))
				{
					if(CheckAttribute(cptChar,"prisoned.indialog")) LAi_SetPoorType(cptChar);
				}
			}
		break;

		case "Surrendered_Captain_Stay":
			for(p=0; p<GetPassengersQuantity(PChar); p++)
			{
				PsgAttrName = "id"+(p+1);
				_curCharIdx = sti(pRef.(PsgAttrName));
				cptChar = GetCharacter(_curCharIdx);
				if(CheckAttribute(cptChar,"prisoned"))
				{
					if(CheckAttribute(cptChar,"prisoned.indialog")) LAi_SetStayType(cptChar);
				}
			}
		break;

		case "Surrendered_Captain_Turn":
			for(p=0; p<GetPassengersQuantity(PChar); p++)
			{
				PsgAttrName = "id"+(p+1);
				_curCharIdx = sti(pRef.(PsgAttrName));
				cptChar = GetCharacter(_curCharIdx);
				if(CheckAttribute(cptChar,"prisoned"))
				{
					if(CheckAttribute(cptChar,"prisoned.indialog"))
					{
						LAi_ActorTurnToCharacter(cptChar, GetMainCharacter());
						LAi_SetStayType(cptChar);
					}
				}
			}
		break;

		case "Surrendered_Captain_Afraid":
			for(p=0; p<GetPassengersQuantity(PChar); p++)
			{
				PsgAttrName = "id"+(p+1);
				_curCharIdx = sti(pRef.(PsgAttrName));
				cptChar = GetCharacter(_curCharIdx);
				if(CheckAttribute(cptChar,"prisoned"))
				{
					if(CheckAttribute(cptChar,"prisoned.indialog")) LAi_ActorAnimation(cptChar, "afraid","", -1);
				}
			}
		break;

		case "Surrendered_Captain_Dead":
			for(p=0; p<GetPassengersQuantity(PChar); p++)
			{
				PsgAttrName = "id"+(p+1);
				_curCharIdx = sti(pRef.(PsgAttrName));
				cptChar = GetCharacter(_curCharIdx);
				if(CheckAttribute(cptChar,"prisoned"))
				{
					if(CheckAttribute(cptChar,"prisoned.indialog"))
					{
						switch(Rand(1))
						{
							case 0: LAi_ActorAnimation(cptChar, "death_afraid_1","", -1); break;
							case 1: LAi_ActorAnimation(cptChar, "death_afraid_2","", -1); break;
						}
					}
				}
			}
		break;

		case "Surrendered_Captain_Dead1":
			for(p=0; p<GetPassengersQuantity(PChar); p++)
			{
				PsgAttrName = "id"+(p+1);
				_curCharIdx = sti(pRef.(PsgAttrName));
				cptChar = GetCharacter(_curCharIdx);
				if(CheckAttribute(cptChar,"prisoned"))
				{
					if(CheckAttribute(cptChar,"prisoned.indialog")) LAi_ActorAnimation(cptChar, "Ground_Afraid_Death","", -1);
					RemovePassenger(GetMainCharacter(),cptChar);
					DeleteAttribute(cptChar,"prisoned");
				}
			}
		break;

		case "Surrendered_Captain_Run":
			for(p=0; p<GetPassengersQuantity(PChar); p++)
			{
				PsgAttrName = "id"+(p+1);
				_curCharIdx = sti(pRef.(PsgAttrName));
				cptChar = GetCharacter(_curCharIdx);
				if(CheckAttribute(cptChar,"prisoned"))
				{
					if(CheckAttribute(cptChar,"prisoned.indialog"))
					{
						LAi_ActorRunToLocation(cptChar, "reload", LAi_FindRandomLocator("reload"), "None", "reload", "", "", -1);
						RemovePassenger(GetMainCharacter(),cptChar);
						DeleteAttribute(cptChar,"prisoned");
					}
				}
			}
		break;

		case "ChangeHoverPos1":
			characters[sti(pchar.quest.ChangeHoverPos1.idx)].location	= "PaP_townhall";
			characters[sti(pchar.quest.ChangeHoverPos1.idx)].location.group = "goto";
			characters[sti(pchar.quest.ChangeHoverPos1.idx)].location.locator = "goto8";
			LAi_SetLoginTime(&characters[sti(pchar.quest.ChangeHoverPos1.idx)], 12.0, 24.0);
			LAi_SetHuberStayType(&characters[sti(pchar.quest.ChangeHoverPos1.idx)]);
			LAi_SetStayHuberPointWindow(&characters[sti(pchar.quest.ChangeHoverPos1.idx)], "goto", "goto1");
			LAi_SetStayHuberPointMap(&characters[sti(pchar.quest.ChangeHoverPos1.idx)], "goto", "goto3");
			pchar.quest.ChangeHoverPos1_progress = "completed";
		break;

		case "ChangeHoverPos2":
			characters[sti(pchar.quest.ChangeHoverPos2.idx)].location	= "PaP_townhall";
			characters[sti(pchar.quest.ChangeHoverPos2.idx)].location.group = "sit";
			characters[sti(pchar.quest.ChangeHoverPos2.idx)].location.locator = "sit1";
			LAi_SetLoginTime(&characters[sti(pchar.quest.ChangeHoverPos2.idx)], 0.0, 12.0);
			LAi_SetHuberType(&characters[sti(pchar.quest.ChangeHoverPos2.idx)]);
			pchar.quest.ChangeHoverPos_progress = "completed";
		break;

		case "StartTrainingFight":
			LAi_SetHP(PChar, makefloat(sti(PChar.skill.Fencing)*400), makefloat(sti(PChar.skill.Fencing)*400));
			LAi_SetFightMode(PChar, true);
			Lai_SetCheckMinHP(Pchar, 0.5*LAi_GetCharacterHP(PChar), false, "TrainingFightFinished1");
			for(int ts=1; ts<sti(PChar.TrainingFight.count)+1; ts++)
			{
				LAi_SetHP(CharacterFromID("TrainingFight_"+ts), makefloat(sti(PChar.skill.Fencing)*400), makefloat(sti(PChar.skill.Fencing)*400));
				Lai_SetImmortal(CharacterFromID("TrainingFight_"+ts), false);
				LAi_SetActorTypeNoGroup(CharacterFromID("TrainingFight_"+ts));
				LAi_ActorAttack(CharacterFromID("TrainingFight_"+ts), Pchar, "");
				Lai_SetCheckMinHP(CharacterFromID("TrainingFight_"+ts), 0.5*LAi_GetCharacterHP(CharacterFromID("TrainingFight_"+ts)), true, "TrainingFightFinished1");
			}
		break;

		case "ContinueTrainingFight":
			LAi_SetHP(PChar, makefloat(sti(PChar.skill.Fencing)*400), makefloat(sti(PChar.skill.Fencing)*400));
			LAi_SetFightMode(PChar, true);
			Lai_SetCheckMinHP(Pchar, 0.5*LAi_GetCharacterHP(PChar), false, "TrainingFightFinished2");
			for(int tc=1; tc<sti(PChar.TrainingFight.count)+1; tc++)
			{
				LAi_SetHP(CharacterFromID("TrainingFight_"+tc), makefloat(sti(PChar.skill.Fencing)*400), makefloat(sti(PChar.skill.Fencing)*400));
				Lai_SetImmortal(CharacterFromID("TrainingFight_"+tc), false);
				LAi_SetActorTypeNoGroup(CharacterFromID("TrainingFight_"+tc));
				LAi_ActorAttack(CharacterFromID("TrainingFight_"+tc), Pchar, "");
				Lai_SetCheckMinHP(CharacterFromID("TrainingFight_"+tc), 0.5*LAi_GetCharacterHP(CharacterFromID("TrainingFight_"+tc)), true, "TrainingFightFinished2");
			}
		break;

		case "TrainingFightFinished1":
			for(int tf=1; tf<sti(PChar.TrainingFight.count)+1; tf++)
			{
				LAi_RemoveCheckMinHP(CharacterFromID("TrainingFight_"+tf));
				LAi_SetCurHPMax(CharacterFromID("TrainingFight_"+tf));
				ResetHP(CharacterFromID("TrainingFight_"+tf));
				LAi_type_actor_Reset(CharacterFromID("TrainingFight_"+tf));
			}

			LAi_RemoveCheckMinHP(Pchar);
			LAi_SetCurHPMax(Pchar);
			ResetHP(Pchar);
			LAi_SetActorTypeNoGroup(PChar);
			Lai_ActorWaitDialog(Pchar, CharacterFromID("TrainingFight_1"));
			LAi_SetFightMode(PChar, false);
			Lai_QuestDelay("Tut_ReturnPlayer", 1.5);

			Characters[sti(PChar.TrainingFight.leader)].Dialog.CurrentNode = "EnoughForYou1";
			LAi_ActorDialog(CharacterFromID("TrainingFight_1"), PChar, "", 1.0, 1.0);
		break;

		case "TrainingFightFinished2":
			for(int te=1; te<sti(PChar.TrainingFight.count)+1; te++)
			{
				LAi_RemoveCheckMinHP(CharacterFromID("TrainingFight_"+te));
				LAi_SetCurHPMax(CharacterFromID("TrainingFight_"+te));
				ResetHP(CharacterFromID("TrainingFight_"+te));
				LAi_type_actor_Reset(CharacterFromID("TrainingFight_"+te));
			}

			LAi_RemoveCheckMinHP(Pchar);
			LAi_SetCurHPMax(Pchar);
			ResetHP(Pchar);
			LAi_SetActorTypeNoGroup(PChar);
			Lai_ActorWaitDialog(Pchar, CharacterFromID("TrainingFight_1"));
			LAi_SetFightMode(PChar, false);
			Lai_QuestDelay("Tut_ReturnPlayer", 1.5);

			Characters[sti(PChar.TrainingFight.leader)].Dialog.CurrentNode = "EnoughForYou2";
			LAi_ActorDialog(&Characters[sti(PChar.TrainingFight.leader)], PChar, "", 1.0, 1.0);
		break;
		// MAXIMUS =================================== Prisoners and Captived Captains Section =================================== <

// KK ----------------- Resurrection Event ------------------------------->

		case "ResurrectionEvent":
			if (GetActualNationRelation2MainCharacter(GetCurrentLocationNation()) != RELATION_ENEMY)
				LAi_QuestDelay("ResurrectionEvent_BlazeWakes", 0.0);
			else
				LAi_QuestDelay("ResurrectionEvent_BlazeMustEscape", 0.0);
		break;

		case "ResurrectionEvent_BlazeWakes":
			LAi_SetActorType(PChar);
			LAi_SetActorType(ResurrectingOfficiant);
			LAi_ActorFollow(PChar, ResurrectingOfficiant, "", 1.5);
			LAi_ActorFollow(ResurrectingOfficiant, PChar, "ResurrectionEvent_DialogStart", 1.5);
		break;

		case "ResurrectionEvent_DialogStart":
			LAi_type_actor_Reset(PChar);
			LAi_ActorWaitDialog(PChar, ResurrectingOfficiant);
			LAi_ActorDialog(ResurrectingOfficiant, PChar, "", 1.0, 1.0);
			LAi_SetPlayerType(PChar);
		break;

		case "ResurrectionEvent_OfficiantLeaves":
			LAi_SetActorType(ResurrectingOfficiant);
			LAi_ActorGoToLocation(ResurrectingOfficiant, "reload", "reload1", ResurrectingOfficiant.tavern.location, ResurrectingOfficiant.tavern.location.group, ResurrectingOfficiant.tavern.location.locator, "ResurrectionEvent_OfficiantLeftTavernUpstairs", 10.0);
		break;

		case "ResurrectionEvent_OfficiantLeftTavernUpstairs":
			LAi_SetWaitressType(ResurrectingOfficiant);
			Locations[FindLoadedLocation()].reload.l1.disable = 0;
			if (CheckAttribute(PChar, "NoSave.Resurrection")) DeleteAttribute(PChar, "NoSave.Resurrection");
			if (CheckAttribute(PChar, "NoSave")) DeleteAttribute(PChar, "NoSave");
		break;

		case "ResurrectionEvent_BlazeMustEscape":
			ResurrectingOfficiant.Dialog.CurrentNode = "Blaze_must_escape";
			LAi_SetActorType(PChar);
			LAi_SetActorType(ResurrectingOfficiant);
			LAi_ActorTurnToCharacter(PChar, ResurrectingOfficiant);
			LAi_ActorFollow(ResurrectingOfficiant, PChar, "ResurrectionEvent_DialogStart", 1.5);
		break;

//	----------- Safe Port Leave ------------------------------------------------

		case "Safe_port_leave":
			iForceDetectionFalseFlag = 0;
		break;

//	----------- Colony Capture -------------------------------------------------

		case "ColonyCapture_Ransom":
			RansomColony(GetCharacter(sti(PChar.colony_capture.govidx)));
			DeleteAttribute(PChar, "colony_capture");
		break;

		case "ColonyCapture_Capture":
			CaptureColony(GetCharacter(sti(PChar.colony_capture.govidx)), sti(PChar.colony_capture.nation));
			DeleteAttribute(PChar, "colony_capture");
		break;

		case "ColonyCapture_ContinueDialog":
			if (CheckAttribute(PChar, "colony_capture")) {
				NPChar = GetCharacter(sti(PChar.colony_capture.govidx));
				NPChar.Dialog.CurrentNode = "First time";
				NPChar.Dialog.TempNode = "First time";
				LAi_SetActorType(PChar);
				LAi_ActorDialog(PChar, NPChar, "Surrendered_Captain_Dialog", 60.0, 0);	// surrender dialog
			}
		break;
// <-- KK
	}
}
