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:
104
_module/nss/jw_night_usd.nss
Normal file
104
_module/nss/jw_night_usd.nss
Normal file
@@ -0,0 +1,104 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Custom User Defined Event
|
||||
//:: FileName
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By:
|
||||
//:: Created On:
|
||||
//:://////////////////////////////////////////////
|
||||
#include "NW_I0_SPELLS"
|
||||
void makesleep()
|
||||
{
|
||||
effect eVis = EffectVisualEffect(SPELLABILITY_DRAGON_BREATH_SLEEP);
|
||||
effect eHowl = EffectSleep();
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD);
|
||||
effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_ODD);
|
||||
effect eLink = EffectLinkEffects(eHowl, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eDur2);
|
||||
float fDelay;
|
||||
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDC = 18;
|
||||
int nDuration = 1 + (nHD/2);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && !GetIsFriend(oTarget) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
nDuration = GetScaledDuration(nDuration , oTarget);
|
||||
//Fire cast spell at event for the specified target
|
||||
//SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_HOWL_PARALYSIS));
|
||||
fDelay = GetDistanceToObject(oTarget)/10;
|
||||
//Make a saving throw check
|
||||
if(FortitudeSave(oTarget,nDC,SAVING_THROW_TYPE_MIND_SPELLS)==0)
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
int nUser = GetUserDefinedEventNumber();
|
||||
|
||||
if(nUser == 1001) //HEARTBEAT
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
else if(nUser == 1002) // PERCEIVE
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == 1003) // END OF COMBAT
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == 1004) // ON DIALOGUE
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == 1005) // ATTACKED
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == 1006) // DAMAGED
|
||||
{
|
||||
if (GetLocalInt(OBJECT_SELF,"nDone")!=2)
|
||||
{
|
||||
makesleep();
|
||||
|
||||
SetLocalInt(OBJECT_SELF,"nDone",2);
|
||||
}
|
||||
else
|
||||
if (d6()==1)
|
||||
{
|
||||
makesleep();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else if(nUser == 1007) // DEATH
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == 1008) // DISTURBED
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user