Siema.Mam takie pytanie/problem.Chcę w dialogu dać następne zadanie,które pojawi się tylko wtedy,gdy poprzednie zostało wykonane.Wklejam skrypt wykonanego zadania i tego,które bym chciał,aby było.
//========================================
//-----------------> HELLO3
//========================================
INSTANCE DIA_Druid_HELLO3 (C_INFO)
{
npc = BAU_985_Druid;
nr = 3;
condition = DIA_Druid_HELLO3_Condition;
information = DIA_Druid_HELLO3_Info;
permanent = FALSE;
description = "Mam dla ciebie jedzenie.";
};
FUNC INT DIA_Druid_HELLO3_Condition()
{
if (Npc_KnowsInfo (other, DIA_Druid_HELLO2))
&& (Npc_HasItems (other, ItFo_Beer) >=1)
&& (Npc_HasItems (other, ItFo_Cheese) >=1)
&& (Npc_HasItems (other, ItFo_Bread) >=1)
{
return TRUE;
};
};
FUNC VOID DIA_Druid_HELLO3_Info()
{
AI_Output (other, self ,"DIA_Druid_HELLO3_15_01"); //Mam dla ciebie jedzenie.
AI_Output (self, other ,"DIA_Druid_HELLO3_03_02"); //Przyniosłeś wszystko,o co prosiłem?
AI_Output (other, self ,"DIA_Druid_HELLO3_15_03"); //Oczywiście.Chleb.
B_GiveInvItems (other, self, ItFo_Bread, 1);
B_UseItem (self, ItFo_Bread);
AI_Output (self, other ,"DIA_Druid_HELLO3_03_04"); //Pyszny.
AI_Output (other, self ,"DIA_Druid_HELLO3_15_05"); //Kawałek sera.
B_GiveInvItems (other, self, ItFo_Cheese, 1);
B_UseItem (self, ItFo_Cheese);
AI_Output (self, other ,"DIA_Druid_HELLO3_03_06"); //Mmmm...gouda.
AI_Output (other, self ,"DIA_Druid_HELLO3_15_07"); //I piwo.
B_GiveInvItems (other, self, ItFo_Beer, 1);
B_UseItem (self, ItFo_Beer);
AI_Output (self, other ,"DIA_Druid_HELLO3_03_08"); //Ahhh...schłodzone.
AI_Output (other, self ,"DIA_Druid_HELLO3_15_09"); //To wszystko.
AI_Output (self, other ,"DIA_Druid_HELLO3_03_10"); //Wielkie dzięki.Przyjmij w nagrodę 1000 sztuk złota.
CreateInvItems (self, ItMi_Gold, 1000);
B_GiveInvItems (self, other, ItMi_Gold, 1000);
B_LogEntry (TOPIC_Druid_Food,"Przyniosłem jedzenie i dostałem swoją nagrodę.");
Log_SetTopicStatus (TOPIC_Druid_Food, LOG_SUCCESS);
B_GivePlayerXP (300);
AI_StopProcessInfos (self);
};
//========================================
//-----------------> HELLO4
//========================================
INSTANCE DIA_Druid_HELLO4 (C_INFO)
{
npc = BAU_985_Druid;
nr = 4;
condition = DIA_Druid_HELLO4_Condition;
information = DIA_Druid_HELLO4_Info;
permanent = FALSE;
description = "Masz dla mnie jeszcze jakieś zadanie?";
};
FUNC INT DIA_Druid_HELLO4_Condition()
{
if (MIS_Druid_Food == LOG_SUCCESS)
{
return TRUE;
};
};
FUNC VOID DIA_Druid_HELLO4_Info()
{
AI_Output (other, self ,"DIA_Druid_HELLO4_15_01"); //Masz dla mnie jeszcze jakieś zadanie?
AI_Output (self, other ,"DIA_Druid_HELLO4_03_02"); //Tak.Przynieś mi sztylet.
AI_Output (other, self ,"DIA_Druid_HELLO4_15_03"); //Ok.
Log_CreateTopic (TOPIC_Druid_Weapon, LOG_MISSION);
Log_SetTopicStatus (TOPIC_Druid_Weapon, LOG_RUNNING);
B_LogEntry (TOPIC_Druid_Weapon,"Teraz muszę przynieść sztylet.");
AI_Output (self, other ,"DIA_Druid_HELLO4_03_04"); //Nie śpiesz się.
AI_StopProcessInfos (self);
};
Akurat problem jest tylko z tym MIS_Druid_Food,ponieważ przy próbie naprawy skryptów spacerem wyskakuje błąd następującej treści:
U:PAR: \_WORK\DATA\SCRIPTS\CONTENT\STORY\DIALOGE\DIA_BAU_985_DRUID.D: Unknown identifier: MIS_DRUID_FOOD.
Jak usunę ten kawałek to nie ma błędu...