Exemplo n.º 1
0
void ProcessDialogEvent()
{
	ref NPChar;
	aref Link, NextDiag;

	DeleteAttribute(&Dialog,"Links");

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

	ref PChar;
	PChar = GetMainCharacter();


	switch(Dialog.CurrentNode)
	{
		// -----------------------------------Диалог первый - первая встреча
		case "First time":

			Dialog.defAni = "dialog_stay1";
			Dialog.defCam = "1";
			Dialog.defSnd = "dialogs\0\017";
			Dialog.defLinkAni = "dialog_1";
			Dialog.defLinkCam = "1";
			Dialog.defLinkSnd = "dialogs\woman\024";
			Dialog.ani = "dialog_stay2";
			Dialog.cam = "1";
			Dialog.snd = "voice\PEBE\PEBE001";

			dialog.text = DLG_TEXT[0];
			link.l1 = DLG_TEXT[1]+ Characters[GetCharacterIndex(DLG_TEXT[2])].name +" "+ Characters[GetCharacterIndex(DLG_TEXT[3])].lastname +DLG_TEXT[4];
			link.l1.go = "1";

		break;

		case "1":
			Dialog.snd = "voice\PEBE\PEBE002";
			dialog.text = DLG_TEXT[5];
			link.l1 = DLG_TEXT[6];
			link.l1.go = "2";

		break;

		case "2":
			Dialog.snd = "voice\PEBE\PEBE003";
			dialog.text = DLG_TEXT[7];
			link.l1 = DLG_TEXT[8];
			link.l1.go = "Exit_kill";
			link.l2 = DLG_TEXT[9];
			link.l2.go = "Exit_spare";

		break;

		case "Exit_kill":

			DialogExit();
			NextDiag.CurrentNode = NextDiag.TempNode;

			ChangeCharacterReputation(pchar, -10);

			AddDialogExitQuest("Hit_kill_Pepin");

		break;

		case "Exit_spare":

			DialogExit();
			NextDiag.CurrentNode = NextDiag.TempNode;

			ChangeCharacterReputation(pchar, -5);

			AddDialogExitQuest("Hit_spare_Pepin");

		break;

	}
}
Exemplo n.º 2
0
void ProcessDialogEvent()
{
	ref NPChar, PChar, d;
	PChar = GetMainCharacter();
	aref Link, Diag;
	string NPC_Meeting;

	DeleteAttribute(&Dialog,"Links");

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

	switch(Dialog.CurrentNode)
	{
		case "First time":
			Dialog.defAni = "dialog_stay1";
			Dialog.defCam = "1";
			Dialog.defSnd = "dialogs\0\017";
			Dialog.defLinkAni = "dialog_1";
			Dialog.defLinkCam = "1";
			Dialog.defLinkSnd = "dialogs\woman\024";
			Dialog.ani = "dialog_stay2";
			Dialog.cam = "1";
			
			dialog.snd = "Voice\ANAC\ANAC001";
			dialog.text = DLG_TEXT[0];
			link.l1 = DLG_TEXT[1];
			link.l1.go = "node_2";
		break;
		
		case "node_2":
			dialog.snd = "Voice\ANAC\ANAC002";
			dialog.text = DLG_TEXT[2];
			link.l1 = DLG_TEXT[3];
			link.l1.go = "exit";
		break;
		
		case "ask_about_artois":
			dialog.snd = "Voice\ANAC\ANAC003";
			dialog.text = DLG_TEXT[4];
			link.l1 = DLG_TEXT[5];
			link.l1.go = "exit";
			AddDialogExitQuest("Blaze_cop_dialog");
		break;
		
		case "artois_lay":
			dialog.snd = "Voice\ANAC\ANAC004";
			dialog.text = DLG_TEXT[6];
			link.l1 = DLG_TEXT[7];
			link.l1.go = "artois_lay_2";
		break;
		
		case "artois_lay_2":
			dialog.snd = "Voice\ANAC\ANAC005";
			dialog.text = DLG_TEXT[8];
			link.l1 = DLG_TEXT[9];
			link.l1.go = "exit";
			AddDialogExitQuest("fight_for_artois_with_child_of_giens");
		break;
		
		case "doctor":
			dialog.snd = "Voice\ANAC\ANAC006";
			dialog.text = DLG_TEXT[10];
			link.l1 = DLG_TEXT[11];
			link.l1.go = "doctor_2";
		break;
		
		case "doctor_2":
			dialog.snd = "Voice\ANAC\ANAC007";
			dialog.text = DLG_TEXT[12];
			if (makeint(pchar.money)>=2000)
			{
				link.l1 = DLG_TEXT[13];
				link.l1.go = "doctor_3";
			}
			link.l2 = DLG_TEXT[14];
			link.l2.go = "exit_doctor_bad";
		break;
		
		case "doctor_3":
			dialog.snd = "Voice\ANAC\ANAC008";
			dialog.text = DLG_TEXT[15];
			link.l1 = DLG_TEXT[16];
			link.l1.go = "exit_doctor_good";
			link.l2 = DLG_TEXT[17];
			link.l2.go = "exit_doctor_bad";
		break;
		
		case "exit_doctor_good":
			Diag.CurrentNode = Diag.TempNode;
			DialogExit();
			AddDialogExitQuest("exit_doctor_good");
		break;
		
		case "remove":
			if (npchar.alignment == "good")
			{
				dialog.snd = "Voice\ANAC\ANAC009";
				dialog.text = DLG_TEXT[18];
				link.l1 = DLG_TEXT[19];
			}
			else
			{
				dialog.snd = "Voice\ANAC\ANAC010";
				dialog.text = DLG_TEXT[20];
				link.l1 = DLG_TEXT[21];
			}
			link.l1.go = "exit";
			pchar.removed_officer = GetCharacterIndex(npchar.id);
			AddDialogExitQuest("removed_officer_runaway");
			npchar.location = npchar.homelocation;
			npchar.location.group = npchar.homelocation.group;
			npchar.location.locator = npchar.homelocation.locator;
		break;
		
		case "hired_again":
			dialog.snd = "Voice\ANAC\ANAC011";
			dialog.text = DLG_TEXT[22];
			link.l1 = DLG_TEXT[23];
			link.l1.go = "hired_again_2";
		break;
		
		case "hired_again_2":
			dialog.snd = "Voice\ANAC\ANAC012";
			dialog.text = DLG_TEXT[24];
			link.l1 = DLG_TEXT[25];
			link.l1.go = "exit";
			AddPassenger(Pchar, npchar, 0);
			npchar.loyality = 1;
			npchar.dialog.filename = npchar.selfdialog.filename;
			npchar.dialog.currentnode = npchar.selfdialog.currentnode;
		break;
		
		case "exit_doctor_bad":
			Diag.CurrentNode = Diag.TempNode;
			DialogExit();
			AddDialogExitQuest("exit_doctor_bad");
		break;

		case "exit":
			Diag.CurrentNode = Diag.TempNode;
			DialogExit();
		break;
		
		case "prepare_convoy_quest":
			dialog.text = DLG_TEXT[26];
			link.l1 = DLG_TEXT[27];
			link.l1.go = "prepare_convoy_quest_2";
		break;
		
		case "prepare_convoy_quest_2":
			dialog.text = DLG_TEXT[28];
			link.l1 = DLG_TEXT[29];
			link.l1.go = "prepare_convoy_quest_3";
		break;
		
		case "prepare_convoy_quest_3":
			/*Diag.CurrentNode = Diag.TempNode;
			DialogExit();
			AddDialogExitQuest("prepare_gen_convoy_quest");
		break;
		
		case "prepare_convoy_quest_4":*/
			GenerateConvoyQuest();
			dialog.text = DLG_TEXT[30] + pchar.quest.destination + DLG_TEXT[31] + pchar.quest.convoymoney + DLG_TEXT[32];
			link.l1 = DLG_TEXT[33];
			link.l1.go = "convoy_agreeded";
			link.l2 = DLG_TEXT[34];
			link.l2.go = "convoy_refused";
		break;
		
		case "convoy_refused":
			Diag.CurrentNode = Diag.TempNode;
			DialogExit();
			AddDialogExitQuest("convoy_refused");
		break;
		
		case "convoy_agreeded":
			Diag.CurrentNode = Diag.TempNode;
			DialogExit();
			AddDialogExitQuest("convoy_agreeded");
		break;
		
		case "complete_convoy_quest":
			dialog.text = DLG_TEXT[35];
			Link.l1 = DLG_TEXT[36];
			link.l1.go = "exit";
			AddDialogExitQuest("convoy_refused");
		break;
	}
} 
void ProcessDialogEvent()
{
	ref NPChar;
	aref Link, NextDiag;

	DeleteAttribute(&Dialog,"Links");

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

	ref PChar;
	PChar = GetMainCharacter();

	
	switch(Dialog.CurrentNode)
	{
		// -----------------------------------Диалог первый - первая встреча
			
		case "DieMotherFucker":

			Dialog.defAni = "dialog_stay1";
			Dialog.defCam = "1";
			Dialog.defSnd = "dialogs\0\017";
			Dialog.defLinkAni = "dialog_1";
			Dialog.defLinkCam = "1";
			Dialog.defLinkSnd = "dialogs\woman\024";
			Dialog.ani = "dialog_stay2";
			Dialog.cam = "1";
			Dialog.snd = "voice\SFNT\SFNT001";

			Dialog.Text = DLG_TEXT[0] + Address_form.Eng + DLG_TEXT[1];
			Link.l1 = DLG_TEXT[2];
			Link.l1.go = "DieMotherFucker_2";
		break;	
			
		case "First time":

			Dialog.defAni = "dialog_stay1";
			Dialog.defCam = "1";
			Dialog.defSnd = "dialogs\0\017";
			Dialog.defLinkAni = "dialog_1";
			Dialog.defLinkCam = "1";
			Dialog.defLinkSnd = "dialogs\woman\024";
			Dialog.ani = "dialog_stay2";
			Dialog.cam = "1";			
			
			//потасовка в таверне
			if (pchar.quest.main_line == "talk_in_tavern_begin")
			{
				if (pchar.id == "Danielle")
				{
					Dialog.snd = "voice\SFNT\SFNT002";
					Dialog.Text = DLG_TEXT[3] + Address_form.Eng + DLG_TEXT[4];
					Link.l1 = DLG_TEXT[5];
					Link.l1.go = "node_2_danielle";
				}
				else
				{
					Dialog.snd = "voice\SFNT\SFNT003";
					dialog.text = DLG_TEXT[6];
					link.l1 = DLG_TEXT[7];
					link.l1.go = "node_2_kick";
				}
			}
			//арест блейза
			if (pchar.quest.main_line == "fawn_death")
			{
				Dialog.snd = "voice\SFNT\SFNT004";
				dialog.text = DLG_TEXT[8] + address_form.eng + DLG_TEXT[9];
				link.l1 = DLG_TEXT[10];
				link.l1.go = "node_3_blaze";
			}
			if (pchar.quest.main_line == "after_soldier_kick")
			{
				Dialog.snd = "voice\SFNT\SFNT005";
				dialog.text = DLG_TEXT[11];
				link.l1 = DLG_TEXT[12];
				link.l1.go = "exit";
				AddDialogExitQuest("fighting_in_tavern");
			}
		break;

		case "DieMotherFucker_2":
			Dialog.snd = "voice\SFNT\SFNT006";
			Dialog.Text = DLG_TEXT[13] + characters[GetCharacterIndex(DLG_TEXT[14])].lastname + DLG_TEXT[15];
			Link.l1 = DLG_TEXT[16];
			Link.l1.go = "DieMotherFucker_3";
		break;

		case "DieMotherFucker_3":
			Dialog.snd = "voice\SFNT\SFNT007";
			AddDialogExitQuest("Fem_BoatswainFoundsTheClue");
			Dialog.Text = DLG_TEXT[17];
			Link.l1 = DLG_TEXT[18];
			Link.l1.go = "exit";
		break;

		case "node_2_kick":
			Dialog.snd = "voice\SFNT\SFNT008";
			dialog.text = DLG_TEXT[19];
			link.l1 = DLG_TEXT[20];
			link.l1.go = "node_2_kick_2";
		break;

		case "node_2_kick_2":
			DialogExit();
			NextDiag.CurrentNode = NextDiag.TempNode;
			AddDialogExitQuest("kicked_by_soldier_complete");
		break;

		case "node_3_blaze":
			Dialog.snd = "voice\SFNT\SFNT009";
			dialog.text = DLG_TEXT[21];
			link.l1 = DLG_TEXT[22];
			link.l1.go = "exit_arrest";
		break;

		case "Exit":
			DialogExit();
			NextDiag.CurrentNode = NextDiag.TempNode;
		break;

		case "exit_arrest":
			EndQuestMovie();
			DialogExit();
			NextDiag.CurrentNode = NextDiag.TempNode;
			pchar.gun = "";
			pchar.blade = "";
			AddDialogExitQuest("blaze_to_prison_complete");
		break;
	}
}
Exemplo n.º 4
0
void ProcessDialogEvent()
{
	ref NPChar;
	aref Link, NextDiag;

	DeleteAttribute(&Dialog,"Links");

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

	ref PChar;
	PChar = GetMainCharacter();

	
	switch(Dialog.CurrentNode)
	{
		// -----------------------------------Диалог первый - первая встреча
		case "First time":
			Dialog.defAni = "dialog_stay1";
			Dialog.defCam = "1";
			Dialog.defSnd = "dialogs\0\017";
			Dialog.defLinkAni = "dialog_1";
			Dialog.defLinkCam = "1";
			Dialog.defLinkSnd = "dialogs\woman\024";
			Dialog.ani = "dialog_stay2";
			Dialog.cam = "1";
			Dialog.snd = "dialogs\0\009";
			
			if (npchar.location == "Oxbay_mine")
			{
				dialog.text = DLG_TEXT[0];
				link.l1 = DLG_TEXT[1];
				link.l1.go = "exit";
			}
			else
			{
				dialog.text = DLG_TEXT[2];
				link.l1 = DLG_TEXT[3];
				link.l1.go = "exit";
			}

			if (pchar.quest.main_line == "slave_in_oxbay_mine_begin")
			{
				Dialog.Text = DLG_TEXT[4];
				Link.l1 = DLG_TEXT[5];
				Link.l1.go = "node_2";
			}
			if (pchar.quest.main_line == "talk_with_Liborio")
			{
				Dialog.Text = DLG_TEXT[6];
				Link.l1 = DLG_TEXT[7];
				Link.l1.go = "learn";
			}
			if (pchar.quest.main_line == "resque_leborio")
			{
				dialog.text = DLG_TEXT[8];
				link.l1 = DLG_TEXT[9];
				link.l1.go = "bad_story";
			}
			if (pchar.quest.main_line == "resque_leborio_bad")
			{
				dialog.text = DLG_TEXT[10];
				link.l1 = DLG_TEXT[11];
				link.l1.go = "hire";
			}
			if (pchar.quest.main_line == "resque_leborio_denied")
			{
				dialog.text = DLG_TEXT[12];
				link.l1 = DLG_TEXT[13];
				link.l1.go = "exit";
				link.l2 = DLG_TEXT[14];
				link.l2.go = "learn_4";
			}
			if (npchar.quest.hire == "not_hired" && pchar.location == "Falaise_De_Fleur_tavern")
			{
				dialog.text = DLG_TEXT[15];
				link.l1 = DLG_TEXT[16];
				link.l1.go = "hire_4";
				link.l2 = DLG_TEXT[17];
				link.l2.go = "exit";
			}
			if (pchar.quest.main_line == "resque_from_mines_denied")
			{
				dialog.text = DLG_TEXT[18];
				link.l1 = DLG_TEXT[19];
				link.l1.go = "resque_from_mines_denied_2";
			}
			if (pchar.quest.main_line == "lets_go_mines")
			{
				dialog.text = DLG_TEXT[20];
				link.l1 = DLG_TEXT[21];
				link.l1.go = "lets_go_exit";
			}
			if (pchar.quest.main_line == "after_speak_with_leborio" && npchar.quest.hire == "ask_for_hire")
			{
				dialog.text = DLG_TEXT[22];
				link.l1 = DLG_TEXT[23];
				link.l1.go = "passenger_exit";
				link.l2 = DLG_TEXT[24];
				link.l2.go = "fight";
			}
			if (pchar.quest.main_line == "talk_with_Liborio_2")
			{
				Dialog.Text = DLG_TEXT[25];
				Link.l1 = DLG_TEXT[26];
				Link.l1.go = "knowlege";
			}
			if( CheckQuestAttribute("FindMysteriousTablet","TabletBroken") )
			{
				Dialog.Text = DLG_TEXT[27];
				link.l1 = DLG_TEXT[28];
				link.l1.go = "Tablet_copy_1";
			}
			if( CheckQuestAttribute("FindMysteriousTablet","ToMine") )
			{
				Dialog.Text = DLG_TEXT[29];
				link.l1 = DLG_TEXT[30];
				link.l1.go = "knowlege";
			}
			NextDiag.TempNode = "first time";
		break;

		case "Tablet_copy_1":
			Dialog.Text = DLG_TEXT[31];
			link.l1 = DLG_TEXT[32];
			link.l1.go = "exit";
		break;

		case "knowlege":
			dialog.text = DLG_TEXT[33];
			link.l1 = DLG_TEXT[34];
			link.l1.go = "learn_4";
			link.l2 = DLG_TEXT[35];
			link.l2.go = "bad_learn";
		break;

		case "passenger_exit":
			DialogExit();
			NextDiag.CurrentNode = NextDiag.TempNode;
			AddDialogexitQuest("leborio_drago_passenger_exit");
		break;

		case "fight":
			dialog.text = DLG_TEXT[36];
			link.l1 = DLG_TEXT[37];
			link.l1.go = "exit";
			AddDialogExitQuest("leborio_drago_fight_exit");
		break;

		case "lets_go_exit":
			DialogExit();
			NextDiag.CurrentNode = NextDiag.TempNode;
			AddDialogExitQuest("lets_go_begin");
		break;

		case "resque_from_mines_denied_2":
			dialog.text = DLG_TEXT[38];
			link.l1 = DLG_TEXT[39];
			link.l1.go = "resque_from_mines_denied_3";
		break;
		
		case "resque_from_mines_denied_3":
			dialog.text = DLG_TEXT[40];
			link.l1 = DLG_TEXT[41];
			link.l1.go = "resque_from_mines_denied_4";
		break;

		case "resque_from_mines_denied_4":
			dialog.text = DLG_TEXT[42];
			link.l1 = DLG_TEXT[43];
			link.l1.go = "resque_from_mines_denied_5";
		break;

		case "resque_from_mines_denied_5":
			dialog.text = DLG_TEXT[44];
			link.l1 = DLG_TEXT[45];
			link.l1.go = "resque_from_mines_denied_6";
		break;

		case "resque_from_mines_denied_6":
			dialog.text = DLG_TEXT[46];
			link.l1 = DLG_TEXT[47];
			link.l1.go = "resque_from_mines_denied_7";
		break;

		case "resque_from_mines_denied_7":
			dialog.text = DLG_TEXT[48];
			link.l1 = DLG_TEXT[49];
			link.l1.go = "resque_from_mines_denied_8";
		break;

		case "resque_from_mines_denied_8":
			dialog.text = DLG_TEXT[50];
			link.l1 = DLG_TEXT[51];
			link.l1.go = "resque_from_mines_denied_9";
		break;

		case "resque_from_mines_denied_9":
			dialog.text = DLG_TEXT[52];
			link.l1 = DLG_TEXT[53];
			link.l1.go = "resque_from_mines_denied_10";
		break;

		case "resque_from_mines_denied_10":
			dialog.text = DLG_TEXT[54];
			link.l1 = DLG_TEXT[55];
			link.l1.go = "resque_from_mines_denied_11";
		break;

		case "resque_from_mines_denied_11":
			dialog.text = DLG_TEXT[56];
			link.l1 = DLG_TEXT[57];
			link.l1.go = "resque_from_mines_denied_exit";
			AddQuestRecord("search_danielle", "15");
		break;

		case "resque_from_mines_denied_exit":
			DialogExit();
			NextDiag.CurrentNode = NextDiag.TempNode;
			AddDialogExitQuest("wait_for_resque_from_mines");
		break;

		case "learn":
			dialog.text = DLG_TEXT[58];
			link.l1 = DLG_TEXT[59];
			link.l1.go = "learn_2";
		break;

		case "learn_2":
			dialog.text = DLG_TEXT[60] + characters[GetCharacterIndex(DLG_TEXT[61])].name + " " + characters[GetCharacterIndex(DLG_TEXT[62])].lastname + DLG_TEXT[63];
			link.l1 = DLG_TEXT[64];
			link.l1.go = "learn_3";
			link.l2 = DLG_TEXT[65];
			link.l2.go = "bad_learn";
		break; 

		case "learn_3":
			dialog.text = DLG_TEXT[66];
			link.l1 = DLG_TEXT[67];
			link.l1.go = "learn_4";
			link.l2 = DLG_TEXT[68];
			link.l2.go = "bad_learn";
		break;

		case "learn_4":
			dialog.text = DLG_TEXT[69];
			pchar.quest.main_line = "ask_for_resque_leborio";
			link.l1 = DLG_TEXT[70];
			link.l1.go = "exit";
			link.l2 = DLG_TEXT[71];
			link.l2.go = "bad_learn";
			AddQuestRecord("search_danielle", "17");
		break;

		case "bad_learn":
			dialog.text = DLG_TEXT[72];
			link.l1 = DLG_TEXT[73];
			link.l1.go = "bad_story";
		break;

		case "bad_story":
			dialog.text = DLG_TEXT[74];
			link.l1 = DLG_TEXT[75];
			link.l1.go = "bad_story_2";
			AddQuestRecord("search_danielle", "18");
			NextDiag.tempnode = "first time";
		break;

		case "bad_story_2":
			dialog.text = DLG_TEXT[76];
			link.l1 = DLG_TEXT[77];
			link.l1.go = "bad_story_3";
		break;

		case "bad_story_3":
			dialog.text = DLG_TEXT[78];
			link.l1 = DLG_TEXT[79];
			if (pchar.id == "Blaze")
			{
				link.l1.go = "bad_story_4";
			}
			else
			{
				pchar.quest.FindMysteriousTablet = "FindCopy";
				if (npchar.location == "Oxbay_mine")
				{
					link.l1.go = "exit";
					pchar.quest.main_line = "bad_story";
				}
				else
				{
					link.l1.go = "hire";
				}
			}
		break;

		case "bad_story_4":
			dialog.text = DLG_TEXT[80];
			link.l1 = DLG_TEXT[81];
			link.l1.go = "bad_story_5";
		break;

		case "bad_story_5":
			dialog.text = DLG_TEXT[82];
			link.l1 = DLG_TEXT[83];
			if (pchar.quest.main_line == "resque_leborio")
			{
				link.l1.go = "hire";
				pchar.quest.main_line = "hire_leborio";
			}
			else
			{
				link.l1.go = "exit";
				pchar.quest.main_line = "after_speak_with_leborio";
			}
		break;

		case "hire":
			dialog.text = DLG_TEXT[84];
			link.l1 = DLG_TEXT[85];
			link.l1.go = "hire_2";
			OfficersReaction("good");
		break;

		case "hire_2":
			dialog.text = DLG_TEXT[86];
			link.l1 = DLG_TEXT[87];
			link.l1.go = "hire_3";
		break;

		case "hire_3":
			dialog.text = DLG_TEXT[88];
			link.l1 = DLG_TEXT[89];
			link.l1.go = "hire_4";
			link.l2 = DLG_TEXT[90];
			link.l2.go = "hire_denied";
		break;

		case "hire_4":
			dialog.text = DLG_TEXT[91];
			link.l1 = DLG_TEXT[92];
			link.l1.go = "hire_5";
		break;

		case "hire_5":
			dialog.text = DLG_TEXT[93];
			if (makeint(pchar.money) >= 1500)
			{
				link.l1 = DLG_TEXT[94];
				link.l1.go = "hire_6";
			}
			link.l2 = DLG_TEXT[95];
			link.l2.go = "hire_denied";
			if(pchar.id == "Blaze")
			{
				pchar.quest.main_line = "to_isla_muelle";
			}
		break;
		
		case "hire_6":
			dialog.text = DLG_TEXT[96];
			link.l1 = DLG_TEXT[97] + pchar.ship.name + DLG_TEXT[98];
			link.l1.go = "exit";
			npchar.quest.hire = "hired";
			AddMoneyToCharacter(pchar, -1500);
			AddPassenger(pchar, npchar, -1);
			GiveItem2Character(npchar, "blade1");
			EquipCharacterByItem(npchar, "blade1");	
			npchar.dialog.currentnode = "hired";		
		break;

		case "hire_denied":
			dialog.text = DLG_TEXT[99];
			link.l1 = DLG_TEXT[100];
			link.l1.go = "exit";
			AddDialogExitQuest("leborio_hire_denied");
			npchar.quest.hire = "not_hired";
		break;

		case "node_2":
			dialog.text = DLG_TEXT[101];
			link.l1 = DLG_TEXT[102];
			link.l1.go = "node_3";
		break;

		case "node_3":
			dialog.text = DLG_TEXT[103];
			link.l1 = DLG_TEXT[104];
			link.l1.go = "node_4";
		break;

		case "node_4":
			dialog.text = DLG_TEXT[105];
			link.l1 = DLG_TEXT[106];
			link.l1.go = "node_5";
			pchar.quest.main_line = "slave_in_oxbay_mine_begin_1";
			link.l2 = DLG_TEXT[107];
			link.l2.go = "node_5";
			AddQuestRecord("search_danielle", "12");
		break;

		case "node_5":
			dialog.text = DLG_TEXT[108];
			link.l1 = DLG_TEXT[109];
			link.l1.go = "exit";
			AddDialogExitQuest("miner_again_kick_exit");
		break;

		case "Exit_2":
			DialogExit();
			NextDiag.CurrentNode = NextDiag.TempNode;
			pchar.quest.main_line = "blaze_in_mine";
			EndQuestMovie();
		break;

		case "Exit":
			DialogExit();
			NextDiag.CurrentNode = NextDiag.TempNode;
			EndQuestMovie();
		break;
		
		case "hired":
			Dialog.text = DLG_TEXT[110];
			link.l1 = DLG_TEXT[111];
			link.l1.go = "exit";
		break;
	}
}
Exemplo n.º 5
0
void ProcessDialogEvent()
{
	ref NPChar, PChar, d;
	PChar = GetMainCharacter();
	aref Link, Diag;
	string NPC_Meeting;
	
	DeleteAttribute(&Dialog,"Links");

	makeref(NPChar,CharacterRef);
	makearef(Link, Dialog.Links);
	makeref(d, Dialog);
	makearef(Diag, NPChar.Dialog);
	
	switch(Dialog.CurrentNode)
	{
		// -----------------------------------Диалог первый - первая встреча
		case "exit":
			Diag.CurrentNode = Diag.TempNode;
			NPChar.quest.meeting = NPC_Meeting;
			DialogExit();
		break;

		case "First time":
			Dialog.defAni = "dialog_stay1";
			Dialog.defCam = "1";
			Dialog.defSnd = "dialogs\0\017";
			Dialog.defLinkAni = "dialog_1";
			Dialog.defLinkCam = "1";
			Dialog.defLinkSnd = "dialogs\woman\024";
			Dialog.ani = "dialog_stay2";
			Dialog.cam = "1";
			Dialog.snd = "voice\VIDE\VIDE001";
			
			dialog.text = DLG_TEXT[0];
			link.l1 = DLG_TEXT[1];
			link.l1.go = "exit";

			if (CheckQuestAttribute("gambling_with_girl", "gambled"))
			{
				Dialog.snd = "voice\VIDE\VIDE002";
				dialog.text = DLG_TEXT[2];
				link.l1 = DLG_TEXT[3];
				link.l1.go = "she_becomes_prisoner";
				link.l2 =  DLG_TEXT[4];
				link.l2.go = "she_story";
				AddQuestRecord("gambled_girl", "4");
			}		
			if (CheckQuestAttribute("gambling_with_girl", "to_hovernor"))
			{
				Dialog.snd = "voice\VIDE\VIDE019";
				dialog.text = DLG_TEXT[5];
				link.l1 = DLG_TEXT[6];
				link.l1.go = "to_home";
			}
		break;

		case "to_home":
			Dialog.snd = "voice\VIDE\VIDE003";
			dialog.text = DLG_TEXT[7];
			if (GetNationRelation2MainCharacter(FRANCE) == RELATION_ENEMY)
			{
				link.l1 = DLG_TEXT[8];
				link.l1.go = "to_home_bad";
				AddQuestRecord("gambled_girl", "11");
			}
			else
			{
				link.l1 = DLG_TEXT[9];
				link.l1.go = "exit";
			}
			pchar.quest.gambling_with_girl = "to_hovernor_2";
			AddQuestRecord("gambled_girl", "10");
		break;

		case "to_home_bad":
			Dialog.snd = "voice\VIDE\VIDE004";
			dialog.text = DLG_TEXT[10];
			link.l1 = DLG_TEXT[11];
			link.l1.go = "to_home_bad_2";
			link.l2 = DLG_TEXT[12];
			link.l2.go = "exit";
		break;

		case "to_home_bad_2":
			Dialog.snd = "voice\VIDE\VIDE005";
			dialog.text = DLG_TEXT[13];
			link.l1 = DLG_TEXT[14];
			link.l1.go = "exit";
			pchar.quest.gambling_with_girl = "done";
			npchar.location = "none";
			ChangeCharacterReputation(pchar, 1);
			OfficersReaction("good");
			AddPartyExp(pchar, 2000);
			AddQuestRecord("gambled_girl", "12");
		break;

		case "she_story":
			Dialog.snd = "voice\VIDE\VIDE006";
			dialog.text = DLG_TEXT[15];
			link.l1 = DLG_TEXT[16];
			link.l1.go = "she_story_2";
		break;

		case "she_story_2":
			Dialog.snd = "voice\VIDE\VIDE007";
			dialog.text = DLG_TEXT[17] + GetCharacterFullName(npchar.id) + DLG_TEXT[18];
			link.l1 = DLG_TEXT[19];
			link.l1.go = "she_story_3";
		break;

		case "she_story_3":
			Dialog.snd = "voice\VIDE\VIDE008";
			dialog.text = DLG_TEXT[20];
			link.l1 = DLG_TEXT[21];
			link.l1.go = "she_story_4";
		break;

		case "she_story_4":
			Dialog.snd = "voice\VIDE\VIDE009";
			dialog.text = DLG_TEXT[22];
			link.l1 = DLG_TEXT[23];
			link.l1.go = "she_story_5";
		break;

		case "she_story_5":
			Dialog.snd = "voice\VIDE\VIDE010";
			dialog.text = DLG_TEXT[24];
			link.l1 = DLG_TEXT[25];
			link.l1.go = "she_story_6";
		break;

		case "she_story_6":
			Dialog.snd = "voice\VIDE\VIDE011";
			dialog.text = DLG_TEXT[26];
			link.l1 = DLG_TEXT[27];
			link.l1.go = "she_story_7";
			link.l2 = DLG_TEXT[28];
			link.l2.go = "she_story_bad";
			AddQuestRecord("gambled_girl", "6");
		break;

		case "she_story_7":
			Dialog.snd = "voice\VIDE\VIDE012";
			dialog.text = DLG_TEXT[29];
			link.l1 = DLG_TEXT[30];
			link.l1.go = "she_story_8";
		break;

		case "she_story_8":
			Dialog.snd = "voice\VIDE\VIDE013";
			dialog.text = DLG_TEXT[31];
			link.l1 = DLG_TEXT[32];
			link.l1.go = "she_story_9";
		break;

		case "she_story_9":
			Dialog.snd = "voice\VIDE\VIDE014";
			dialog.text = DLG_TEXT[33] + GetCharacterFullName(DLG_TEXT[34]) + DLG_TEXT[35];
			link.l1 = DLG_TEXT[36];
			link.l1.go = "exit";
			AddDialogExitQuest("gambled_girl_to_FdF");
			AddQuestRecord("gambled_girl", "7");
		break;

		case "she_story_bad":
			Diag.CurrentNode = Diag.TempNode;
			NPChar.quest.meeting = NPC_Meeting;
			AddDialogExitQuest("girl_exit_from_room");
			AddQuestRecord("gambled_girl", "8");
		break;

		case "speak_1":
			Dialog.snd = "voice\VIDE\VIDE015";
			dialog.text = DLG_TEXT[37];
			link.l1 = DLG_TEXT[38];
			link.l1.go = "exit";
			characters[GetCharacterIndex("Raymond Bouchez")].dialog.currentnode = "speak_1";
			AddDialogExitQuest("Raymond_speak");
		break;

		case "speak_2":
			Dialog.snd = "voice\VIDE\VIDE016";
			dialog.text = DLG_TEXT[39];
			link.l1 = DLG_TEXT[40];
			link.l1.go = "exit";
			characters[GetCharacterIndex("Raymond Bouchez")].dialog.currentnode = "speak_2";
			AddDialogExitQuest("Raymond_speak");
		break;

		case "speak_3":
			Dialog.snd = "voice\VIDE\VIDE017";
			dialog.text = DLG_TEXT[41];
			link.l1 = DLG_TEXT[42];
			link.l1.go = "exit";
			AddDialogExitQuest("gambled_girl_exit_from_FDF_tavern");
			Diag.TempNode = "first time";
			AddQuestRecord("gambled_girl", "9");
		break;

		case "she_becomes_prisoner":
			Dialog.snd = "voice\VIDE\VIDE018";
			dialog.text = DLG_TEXT[43] + GetCharacterFullName(npchar.id) + DLG_TEXT[44];
			link.l1 = DLG_TEXT[45];
			link.l1.go = "exit_prisoned";
			link.l2 = DLG_TEXT[46];
			link.l2.go = "she_story_3";
		break;

		case "exit_prisoned":
			Diag.CurrentNode = Diag.TempNode;
			NPChar.quest.meeting = NPC_Meeting;
			DialogExit();
			Locations[FindLocation(pchar.location)].reload.l1.disable = 0;
			AddPassenger(pchar, npchar, 1);
			OfficersReaction("bad");
			pchar.quest.gambling_with_girl = "prisoned";
			AddDialogExitQuest("girl_for_sale");
		break;
	}
}
Exemplo n.º 6
0
int
main (int argc, char **argv)
{
	int nr,er,ob,sp,ir,ixz,ls,smooth,ndpfz,ns,
		ixo,ixsm,nxo,nxs,nxm,nt,nxsm,
		shots,midpoints,verbose,tracl,
		*nxz;
	float x0,z0,v00,gamma,dvdx,dvdz,vmin,tmin,tminr,
		x,z,v,t,dsmax,fpeak,
		dxs,dxm,dxo,dt,fxs,fxm,fxo,ft,dxsm,
		xs,zs,xg,zg,
		*xo,*ar,**xr,**zr;
	Reflector *r;
	Wavelet *w;

	/* hook up getpar to handle the parameters */
	initargs(argc,argv);
	requestdoc(0);

	/* get parameters */
	if (!getparint("nt",&nt)) nt = 101; CHECK_NT("nt",nt);
	if (!getparfloat("dt",&dt)) dt = 0.04;
	if (!getparfloat("ft",&ft)) ft = 0.0;
	if ((nxo=countparval("xo"))!=0) {
		xo = ealloc1float(nxo);
		getparfloat("xo",xo);
	} else {
		if (!getparint("nxo",&nxo)) nxo = 1;
		if (!getparfloat("dxo",&dxo)) dxo = 0.05;
		if (!getparfloat("fxo",&fxo)) fxo = 0.0;
		xo = ealloc1float(nxo);
		for (ixo=0; ixo<nxo; ++ixo)
			xo[ixo] = fxo+ixo*dxo;
	}
	shots = (getparint("nxs",&nxs) || 
		getparfloat("dxs",&dxs) || 
		getparfloat("fxs",&fxs));
	midpoints = (getparint("nxm",&nxm) || 
		getparfloat("dxm",&dxm) || 
		getparfloat("fxm",&fxm)); 
	if (shots && midpoints)
		err("cannot specify both shot and midpoint sampling!\n");
	if (shots) {
		if (!getparint("nxs",&nxs)) nxs = 101;
		if (!getparfloat("dxs",&dxs)) dxs = 0.05;
		if (!getparfloat("fxs",&fxs)) fxs = 0.0;
		nxsm = nxs;
		dxsm = dxs;
	} else {
		midpoints = 1;
		if (!getparint("nxm",&nxm)) nxm = 101;
		if (!getparfloat("dxm",&dxm)) dxm = 0.05;
		if (!getparfloat("fxm",&fxm)) fxm = 0.0;
		nxsm = nxm;
		dxsm = dxm;
	}
	if (!getparint("nxm",&nxm)) nxm = 101;
	if (!getparfloat("dxm",&dxm)) dxm = 0.05;
	if (!getparfloat("fxm",&fxm)) fxm = 0.0;
	if (!getparfloat("x0",&x0)) x0 = 0.0;
	if (!getparfloat("z0",&z0)) z0 = 0.0;
	if (!getparfloat("v00",&v00)) v00 = 2.0;
	if (!getparfloat("gamma",&gamma)) gamma = 1.0;
	if (!getparfloat("dvdx",&dvdx)) dvdx = 0.0;
	if (!getparfloat("dvdz",&dvdz)) dvdz = 0.0;
	if (!getparfloat("fpeak",&fpeak)) fpeak = 0.2/dt;
	if (!getparint("ls",&ls)) ls = 0;
	if (!getparint("er",&er)) er = 0;
	if (!getparint("ob",&ob)) ob = 1;
	if (!getparint("sp",&sp)) sp = 1;
	if (!getparfloat("tmin",&tmin)) tmin = 10.0*dt;
	if (!getparint("ndpfz",&ndpfz)) ndpfz = 5;
	if (!getparint("smooth",&smooth)) smooth = 0;
	if (!getparint("verbose",&verbose)) verbose = 0;
	decodeReflectors(&nr,&ar,&nxz,&xr,&zr);
	if (!smooth) breakReflectors(&nr,&ar,&nxz,&xr,&zr);

	/* convert velocity v(x0,z0) to v(0,0) */
	v00 -= dvdx*x0+dvdz*z0;
	
	/* determine minimum velocity and minimum reflection time */
	for (ir=0,vmin=FLT_MAX,tminr=FLT_MAX; ir<nr; ++ir) {
		for (ixz=0; ixz<nxz[ir]; ++ixz) {
			x = xr[ir][ixz];
			z = zr[ir][ixz];
			v = v00+dvdx*x+dvdz*z;
			if (v<vmin) vmin = v;
			t = 2.0*z/v;
			if (t<tminr) tminr = t;
		}
	}

	/* determine maximum reflector segment length */
	tmin = MAX(tmin,MAX(ft,dt));
	dsmax = vmin/(2*ndpfz)*sqrt(tmin/fpeak);
 	
	/* make reflectors */
	makeref(dsmax,nr,ar,nxz,xr,zr,&r);

	/* count reflector segments */
	for (ir=0,ns=0; ir<nr; ++ir)
		ns += r[ir].ns;

	/* make wavelet */
	makericker(fpeak,dt,&w);
	
	/* if requested, print information */
	if (verbose) {
		warn("\nSYNLVCW:");
		warn(
			"Minimum possible reflection time (assuming sources\n"
			"and receivers are at the surface Z=0) is %g s.\n"
			"You may want to adjust the \"minimum time of \n"
			"interest\" parameter.",tminr);
		warn(
			"Total number of small reflecting\n"
			"segments is %d.",ns);
	}
	
	/* set constant segy trace header parameters */
	memset( (void *) &tr, 0, sizeof(segy));
	tr.trid = 1;
	tr.counit = 1;
	tr.ns = nt;
	tr.dt = 1.0e6*dt;
	tr.delrt = 1.0e3*ft;
	
	/* loop over shots or midpoints */
	for (ixsm=0,tracl=0; ixsm<nxsm; ++ixsm) {
	
		/* loop over offsets */
		for (ixo=0; ixo<nxo; ++ixo) {
		
			/* compute source and receiver coordinates */
			if (shots)
				xs = fxs+ixsm*dxs;
			else
				xs = fxm+ixsm*dxm-0.5*xo[ixo];
			zs = 0.0;
			xg = xs+xo[ixo];
			zg = 0.0;
			
			/* set segy trace header parameters */
			tr.tracl = tr.tracr = ++tracl;
			if (shots) {
				tr.fldr = 1+ixsm;
				tr.tracf = 1+ixo;
			} else {
				tr.cdp = 1+ixsm;
				tr.cdpt = 1+ixo;
			}
			tr.offset = NINT(1000.0*(dxsm>0.0?xo[ixo]:-xo[ixo]));
			tr.sx = NINT(1000.0*xs);
			tr.gx = NINT(1000.0*xg);
				
			/* make one trace */
			makeone(v00,dvdx,dvdz,ls,er,ob,sp,w,gamma,
				xs,zs,xg,zg,
				nr,r,nt,dt,ft,tr.data);
			
			/* write trace */
			puttr(&tr);
		}
	}
	return(CWP_Exit());
}
void ProcessDialogEvent()
{
	ref NPChar;
	aref Link, NextDiag;

	DeleteAttribute(&Dialog,"Links");

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

	ref PChar;
	PChar = GetMainCharacter();

	
	switch(Dialog.CurrentNode)
	{
		// -----------------------------------Диалог первый - первая встреча
		case "First time":
			Dialog.defAni = "dialog_stay1";
			Dialog.defCam = "1";
			Dialog.defSnd = "dialogs\0\017";
			Dialog.defLinkAni = "dialog_1";
			Dialog.defLinkCam = "1";
			Dialog.defLinkSnd = "dialogs\woman\024";
			Dialog.ani = "dialog_stay2";
			Dialog.cam = "1";
			Dialog.snd = "voice\PADO\PADO001";
			
			dialog.text = DLG_TEXT[0];
			link.l1 = DLG_TEXT[1];
			link.l1.go = "quests";
			link.l2 = DLG_TEXT[2];
			link.l2.go = "donation";
			link.l99 = DLG_TEXT[3];
			link.l99.go = "exit";
			NextDiag.TempNode = "first time";
		break;

		case "quests":
			iTest = 0;
			Dialog.snd = "voice\PADO\PADO002";
			dialog.text = DLG_TEXT[4];
			if (pchar.quest.main_line == "danielle_speak_with_almost_dead_rheims_complete" && iTest < QUEST_COUNTER)
			{
				Link.l1 = DLG_TEXT[5];
				Link.l1.go = "blaze_to_library";
				iTest = iTest + 1;
			}
			if (pchar.quest.main_line == "compramat_done" && iTest < QUEST_COUNTER)
			{
				link.l1 = DLG_TEXT[6];
				link.l1.go = "compramat_done";
				ChangeCharacterReputation(pchar, -1);
			}
			if (pchar.quest.main_line == "compramat_bul_bul" && iTest < QUEST_COUNTER)
			{
				link.l1 = DLG_TEXT[7];
				link.l1.go = "compramat_bul_bul";
			}
			if (CheckQuestAttribute("ANIMISTS", "letter_to_domingues"))
			{
				link.l1 = DLG_TEXT[8];
				link.l1.go = "letter_good";
				TakeItemFromCharacter(pchar, LETTER_TO_DOMINGUES);
			}
			if (CheckQuestAttribute("ANIMISTS", "letter_to_domingues_opened"))
			{
				link.l1 = DLG_TEXT[9];
				link.l1.go = "letter_bad";
			}
			if (CheckQuestAttribute("ANIMISTS", "barkue_drown"))
			{
				link.l1 = DLG_TEXT[10];
				link.l1.go = "barkue_drown";
			}
			if (CheckQuestAttribute("ANIMISTS","to_barkue_complete"))
			{
				link.l1 = DLG_TEXT[11];
				link.l1.go = "to_barkue_complete";
				RemoveCharacterCompanion(pchar, characterFromID("Mergildo Hurtado"));
			}
			link.l99 = DLG_TEXT[12];
			link.l99.go = "exit";
		break;

		case "to_barkue_complete":
			Dialog.snd = "voice\PADO\PADO003";
			dialog.text = DLG_TEXT[13];
			link.l1 = DLG_TEXT[14];
			link.l1.go = "to_barkue_complete_2";
		break;

		case "to_barkue_complete_2":
			Dialog.snd = "voice\PADO\PADO004";
			dialog.text = DLG_TEXT[15];
			link.l1 = DLG_TEXT[16];
			link.l1.go = "to_barkue_complete_3";
		break;

		case "to_barkue_complete_3":
			Dialog.snd = "voice\PADO\PADO005";
			dialog.text = DLG_TEXT[17];
			link.l1 = DLG_TEXT[18];
			link.l1.go = "to_barkue_complete_4";
		break;

		case "to_barkue_complete_4":
			Dialog.snd = "voice\PADO\PADO006";
			dialog.text = DLG_TEXT[19];
			link.l1 = DLG_TEXT[20];
			link.l1.go = "to_bernard_2";
			AddMoneyToCharacter(pchar, 3500);
			AddPartyExp(pchar, 2500);
			AddQuestRecord("ANIMISTS", "19");
		break;

		case "barkue_drown":
			Dialog.snd = "voice\PADO\PADO007";
			dialog.text = DLG_TEXT[21];
			link.l1 = DLG_TEXT[22];
			link.l1.go = "barkue_drown_2";
		break;

		case "barkue_drown_2":
			Dialog.snd = "voice\PADO\PADO008";
			dialog.text = DLG_TEXT[23];
			link.l1 = DLG_TEXT[24];
			link.l1.go = "to_bernard";
			AddMoneyToCharacter(pchar, 2500);
			AddQuestRecord("ANIMISTS", "18");
		break;

		case "to_bernard":
			Dialog.snd = "voice\PADO\PADO009";
			dialog.text = DLG_TEXT[25];
			link.l1 = DLG_TEXT[26];
			link.l1.go = "to_bernard_2";
		break;

		case "to_bernard_2":
			Dialog.snd = "voice\PADO\PADO010";
			dialog.text = DLG_TEXT[27];
			link.l1 = DLG_TEXT[28];
			link.l1.go = "to_bernard_3";
		break;

		case "to_bernard_3":
			Dialog.snd = "voice\PADO\PADO011";
			dialog.text = DLG_TEXT[29];
			link.l1 = DLG_TEXT[30];
			link.l1.go = "exit";
			pchar.quest.ANIMISTS = "letter_to_father_bernard";
			AddDialogExitQuest("oops_ANIMISTS_want_letter_again");
			GiveItem2Character(pchar, LETTER_TO_BERNARD);
			AddQuestRecord("ANIMISTS", "20");
		break;

		case "letter_good":
			Dialog.snd = "voice\PADO\PADO012";
			dialog.text = DLG_TEXT[31];
			link.l1 = DLG_TEXT[32];
			link.l1.go = "letter_good_2";
		break;

		case "letter_bad":
			Dialog.snd = "voice\PADO\PADO013";
			dialog.text = DLG_TEXT[33];
			link.l1 = DLG_TEXT[34];
			link.l1.go = "letter_bad_exit";
			link.l2 = DLG_TEXT[35];
			link.l2.go = "letter_bad_2";
		break;

		case "letter_bad_2":
			Dialog.snd = "voice\PADO\PADO014";
			dialog.text = DLG_TEXT[36];
			link.l1 = DLG_TEXT[37];
			link.l1.go = "letter_bad_3";
		break;

		case "letter_bad_3":
			Dialog.snd = "voice\PADO\PADO015";
			dialog.text = DLG_TEXT[38];
			link.l1 = DLG_TEXT[39];
			link.l1.go = "prepare_for_bark";
			ChangeCharacterReputation(pchar, -5);
			AddMoneyToCharacter(pchar, 1000);
			AddPartyExp(pchar, 1500);
			AddQuestRecord("ANIMISTS", "12");
		break;

		case "letter_bad_exit":
			Dialog.snd = "voice\PADO\PADO016";
			dialog.text = DLG_TEXT[40];
			link.l1 = DLG_TEXT[41];
			link.l1.go = "letter_bad_exit_2";
			link.l2 = DLG_TEXT[42];
			link.l2.go = "letter_bad_2";
		break;

		case "letter_bad_exit_2":
			DialogExit();
			NextDiag.CurrentNode = NextDiag.TempNode;
			
			ChangeCharacterReputation(pchar, -15);
			AddQuestRecord("ANIMISTS", "13");
			CloseQuestheader("ANIMISTS");
		break;

		case "letter_good_2":
			Dialog.snd = "voice\PADO\PADO017";
			dialog.text = DLG_TEXT[43];
			link.l1 = DLG_TEXT[44] + GetcharacterFullname(DLG_TEXT[45]) + DLG_TEXT[46];
			link.l1.go = "letter_good_3";
		break;

		case "letter_good_3":
			Dialog.snd = "voice\PADO\PADO018";
			dialog.text = DLG_TEXT[47];
			link.l1 = DLG_TEXT[48];
			link.l1.go = "letter_good_4";
		break;

		case "letter_good_4":
			Dialog.snd = "voice\PADO\PADO019";
			dialog.text = DLG_TEXT[49] + GetcharacterFullname(DLG_TEXT[50]) + DLG_TEXT[51];
			link.l1 = DLG_TEXT[52];
			link.l1.go = "letter_good_5";
		break;

		case "letter_good_5":
			Dialog.snd = "voice\PADO\PADO020";
			dialog.text = DLG_TEXT[53];
			link.l1 = DLG_TEXT[54];
			link.l1.go = "prepare_for_bark";
			AddMoneyToCharacter(pchar, 2000);
			ChangeCharacterReputation(pchar, 1);
			AddPartyExp(pchar, 1700);
		break;

		case "prepare_for_bark":
			Dialog.snd = "voice\PADO\PADO021";
			dialog.text = DLG_TEXT[55];
			link.l1 = DLG_TEXT[56];
			link.l1.go = "prepare_for_bark_2";
		break;

		case "prepare_for_bark_2":
			Dialog.snd = "voice\PADO\PADO022";
			dialog.text = DLG_TEXT[57];
			link.l1 = DLG_TEXT[58];
			link.l1.go = "prepare_for_bark_3";
		break;

		case "prepare_for_bark_3":
			Dialog.snd = "voice\PADO\PADO023";
			dialog.text = DLG_TEXT[59] + GetCharacterFullName(DLG_TEXT[60]) + DLG_TEXT[61];
			link.l1 = DLG_TEXT[62];
			link.l1.go = "exit";
			pchar.quest.ANIMISTS = "to_barkue";
			AddDialogExitQuest("prepare_for_barkue");
		break;

		case "compramat_bul_bul":
			Dialog.snd = "voice\PADO\PADO024";
			dialog.text = DLG_TEXT[63];
			link.l1 = DLG_TEXT[64];
			link.l1.go = "compramat_bul_bul_2";
		break;

		case "compramat_bul_bul_2":
			Dialog.snd = "voice\PADO\PADO025";
			dialog.text = DLG_TEXT[65];
			link.l1 = DLG_TEXT[66];
			link.l1.go = "compramat_bul_bul_3";
		break;

		case "compramat_bul_bul_3":
			Dialog.snd = "voice\PADO\PADO026";
			dialog.text = DLG_TEXT[67];
			link.l1 = DLG_TEXT[68];
			link.l1.go = "compramat_bul_bul_4";
		break;

		case "compramat_bul_bul_4":
			Dialog.snd = "voice\PADO\PADO027";
			dialog.text = DLG_TEXT[69];
			link.l1 = DLG_TEXT[70];
			link.l1.go = "library";
		break;

		case "compramat_done":
			Dialog.snd = "voice\PADO\PADO028";
			dialog.text = DLG_TEXT[71];
			link.l1 = DLG_TEXT[72];
			link.l1.go = "compramat_done_2";
			link.l2 = DLG_TEXT[73];
			link.l2.go = "compramat_not_done";
		break;

		case "compramat_not_done":
			Dialog.snd = "voice\PADO\PADO029";
			dialog.text = DLG_TEXT[74];
			link.l1 = DLG_TEXT[75];
			link.l1.go = "compramat_not_done_2";
		break;

		case "compramat_not_done_2":
			Dialog.snd = "voice\PADO\PADO030";
			dialog.text = DLG_TEXT[76];
			link.l1 = DLG_TEXT[77];
			link.l1.go = "compramat_not_done_3";
		break;

		case "compramat_not_done_3":
			Dialog.snd = "voice\PADO\PADO031";
			dialog.text = DLG_TEXT[78];
			link.l1 = DLG_TEXT[79];
			link.l1.go = "compramat_not_done_4";
		break;

		case "compramat_not_done_4":
			Dialog.snd = "voice\PADO\PADO032";
			dialog.text = DLG_TEXT[80];
			link.l1 = DLG_TEXT[81];
			link.l1.go = "compramat_done_3";
			ChangeCharacterReputation(pchar, -3);
			AddMoneyToCharacter(pchar, 5000);
		break;

		case "compramat_done_2":
			Dialog.snd = "voice\PADO\PADO033";
			dialog.text = DLG_TEXT[82];
			link.l1 = DLG_TEXT[83];
			link.l1.go = "compramat_done_3";
		break;

		case "compramat_done_3":
			Dialog.snd = "voice\PADO\PADO034";
			dialog.text = DLG_TEXT[84];
			link.l1 = DLG_TEXT[85];
			link.l1.go = "library";
		break;

		case "library":
			DialogExit();
			NextDiag.CurrentNode = NextDiag.TempNode;
			AddDialogExitQuest("come_to_library");
		break;

		case "blaze_to_library":
			Dialog.snd = "voice\PADO\PADO035";
			Dialog.Text = DLG_TEXT[86];
			Link.l1 = DLG_TEXT[87];
			Link.l1.go = "blaze_to_library_2";
			Locations[FindLocation("Muelle_church")].reload.l1.go = "Muelle_town_04";
			Locations[FindLocation("Muelle_church")].reload.l1.emerge = "reload4";
		break;

		case "blaze_to_library_2":
			Dialog.snd = "voice\PADO\PADO036";
			dialog.text = DLG_TEXT[88];
			link.l1 = DLG_TEXT[89];
			link.l1.go = "blaze_to_library_3";
		break;

		case "blaze_to_library_3":
			Dialog.snd = "voice\PADO\PADO037";
			dialog.text = DLG_TEXT[90] + characters[GetCharacterIndex(DLG_TEXT[91])].name + " " + characters[GetCharacterIndex(DLG_TEXT[92])].lastname + DLG_TEXT[93];
			link.l1 = DLG_TEXT[94];
			link.l1.go = "blaze_to_library_4";
		break;

		case "blaze_to_library_4":
			Dialog.snd = "voice\PADO\PADO038";
			dialog.text = DLG_TEXT[95];
			link.l1 = DLG_TEXT[96];
			link.l1.go = "blaze_to_library_5";
		break;

		case "blaze_to_library_5":
			Dialog.snd = "voice\PADO\PADO039";
			dialog.text = DLG_TEXT[97];
			link.l1 = DLG_TEXT[98];
			link.l1.go = "blaze_to_library_6";
		break;

		case "blaze_to_library_6":
			Dialog.snd = "voice\PADO\PADO040";
			dialog.text = DLG_TEXT[99];
			link.l1 = DLG_TEXT[100];
			link.l1.go = "exit";
			AddDialogExitQuest("prepare_for_meet_ferro");
		break;
		
		case "donation":
			Dialog.snd = "voice\PADO\PADO041";
			dialog.Text = DLG_TEXT[101];
			Link.l1 = DLG_TEXT[102];
			Link.l1.go = "No donation";
			if(makeint(PChar.money)>=100)
			{	
				Link.l2 = DLG_TEXT[103];
				Link.l2.go = "donation paid_100";
			}
			if(makeint(PChar.money)>=1000)
			{
				Link.l3 = DLG_TEXT[104];
				Link.l3.go = "donation paid_1000";
			}
			if(makeint(PChar.money)>=5000)
			{	
				Link.l4 = DLG_TEXT[105];
				Link.l4.go = "donation paid_5000";
			}
		break;

		case "No donation":
			Dialog.snd = "voice\PADO\PADO042";
			dialog.Text = DLG_TEXT[106];
			Link.l1 = DLG_TEXT[107];
			Link.l1.go = "quests";
			Link.l2 = DLG_TEXT[108];
			Link.l2.go = "exit";
		break;

		case "donation paid_100":
			Dialog.snd = "voice\PADO\PADO043";
			AddMoneyToCharacter(pchar, -100);
			pchar.quest.donate = makeint(pchar.quest.donate) + 100;
			dialog.Text = DLG_TEXT[109];
			Link.l1 = DLG_TEXT[110];
			Link.l1.go = "quests";
			Link.l2 = DLG_TEXT[111];
			Link.l2.go = "exit";
			AddDialogExitQuest("donation");
		break;
		
		case "donation paid_1000":
			Dialog.snd = "voice\PADO\PADO043";
			AddMoneyToCharacter(pchar, -1000);
			pchar.quest.donate = makeint(pchar.quest.donate) + 1000;
			dialog.Text = DLG_TEXT[112];
			Link.l1 = DLG_TEXT[113];
			Link.l1.go = "quests";
			Link.l2 = DLG_TEXT[114];
			Link.l2.go = "exit";
			AddDialogExitQuest("donation");
		break;
		
		case "donation paid_5000":
			Dialog.snd = "voice\PADO\PADO043";
			AddMoneyToCharacter(pchar, -5000);
			pchar.quest.donate = makeint(pchar.quest.donate) + 5000;
			dialog.Text = DLG_TEXT[115];
			Link.l1 = DLG_TEXT[116];
			Link.l1.go = "quests";
			Link.l2 = DLG_TEXT[117];
			Link.l2.go = "exit";
			AddDialogExitQuest("donation");
		break;

		case "Exit":
			DialogExit();
			NextDiag.CurrentNode = NextDiag.TempNode;
		break;
	}
}