instance ItPl_Mushroom_02(C_Item)
{
name = "Мясной гриб ";
mainflag = ITEM_KAT_FOOD;
flags = ITEM_MULTI;
value = Value_Mushroom_02;
visual = "ItPl_Mushroom_02.3DS";
material = MAT_LEATHER;
on_state[0] = Use_Mushroom_02;
scemeName = "FOOD";
description = name;
text[1] = NAME_Bonus_HP;
count[1] = HP_Mushroom_02;
text[5] = NAME_Value;
count[5] = Value_Mushroom_02;
};
func void Use_Mushroom_02()
{
Npc_ChangeAttribute(self,ATR_HITPOINTS,HP_Mushroom_02);
if(Npc_IsPlayer(self))
{
Mushroom_02_Eaten = Mushroom_02_Eaten + 1;
if(Mushroom_02_Eaten == Mushroom_02_Eaten_MAX)
{
B_RaiseAttribute(self,ATR_MANA_MAX,10);
Npc_ChangeAttribute(self,ATR_MANA,10);
Snd_Play("LevelUp");
Mushroom_02_Eaten = 0;
};
};
};
instance ItPl_Blueplant(C_Item)
{
name = "Синее растение";
mainflag = ITEM_KAT_FOOD;
flags = ITEM_MULTI;
value = Value_Blueplant;
visual = "ItPl_Blueplant.3DS";
material = MAT_LEATHER;
on_state[0] = Use_Blueplant;
scemeName = "FOOD";
description = name;
text[1] = NAME_Bonus_HP;
count[1] = HP_Blueplant;
text[2] = NAME_Bonus_Mana;
count[2] = Mana_Blueplant;
text[5] = NAME_Value;
count[5] = Value_Blueplant;
};
func void Use_Blueplant()
{
Npc_ChangeAttribute(self,ATR_MANA,Mana_Blueplant);
Npc_ChangeAttribute(self,ATR_HITPOINTS,HP_Blueplant);
if(Npc_IsPlayer(self))
{
Blueplant_Eaten = Blueplant_Eaten + 1;
if(Blueplant_Eaten == Blueplant_Eaten_MAX)
{
B_RaiseAttribute(self,ATR_HITPOINTS_MAX,5);
Npc_ChangeAttribute(self,ATR_HITPOINTS,5);
B_RaiseAttribute(self,ATR_MANA_MAX,5);
Npc_ChangeAttribute(self,ATR_MANA,5);
Snd_Play("LevelUp");
Blueplant_Eaten = 0;
};
};
};
instance ItPl_Forestberry(C_Item)
{
name = "Лесная ягода ";
mainflag = ITEM_KAT_FOOD;
flags = ITEM_MULTI;
value = Value_Forestberry;
visual = "ItPl_Forestberry.3DS";
material = MAT_LEATHER;
scemeName = "FOOD";
on_state[0] = Use_Forestberry;
description = name;
text[1] = NAME_Bonus_HP;
count[1] = HP_Forestberry;
text[5] = NAME_Value;
count[5] = Value_Forestberry;
};
func void Use_Forestberry()
{
Npc_ChangeAttribute(self,ATR_HITPOINTS,HP_Forestberry);
if(Npc_IsPlayer(self))
{
Forestberry_Eaten = Forestberry_Eaten + 1;
if(Forestberry_Eaten == Forestberry_Eaten_MAX)
{
B_RaiseAttribute(self,ATR_HITPOINTS_MAX,10);
Npc_ChangeAttribute(self,ATR_HITPOINTS,HP_Forestberry);
Snd_Play("LevelUp");
Forestberry_Eaten = 0;
};
};
};
instance ItPl_Planeberry(C_Item)
{
name = "Дикая ягода ";
mainflag = ITEM_KAT_FOOD;
flags = ITEM_MULTI;
value = Value_Planeberry;
visual = "ItPl_Planeberry.3DS";
material = MAT_LEATHER;
scemeName = "FOOD";
on_state[0] = Use_Planeberry;
description = name;
text[1] = NAME_Bonus_HP;
count[1] = HP_Planeberry;
text[5] = NAME_Value;
count[5] = Value_Planeberry;
};
func void Use_Planeberry()
{
Npc_ChangeAttribute(self,ATR_HITPOINTS,HP_Planeberry);
if(Npc_IsPlayer(self))
{
Planeberry_Eaten = Planeberry_Eaten + 1;
if(Planeberry_Eaten == Planeberry_Eaten_MAX)
{
B_RaiseAttribute(self,ATR_HITPOINTS_MAX,10);
Npc_ChangeAttribute(self,ATR_HITPOINTS,10);
Snd_Play("LevelUp");
Planeberry_Eaten = 0;
};
};
};