Files
Anphillia_PRC8/_removed/nw_s0_invspha.nss
Jaysyn904 28cdb617b3 Initial commit
Adding all of the current content for Anphillia Unlimited.
2024-01-04 07:49:38 -05:00

43 lines
1.4 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Invisibility Sphere: On Enter
//:: NW_S0_InvSphA.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
All allies within 15ft are rendered invisible.
*/
/*
Anphillia Changes
This spell now works outside of parties.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Jan 7, 2002
//:://////////////////////////////////////////////
void main()
{
//Declare major variables
object oSource = GetAreaOfEffectCreator();
object oTarget = GetEnteringObject();
effect eInvis = EffectInvisibility(INVISIBILITY_TYPE_NORMAL);
effect eVis = EffectVisualEffect(VFX_DUR_INVISIBILITY);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
effect eLink = EffectLinkEffects(eInvis, eVis);
eLink = EffectLinkEffects(eLink, eDur);
if(GetIsFriend(oTarget, oSource) ||
(GetIsNeutral(oTarget, oSource) && (GetIsPC(oTarget) || GetIsPC(GetMaster(oTarget))) && !GetIsDM(oTarget)))
// * don't try and make dead people invisible
if (GetIsDead(oTarget) == FALSE)
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_INVISIBILITY_SPHERE, FALSE));
//Apply the VFX impact and effects
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oTarget);
}
}