[G2:NK]Problem ze skryptem dialogu 1906 6

O temacie

Autor Graveir

Zaczęty 27.06.2010 roku

Wyświetleń 1906

Odpowiedzi 6

Graveir

Graveir

Użytkownicy
Avatar Twilight Sparkle / Pożeracz serc
posty1275
Propsy235
ProfesjaGracz
  • Użytkownicy
  • Avatar Twilight Sparkle / Pożeracz serc
Tak jak w nazwie i opisie tematu-nie mogę wykonać zadania,mimo,że mam wymaganą ilość przedmitów i spełniam wszystkie warunki.Podaję skrypt(ostrzegam dość długi):
//========================================
//-----------------> OPCJA *KONIEC*
//========================================

INSTANCE DIA_Marian_EXIT(C_INFO)
{
npc = VLK_4400_Marian;
nr = 999;
condition = DIA_Marian_EXIT_Condition;
information = DIA_Marian_EXIT_Info;
permanent = TRUE;
description = "KONIEC";
};

FUNC INT DIA_Marian_EXIT_Condition()
{
return TRUE;
};

FUNC VOID DIA_Marian_EXIT_Info()
{
AI_StopProcessInfos (self);
};

//========================================
//-----------------> HELLO1
//========================================

INSTANCE DIA_Marian_HELLO1 (C_INFO)
{
   npc = VLK_4400_Marian;
   nr = 1;
   condition = DIA_Marian_HELLO1_Condition;
   information = DIA_Marian_HELLO1_Info;
   permanent = FALSE;
   description = "Kim jesteś?";
};

FUNC INT DIA_Marian_HELLO1_Condition()
{
return TRUE;
};

FUNC VOID DIA_Marian_HELLO1_Info()
{
AI_Output (other, self ,"DIA_Marian_HELLO1_15_01"); //Kim jesteś?
AI_Output (self, other ,"DIA_Marian_HELLO1_03_02"); //Nazywam się Marian.Jestem w odwiedzinach u swojego znajomego Farima.
AI_Output (other, self ,"DIA_Marian_HELLO1_15_03"); //Aha rozumiem.Masz jakieś ciekawe rzeczy do roboty?
AI_Output (self, other ,"DIA_Marian_HELLO1_03_04"); //Nie za bardzo.Jedynie pilnuje,by żadna bestia nie zaatakowała w nocy.
AI_Output (other, self ,"DIA_Marian_HELLO1_15_05"); //Masz dla mnie jakieś zadanie?
AI_Output (self, other ,"DIA_Marian_HELLO1_03_06"); //Tak mam.Idź mi kup 5 ryb u Halvora.
AI_Output (self, other ,"DIA_Marian_HELLO1_03_07"); //Tu masz kasę.Resztę możesz sobie wziąść.
CreateInvItems (self, ItMi_Gold, 200);
B_GiveInvItems (self, other, ItMi_Gold, 200);
AI_Output (other, self ,"DIA_Marian_HELLO1_15_08"); //No to idę na zakupy.
var int MIS_Ryby_Od_Halvora;
MIS_Ryby_Od_Halvora = LOG_RUNNING;

Log_CreateTopic (TOPIC_Ryby_Od_Halvora, LOG_MISSION);
Log_SetTopicStatus   (TOPIC_Ryby_Od_Halvora, LOG_RUNNING);
B_LogEntry (TOPIC_Ryby_Od_Halvora,"Muszę kupić Marianowi 5 ryb u Halvora-resztę mogę sobie zatrzymać.");
AI_StopProcessInfos (self);

};

//========================================
//-----------------> HELLO2
//========================================

INSTANCE DIA_Marian_HELLO2 (C_INFO)
{
   npc = VLK_4400_Marian;
   nr = 2;
   condition = DIA_Marian_HELLO2_Condition;
   information = DIA_Marian_HELLO2_Info;
   permanent = FALSE;
   description = "Mam ryby.";
};

FUNC INT DIA_Marian_HELLO2_Condition()
{
if (Npc_KnowsInfo (other, DIA_Marian_HELLO1))
&& (MIS_Ryby_Od_Halvora == LOG_RUNNING)
&& (Npc_HasItems (other, ItFo_Fish) >=5)
{
return TRUE;
};
};


