void ProcessDialogEvent()
{
	int tmpLangFileID = LanguageOpenFile("characters_names.txt");
	ref NPChar;
	aref Link, NextDiag;
	string boarder_blade = BOARDER_SPAREBLADE; // KK

	DeleteAttribute(&Dialog,"Links");

	makeref(NPChar,CharacterRef);
	makearef(Link, Dialog.Links);
	makearef(NextDiag, NPChar.Dialog);

	ref PChar;
	PChar = GetMainCharacter();
	

	switch(Dialog.CurrentNode)
	{
		// -----------------------------------I???? ?? ??

		case "exit":
			NextDiag.CurrentNode = NextDiag.Tempnode;
			DialogExit();
		break;

// ccc -->
		case "start":			
			dialog.text = DLG_TEXT[253];
			
			// NK 05-03-24 re-order Malcolm dialogs so normal choices are first (so you can skip through with the spacebar).
			link.l1 = DLG_TEXT[254];
			link.l1.go = "intro2";
			link.l2 = DLG_TEXT[261];
			link.l2.go = "start1"; // PB: Skip long nonsense-talk :-P
			link.l3 = DLG_TEXT[262];
			link.l3.go = "stormystart"; // CCC: Stormy Start
			SetFleetInTown("Oxbay", "pchar"); // NK 05-04-02 WM/IT set fleet.
			
			PChar.vcskip = true; // NK 04-06
		break;

		case "intro2":			
			dialog.text = DLG_TEXT[255];
			link.l1 = DLG_TEXT[256];
			link.l1.go = "intro3";
		break;

		case "intro3":			
			dialog.text = DLG_TEXT[257];
			link.l1 = DLG_TEXT[258];
			link.l1.go = "intro4";
		break;

		case "intro4":			
			dialog.text = DLG_TEXT[259];
			link.l1 = DLG_TEXT[260];
// changed by MAXIMUS [choose character mod] -->
			Link.l1.go = "start1";
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
// changed by MAXIMUS [choose character mod] <--
		break;
//<-- ccc

// NK -->
		case "start5":
			dialog.text = DLG_TEXT[272];
			if(Pchar.location != "Tutorial_deck") dialog.text = DLG_TEXT[271];
			Link.l2 = DLG_TEXT[273];
			Link.l2.go = "blaze";
			Link.l1 = DLG_TEXT[275];
			Link.l1.go = "nochange";
			Link.l3 = DLG_TEXT[276];
			Link.l3.go = "depp";
//Jack Sparrow - Reworked by Daede -->
			Link.l4 = DLG_TEXT[286];
			Link.l4.go = "9Ja";
//Jack Sparrow - Reworked by Daede <--
// Taegan n Cat by Daede, with the help of Petros's 50_Becka model and Alan Smithee's Beatrice face and Original Akella Textures/Models -->
			Link.l5 = DLG_TEXT[287];
			Link.l5.go = "9Ta";
// Taegan n Cat by Daede, with the help of Petros's 50_Becka model and Alan Smithee's Beatrice face and Original Akella Textures/Models <--
			Link.l14 = DLG_TEXT[277];
			Link.l14.go = "black_corsair";
			Link.l17 = DLG_TEXT[278];
			Link.l17.go = "will";
			Link.l21 = DLG_TEXT[279];
			Link.l21.go = "corsair1_3";
			Link.l22 = DLG_TEXT[280];
			Link.l22.go = "napitan";
			Link.l24 = DLG_TEXT[281];
			Link.l24.go = "fawn";
// MAXIMUS interface MOD -->
			Link.l34 = DLG_TEXT[282];
			Link.l34.go = "danielle";
			Link.l35 = DLG_TEXT[300];
			Link.l35.go = "newBlaze";
			Link.l36 = DLG_TEXT[301];
			Link.l36.go = "Beatrice";
// MAXIMUS interface MOD <--
			// note 26 used above.
		break;

		case "nochange":
			dialog.text = DLG_TEXT[288];
			Link.l1 = DLG_TEXT[289];
			Link.l1.go = "start1";
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "blaze":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "blaze";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "depp":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "depp";
			Pchar.name = LanguageConvertString(tmpLangFileID,"Jack");
			Pchar.lastname = LanguageConvertString(tmpLangFileID,"Sparrow");
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "capitan1":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "capitan1";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "corsair1":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "corsair1";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "corsair1_1":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "corsair1_1";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start";
			}
		break;

		case "corsair1_2":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "corsair1_2";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "killer":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "killer";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "capitan":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "capitan";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "pirat10":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "pirat10";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "pirat11":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "pirat11";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "storeman2":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "storeman2";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "pirat4":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "pirat4";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "sailor4":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "sailor4";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "black_corsair":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "black_corsair";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "brodyaga":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "brodyaga";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "researcher":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "researcher";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "will":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "will";
			Pchar.name = LanguageConvertString(tmpLangFileID,"Will");
			Pchar.lastname = LanguageConvertString(tmpLangFileID,"Turner");
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "Navy_off":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "Navy_off";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "Navy_Office4":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "Navy_Office4";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "corsair3":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "corsair3";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "corsair1_3":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "corsair1_3";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "napitan":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "napitan";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "bocman3":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "bocman3";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "fawn":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "fawn";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "shkiper":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "shkiper";
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

// MAXIMUS interface MOD -->
		case "danielle":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "danielle";
			Pchar.sex = "woman";
			Pchar.model.animation = "woman_sit";
			Pchar.name = LanguageConvertString(tmpLangFileID,"Danielle");
			Pchar.lastname = LanguageConvertString(tmpLangFileID,"Green");
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "newBlaze":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "Devlin";
			Pchar.sex = "man";
			Pchar.model.animation = "Blaze";
			Pchar.model.height		=  1.85;
			Pchar.name = LanguageConvertString(tmpLangFileID,"Blaze");
			Pchar.lastname = LanguageConvertString(tmpLangFileID,"Devlin");
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;

		case "Beatrice":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "BeatriceA";
			Pchar.sex = "woman";
			Pchar.model.animation = "new_woman";
			Pchar.model.height		=  1.7;
			Pchar.name = LanguageConvertString(tmpLangFileID,"Beatrice");
			Pchar.lastname = LanguageConvertString(tmpLangFileID,"Devlin");
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;
// MAXIMUS interface MOD <--

//Jack Sparrow - Reworked by Daede -->
		case "9Ja":
			dialog.text = DLG_TEXT[283];
			Pchar.model = "9Ja";
			Pchar.name = LanguageConvertString(tmpLangFileID,"Jack");
			Pchar.lastname = LanguageConvertString(tmpLangFileID,"Sparrow");
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;
//Jack Sparrow - Reworked by Daede <--

// Taegan n Cat by Daede, with the help of Petros's 50_Becka model and Alan Smithee's Beatrice face and Original Akella Textures/Models -->
		case "9Ta":
			dialog.text = DLG_TEXT[284];
			Pchar.model = "9Ta";
			Pchar.sex = "woman";
			Pchar.model.animation = "woman_sit";
			Pchar.name = LanguageConvertString(tmpLangFileID,"Taegan");
			Pchar.lastname = LanguageConvertString(tmpLangFileID,"Finch");
			facemaker(pchar);
			Link.l1 = DLG_TEXT[49];
			Link.l1.go = "start1";
			SendMessage(PChar, "lss", MSG_CHARACTER_SETMODEL, PChar.model, PChar.model.animation);
			ExecuteCharacterEquip(PChar);
			if(Pchar.location != "Tutorial_deck")
			{
				Link.l1.go = "exit";
				if(NextDiag.Tempnode != "Questions") NextDiag.Tempnode = "start5";
			}
		break;
// Taegan n Cat by Daede, with the help of Petros's 50_Becka model and Alan Smithee's Beatrice face and Original Akella Textures/Models <--

// NK <--

		case "start1":
			BLI_UpdateOfficers(); // NK
			dialog.text = DLG_TEXT[3];
			link.l1 = DLG_TEXT[4];
			link.l1.go = "start2";
			link.l2 = DLG_TEXT[5];
			link.l2.go = "Skip_tutorial";
			link.l3 = DLG_TEXT[284];
			link.l3.go = "stormystart"; // CCC: Stormy Start
		break;

		case "start2":
			dialog.text = DLG_TEXT[6];
			link.l1 = DLG_TEXT[7];
			link.l1.go = "start3";
		break;

		case "start3":
// KK -->
			if (sti(GetStorylineVar(FindCurrentStoryline(), "USE_PROPER_TUTORIAL_DECK")) == false)
				dialog.text = DLG_TEXT[8] + DLG_TEXT[10];
			else
				dialog.text = DLG_TEXT[9] + DLG_TEXT[10];
// <-- KK
			link.l1 = DLG_TEXT[11];
			link.l1.go = "start4";
		break;

		case "start4":
			addDialogExitQuest("Tut_TakeStuff");
			NextDiag.TempNode = "TakeWeapon";
			dialog.text = DLG_TEXT[12];
			link.l1 = DLG_TEXT[13];
			link.l1.go = "Exit";
		break;
// changed by MAXIMUS 12.10.2006 -->
		case "TakeWeapon":			
			// NK -->
			if(FindCharacterItemByGroup(PChar, BLADE_ITEM_TYPE) == "" || FindCharacterItemByGroup(PChar, GUN_ITEM_TYPE) == "" || FindCharacterItemByGroup(PChar, SPYGLASS_ITEM_TYPE) == "")
			{	
				NextDiag.TempNode = "TakeWeapon";
				dialog.text = DLG_TEXT[14];
				link.l1 = DLG_TEXT[15];
				link.l1.go = "Exit";
			}
			else
			{
				if(CheckAttribute(PChar,"equip."+BLADE_ITEM_TYPE) && CheckAttribute(PChar,"equip."+GUN_ITEM_TYPE)) // NK
				{
// KK -->
					if (WEAPONSLOCKER == 1) {
						if (GET_WEAPONS_BACK == 1)
							Dialog.text = DLG_TEXT[304] + DLG_TEXT[305] + DLG_TEXT[307];
						else
							Dialog.text = DLG_TEXT[304] + DLG_TEXT[306] + DLG_TEXT[307];
						link.l1 = DLG_TEXT[11];
						link.l1.go = "Weaponslocker";
						//Link.l2 = DLG_TEXT[312];
						//Link.l2.go = "TakeWeapon_1";
					} else {
						dialog.text = DLG_TEXT[18];
						link.l1 = DLG_TEXT[19];
						link.l1.go = "Swordplay";
						link.l2 = DLG_TEXT[20];
						link.l2.go = "OutOfThisShip";
						link.l3 = DLG_TEXT[21];
						link.l3.go = "Skip_tutorial";
					}
// <-- KK
				}
				else
				{
					addDialogExitQuest("Tut_EquipWeapon");
					NextDiag.TempNode = "EquipWeapon";
					dialog.text = DLG_TEXT[16] + DLG_TEXT[302];
					link.l1 = DLG_TEXT[17];
					link.l1.go = "Exit";
				}
			}
			// NK <--
		break;

// KK -->
		case "TakeWeapon_1":
			dialog.text = DLG_TEXT[18];
			link.l1 = DLG_TEXT[19];
			link.l1.go = "Swordplay";
			link.l2 = DLG_TEXT[20];
			link.l2.go = "OutOfThisShip";
			link.l3 = DLG_TEXT[21];
			link.l3.go = "Skip_tutorial";
		break;
// <-- KK

		case "EquipWeapon":
			if(FindCharacterItemByGroup(PChar, BLADE_ITEM_TYPE) == "" || FindCharacterItemByGroup(PChar, GUN_ITEM_TYPE) == "" || FindCharacterItemByGroup(PChar, SPYGLASS_ITEM_TYPE) == "")
			{	
				NextDiag.TempNode = "TakeWeapon";
				dialog.text = DLG_TEXT[14];
				link.l1 = DLG_TEXT[15];
				link.l1.go = "Exit";
			}
			else
			{
				if(CheckAttribute(PChar,"equip."+BLADE_ITEM_TYPE)) // NK
				{
					if(GetCharacterEquipByGroup(PChar,BLADE_ITEM_TYPE)=="bladeX4")
					{
						Dialog.TempNode = "EquipWeapon";
						dialog.text = DLG_TEXT[303];
						link.l1 = DLG_TEXT[31];
						link.l1.go = "Exit";
					}
					else
					{
						if(CheckAttribute(PChar,"equip."+GUN_ITEM_TYPE)) // NK
						{
// KK -->
							if (WEAPONSLOCKER == 1) {
								if (GET_WEAPONS_BACK == 1)
									Dialog.text = DLG_TEXT[304] + DLG_TEXT[305] + DLG_TEXT[307];
								else
									Dialog.text = DLG_TEXT[304] + DLG_TEXT[306] + DLG_TEXT[307];
								link.l1 = DLG_TEXT[11];
								link.l1.go = "Weaponslocker";
							} else {
								dialog.text = DLG_TEXT[24];
								link.l1 = DLG_TEXT[25];
								link.l1.go = "Swordplay";
							}
// <-- KK
						}
						else
						{
							Dialog.TempNode = "EquipWeapon";
							dialog.text = DLG_TEXT[28];
							link.l1 = DLG_TEXT[29];
							link.l1.go = "Exit";
						}
					}
				}
				else
				{
					Dialog.TempNode = "EquipWeapon";
					dialog.text = DLG_TEXT[16];
					link.l1 = DLG_TEXT[23];
					link.l1.go = "Exit";
				}
				link.l2 = DLG_TEXT[26];
				link.l2.go = "OutOfThisShip";
				link.l3 = DLG_TEXT[27];
				link.l3.go = "Skip_tutorial";
			}
		break;
// changed by MAXIMUS 12.10.2006 <--

// KK -->
		case "Weaponslocker":
			Dialog.text = DLG_TEXT[308] + GetItemNameByID(boarder_blade) + DLG_TEXT[309];
			Link.l1 = DLG_TEXT[288];
			Link.l1.go = "EquipWeaponslocker";
			Link.l2 = DLG_TEXT[312];
			Link.l2.go = "SkipWeaponslocker";
		break;

		case "EquipWeaponslocker":
			TakenItems(Pchar, boarder_blade, 12);
			NextDiag.TempNode = "EquipWeaponslocker_1";
			NextDiag.CurrentNode = NextDiag.Tempnode;
			DialogExit();
		break;

		case "EquipWeaponslocker_1":
			if (CheckAttribute(Locations[FindLocation("Tutorial_Deck")], "WeaponsLocker.items." + boarder_blade) == false || Locations[FindLocation("Tutorial_Deck")].WeaponsLocker.items.(boarder_blade) < 12) {
				NextDiag.TempNode = "EquipWeaponslocker_1";
				Dialog.text = DLG_TEXT[310];
				Link.l1 = DLG_TEXT[311];
				Link.l1.go = "Exit";
			} else {
				dialog.text = DLG_TEXT[24];
				link.l1 = DLG_TEXT[25];
				link.l1.go = "Swordplay";
				link.l2 = DLG_TEXT[26];
				link.l2.go = "OutOfThisShip";
				link.l3 = DLG_TEXT[27];
				link.l3.go = "Skip_tutorial";
			}
		break;

		case "SkipWeaponslocker":
			Locations[FindLocation("Tutorial_Deck")].WeaponsLocker.items.(boarder_blade) = 12;
			dialog.text = DLG_TEXT[24];
			link.l1 = DLG_TEXT[25];
			link.l1.go = "Swordplay";
			link.l2 = DLG_TEXT[26];
			link.l2.go = "OutOfThisShip";
			link.l3 = DLG_TEXT[27];
			link.l3.go = "Skip_tutorial";
		break;
// <-- KK

		case "Swordplay":			
			dialog.text = DLG_TEXT[32];
			link.l1 = DLG_TEXT[33];
			link.l1.go = "Swordplay_1";
		break;

		case "Swordplay_1":			
			addDialogExitQuest("Tut_WalkToSwordplayPlace"); // KK
			NextDiag.Tempnode = "NowHitMe"; // KK
			dialog.text = DLG_TEXT[34];
			link.l1 = DLG_TEXT[35];
			link.l1.go = "Exit";
		break;

		case "NowHitMe":
			AddDialogExitQuest("Tut_FirstMeleeFight");
			NextDiag.Tempnode = "WhatAreYouWaitingFor";
			dialog.text = DLG_TEXT[36];
			link.l1 = DLG_TEXT[37];
			link.l1.go = "NowHitMe_1";
		break;

		case "NowHitMe_1":
			NextDiag.Tempnode = "WhatAreYouWaitingFor";
			dialog.text = DLG_TEXT[38];
			link.l1 = DLG_TEXT[39];
			link.l1.go = "Exit";
		break;

		case "WhatAreYouWaitingFor":
			NextDiag.Tempnode = "WhatAreYouWaitingFor";
			dialog.text = DLG_TEXT[40];
			link.l1 = DLG_TEXT[41];
			link.l1.go = "Continue_ToSeriousFight";
			link.l2 = DLG_TEXT[42];
			link.l2.go = "WhatAreYouWaitingFor_1";
			link.l3 = DLG_TEXT[43];
			link.l3.go = "Skip_tutorial";
		break;

		case "HurtEnough":
			AddDialogExitQuest("Tut_ReturnPlayer");
			dialog.text = DLG_TEXT[44];
			link.l1 = DLG_TEXT[45];
			link.l1.go = "Continue_ToSeriousFight";
			link.l2 = DLG_TEXT[46];
			link.l2.go = "WhatAreYouWaitingFor_1";
			link.l3 = DLG_TEXT[47];
			link.l3.go = "Skip_tutorial";
		break;

		case "WhatAreYouWaitingFor_1":
			AddDialogExitQuest("Tut_FirstMeleeFight");
			NextDiag.Tempnode = "WhatAreYouWaitingFor";
			dialog.text = DLG_TEXT[48];
			link.l1 = DLG_TEXT[49];
			link.l1.go = "Exit";			
		break;

		case "Continue_ToSeriousFight":
			AddDialogExitQuest("Tut_StartSeriousFight");
			NextDiag.Tempnode = "WhatAreYouWaitingFor";
			dialog.text = DLG_TEXT[50];
			link.l1 = DLG_TEXT[51];
			link.l1.go = "Exit";			
		break;

		case "SeriousStopped":
			if(LAi_GetCharacterHP(Pchar) >= (LAi_GetCharacterHP(CharacterFromID("Malcolm Hatcher"))+50))
			{
				dialog.text = DLG_TEXT[52];
				link.l1 = DLG_TEXT[53];
				link.l1.go = "OutOfThisShip";			
				link.l2 = DLG_TEXT[54];
				link.l2.go = "OnceAgain";			
				link.l3 = DLG_TEXT[55];
				link.l3.go = "Skip_Tutorial";			

			}
			else
			{
				dialog.text = DLG_TEXT[56];
				link.l1 = DLG_TEXT[57];
				link.l1.go = "OnceAgain";	
				link.l2 = DLG_TEXT[58];
				link.l2.go = "OutOfThisShip";			
				link.l3 = DLG_TEXT[59];
				link.l3.go = "Skip_Tutorial";			
			}
		break;


		case "OnceAgain":
			AddDialogExitQuest("Tut_StartSeriousFightAgain");
			dialog.text = DLG_TEXT[60];
			link.l1 = DLG_TEXT[61];
			link.l1.go = "Exit";			
		break;

		case "SeriousStoppedAgain":
			if(LAi_GetCharacterHP(Pchar) >= (LAi_GetCharacterHP(CharacterFromID("Malcolm Hatcher"))+50))
			{
				dialog.text = DLG_TEXT[62];
				link.l1 = DLG_TEXT[63];
				link.l1.go = "OutOfThisShip";			
				link.l2 = DLG_TEXT[64];
				link.l2.go = "OnceAgain";			
				link.l3 = DLG_TEXT[65];
				link.l3.go = "Skip_Tutorial";			
			}
			else
			{
				dialog.text = DLG_TEXT[66];
				link.l1 = DLG_TEXT[67];
				link.l1.go = "OnceAgain";	
				link.l2 = DLG_TEXT[68];
				link.l2.go = "OutOfThisShip";			
				link.l3 = DLG_TEXT[69];
				link.l3.go = "Skip_Tutorial";			
			}
		break;

		case "OutOfThisShip":
// KK -->
			if (AUTO_SKILL_SYSTEM == 0) {
				dialog.text = DLG_TEXT[70];
				link.l1 = DLG_TEXT[71];
				link.l1.go = "DistributePoints";
			} else {
				dialog.text = DLG_TEXT[313];
				link.l1 = DLG_TEXT[314];
				link.l1.go = "EarnPoints";
			}
// <-- KK
			link.l2 = DLG_TEXT[72];			
			link.l2.go = "SkillDescription";			
			link.l3 = DLG_TEXT[73];			
			link.l3.go = "FuckTheSkillsLetsGo";			
		break;

		case "DistributePoints":
			dialog.text = DLG_TEXT[74];			
			link.l1 = DLG_TEXT[75];			
			link.l1.go = "DistributePoints_1";			
			link.l2 = DLG_TEXT[76];			
			link.l2.go = "FuckTheSkillsLetsGo";			
			link.l3 = DLG_TEXT[77];			
			link.l3.go = "SkillDescription";			
		break;

		case "DistributePoints_1":
			NextDiag.TempNode = "ContinueAfterSkills";
			AddDialogExitQuest("Tut_PlayerDistributeSkills");
			dialog.text = DLG_TEXT[78];			
			link.l1 = DLG_TEXT[79];			
			link.l1.go = "Exit";						
		break;

// KK -->
		case "EarnPoints":
			dialog.text = DLG_TEXT[84];
			link.l1 = DLG_TEXT[85];
			link.l1.go = "ELeadership";
			link.l2 = DLG_TEXT[86];
			link.l2.go = "EMelee Combat";
			link.l3 = DLG_TEXT[87];
			link.l3.go = "ESailing";
			link.l4 = DLG_TEXT[88];
			link.l4.go = "EAccuracy";
			link.l5 = DLG_TEXT[89];
			link.l5.go = "ECannons";
			link.l6 = DLG_TEXT[90];
			link.l6.go = "EGrappling";
			link.l7 = DLG_TEXT[91];
			link.l7.go = "ERepair";
			link.l8 = DLG_TEXT[92];
			link.l8.go = "EDefense";
			link.l9 = DLG_TEXT[93];
			link.l9.go = "ECommerce";
			link.l10 = DLG_TEXT[94];
			link.l10.go = "Eluck";
		break;

		case "ELeadership":
			dialog.text = DLG_TEXT[315];
			link.l1 = DLG_TEXT[96];
			link.l1.go = "EarnPoints";
			link.l2 = DLG_TEXT[77];			
			link.l2.go = "SkillDescription";			
			link.l3 = DLG_TEXT[97];			
			link.l3.go = "FuckTheSkillsLetsGo";	
		break;

		case "EMelee Combat":
			dialog.text = DLG_TEXT[316];
			link.l1 = DLG_TEXT[96];
			link.l1.go = "EarnPoints";
			link.l2 = DLG_TEXT[77];			
			link.l2.go = "SkillDescription";			
			link.l3 = DLG_TEXT[97];			
			link.l3.go = "FuckTheSkillsLetsGo";	
		break;

		case "ESailing":
			dialog.text = DLG_TEXT[317];
			link.l1 = DLG_TEXT[96];
			link.l1.go = "EarnPoints";
			link.l2 = DLG_TEXT[77];			
			link.l2.go = "SkillDescription";			
			link.l3 = DLG_TEXT[97];			
			link.l3.go = "FuckTheSkillsLetsGo";	
		break;

		case "EAccuracy":
			dialog.text = DLG_TEXT[318];
			link.l1 = DLG_TEXT[96];
			link.l1.go = "EarnPoints";
			link.l2 = DLG_TEXT[77];			
			link.l2.go = "SkillDescription";			
			link.l3 = DLG_TEXT[97];			
			link.l3.go = "FuckTheSkillsLetsGo";	
		break;

		case "ECannons":
			dialog.text = DLG_TEXT[319];
			link.l1 = DLG_TEXT[96];
			link.l1.go = "EarnPoints";
			link.l2 = DLG_TEXT[77];			
			link.l2.go = "SkillDescription";			
			link.l3 = DLG_TEXT[97];			
			link.l3.go = "FuckTheSkillsLetsGo";	
		break;

		case "EGrappling":
			dialog.text = DLG_TEXT[320];
			link.l1 = DLG_TEXT[96];
			link.l1.go = "EarnPoints";
			link.l2 = DLG_TEXT[77];			
			link.l2.go = "SkillDescription";			
			link.l3 = DLG_TEXT[97];			
			link.l3.go = "FuckTheSkillsLetsGo";	
		break;

		case "ERepair":
			dialog.text = DLG_TEXT[321];
			link.l1 = DLG_TEXT[96];
			link.l1.go = "EarnPoints";
			link.l2 = DLG_TEXT[77];			
			link.l2.go = "SkillDescription";			
			link.l3 = DLG_TEXT[97];			
			link.l3.go = "FuckTheSkillsLetsGo";	
		break;

		case "EDefense":
			dialog.text = DLG_TEXT[322];
			link.l1 = DLG_TEXT[96];
			link.l1.go = "EarnPoints";
			link.l2 = DLG_TEXT[77];			
			link.l2.go = "SkillDescription";			
			link.l3 = DLG_TEXT[97];			
			link.l3.go = "FuckTheSkillsLetsGo";	
		break;

		case "ECommerce":
			dialog.text = DLG_TEXT[323];
			link.l1 = DLG_TEXT[96];
			link.l1.go = "EarnPoints";
			link.l2 = DLG_TEXT[77];			
			link.l2.go = "SkillDescription";			
			link.l3 = DLG_TEXT[97];			
			link.l3.go = "FuckTheSkillsLetsGo";	
		break;

		case "Eluck":
			dialog.text = DLG_TEXT[324];
			link.l1 = DLG_TEXT[96];
			link.l1.go = "EarnPoints";
			link.l2 = DLG_TEXT[77];			
			link.l2.go = "SkillDescription";			
			link.l3 = DLG_TEXT[97];			
			link.l3.go = "FuckTheSkillsLetsGo";	
		break;
// <-- KK

		case "ContinueAfterSkills":
			NextDiag.TempNode = "ContinueAfterSkills";
			dialog.text = DLG_TEXT[80];			
			link.l1 = DLG_TEXT[81];			
			link.l1.go = "DistributePoints_1";			
			link.l2 = DLG_TEXT[82];			
			link.l2.go = "FuckTheSkillsLetsGo";			
			link.l3 = DLG_TEXT[83];			
			link.l3.go = "SkillDescription";			
		break;

		case "SkillDescription":
			dialog.text = DLG_TEXT[84];			
			link.l1 = DLG_TEXT[85];			
			link.l1.go = "Leadership";			
			link.l2 = DLG_TEXT[86];			
			link.l2.go = "Melee Combat";			
			link.l3 = DLG_TEXT[87];			
			link.l3.go = "Sailing";						
			link.l4 = DLG_TEXT[88];			
			link.l4.go = "Accuracy";			
			link.l5 = DLG_TEXT[89];			
			link.l5.go = "Cannons";			
			link.l6 = DLG_TEXT[90];			
			link.l6.go = "Grappling";			
			link.l7 = DLG_TEXT[91];			
			link.l7.go = "Repair";			
			link.l8 = DLG_TEXT[92];			
			link.l8.go = "Defense";			
			link.l9 = DLG_TEXT[93];			
			link.l9.go = "Commerce";			
			link.l10 = DLG_TEXT[94];			
			link.l10.go = "Luck";			
		break;

		case "Leadership":
			dialog.text = DLG_TEXT[95];			
			link.l1 = DLG_TEXT[96];			
			link.l1.go = "SkillDescription";			
			link.l2 = DLG_TEXT[97];			
			link.l2.go = "FuckTheSkillsLetsGo";
// Sulan -->
			if (AUTO_SKILL_SYSTEM == 0) {
				link.l3 = DLG_TEXT[98];
				link.l3.go = "DistributePoints_1";
			} else {
				link.l3 = DLG_TEXT[314];
				link.l3.go = "EarnPoints";
			}
// <-- Sulan
		break;

		case "Melee Combat":
			dialog.text = DLG_TEXT[99];			
			link.l1 = DLG_TEXT[100];			
			link.l1.go = "SkillDescription";			
			link.l2 = DLG_TEXT[101];			
			link.l2.go = "FuckTheSkillsLetsGo";
// Sulan -->
			if (AUTO_SKILL_SYSTEM == 0) {
				link.l3 = DLG_TEXT[102];
				link.l3.go = "DistributePoints_1";
			} else {
				link.l3 = DLG_TEXT[314];
				link.l3.go = "EarnPoints";
			}
// <-- Sulan
		break;

		case "Sailing":
			dialog.text = DLG_TEXT[103];			
			link.l1 = DLG_TEXT[104];			
			link.l1.go = "SkillDescription";			
			link.l2 = DLG_TEXT[105];			
			link.l2.go = "FuckTheSkillsLetsGo";
// Sulan -->
			if (AUTO_SKILL_SYSTEM == 0) {
				link.l3 = DLG_TEXT[106];
				link.l3.go = "DistributePoints_1";
			} else {
				link.l3 = DLG_TEXT[314];
				link.l3.go = "EarnPoints";
			}
// <-- Sulan
		break;

		case "Accuracy":
			dialog.text = DLG_TEXT[107];			
			link.l1 = DLG_TEXT[108];			
			link.l1.go = "SkillDescription";			
			link.l2 = DLG_TEXT[109];			
			link.l2.go = "FuckTheSkillsLetsGo";
// Sulan -->
			if (AUTO_SKILL_SYSTEM == 0) {
				link.l3 = DLG_TEXT[110];
				link.l3.go = "DistributePoints_1";
			} else {
				link.l3 = DLG_TEXT[314];
				link.l3.go = "EarnPoints";
			}
// <-- Sulan
		break;

		case "Cannons":
			dialog.text = DLG_TEXT[111];			
			link.l1 = DLG_TEXT[112];			
			link.l1.go = "SkillDescription";			
			link.l2 = DLG_TEXT[113];			
			link.l2.go = "FuckTheSkillsLetsGo";
// Sulan -->
			if (AUTO_SKILL_SYSTEM == 0) {
				link.l3 = DLG_TEXT[114];
				link.l3.go = "DistributePoints_1";
			} else {
				link.l3 = DLG_TEXT[314];
				link.l3.go = "EarnPoints";
			}
// <-- Sulan
		break;

		case "Grappling":
			dialog.text = DLG_TEXT[115];			
			link.l1 = DLG_TEXT[116];
			link.l1.go = "SkillDescription";			
			link.l2 = DLG_TEXT[117];
			link.l2.go = "FuckTheSkillsLetsGo";
// Sulan -->
			if (AUTO_SKILL_SYSTEM == 0) {
				link.l3 = DLG_TEXT[118];
				link.l3.go = "DistributePoints_1";
			} else {
				link.l3 = DLG_TEXT[314];
				link.l3.go = "EarnPoints";
			}
// <-- Sulan
		break;

		case "Repair":
			dialog.text = DLG_TEXT[119];			
			link.l1 = DLG_TEXT[120];			
			link.l1.go = "SkillDescription";			
			link.l2 = DLG_TEXT[121];			
			link.l2.go = "FuckTheSkillsLetsGo";
// Sulan -->
			if (AUTO_SKILL_SYSTEM == 0) {
				link.l3 = DLG_TEXT[122];
				link.l3.go = "DistributePoints_1";
			} else {
				link.l3 = DLG_TEXT[314];
				link.l3.go = "EarnPoints";
			}
// <-- Sulan
		break;

		case "Commerce":
			dialog.text = DLG_TEXT[123];			
			link.l1 = DLG_TEXT[124];			
			link.l1.go = "SkillDescription";			
			link.l2 = DLG_TEXT[125];			
			link.l2.go = "FuckTheSkillsLetsGo";
// Sulan -->
			if (AUTO_SKILL_SYSTEM == 0) {
				link.l3 = DLG_TEXT[126];
				link.l3.go = "DistributePoints_1";
			} else {
				link.l3 = DLG_TEXT[314];
				link.l3.go = "EarnPoints";
			}
// <-- Sulan
		break;

		case "Luck":
			dialog.text = DLG_TEXT[127];			
			link.l1 = DLG_TEXT[128];
			link.l1.go = "SkillDescription";			
			link.l2 = DLG_TEXT[129];
			link.l2.go = "FuckTheSkillsLetsGo";
// Sulan -->
			if (AUTO_SKILL_SYSTEM == 0) {
				link.l3 = DLG_TEXT[130];
				link.l3.go = "DistributePoints_1";
			} else {
				link.l3 = DLG_TEXT[314];
				link.l3.go = "EarnPoints";
			}
// <-- Sulan
		break;

		case "Defense":
			dialog.text = DLG_TEXT[131];
			link.l1 = DLG_TEXT[132];
			link.l1.go = "SkillDescription";			
			link.l2 = DLG_TEXT[133];
			link.l2.go = "FuckTheSkillsLetsGo";
// Sulan -->
			if (AUTO_SKILL_SYSTEM == 0) {
				link.l3 = DLG_TEXT[134];
				link.l3.go = "DistributePoints_1";
			} else {
				link.l3 = DLG_TEXT[314];
				link.l3.go = "EarnPoints";
			}
// <-- Sulan
		break;


		case "FuckTheSkillsLetsGo":
			dialog.text = DLG_TEXT[135];
			link.l1 = DLG_TEXT[136];
			link.l1.go = "TutorialTasks";
		break;

		case "TutorialTasks":
			dialog.text = DLG_TEXT[137];
			link.l1 = DLG_TEXT[138];
			link.l1.go = "TutorialTasks_1";				
		break;

		case "TutorialTasks_1":
			dialog.text = DLG_TEXT[139];
// KK -->
			if (ENABLE_FLAGS == 1 && sti(PChar.nation) == ENGLAND) dialog.text = dialog.text + "\n" + DLG_TEXT[285];
			link.l1 = DLG_TEXT[140];
			if (PChar.location == "Tutorial_Deck") {
				addDialogExitQuest("Tut_WalkThroughQDeck");
				link.l1.go = "Exit";
			} else {
				addDialogExitQuest("Tut_ReloadToOxbayPort");
				link.l1.go = "Exit";
			}
// <-- KK
		break;

		case "NowLetsBuyASpyglass":
			dialog.text = DLG_TEXT[141];
			link.l1 = DLG_TEXT[142];
			link.l1.go = "GuideToSpyglass";	
			link.l2 = DLG_TEXT[143];
			link.l2.go = "ContinueWithoutSpyglass";
			link.l3 = DLG_TEXT[144];
			link.l3.go = "Skip_TutorialInPort";
		break;

// KK -->
		case "ToFdFCenter":
			dialog.text = DLG_TEXT[293];
			link.l1 = DLG_TEXT[288];
			link.l1.go = "ToTheTown_1";
			link.l2 = DLG_TEXT[144];
			link.l2.go = "ToTheTown_2";
		break;

		case "ToQCTown":
			dialog.text = DLG_TEXT[296];
			link.l1 = DLG_TEXT[288];
			link.l1.go = "ToTheTown_1";
			link.l2 = DLG_TEXT[144];
			link.l2.go = "ToTheTown_2";
		break;

		case "ToTheTown_1":
			AddDialogExitQuest("Tut_GuideToSpyglass");
			DialogExit();
		break;

		case "ToTheTown_2":
			AddDialogExitQuest("Tut_SkipTutorialInPort");
			DialogExit();
		break;

		case "NoStallsOnQC":
			dialog.text = DLG_TEXT[297];
			link.l1 = DLG_TEXT[142];
			link.l1.go = "GuideToSpyglass";
			link.l2 = DLG_TEXT[143];
			link.l2.go = "ContinueWithoutSpyglass";
			link.l3 = DLG_TEXT[144];
			link.l3.go = "Skip_TutorialInPort";
		break;
// <-- KK

		case "GuideToSpyglass":
// KK -->
			if (sti(PChar.nation) != FRANCE && sti(PChar.nation) != PIRATE)
				AddDialogExitQuest("Tut_GuideToSpyglass");
			else
				AddDialogExitQuest("Tut_ToTheTown");
// <-- KK
			dialog.text = DLG_TEXT[145];
			link.l1 = DLG_TEXT[146];
			link.l1.go = "Exit";							
		break;

		case "HereAretheTraders":
			addDialogExitQuest("Tut_SoBuyTheFuckingGlass");
			NextDiag.TempNode = "SoBuyTheFuckingGlass";
			dialog.text = DLG_TEXT[147];
			link.l1 = DLG_TEXT[148];
			link.l1.go = "Exit";					
		break;

		case "SoBuyTheFuckingGlass":
			if(CheckCharacterItem(Pchar, "spyglass2"))
			{
				dialog.text = DLG_TEXT[149];
				link.l1 = DLG_TEXT[150];
// KK -->
				if (sti(PChar.nation) == PIRATE)
					link.l1.go = "NowGoTotheStore_1";
				else
					link.l1.go = "GoToStore";
// <-- KK
				link.l2 = DLG_TEXT[151];
				link.l2.go = "Skip_TutorialInPort";
			}
			else
			{
				NextDiag.TempNode = "SoBuyTheFuckingGlass";
				dialog.text = DLG_TEXT[152];
				link.l1 = DLG_TEXT[153];
				link.l1.go = "Exit";	
				link.l2 = DLG_TEXT[154];
				link.l2.go = "ContinueWithoutSpyglass";
				link.l3 = DLG_TEXT[155];
				link.l3.go = "Skip_TutorialInPort";
			}
		break;

		case "ContinueWithoutSpyglass":
			dialog.text = DLG_TEXT[156];
			link.l1 = DLG_TEXT[157];
// KK -->
			if (sti(PChar.nation) == PIRATE) {
				PChar.quest.ContinueWithoutSpyglass = "1";
				link.l1.go = "NowGoTotheStore_1";
			} else {
				link.l1.go = "GoToStore";
			}
// <-- KK
			link.l2 = DLG_TEXT[158];
			link.l2.go = "Skip_TutorialInPort";
		break;

		case "GoToStore":
// KK -->
			AddDialogExitQuest("Tut_ReloadToOxbay");
			if (sti(PChar.nation) == FRANCE)
				dialog.text = DLG_TEXT[294];
			else
				dialog.text = DLG_TEXT[159];
			link.l1 = DLG_TEXT[160];
			link.l1.go = "Exit";
// <-- KK					
		break;

		case "NowGoTotheStore":
			dialog.text = DLG_TEXT[161];
			link.l1 = DLG_TEXT[162];
			link.l1.go = "NowGoTotheStore_1";
			link.l2 = DLG_TEXT[163];
			link.l2.go = "Skip_tutorialInTown";
		break;

		case "NowGoTotheStore_1":
			AddDialogExitQuest("Tut_MalcolmShowsTheStore");
			dialog.text = DLG_TEXT[164];
			link.l1 = DLG_TEXT[165];
			link.l1.go = "Exit";							
		break;

		case "MoreDetailsOnTrade":
			AddDialogExitQuest("Tut_StartTrading");
// KK -->
			if (sti(PChar.nation) != PIRATE || CheckQuestAttribute("ContinueWithoutSpyglass", "1"))
				dialog.text = DLG_TEXT[166];
			else
				dialog.text = DLG_TEXT[298];
			if (GetCargoGoods(Pchar, CharGood1) != 0) dialog.text = dialog.text + XI_ConvertString(Goods[CharGood1].name);
			if (GetCargoGoods(Pchar, CharGood2) != 0 && CharGood2 != CharGood1) dialog.text = dialog.text + DLG_TEXT[167] + XI_ConvertString(Goods[CharGood2].name);
			if (sti(PChar.nation) != PIRATE || CheckQuestAttribute("ContinueWithoutSpyglass", "1"))
				dialog.text = dialog.text + DLG_TEXT[168];
			else
				dialog.text = dialog.text + DLG_TEXT[299];
			DeleteQuestAttribute("ContinueWithoutSpyglass");
// <-- KK
			link.l1 = DLG_TEXT[169];
			link.l1.go = "MoreDetailsOnTrade_1";	
			link.l2 = DLG_TEXT[170];
			link.l2.go = "MoreDetailsOnTrade_2";							
		break;

		case "MoreDetailsOnTrade_1":
			dialog.text = DLG_TEXT[171];
			link.l1 = DLG_TEXT[172];
			link.l1.go = "MoreDetailsOnTrade_2";
		break;

		case "MoreDetailsOnTrade_2":
			dialog.text = DLG_TEXT[173];
			link.l1 = DLG_TEXT[174];
			link.l1.go = "exit";
		break;

		case "GoodsSoldInStore":
			if(GetCargoGoods(Pchar, CharGood1) != 0 || GetCargoGoods(Pchar, CharGood2) != 0) // KK
			{
				dialog.text = DLG_TEXT[175];
				link.l1 = DLG_TEXT[176];
				link.l1.go = "GoodsSoldInStore_1";
				link.l2 = DLG_TEXT[177];
				link.l2.go = "Skip_TutorialInTown";
			}
			else
			{
				dialog.text = DLG_TEXT[178];
				link.l1 = DLG_TEXT[179];
				link.l1.go = "GoodsSoldInStore_1";
				link.l2 = DLG_TEXT[180];
				link.l2.go = "Skip_TutorialInTown";
			}
			if (sti(PChar.nation) == FRANCE) dialog.text = dialog.text + DLG_TEXT[295];
		break;

		case "GoodsSoldInStore_1":
			AddDialogExitQuest("Tut_MalcolmLeadsToTavern");
			dialog.text = DLG_TEXT[181];
			link.l1 = DLG_TEXT[182];
			link.l1.go = "exit";
		break;

		case "CrewHiringInTavern":
			PChar.disable_hiring = 1; // PB: Fix a little bug in the tutorial
			dialog.text = DLG_TEXT[183];
			link.l1 = DLG_TEXT[184];
			link.l1.go = "CrewHiringInTavern_1";
		break;

		case "CrewHiringInTavern":
			dialog.text = DLG_TEXT[185];
			link.l1 = DLG_TEXT[186];
			link.l1.go = "CrewHiringInTavern_1";
		break;

		case "CrewHiringInTavern_1":
			addDialogExitQuest("Tut_MalcolmLeavesTavern");
			dialog.text = DLG_TEXT[187];
			link.l1 = DLG_TEXT[188];
			link.l1.go = "exit";
		break;

		case "CrewHiredintavern":
			if(CheckAttribute(PChar, "disable_hiring")) DeleteAttribute(PChar, "disable_hiring");// PB: Fix a little bug in the tutorial
			if(GetMaxCrewQuantity(Pchar) == GetCrewQuantity(Pchar))
			{
				dialog.text = DLG_TEXT[189];
				link.l1 = DLG_TEXT[190];
				link.l1.go = "CrewHiredintavern_1";
				link.l2 = DLG_TEXT[191];
				link.l2.go = "Skip_TutorialInTown";
			}
			else
			{
				dialog.text = DLG_TEXT[192];
				link.l1 = DLG_TEXT[193];
				link.l1.go = "CrewHiredintavern_1";
				link.l2 = DLG_TEXT[194];
				link.l2.go = "Skip_TutorialInTown";
			}
		break;

		case "CrewHiredintavern_1":
			AddDialogExitQuest("Tut_BooGoForShipyard");
			dialog.text = DLG_TEXT[195];
			link.l1 = DLG_TEXT[196];
			link.l1.go = "exit";			
		break;

		case "ShipRepairing":
			dialog.text = DLG_TEXT[197];
			link.l1 = DLG_TEXT[198];
			link.l1.go = "ShipRepairing_1";
			link.l2 = DLG_TEXT[199];
			link.l2.go = "ShipRepairing_2";
		break;

		case "ShipRepairing_1":
			dialog.text = DLG_TEXT[200];
			link.l1 = DLG_TEXT[201];
			link.l1.go = "ShipRepairing_2";			
		break;

		case "ShipRepairing_2":
			AddDialogExitQuest("Tut_MalcolmLeavesShipyard");
			dialog.text = DLG_TEXT[202];
			link.l1 = DLG_TEXT[203];
			link.l1.go = "exit";			
		break;

		case "FinalStage":
			// NK, this quest DOES NOT EXIST - AddDialogExitQuest("Tut_Finished");
			DeleteAttribute(&PChar,"vcskip"); // NK 04-06
// KK -->
			if (GetCharacterShipCabin(PChar) != "Cabin_none")
				dialog.text = DLG_TEXT[204];
			else
				dialog.text = DLG_TEXT[325];
// <-- KK
			link.l1 = DLG_TEXT[205];
			link.l1.go = "FinalStage_1";			
		break;

		case "FinalStage_1":
			dialog.text = DLG_TEXT[206];
			link.l1 = DLG_TEXT[207];
			link.l1.go = "Suggestions";			
			link.l2 = DLG_TEXT[208];
			link.l2.go = "Ship_sailing";			
			link.l3 = DLG_TEXT[209];
			link.l3.go = "Final_Goodbye";			
		break;

		case "Suggestions":
// KK -->
			string good1 = "";
			string good2 = "";
			string colony1 = "";
			string colony2 = "";
			FindProfitableRoute(&good1, &colony1, &good2, &colony2);
			string aboutColony = good2 + DLG_TEXT[214] + colony2;
			if(colony1 == "nowhere") colony1 = "";// MAXIMUS
			if(colony2 == "nowhere") aboutColony = "..";// MAXIMUS
			if (colony1 != "")
				dialog.text = DLG_TEXT[210] + good1 + DLG_TEXT[167] + good2 + DLG_TEXT[211] + colony1 + DLG_TEXT[212] + good1 + DLG_TEXT[213] + aboutColony + ".";
			else
				dialog.text = DLG_TEXT[300];
			link.l1 = DLG_TEXT[215];
			link.l1.go = "Ship_sailing";			
			link.l2 = DLG_TEXT[216];
			link.l2.go = "Final_Goodbye";			
// <-- KK
		break;

		case "Skip_tutorial":
			dialog.text = DLG_TEXT[217];
			link.l1 = DLG_TEXT[218];
			link.l1.go = "Skip_tutorial_1";
		break;

		case "Skip_tutorial_1":
			dialog.text = DLG_TEXT[219];
			link.l1 = DLG_TEXT[220];
			link.l1.go = "Skip_tutorial_2";				
		break;

		case "Skip_tutorial_2":
			bDisableFastReload = 0;
			addDialogExitQuest("Tut_SkipTutorialOnShip");
			NextDiag.Tempnode = "Questions"; // ccc So that Malcolm talks in town 
			dialog.text = DLG_TEXT[221];
			if (ENABLE_FLAGS == 1 && sti(PChar.nation) == ENGLAND) dialog.text = dialog.text + "\n" + DLG_TEXT[285]; // KK
			dialog.text = dialog.text + DLG_TEXT[292]; // KK
			link.l1 = DLG_TEXT[222];
			link.l1.go = "Exit";				
		break;

		case "Skip_TutorialInPort":
			addDialogExitQuest("Tut_SkipTutorialInPort");
			dialog.text = DLG_TEXT[223];
			link.l1 = DLG_TEXT[224];
			link.l1.go = "Skip_TutorialInPort_1";			
		break

		case "Skip_TutorialInPort_1":
			dialog.text = DLG_TEXT[225];
			link.l1 = DLG_TEXT[226];
			link.l1.go = "Suggestions";			
			link.l2 = DLG_TEXT[227];
			link.l2.go = "Ship_sailing";			
			link.l3 = DLG_TEXT[228];
			link.l3.go = "Final_Goodbye";			
		break;

		case "Skip_TutorialInTown":
			bDisableFastReload = 0;
			addDialogExitQuest("Tut_SkipTutorialInTown");
			dialog.text = DLG_TEXT[229];
			link.l1 = DLG_TEXT[230];
			link.l1.go = "Skip_TutorialInTown_1";			
		break;

		case "Skip_TutorialInTown_1":
			dialog.text = DLG_TEXT[231];
			link.l1 = DLG_TEXT[232];
			link.l1.go = "Suggestions";			
			link.l2 = DLG_TEXT[233];
			link.l2.go = "Ship_sailing";			
			link.l3 = DLG_TEXT[234];
			link.l3.go = "Final_Goodbye";			
		break;

		case "Ship_sailing":
			dialog.text = DLG_TEXT[235];
			link.l1 = DLG_TEXT[236];
			link.l1.go = "CannonFire";			
			link.l2 = DLG_TEXT[237];
			link.l2.go = "BoardingShips";			
			link.l3 = DLG_TEXT[238];
			link.l3.go = "Final_Goodbye";			
		break;

		case "CannonFire":
			dialog.text = DLG_TEXT[239];
			link.l1 = DLG_TEXT[240];
			link.l1.go = "BoardingShips";			
			link.l2 = DLG_TEXT[241];
			link.l2.go = "Ship_sailing";			
			link.l3 = DLG_TEXT[242];
			link.l3.go = "Final_Goodbye";			
		break;

		case "BoardingShips":
			dialog.text = DLG_TEXT[243];
			link.l1 = DLG_TEXT[244];
			link.l1.go = "CannonFire";			
			link.l2 = DLG_TEXT[245];
			link.l2.go = "Ship_sailing";			
			link.l3 = DLG_TEXT[246];
			link.l3.go = "Final_Goodbye";			
		break;

		case "Final_Goodbye":
			if (Locations[FindLoadedLocation()].type != "tavern") AddDialogExitQuest("Tut_SkipTutorialInTown"); // KK
			NextDiag.Tempnode = "Questions";
// MAXIMUS [info about tavern] 12.10.2006 -->
			string locTavern = DLG_TEXT[247];
			if(Locations[FindLoadedLocation()].type != "tavern") locTavern += DLG_TEXT[292];
			dialog.text = locTavern;
// MAXIMUS [info about tavern] 12.10.2006 <--
// LDH -->
			// LDH - "French flag" dialog
			if (ENABLE_FLAGS == 1 && sti(PChar.nation) == ENGLAND) dialog.text = dialog.text + "\n" + DLG_TEXT[285];
// LDH <--
			link.l1 = DLG_TEXT[248];
			link.l1.go = "Exit";
		break;

		case "Questions":
			dialog.text = DLG_TEXT[249];
			link.l1 = DLG_TEXT[250];
			link.l1.go = "Suggestions";			
			link.l2 = DLG_TEXT[251];
			link.l2.go = "Ship_sailing";			
// NK -->
//no longer needed due to Tailor mod
			//link.l10 = "I need to change my clothes."
			//link.l10.go = "start5";
// NK <--
			link.l3 = DLG_TEXT[252];
			link.l3.go = "Goodbye";			
		break;

// added by MAXIMUS -->
		case "Goodbye":
			NextDiag.Tempnode = "Questions";
// MAXIMUS [info about tavern] 12.10.2006 -->
			locTavern = DLG_TEXT[247];
			if(Locations[FindLoadedLocation()].type != "tavern") locTavern += DLG_TEXT[292];
			dialog.text = locTavern;
// MAXIMUS [info about tavern] 12.10.2006 <--
			link.l1 = DLG_TEXT[248];
			link.l1.go = "Exit";						
		break;
// added by MAXIMUS <--

// ccc Stormy Start mod
		case "stormystart":
			PlayStereoSound("sails_up");
			addDialogExitQuest("stormystart");	// this section in Both_reaction.c will run after the dialog
			DialogExit();	// closes the dialog
			NextDiag.Tempnode = "Questions";
			NextDiag.CurrentNode = "Questions"; // TIH so his dialog is right next time you meet him Aug29'06
			bChangeNation = true; // PB: Enable changing of flag
		break;
// ccc Stormy Start mod end

// KK -->
		case "OnMalcolmShip":
			dialog.text = DLG_TEXT[263] + XI_ConvertString(GetShipTypeName(PChar)) + DLG_TEXT[264] + PChar.ship.name + DLG_TEXT[265];
			link.l1 = DLG_TEXT[266] + XI_ConvertString(GetShipTypeName(NPChar)) + ", `" + NPChar.ship.name + "'" + DLG_TEXT[146];
			link.l1.go = "OnMalcolmShip_1";
			link.l2 = DLG_TEXT[267];
			link.l2.go = "stormystart"; // CCC: Stormy Start
		break;

		case "OnMalcolmShip_1":
			dialog.text = DLG_TEXT[268];
			link.l1 = DLG_TEXT[269];
			link.l1.go = "OnMalcolmShip_2";
			link.l2 = DLG_TEXT[270];
			link.l2.go = "Skip_tutorial";
		break;

		case "OnMalcolmShip_2":
			addDialogExitQuest("Tut_TakeStuff");
			NextDiag.TempNode = "TakeWeapon";
			dialog.text = DLG_TEXT[271];
			link.l1 = DLG_TEXT[11];
			link.l1.go = "Exit";
		break;

		case "SkipTutorialOnShip":
			NextDiag.TempNode = "SkipTutorialOnShip";
			dialog.text = DLG_TEXT[301];
			link.l1 = DLG_TEXT[31];
			link.l1.go = "Exit";
		break;
// <-- KK
	}
}
