instance PC_MAKE_BENNET_1H(C_Info)
{
npc = PC_Hero;
nr = 1;
condition = pc_make_bennet_1h_condition;
information = pc_make_bennet_1h_info;
permanent = TRUE;
description = "Ковать кошерные мечи";
};
func int pc_make_bennet_1h_condition()
{
if((PLAYER_MOBSI_PRODUCTION == MOBSI_SmithWeapon) && (Bennet_TeachSmith == TRUE == 1) && (SMITH_ARMOR_VAR != 1))
{
return TRUE;
};
};
func void pc_make_bennet_1h_info()
{
Info_ClearChoices(pc_make_bennet_1h);
Info_AddChoice(pc_make_bennet_1h,DIALOG_ENDE_WORK,PC_SmithWeapon_End_Info);
if(BENNET_1H_1 == 1)
{
Info_AddChoice(pc_make_bennet_1h,"Сделать [Простой меч наемника]",pc_makeweapon_bennet_1h_1);
};
if(BENNET_1H_2 == 1)
{
Info_AddChoice(pc_make_bennet_1h,"Сделать [Тяжелый меч наемника]",pc_makeweapon_bennet_1h_2);
};
if(BENNET_1H_3 == 1)
{
Info_AddChoice(pc_make_bennet_1h,"Сделать [Кошерный меч наемника]",pc_makeweapon_bennet_1h_3);
};
if(BENNET_1H_4 == 1)
{
Info_AddChoice(pc_make_bennet_1h,"Сделать [Маленький убийца]",pc_makeweapon_bennet_1h_4);
};
if(BENNET_1H_5 == 1)
{
Info_AddChoice(pc_make_bennet_1h,"Сделать [Большой убийца]",pc_makeweapon_bennet_1h_5);
};
};
func void pc_makeweapon_bennet_1h_1()
{
if((Npc_HasItems(hero,ItMiSwordblade) >= 1) && (Npc_HasItems(hero,ItMiSwordrawhot) >= 4))
{
CreateInvItems(self,itmw_bennet_1h_1,1);
Npc_RemoveInvItems(self,ItMiSwordblade,1);
Npc_RemoveInvItems(self,ItMiSwordrawhot,4);
AI_PrintScreen("Меч 'Прстой меч наемника' готов!",-1,YPOS_ItemGiven,FONT_ScreenSmall,2);
B_Say(self,self,"$ITEMREADY");
b_endproductiondialog();
};
[B][COLOR="Red"]else[/COLOR][/B]
{
AI_PrintScreen(PRINT_ProdItemsMissing,-1,YPOS_ItemGiven,FONT_ScreenSmall,2);
B_Say(self,self,"$MISSINGINGREDIENTS");
b_endproductiondialog();
CreateInvItems(self,ItMiSwordrawhot,1);
}
};
func void pc_makeweapon_bennet_1h_2()
{
if((Npc_HasItems(hero,ItMiSwordblade) >= 2) && (Npc_HasItems(hero,ItMiSwordrawhot) >= 4))
{
CreateInvItems(self,itmw_bennet_1h_2,1);
Npc_RemoveInvItems(self,ItMiSwordblade,2);
Npc_RemoveInvItems(self,ItMiSwordrawhot,4);
AI_PrintScreen("Меч 'Тяжелый меч наемника' готов!",-1,YPOS_ItemGiven,FONT_ScreenSmall,2);
B_Say(self,self,"$ITEMREADY");
b_endproductiondialog();
}
else
{
AI_PrintScreen(PRINT_ProdItemsMissing,-1,YPOS_ItemGiven,FONT_ScreenSmall,2);
B_Say(self,self,"$MISSINGINGREDIENTS");
b_endproductiondialog();
CreateInvItems(self,ItMiSwordrawhot,1);
};
};
func void pc_makeweapon_bennet_1h_3()
{
if((Npc_HasItems(hero,ItMiSwordrawhot) >= 9) && (Npc_HasItems(hero,ItMi_Nugget) >= 10))
{
CreateInvItems(self,itmw_bennet_1h_3,1);
Npc_RemoveInvItems(self,ItMiSwordrawhot,9);
Npc_RemoveInvItems(self,ItMi_Nugget,10);
AI_PrintScreen("Меч 'Кошерный меч наемника' готов!",-1,YPOS_ItemGiven,FONT_ScreenSmall,2);
B_Say(self,self,"$ITEMREADY");
b_endproductiondialog();
}
else
{
AI_PrintScreen(PRINT_ProdItemsMissing,-1,YPOS_ItemGiven,FONT_ScreenSmall,2);
B_Say(self,self,"$MISSINGINGREDIENTS");
b_endproductiondialog();
CreateInvItems(self,ItMiSwordrawhot,1);
};
};
func void pc_makeweapon_bennet_1h_4()
{
if((Npc_HasItems(hero,ItMiSwordrawhot) >= 9) && (Npc_HasItems(hero,ItMi_Nugget) >= 15))
{
CreateInvItems(self,itmw_bennet_1h_4,1);
Npc_RemoveInvItems(self,ItMiSwordrawhot,9);
Npc_RemoveInvItems(self,ItMi_Nugget,15);
AI_PrintScreen("Меч 'Маленький убийца' готов!",-1,YPOS_ItemGiven,FONT_ScreenSmall,2);
B_Say(self,self,"$ITEMREADY");
b_endproductiondialog();
}
else
{
AI_PrintScreen(PRINT_ProdItemsMissing,-1,YPOS_ItemGiven,FONT_ScreenSmall,2);
B_Say(self,self,"$MISSINGINGREDIENTS");
b_endproductiondialog();
CreateInvItems(self,ItMiSwordrawhot,1);
};
};
func void pc_makeweapon_bennet_1h_5()
{
if((Npc_HasItems(hero,ItMiSwordrawhot) >= 9) && (Npc_HasItems(hero,ItMi_Nugget) >= 20))
{
CreateInvItems(self,itmw_bennet_1h_5,1);
Npc_RemoveInvItems(self,ItMiSwordrawhot,9);
Npc_RemoveInvItems(self,ItMi_Nugget,20);
AI_PrintScreen("Меч 'Большой убийца' готов!",-1,YPOS_ItemGiven,FONT_ScreenSmall,2);
B_Say(self,self,"$ITEMREADY");
b_endproductiondialog();
}
else
{
AI_PrintScreen(PRINT_ProdItemsMissing,-1,YPOS_ItemGiven,FONT_ScreenSmall,2);
B_Say(self,self,"$MISSINGINGREDIENTS");
b_endproductiondialog();
CreateInvItems(self,ItMiSwordrawhot,1);
};
};