PWE_PRC8/_module/nss/b2_nor35cochoas.nss
Jaysyn904 ee1dc35889 Initial Commit
Initial Commit
2025-04-03 10:29:41 -04:00

85 lines
2.8 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Name Choas Caves PBox Effect
//:: FileName
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
This is the Inside Random Choas Caves Area.
*/
//:://////////////////////////////////////////////
//:: Created By: Donny Wilbanks
//:: Created On: 11/20/02
//:://////////////////////////////////////////////
#include "NW_I0_SPELLS"
int vVortexs = 20; // This Setting tells how many Vortoxes are present.
// void Pandora's Box effect - suck things arround it to location.
void PandorasBox(location lLoc,location dLoc)
{
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lLoc, TRUE, OBJECT_TYPE_CREATURE);
float vDelay = 1.0;
while (GetIsObjectValid(oTarget))
{
DelayCommand(vDelay-1.0,AssignCommand(oTarget,ClearAllActions()));
//*** Stun Victem
effect eHowl = EffectDazed();
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
effect eDur2 = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
effect eLink = EffectLinkEffects(eHowl, eDur);
eLink = EffectLinkEffects(eLink, eDur2);
int nDuration = d3();
DelayCommand(vDelay+2.0,ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget,RoundsToSeconds(nDuration)));
DelayCommand(vDelay,AssignCommand(oTarget,JumpToLocation(dLoc)));
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lLoc, TRUE, OBJECT_TYPE_CREATURE);
vDelay = vDelay + 1.0;
}
}
//
void CavesOfChaos()
{
int vFound = 0;
int vWhere;
int vStart;
string sCoC = "SP_CAVESOFCHOAS";
object oExit = GetObjectByTag(sCoC,vFound);
while(GetIsObjectValid(oExit))
{
vFound++;
oExit = GetObjectByTag(sCoC,vFound);
}
vWhere = Random(vFound);
vStart = Random(vFound);
object oStart =GetObjectByTag(sCoC,vStart);
location lLoc = GetLocation(oStart);
location lTarget = lLoc;
oExit = GetObjectByTag(sCoC,vWhere);
object oArea = GetArea(oExit);
if(GetIsObjectValid(oExit))
{
effect eEffect = EffectVisualEffect(VFX_FNF_IMPLOSION,FALSE);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY,eEffect,lLoc,6.0);
lLoc = GetLocation(oExit);
DelayCommand(1.0,ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY,eEffect,lLoc,6.0));
DelayCommand(2.0,PandorasBox(lTarget,lLoc));
effect eLightning = EffectVisualEffect(VFX_IMP_LIGHTNING_M,FALSE);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY,eLightning,lLoc,6.0);
}
else
{
effect eEffect = eEffect = EffectVisualEffect(VFX_DUR_BLACKOUT,FALSE);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY,eEffect,lLoc,6.0);
}
}
void main()
{
int vK;
for (vK=0;vK<=vVortexs;vK++)
{
CavesOfChaos();
}
}