53 lines
1.9 KiB
Plaintext
53 lines
1.9 KiB
Plaintext
|
void CreateObject2(int nObjectType, string sTemplate, location lLocation, int bUseAppearAnimation=FALSE);
|
||
|
//::///////////////////////////////////////////////
|
||
|
//:: Strong Tangle Trap
|
||
|
//:: NW_T1_TangStrC
|
||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||
|
//:://////////////////////////////////////////////
|
||
|
/*
|
||
|
Targets within 10ft of the entering character
|
||
|
are slowed unless they make a will save with
|
||
|
a DC of 30. Effect lasts for 4 Rounds
|
||
|
*/
|
||
|
//:://////////////////////////////////////////////
|
||
|
//:: Created By: Preston Watamaniuk
|
||
|
//:: Created On: July 4th, 2001
|
||
|
//:://////////////////////////////////////////////
|
||
|
|
||
|
#include "prc_inc_spells"
|
||
|
#include "NW_I0_SPELLS"
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
//Declare major variables
|
||
|
int nDuration = 4;
|
||
|
object oTarget = GetEnteringObject();
|
||
|
location lTarget = GetLocation(oTarget);
|
||
|
effect eSlow = EffectSlow();
|
||
|
effect eVis = EffectVisualEffect(VFX_IMP_SLOW);
|
||
|
|
||
|
//Find first target in the size
|
||
|
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, lTarget);
|
||
|
//Cycle through the objects in the radius
|
||
|
while (GetIsObjectValid(oTarget))
|
||
|
{
|
||
|
if(!MySavingThrow(SAVING_THROW_WILL, oTarget, 30,SAVING_THROW_TYPE_NONE))
|
||
|
{
|
||
|
//Apply slow effect and slow effect
|
||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSlow, oTarget, RoundsToSeconds(nDuration));
|
||
|
}
|
||
|
//Get next target in the shape.
|
||
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, lTarget);
|
||
|
}
|
||
|
//respawn trap
|
||
|
DelayCommand(598.0, CreateObject2(GetObjectType(OBJECT_SELF), GetResRef(OBJECT_SELF), GetLocation(OBJECT_SELF)));
|
||
|
DelayCommand(600.0, DestroyObject(OBJECT_SELF));
|
||
|
}
|
||
|
|
||
|
void CreateObject2(int nObjectType, string sTemplate, location lLocation, int bUseAppearAnimation=FALSE)
|
||
|
{
|
||
|
CreateObject(nObjectType, sTemplate, lLocation, bUseAppearAnimation);
|
||
|
return;
|
||
|
}
|