Files
HeroesStone_PRC8/_removed/nw_s0_raisdead.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

68 lines
3.5 KiB
Plaintext

////////////////////////////////////////////////////////////////////////////////
// // //
// Lootable Corpses: Raise Dead script // VERSION 1.0 //
// // //
// Scrotok's Raise Dead/Resurrection Plugin ////////////////////////////
// by Scrotok on 18 Dec 02 //
// Thanks to Lord Niah and Bored Bistander for help on the Raise/Res idea //
// email Questions and Comments to: jnbplatte@intellisys.net //
// //
////////////////////////////////////////////////////////////////////////////////
// //
// This is an optional plugin for Scrotok's Lootable Corpses. It requires //
// a script called "_kb_raise_res" (included in the ERF for this plugin), //
// and the "_kb_corpse_spell" script (part of Scrotok's Lootable Corpses). //
// It allows corpses to be raised from the dead. Raise Dead won't work if //
// the corpse has been bashed into bones, or has faded into bones. //
// //
// NEWBIES: You don't need to place this script anywhere -- it's already //
// taken care of for you (this script IS the default Raise Dead script for //
// Neverwinter Nights). //
// //
// This script is only slightly modified from the Bioware default. Changes //
// to the code are noted below. //
// //
////////////////////////////////////////////////////////////////////////////////
//::///////////////////////////////////////////////
//:: [Raise Dead]
//:: [NW_S0_RaisDead.nss]
//:: Copyright (c) 2000 Bioware Corp.
//:://////////////////////////////////////////////
//:: Brings a character back to life with 1 HP.
//:://////////////////////////////////////////////
//:: 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()
{
//Declare major variables
object oTarget = GetSpellTargetObject();
effect eRaise = EffectResurrection();
effect eVis = EffectVisualEffect(VFX_IMP_RAISE_DEAD);
if(GetIsDead(oTarget))
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_RAISE_DEAD, FALSE));
//Apply raise dead effect and VFX impact
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTarget));
ApplyEffectToObject(DURATION_TYPE_INSTANT, eRaise, oTarget);
}
// The following lines have been added to support Scrotok's Lootable Corpses script
// Fire SpellCastAt event for lootable corpse placeables or bones
// (Raise Dead won't work for bones, but _kb_raise_res" takes care of that)
if ((GetTag(oTarget) == "invis_corpse_obj") || (GetTag(oTarget) == "loot_bones_obj"))
{
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_RAISE_DEAD, FALSE));
}
}