53 lines
1.7 KiB
Plaintext
53 lines
1.7 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: [Ressurection]
|
|
//:: [NW_S0_Ressurec.nss]
|
|
//:: Copyright (c) 2000 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
//:: Brings a character back to life with full
|
|
//:: health.
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Preston Watamaniuk
|
|
//:: Created On: Jan 31, 2001
|
|
//:://////////////////////////////////////////////
|
|
//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001
|
|
//:: VFX Pass By: Preston W, On: June 22, 2001
|
|
|
|
void main()
|
|
{
|
|
//Get the spell target
|
|
object oTarget = GetSpellTargetObject();
|
|
object oPC = oTarget;
|
|
object oItem;
|
|
object oDeath = GetItemPossessedBy(oPC, "death");
|
|
DestroyObject(oDeath, 0.0f);
|
|
|
|
if (!GetIsDead(oTarget)){return;}
|
|
|
|
if (GetLocalInt(GetArea(oTarget), "streamed")==2){
|
|
return;
|
|
}
|
|
|
|
//Check to make sure the target is dead first
|
|
if (GetIsDead(oTarget))
|
|
{
|
|
SetPlotFlag(oTarget, 0);
|
|
|
|
//Remove the Death Logging from the player..
|
|
SetCampaignInt(GetName(GetModule()), "DEATH_LOG", 0, oPC);
|
|
|
|
//Fire cast spell at event for the specified target
|
|
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, 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));
|
|
|
|
}
|
|
}
|
|
|