Dedication to Action and fun.
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 badlands darkness

View previous topic View next topic Go down 
AuthorMessage
lolthatguy

avatar

Posts : 243
Join date : 2013-05-05
Age : 23
Location : larry town

PostSubject: badlands darkness   Mon Jul 27, 2015 7:09 pm

yo, highv, could you post your altered darkness spell script here so I can play test with it? It seems like darkness gets treated differently on my mod, but I dunno why.
Back to top Go down
View user profile
Highv Priest
Admin
avatar

Posts : 561
Join date : 2012-09-13

PostSubject: Re: badlands darkness   Wed Jul 29, 2015 11:14 pm

Script = nw_s0_darknessa


//::///////////////////////////////////////////////
//:: 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 = EffectBlindness();
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
effect eLink = EffectLinkEffects(eDark, eDur);
eLink = EffectLinkEffects(eLink, eInvis);
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(GetHasEffect(EFFECT_TYPE_ULTRAVISION, oTarget) == TRUE)
{
return;
}
if(GetHasEffect(EFFECT_TYPE_TRUESEEING, oTarget) == TRUE)
{
return;
}
if(GetItemHasItemProperty(GetItemInSlot(INVENTORY_SLOT_CARMOUR, oTarget), ITEM_PROPERTY_TRUE_SEEING))
{
return;
}
if(GetLocalInt(oTarget, "DARKVISION"))
{
return;
}

if(GetIsObjectValid(oTarget) && oTarget != GetAreaOfEffectCreator())
{
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator()))
{
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetEffectSpellId(eLink)));
}
else
{
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetEffectSpellId(eLink), FALSE));
}
// Creatures immune to the darkness spell are not affected.
if ( ResistSpell(OBJECT_SELF,oTarget) != 2 )
{
//Fire cast spell at event for the specified target
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oTarget);
}
}
else if (oTarget == GetAreaOfEffectCreator())
{
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetEffectSpellId(eLink), FALSE));
// Creatures immune to the darkness spell are not affected.
if ( ResistSpell(OBJECT_SELF,oTarget) != 2 )
{
//Fire cast spell at event for the specified target
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink2, oTarget);
}
}
}
Back to top Go down
View user profile http://badlandsaction.forumotion.com
 
badlands darkness
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Love this bright darkness <3
» Heart of Darkness
» Living World of Darkness
» 7 Roses: A Darkness Rises
» Cover Of Darkness Released

Permissions in this forum:You cannot reply to topics in this forum
Badlands Action :: Talking about nwn :: Q&A-
Jump to: