home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Zone 125
/
DPPCZ0203B.7z
/
DPPCZ0203B.ISO
/
Demos
/
Neverwinter
/
data1.cab
/
override
/
nw_s0_darknessa.nss
< prev
next >
Wrap
Text File
|
2002-09-10
|
2KB
|
50 lines
//::///////////////////////////////////////////////
//:: Darkness: On Enter
//:: NW_S0_DarknessA.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Creates a globe of darkness around those in the area
of effect.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Feb 28, 2002
//:://////////////////////////////////////////////
void main()
{
int nMetaMagic = GetMetaMagicFeat();
effect eInvis = EffectInvisibility(INVISIBILITY_TYPE_DARKNESS);
effect eDark = EffectDarkness();
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
effect eLink = EffectLinkEffects(eDark, eDur);
effect eLink2 = EffectLinkEffects(eInvis, eDur);
int nDuration = GetCasterLevel(OBJECT_SELF);
//Enter Metamagic conditions
if (nMetaMagic == METAMAGIC_EXTEND)
{
nDuration = nDuration *2; //Duration is +100%
}
object oTarget = GetEnteringObject();
if(GetIsObjectValid(oTarget) && oTarget != GetAreaOfEffectCreator())
{
if(GetIsFriend(oTarget))
{
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_DARKNESS, FALSE));
}
if(!GetIsFriend(oTarget))
{
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_DARKNESS));
}
//Fire cast spell at event for the specified target
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oTarget);
}
else if (oTarget == GetAreaOfEffectCreator())
{
//Fire cast spell at event for the specified target
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink2, oTarget);
}
}