Witam.Mam taki problem,że dodałem do dialogu warunek "Jeśli odległość od bohatera do postaci wynosi",ale po zreparsowaniu skryptu i zaaktualizowaniu dialogów nie działa mi opcja dialogowa.Mam jedynie do wybrania drugą opcję;/
Skrypt dialogu:
// *Script was make in Easy Dialog Maker (EDM)
//========================================
//-----------------> OPCJA *KONIEC*
//========================================
INSTANCE DIA_Testowiec_EXIT(C_INFO)
{
npc = NONE_304_Testowiec;
nr = 999;
condition = DIA_Testowiec_EXIT_Condition;
information = DIA_Testowiec_EXIT_Info;
permanent = TRUE;
description = "KONIEC";
};
FUNC INT DIA_Testowiec_EXIT_Condition()
{
return TRUE;
};
FUNC VOID DIA_Testowiec_EXIT_Info()
{
AI_StopProcessInfos (self);
};
//========================================
//-----------------> HELLO1
//========================================
INSTANCE DIA_Testowiec_HELLO1 (C_INFO)
{
npc = NONE_304_Testowiec;
nr = 1;
condition = DIA_Testowiec_HELLO1_Condition;
information = DIA_Testowiec_HELLO1_Info;
permanent = FALSE;
Important = TRUE;
};
FUNC INT DIA_Testowiec_HELLO1_Condition()
{
if (Npc_GetDistToNpc(other, self) == 20)
{
return TRUE;
};
};
FUNC VOID DIA_Testowiec_HELLO1_Info()
{
AI_Output (self, other ,"DIA_Testowiec_HELLO1_03_01"); //Hej poczekaj chwilę.
AI_Output (other, self ,"DIA_Testowiec_HELLO1_15_02"); //O co chodzi?
AI_Output (self, other ,"DIA_Testowiec_HELLO1_03_03"); //Mam dzisiaj dobry humor i postanowiłem kogoś obdarować przedmiotem.
AI_Output (self, other ,"DIA_Testowiec_HELLO1_03_04"); //Chcesz dostać jakiś za darmo?
AI_Output (other, self ,"DIA_Testowiec_HELLO1_15_05"); //Oczywiście,że tak!
AI_Output (self, other ,"DIA_Testowiec_HELLO1_03_06"); //No to wybierz sobie pancerz,złoto lub zwoje.
Info_ClearChoices (DIA_Testowiec_HELLO1);
Info_AddChoice (DIA_Testowiec_HELLO1, "Wezmę pancerz.", DIA_Testowiec_HELLO1_Pancerz);
Info_AddChoice (DIA_Testowiec_HELLO1, "Daj mi 100 sztuk złota.", DIA_Testowiec_HELLO1_Zloto);
Info_AddChoice (DIA_Testowiec_HELLO1, "Jakie mogę wybrać zwoje?", DIA_Testowiec_HELLO1_JakieZwoje);
};
FUNC VOID DIA_Testowiec_HELLO1_Pancerz()
{
AI_Output (other, self ,"DIA_Testowiec_HELLO1_Pancerz_15_01"); //Wezmę pancerz.
AI_Output (self, other ,"DIA_Testowiec_HELLO1_Pancerz_03_02"); //Niech cię chroni w walce.
CreateInvItems (self, GUR_ARMOR_M, 1);
B_GiveInvItems (self, other, GUR_ARMOR_M, 1);
Info_ClearChoices (DIA_Testowiec_HELLO1);
AI_StopProcessInfos (self);
};
FUNC VOID DIA_Testowiec_HELLO1_Zloto()
{
AI_Output (other, self ,"DIA_Testowiec_HELLO1_Zloto_15_01"); //Daj mi 100 sztuk złota.
AI_Output (self, other ,"DIA_Testowiec_HELLO1_Zloto_03_02"); //Trzymaj.
CreateInvItems (self, ItMi_Gold, 100);
B_GiveInvItems (self, other, ItMi_Gold, 100);
Info_ClearChoices (DIA_Testowiec_HELLO1);
AI_StopProcessInfos (self);
};
FUNC VOID DIA_Testowiec_HELLO1_JakieZwoje()
{
AI_Output (other, self ,"DIA_Testowiec_HELLO1_JakieZwoje_15_01"); //Jakie mogę wybrać zwoje?
AI_Output (self, other ,"DIA_Testowiec_HELLO1_JakieZwoje_03_02"); //Kulę ognia,przyzwanie wilka lub tchnienie śmierci po 5 sztuk.
Info_ClearChoices (DIA_Testowiec_HELLO1);
Info_ClearChoices (DIA_Testowiec_HELLO1);
Info_AddChoice (DIA_Testowiec_HELLO1, "Kula ognia.", DIA_Testowiec_HELLO1_JakieZwoje_KulaOgnia);
Info_AddChoice (DIA_Testowiec_HELLO1, "Tchnienie śmierci.", DIA_Testowiec_HELLO1_JakieZwoje_TchnienieSmierci);
Info_AddChoice (DIA_Testowiec_HELLO1, "Przyzwanie wilka.", DIA_Testowiec_HELLO1_JakieZwoje_PrzyzwanieWilka);
Info_AddChoice (DIA_Testowiec_HELLO1, "[WRÓĆ]", DIA_Testowiec_HELLO1_JakieZwoje_BACK);
};
FUNC VOID DIA_Testowiec_HELLO1_JakieZwoje_KulaOgnia()
{
CreateInvItems (self, ItSc_InstantFireball, 5);
B_GiveInvItems (self, other, ItSc_InstantFireball, 5);
Liczba = Liczba+1;
if (Liczba == 2)
{
Info_ClearChoices (DIA_Testowiec_HELLO1);
};
};
FUNC VOID DIA_Testowiec_HELLO1_JakieZwoje_TchnienieSmierci()
{
CreateInvItems (self, ItSc_BreathOfDeath, 5);
B_GiveInvItems (self, other, ItSc_BreathOfDeath, 5);
Liczba = Liczba+1;
if (Liczba == 2)
{
Info_ClearChoices (DIA_Testowiec_HELLO1);
};
};
FUNC VOID DIA_Testowiec_HELLO1_JakieZwoje_PrzyzwanieWilka()
{
CreateInvItems (self, ItSc_SumWolf, 5);
B_GiveInvItems (self, other, ItSc_SumWolf, 5);
Liczba = Liczba+1;
if (Liczba == 2)
{
Info_ClearChoices (DIA_Testowiec_HELLO1);
};
};
FUNC VOID DIA_Testowiec_HELLO1_JakieZwoje_BACK()
{
Info_ClearChoices (DIA_Testowiec_HELLO1);
Info_AddChoice (DIA_Testowiec_HELLO1, "Wezmę pancerz.", DIA_Testowiec_HELLO1_Pancerz);
Info_AddChoice (DIA_Testowiec_HELLO1, "Daj mi 100 sztuk złota.", DIA_Testowiec_HELLO1_Zloto);
Info_AddChoice (DIA_Testowiec_HELLO1, "Jakie mogę wybrać zwoje?", DIA_Testowiec_HELLO1_JakieZwoje);
};
//========================================
//-----------------> HELLO2
//========================================
INSTANCE DIA_Testowiec_HELLO2 (C_INFO)
{
npc = NONE_304_Testowiec;
nr = 2;
condition = DIA_Testowiec_HELLO2_Condition;
information = DIA_Testowiec_HELLO2_Info;
permanent = FALSE;
description = "Wielkie dzięki.";
};
FUNC INT DIA_Testowiec_HELLO2_Condition()
{
return TRUE;
};
FUNC VOID DIA_Testowiec_HELLO2_Info()
{
AI_Output (other, self ,"DIA_Testowiec_HELLO2_15_01"); //Wielkie dzięki.
AI_Output (self, other ,"DIA_Testowiec_HELLO2_03_02"); //Nie ma sprawy.
AI_Output (self, other ,"DIA_Testowiec_HELLO2_03_03"); //Masz tu wódkę.Mam wrażenie,że przyda ci się do jakiegoś zadania.
CreateInvItems (self, itfo_wodka, 2);
B_GiveInvItems (self, other, itfo_wodka, 2);
AI_Output (other, self ,"DIA_Testowiec_HELLO2_15_04"); //Do zobaczenia.
AI_StopProcessInfos (self);
};
Skrypt postaci raczej niepotrzebny,ale jakby co to napiszcie.