26 lines
1.0 KiB
Plaintext
26 lines
1.0 KiB
Plaintext
void main()
|
|
{
|
|
//effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION);
|
|
// FloatingTextStringOnCreature("healplayer",OBJECT_SELF,TRUE);
|
|
|
|
effect eBad = GetFirstEffect(OBJECT_SELF);
|
|
if (GetIsDead(OBJECT_SELF))
|
|
{
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),OBJECT_SELF);
|
|
}
|
|
|
|
|
|
//Search for negative effects
|
|
while(GetIsEffectValid(eBad))
|
|
{
|
|
RemoveEffect(OBJECT_SELF, eBad);
|
|
eBad = GetNextEffect(OBJECT_SELF);
|
|
}
|
|
//Fire cast spell at event for the specified target
|
|
SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_RESTORATION, FALSE));
|
|
SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_GREATER_RESTORATION, FALSE));
|
|
SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_REMOVE_CURSE, FALSE));
|
|
//ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, OBJECT_SELF);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(OBJECT_SELF)), OBJECT_SELF);
|
|
}
|