23 lines
695 B
Plaintext
23 lines
695 B
Plaintext
// em_healstones.nss
|
|
// Searches a player's inventory and heals all the bindstones in their possesion.
|
|
void main()
|
|
{
|
|
object oPlayer = OBJECT_SELF;
|
|
object oItem = GetFirstItemInInventory(oPlayer);
|
|
int iNoHealed;
|
|
|
|
while(GetIsObjectValid(oItem)){
|
|
string sTag = GetTag(oItem);
|
|
|
|
if (sTag == "em_bindstone"){
|
|
iNoHealed = iNoHealed + 1;
|
|
SetLocalInt(oItem, "liDamage", 0);
|
|
}
|
|
|
|
oItem = GetNextItemInInventory(oPlayer);
|
|
}
|
|
|
|
SendMessageToPC(oPlayer, "Healed " + IntToString(iNoHealed) + " bindstones");
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_REMOVE_CONDITION), oPlayer);
|
|
}
|