FUNC VOID DIA_Marian_HELLO2_Info()
{
AI_Output (other, self ,"DIA_Marian_HELLO2_15_01"); //Mam ryby.
AI_Output (self, other ,"DIA_Marian_HELLO2_03_02"); //To świetnie.Mam nadzieję,że są świeże.
B_GiveInvItems (other, self, Itfo_Fish, 5);
AI_Output (other, self ,"DIA_Marian_HELLO2_15_03"); //Oczywiście.
AI_Output (self, other ,"DIA_Marian_HELLO2_03_04"); //No faktycznie wyglądają świeżo.
B_UseItem (self, ItFo_Fish);
AI_Output (other, self ,"DIA_Marian_HELLO2_15_05"); //Należy mi się chyba jakaś nagroda?
AI_Output (self, other ,"DIA_Marian_HELLO2_03_06"); //Oczywiście.
AI_Output (self, other ,"DIA_Marian_HELLO2_03_07"); //Dam ci zwój z czarem sen oraz 100 sztuk złota.
CreateInvItems (self, ItMi_Gold, 100);
B_GiveInvItems (self, other, ItMi_Gold, 100);
CreateInvItems (self, ItSc_Sleep, 1);
B_GiveInvItems (self, other, ItSc_Sleep, 1);
AI_Output (other, self ,"DIA_Marian_HELLO2_15_08"); //Dzięki.
B_LogEntry (TOPIC_Ryby_Od_Halvora,"Otrzymałem w nagrodę zwój z czarem sen i 100 sztuk złota.");
Log_SetTopicStatus   (TOPIC_Ryby_Od_Halvora, LOG_SUCCESS);
MIS_Ryby_Od_Halvora = LOG_SUCCESS;

B_GivePlayerXP (100);
AI_StopProcessInfos (self);

};

//========================================
//-----------------> HELLO3
//========================================

INSTANCE DIA_Marian_HELLO3 (C_INFO)
{
   npc = VLK_4400_Marian;
   nr = 3;
   condition = DIA_Marian_HELLO3_Condition;
   information = DIA_Marian_HELLO3_Info;
   permanent = FALSE;
   description = "Może się napijemy piwa?";
};

FUNC INT DIA_Marian_HELLO3_Condition()
{
if (Npc_KnowsInfo (other, DIA_Marian_HELLO2))
{
return TRUE;
};
};


FUNC VOID DIA_Marian_HELLO3_Info()
{
AI_Output (other, self ,"DIA_Marian_HELLO3_15_01"); //Może się napijemy piwa?
AI_Output (self, other ,"DIA_Marian_HELLO3_03_02"); //Oczywiście.Ja stawiam.
CreateInvItems (self, ItFo_Beer, 2);
AI_Output (self, other ,"DIA_Marian_HELLO3_03_03"); //Trzymaj.
CreateInvItems (self, ItFo_Beer, 1);
B_GiveInvItems (self, other, ItFo_Beer, 1);
AI_Output (other, self ,"DIA_Marian_HELLO3_15_04"); //Dzięki.No to twoje zdrowie!
B_UseItem (self, ItFo_Beer);
B_UseItem (other, ItFo_Beer);
AI_Output (self, other ,"DIA_Marian_HELLO3_03_05"); //Do zobaczenia.
AI_StopProcessInfos (self);

};

//========================================
//-----------------> HELLO4
//========================================

INSTANCE DIA_Marian_HELLO4 (C_INFO)
{
   npc = VLK_4400_Marian;
   nr = 4;
   condition = DIA_Marian_HELLO4_Condition;
   information = DIA_Marian_HELLO4_Info;
   permanent = FALSE;
   description = "Masz dla mnie jeszcze jakieś zadanie?";
};

FUNC INT DIA_Marian_HELLO4_Condition()
{
if (MIS_Ryby_Od_Halvora == LOG_SUCCESS)
&& (Npc_KnowsInfo (other, DIA_Marian_HELLO3))
{
return TRUE;
};
};


