#include "DIALOGS\peasant_dialog.h" 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\PEDI\PEDI001"; dialog.text = DLG_TEXT[0]; link.l1 = DLG_TEXT[1]; link.l1.go = "exit"; if (pchar.quest.main_line == "speak_with_peasant") { Dialog.snd = "voice\PEDI\PEDI002"; Dialog.Text = DLG_TEXT[2]; Link.l1 = DLG_TEXT[3]; Link.l1.go = "node_2"; } NextDiag.TempNode = "first time"; break; case "node_2": Dialog.snd = "voice\PEDI\PEDI003"; dialog.text = DLG_TEXT[4]; link.l1 = DLG_TEXT[5]; link.l1.go = "node_3"; break; case "node_3": Dialog.snd = "voice\PEDI\PEDI004"; dialog.text = DLG_TEXT[6]; link.l1 = DLG_TEXT[7]; link.l1.go = "exit"; pchar.quest.main_line = "after_speak_with_peasant"; break; case "Exit": DialogExit(); NextDiag.CurrentNode = NextDiag.TempNode; EndQuestMovie(); break; } }