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:
65
_removed/nw_s0_darknessa.nss
Normal file
65
_removed/nw_s0_darknessa.nss
Normal file
@@ -0,0 +1,65 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: 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
|
||||
//:://////////////////////////////////////////////
|
||||
#include "x0_i0_spells"
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
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();
|
||||
|
||||
// * July 2003: If has darkness then do not put it on it again
|
||||
if (GetHasEffect(EFFECT_TYPE_DARKNESS, oTarget) == TRUE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(GetIsObjectValid(oTarget) && oTarget != GetAreaOfEffectCreator())
|
||||
{
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator()))
|
||||
{
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId()));
|
||||
}
|
||||
else
|
||||
{
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));
|
||||
}
|
||||
//Fire cast spell at event for the specified target
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oTarget);
|
||||
}
|
||||
else if (oTarget == GetAreaOfEffectCreator())
|
||||
{
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));
|
||||
//Fire cast spell at event for the specified target
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink2, oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user