Amon_PRC8/_module/nss/em_healstones.nss

23 lines
695 B
Plaintext
Raw Permalink Normal View History

2025-04-03 19:00:46 -04:00
// 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);
}