Initial Upload
Initial Upload
This commit is contained in:
25
_module/nss/healplayer.nss
Normal file
25
_module/nss/healplayer.nss
Normal file
@@ -0,0 +1,25 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user