Initial commit
Initial commit [1.18]
This commit is contained in:
81
_removed/nw_s0_raisdead.nss
Normal file
81
_removed/nw_s0_raisdead.nss
Normal file
@@ -0,0 +1,81 @@
|
||||
//
|
||||
//:: Changed script so that spell restoration does not remove subracial bonus
|
||||
//:: ability changes.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//::///////////////////////////////////////////////
|
||||
//:: [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
|
||||
|
||||
// Jasperre:
|
||||
// - To make this operate effectivly, the AI that is, the PC speaks silently
|
||||
// when they are raised, to let NPC's get them :-P
|
||||
// This is not required, but is a simple addition.
|
||||
// - It also adds NPC re-targeting to get them back into combat.
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
#include "sha_subr_methds"
|
||||
#include "x0_i0_campaign"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eRaise = EffectResurrection();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_RAISE_DEAD);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_RAISE_DEAD, FALSE));
|
||||
if(GetIsDead(oTarget))
|
||||
{
|
||||
//Apply raise dead effect and VFX impact
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTarget));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eRaise, oTarget);
|
||||
// Jasperre's additions...
|
||||
AssignCommand(oTarget, SpeakString("I AM ALIVE!", TALKVOLUME_SILENT_TALK));
|
||||
if(!GetIsPC(oTarget) && !GetIsDMPossessed(oTarget))
|
||||
{
|
||||
// Default AI script
|
||||
ExecuteScript("nw_c2_default3", oTarget);
|
||||
}
|
||||
//-----------Modification made for Shayan's Subrace Engine
|
||||
if(GetIsPC(oTarget))
|
||||
{
|
||||
SetCampaignDBInt(oTarget, "PLAYERHASDIED", FALSE);
|
||||
SetLocalInt(oTarget, "DEAD_TIME_REMAINING", 0);
|
||||
ReapplySubraceAbilities(oTarget);
|
||||
}
|
||||
//---------End Modification by Shayan
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user