generated from Jaysyn/ModuleTemplate
40 lines
1.4 KiB
Plaintext
40 lines
1.4 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Name corp_ressurect
|
|
//:: FileName
|
|
//::
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Created from NW_S0_Ressurec by Bioware, this script ressurects
|
|
the creature associated with the corpse placeable.
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Alexandre Brunel
|
|
//:: Created On: 21/04/2003
|
|
//:://////////////////////////////////////////////
|
|
|
|
#include "corpse_lib"
|
|
void main()
|
|
{
|
|
//Get the spell target
|
|
object oTarget = GetLocalObject(OBJECT_SELF,CorpseCreatureCorpse);//GetSpellTargetObject();
|
|
//Check to make sure the target is dead first
|
|
if (GetIsDead(oTarget))
|
|
{
|
|
//Fire cast spell at event for the specified target
|
|
SignalEvent(oTarget, EventSpellCastAt(GetLocalObject(OBJECT_SELF,CorpseSpellCaster), SPELL_RESURRECTION, FALSE));
|
|
//Declare major variables
|
|
int nHealed = GetMaxHitPoints(oTarget);
|
|
effect eRaise = EffectResurrection();
|
|
effect eHeal = EffectHeal(nHealed + 10);
|
|
effect eVis = EffectVisualEffect(VFX_IMP_RAISE_DEAD);
|
|
//Apply the heal, raise dead and VFX impact effect
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eRaise, oTarget);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTarget));
|
|
}
|
|
else
|
|
{
|
|
WriteTimestampedLogEntry("Target is not dead");
|
|
}
|
|
}
|