So... I have something like this:
void SetRune(itemproperty ipProperty)
{
object oPC = GetItemActivator();
object oActiv = GetItemActivated();
object oTarget = GetItemActivatedTarget();
string sDesc = GetDescription(oTarget);
int nFreeSlot = GetLocalInt(oTarget, "RUNESLOT");
int nWeaponOnly = GetLocalInt(oActiv, "WEAPON_ONLY_RUNE");
int nGetStack = GetItemStackSize(oActiv);
if(nWeaponOnly == 1 && (IPGetIsRangedWeapon(oTarget) || IPGetIsMeleeWeapon(oTarget)) == FALSE)
SendMessageToPC(oPC, "This rune can be aplied only on weapon");
else
{
if(nFreeSlot > 0)
{
AddItemProperty(DURATION_TYPE_PERMANENT, ipProperty, oTarget);
SetDescription(oTarget, sDesc + "\\n" + GetName(oActiv));
SetLocalInt(oTarget, "RUNESLOT", nFreeSlot-1);
if(nGetStack == 1)
DestroyObject(oActiv);
else
SetItemStackSize(oActiv, nGetStack-1);
}
else
SendMessageToPC(oPC, "This item has no free rune slot");
}
}
How to modify it to restrict the possibility of adding the same rune again?
I tried to set on rune var: RUNE_TYPE string TIER_1_RUNE_1, but if I set other rune on the item (TIER_1_RUNE_2), I can set up first again