FUNC VOID DIA_Marian_HELLO4_Info()
{
AI_Output (other, self ,"DIA_Marian_HELLO4_15_01"); //Masz dla mnie jeszcze jakieś zadanie?
AI_Output (self, other ,"DIA_Marian_HELLO4_03_02"); //Tak.Jeśli mi przyniesiesz parę rzeczy to dostaniesz w nagrodę runy.
AI_Output (other, self ,"DIA_Marian_HELLO4_15_03"); //Nie ma sprawy.Co mam przynieść?
AI_Output (self, other ,"DIA_Marian_HELLO4_03_04"); //Przynieś mi bochen chleba,surowe mięso,wino i kawałek sera.
var int MIS_Zdobyć_Jedzenie;
MIS_Zdobyć_Jedzenie = LOG_RUNNING;

Log_CreateTopic (TOPIC_Zdobyć_Jedzenie, LOG_MISSION);
Log_SetTopicStatus   (TOPIC_Zdobyć_Jedzenie, LOG_RUNNING);
B_LogEntry (TOPIC_Zdobyć_Jedzenie,"Muszę przynieść Marianowi bochen chleba,wino,kawałek sera i surowe mięso.");
AI_Output (other, self ,"DIA_Marian_HELLO4_15_05"); //Ruszam do sklepu.
AI_StopProcessInfos (self);

};

//========================================
//-----------------> HELLO5
//========================================

INSTANCE DIA_Marian_HELLO5 (C_INFO)
{
   npc = VLK_4400_Marian;
   nr = 5;
   condition = DIA_Marian_HELLO5_Condition;
   information = DIA_Marian_HELLO5_Info;
   permanent = FALSE;
   description = "Zdobyłem pożywienie.";
};

FUNC INT DIA_Marian_HELLO5_Condition()
{
if (Npc_KnowsInfo (other, DIA_Marian_HELLO4))
&& (Npc_HasItems (other, ItFo_Wine) >=1)
&& (Npc_HasItems (other, ItFo_Cheese) >=1)
&& (Npc_HasItems (other, ItFo_Bread) >=1)
&& (Npc_HasItems (other, ItFoMuttonRaw) >=1)
{
return TRUE;
};
};


FUNC VOID DIA_Marian_HELLO5_Info()
{
AI_Output (other, self ,"DIA_Marian_HELLO5_15_01"); //Zdobyłem pożywienie.
B_GiveInvItems (other, self, ItFoMuttonRaw, 1);
B_GiveInvItems (other, self, ItFo_Cheese, 1);
B_GiveInvItems (other, self, ItFo_Bread, 1);
B_GiveInvItems (other, self, ItFo_Wine, 1);
AI_Output (self, other ,"DIA_Marian_HELLO5_03_02"); //Świetnie.Masz tu runę ognista strzała i leczenie lekkich ran.
CreateInvItems (self, ItRu_LightHeal, 1);
B_GiveInvItems (self, other, ItRu_LightHeal, 1);
CreateInvItems (self, ItRu_FireBolt, 1);
B_GiveInvItems (self, other, ItRu_FireBolt, 1);
B_LogEntry (TOPIC_Zdobyć_Jedzenie,"Zadanie wykonane,a nagroda odebrana.");
Log_SetTopicStatus   (TOPIC_Zdobyć_Jedzenie, LOG_SUCCESS);
MIS_Zdobyć_Jedzenie = LOG_SUCCESS;

B_GivePlayerXP (450);
AI_StopProcessInfos (self);

};

//========================================
//-----------------> HELLO6
//========================================

INSTANCE DIA_Marian_HELLO6 (C_INFO)
{
   npc = VLK_4400_Marian;
   nr = 6;
   condition = DIA_Marian_HELLO6_Condition;
   information = DIA_Marian_HELLO6_Info;
   permanent = FALSE;
   Important   = TRUE;
};

FUNC INT DIA_Marian_HELLO6_Condition()
{
if (Npc_KnowsInfo (other, DIA_Marian_HELLO5))
&& (MIS_Zdobyć_Jedzenie == LOG_SUCCESS)
{
return TRUE;
};
};


