Initial upload
Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
78
_removed/nw_s0_silence.nss
Normal file
78
_removed/nw_s0_silence.nss
Normal file
@@ -0,0 +1,78 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Silence
|
||||
//:: NW_S0_Silence.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
The target is surrounded by a zone of silence
|
||||
that allows them to move without sound. Spell
|
||||
casters caught in this area will be unable to cast
|
||||
spells.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 7, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
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 including Area of Effect Object
|
||||
effect eAOE = EffectAreaOfEffect(AOE_MOB_SILENCE);
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
//Make sure duration does no equal 0
|
||||
if (nDuration < 1)
|
||||
{
|
||||
nDuration = 1;
|
||||
}
|
||||
//Check Extend metamagic feat.
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
if(!GetIsFriend(oTarget))
|
||||
{
|
||||
if(!MyResistSpell(OBJECT_SELF, oTarget))
|
||||
{
|
||||
if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC()))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_SILENCE));
|
||||
|
||||
//Create an instance of the AOE Object using the Apply Effect function
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAOE, oTarget, RoundsToSeconds(nDuration));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_SILENCE, FALSE));
|
||||
//Create an instance of the AOE Object using the Apply Effect function
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAOE, oTarget, RoundsToSeconds(nDuration));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user