Chciałby w g1 zrobić podobną rzecz jak w g2. Chodzi mi Wasilij który zbierał stare monety. Udało mi się napisać skrypt że npc bierze monety i daje w zamian rude, ale niestety tylko pojedynczo. Jak zrobić tak żeby, skrypt działał tak jak w g2. Żeby npc brał wszystkie monety na raz i dawał rude w zależności od ilości monet. Tak wygląda mój skrypt.
// **************************************
// EXIT
// **************************************
instance DIA_Aulus_EXIT (C_INFO)
{
npc = Non_7000_Aulus;
nr = 999;
condition = DIA_Aulus_Exit_Condition;
information = DIA_Aulus_Exit_Info;
permanent = 1;
description = DIALOG_ENDE;
};
FUNC int DIA_Aulus_Exit_Condition()
{
return 1;
};
FUNC VOID DIA_Aulus_Exit_Info()
{
AI_StopProcessInfos (self);
};
// **************************************
// Hello
// **************************************
INSTANCE DIA_Aulus_Hello (C_INFO)
{
npc = Non_7000_Aulus;
nr = 1;
condition = DIA_Aulus_Hello_Condition;
information = DIA_Aulus_Hello_Info;
permanent = 0;
description = "Kim jesteś?";
};
FUNC INT DIA_Aulus_Hello_Condition()
{
return 1;
};
FUNC VOID DIA_Aulus_Hello_Info()
{
AI_Output (other, self,"DIA_Aulus_Hello_15_00"); //Kim jesteś?
AI_Output (self, other,"DIA_Aulus_Hello_13_01"); //Jestem Aulus.
};
// **************************************
// monety
// **************************************
INSTANCE DIA_Aulus_monety (C_INFO)
{
npc = Non_7000_Aulus;
nr = 1;
condition = DIA_Aulus_monety_Condition;
information = DIA_Aulus_monety_Info;
permanent = 0;
description = "Potrzebujesz czegoś";
};
FUNC INT DIA_Aulus_monety_Condition()
{
if(Npc_Knowsinfo(other,DIA_Aulus_Hello))
{
return 1;
};
};
FUNC VOID DIA_Aulus_monety_Info()
{
AI_Output (other, self,"DIA_Aulus_monety_15_00"); //Potrzebujesz czegoś?
AI_Output (self, other,"DIA_Aulus_monety_13_01"); //Zbieram stare monety.
AI_Output (self, other,"DIA_Aulus_monety_13_02"); //Dam ci rude za każdą monete którą mi przyniesiesz.
};
// **************************************
// koniec
// **************************************
INSTANCE DIA_Aulus_koniec (C_INFO)
{
npc = Non_7000_Aulus;
nr = 1;
condition = DIA_Aulus_koniec_Condition;
information = DIA_Aulus_koniec_Info;
permanent = 1;
description = "Mam monety";
};
FUNC INT DIA_Aulus_koniec_Condition()
{
if(Npc_Knowsinfo(other,DIA_Aulus_Hello))
&&(Npc_hasitems(other, ItMi_Stuff_OldCoin_01) >=1)
{
return 1;
};
};
FUNC VOID DIA_Aulus_koniec_Info()
{
AI_Output (other, self,"DIA_Aulus_koniec_15_00"); //Mam monety
AI_Output (self, other,"DIA_Aulus_koniec_13_01"); //Tak o takie mi chodziło.
AI_Output (self, other,"DIA_Aulus_koniec_13_02"); //Wez tą rude w zamian.
B_giveinvitems(other,self,ItMi_Stuff_OldCoin_01, 1);
Createinvitems(self,ItMiNugget,1);
B_giveinvitems(self,other,ItMiNugget,1);
};
// **************************************
// koniec2
// **************************************
INSTANCE DIA_Aulus_koniec2 (C_INFO)
{
npc = Non_7000_Aulus;
nr = 2;
condition = DIA_Aulus_koniec2_Condition;
information = DIA_Aulus_koniec2_Info;
permanent = 1;
description = "Mam monety";
};
FUNC INT DIA_Aulus_koniec2_Condition()
{
if(Npc_Knowsinfo(other,DIA_Aulus_Hello))
&&(Npc_hasitems(other, ItMi_Stuff_OldCoin_02) >=1)
{
return 1;
};
};
FUNC VOID DIA_Aulus_koniec2_Info()
{
AI_Output (other, self,"DIA_Aulus_koniec2_15_00"); //Mam monety
AI_Output (self, other,"DIA_Aulus_koniec2_13_01"); //Tak o takie mi chodziło.
AI_Output (self, other,"DIA_Aulus_koniec2_13_02"); //Wez tą rude w zamian.
B_giveinvitems(other,self,ItMi_Stuff_OldCoin_02, 1);
Createinvitems(self,ItMiNugget,1);
B_giveinvitems(self,other,ItMiNugget,1);
};