FUNC VOID DIA_Marian_HELLO6_Info()
{
AI_Output (self, other ,"DIA_Marian_HELLO6_03_01"); //Mam dla ciebie ostatnie zadanie.
AI_Output (other, self ,"DIA_Marian_HELLO6_15_02"); //Słucham.
AI_Output (self, other ,"DIA_Marian_HELLO6_03_03"); //Musisz znaleźć mój list,który zgubiłem.
AI_Output (other, self ,"DIA_Marian_HELLO6_15_04"); //Cholera.Dużo szukania się szykuje.
AI_Output (self, other ,"DIA_Marian_HELLO6_03_05"); //Myślę,że nie.
AI_Output (self, other ,"DIA_Marian_HELLO6_03_06"); //Zgubiłem go tutaj,w porcie.
AI_Output (other, self ,"DIA_Marian_HELLO6_15_07"); //A to inaczej się słyszy.Idę na poszukiwanie.
AI_Output (self, other ,"DIA_Marian_HELLO6_03_08"); //Masz tu runę światła-może ci pomóc hehe.
CreateInvItems (self, ItRu_Light, 1);
B_GiveInvItems (self, other, ItRu_Light, 1);
var int MIS_List_Mariana;
MIS_List_Mariana = LOG_RUNNING;

Log_CreateTopic (TOPIC_List_Mariana, LOG_MISSION);
Log_SetTopicStatus   (TOPIC_List_Mariana, LOG_RUNNING);
B_LogEntry (TOPIC_List_Mariana,"Muszę odnaleźć list,który został zgubiony przez Mariana.");
AI_StopProcessInfos (self);

};

//========================================
//-----------------> HELLO7
//========================================

INSTANCE DIA_Marian_HELLO7 (C_INFO)
{
   npc = VLK_4400_Marian;
   nr = 7;
   condition = DIA_Marian_HELLO7_Condition;
   information = DIA_Marian_HELLO7_Info;
   permanent = FALSE;
   description = "Mam list.";
};

FUNC INT DIA_Marian_HELLO7_Condition()
{
if (Npc_KnowsInfo (other, DIA_Marian_HELLO6))
&& (Npc_HasItems (other, itwr_list_mariana) >=1)
{
return TRUE;
};
};


FUNC VOID DIA_Marian_HELLO7_Info()
{
AI_Output (other, self ,"DIA_Marian_HELLO7_15_01"); //Mam list.
AI_Output (self, other ,"DIA_Marian_HELLO7_03_02"); //To świetnie.Dawaj go.
AI_Output (other, self ,"DIA_Marian_HELLO7_15_03"); //Trzymaj.
B_GiveInvItems (other, self, itwr_list_mariana, 1);
AI_Output (self, other ,"DIA_Marian_HELLO7_03_04"); //O dzięki.Ratujesz mi życie.
B_LogEntry (TOPIC_List_Mariana,"Odnalazłem list.Mam nadzieję,że dostanę jakąś nagrodę.");
Log_SetTopicStatus   (TOPIC_List_Mariana, LOG_SUCCESS);
MIS_List_Mariana = LOG_SUCCESS;

B_GivePlayerXP (600);
AI_Output (other, self ,"DIA_Marian_HELLO7_15_05"); //Należy mi się chyba coś za odnalezienie listu?
AI_Output (self, other ,"DIA_Marian_HELLO7_03_06"); //Ależ oczywiście.
AI_Output (self, other ,"DIA_Marian_HELLO7_03_07"); //Masz tu 50 sztuk złota i 10 łodyg bagiennego ziela.
CreateInvItems (self, ItMi_Gold, 50);
B_GiveInvItems (self, other, ItMi_Gold, 50);
CreateInvItems (self, ItMi_Joint, 10);
B_GiveInvItems (self, other, ItMi_Joint, 10);
AI_Output (self, other ,"DIA_Marian_HELLO7_03_08"); //Do zobaczenia.
AI_StopProcessInfos (self);
};
Edit:Spacer nie znajduje żadnych błędów.
 
Mój obecny sprzęt PC:
Intel core i5-4590
8 gb ram
Geforce GTX 1050Ti

Adanos

Adanos

Administrator
Szara eminencja
posty5204
Propsy3870
ProfesjaProgramista
  • Administrator
  • Szara eminencja
