var int ArmorBlessed; //новая переменная
instance PC_PrayShrine_BlessArmor(C_Info)
{
npc = PC_Hero;
nr = 4;
condition = PC_PrayShrine_BlessArmor_Condition;
information = PC_PrayShrine_BlessArmor_Info;
permanent = TRUE; //диалог многоразовый
description = "Освятить старые доспехи паладина";
};
func int PC_PrayShrine_BlessArmor_Condition()
{
if(ArmorBlessed == TRUE) //новое условие
{
return FALSE;
};
if((PLAYER_MOBSI_PRODUCTION == MOBSI_PrayShrine) && (hero.guild == GIL_PAL) && (CurrentLevel == NEWWORLD_ZEN) && (PAL_KnowsAbout_FINAL_BLESSING == TRUE) && ArmorEquipped(hero,ITAR_PAL_Skel))
{
if(Npc_GetDistToWP(hero,"NW_MONASTERY_CHAPELL_02") <= 500)
{
return TRUE;
};
};
};
func void PC_PrayShrine_BlessArmor_Info()
{
if(Saturas_KlaueInsMeer == TRUE)
{
B_RemoveEveryInvItem(hero,ITAR_PAL_Skel);
CreateInvItem(hero,ITAR_PAL_BEST);
AI_EquipArmor(hero,ITAR_PAL_BEST);
Wld_PlayEffect("spellFX_PalHeal_ORIGIN",hero,hero,0,0,0,FALSE);
Snd_Play("MFX_Heal_Cast");
B_GivePlayerXP(XP_ArmorBlessed);
ArmorBlessed = TRUE; //доспехи освящены, блокировать диалог
}
else
{
PrintScreen("Иннос отвергает Вас!",-1,-1,FONT_Screen,3);
};
};