Ale konkrety proszę. Co jest źle i jak ma działać?

Graveir

Graveir

Użytkownicy
Avatar Twilight Sparkle / Pożeracz serc
posty1275
Propsy235
ProfesjaGracz
  • Użytkownicy
  • Avatar Twilight Sparkle / Pożeracz serc
Ale konkrety proszę. Co jest źle i jak ma działać?
Konkrety?Np.część 1 dialogu-czyli dostajemy zadanie zdobycia 5 ryb i przekazanie go npc#msgote author=Adanos link=topic=10587.msg100801#msg100801 date=1277662808]Ale konkrety proszę. Co jest źle i jak ma działać?[/quote]
Konkrety?Np.część 1 dialogu-czyli dostajemy zadanie zdobycia 5 ryb i przekazanie go npcowi.Problem w tym,że mam w ekwipunku 5 ryb,ale nie ma opcji dialogowej,która powinna być.
 
Mój obecny sprzęt PC:
Intel core i5-4590
8 gb ram
Geforce GTX 1050Ti

Adanos

Adanos

Administrator
Szara eminencja
posty5204
Propsy3870
ProfesjaProgramista
  • Administrator
  • Szara eminencja
FUNC INT DIA_Marian_HELLO2_Condition()
{
if (Npc_KnowsInfo (other, DIA_Marian_HELLO1))
&& (MIS_Ryby_Od_Halvora == LOG_RUNNING)
&& (Npc_HasItems (other, ItFo_Fish) >=5)
{
return TRUE;
};
};
Po co tyle tych warunków? Daj tak i powinno być dobrze:
FUNC INT DIA_Marian_HELLO2_Condition()
{
if (Npc_KnowsInfo (other, DIA_Marian_HELLO1))
&& (Npc_HasItems (other, ItFo_Fish) >=5)
{
return TRUE;
};
};

Graveir

Graveir

Użytkownicy
Avatar Twilight Sparkle / Pożeracz serc
posty1275
Propsy235
ProfesjaGracz
  • Użytkownicy
  • Avatar Twilight Sparkle / Pożeracz serc
A jesteś pewien,że nie da rady zrobić tak by działało,ale w warunku było rozpoczęcie zadania?
 
Mój obecny sprzęt PC:
Intel core i5-4590
8 gb ram
Geforce GTX 1050Ti

Adanos

Adanos

Administrator
Szara eminencja
posty5204
Propsy3870
ProfesjaProgramista
  • Administrator
  • Szara eminencja
Ale po co? Możesz pobawić się jeszcze rozstawieniem nawiasów (dodać nawiasy):
FUNC INT DIA_Marian_HELLO2_Condition()
{
if ((Npc_KnowsInfo (other, DIA_Marian_HELLO1))
&& (MIS_Ryby_Od_Halvora == LOG_RUNNING)
&& (Npc_HasItems (other, ItFo_Fish) >=5))
{
return TRUE;
};
};

Graveir

Graveir

Użytkownicy
Avatar Twilight Sparkle / Pożeracz serc
posty1275
Propsy235
ProfesjaGracz
  • Użytkownicy
  • Avatar Twilight Sparkle / Pożeracz serc
Ale po co? Możesz pobawić się jeszcze rozstawieniem nawiasów (dodać nawiasy):
FUNC INT DIA_Marian_HELLO2_Condition()
{
if ((Npc_KnowsInfo (other, DIA_Marian_HELLO1))
&& (MIS_Ryby_Od_Halvora == LOG_RUNNING)
&& (Npc_HasItems (other, ItFo_Fish) >=5))
{
return TRUE;
};
};
I to teoretycznie mogłoby pomóc?A cel tych warunków to taki,by zadanie pojawiło się dopiero,gdy poprzednie zostało wykonane-czyli coś jakby wykonanie zadania dla nowicjusza w obozie na bagnach(tego co trzeba skopać tyłek jakiemuś leniwemu nowicjuszowi).
 
Mój obecny sprzęt PC:
Intel core i5-4590
8 gb ram
Geforce GTX 1050Ti


0 użytkowników i 1 Gość przegląda ten wątek.
0 użytkowników
Do góry