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

35 lines
944 B
Plaintext

void main()
{
location lTargetLoc;
effect eLight = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
int nXPos, nYPos;
object oTargetArea = GetArea(OBJECT_SELF);
vector vNewVector;
int x=0;
object oMonster;
float DELAY = 0.5;
if(GetLocalInt(OBJECT_SELF,"IS_ACTIVE") == 0)
{
for(x=0;x<2;++x)
{
vNewVector = GetPositionFromLocation(GetLocation(OBJECT_SELF));
nXPos = Random(10) - 5;
nYPos = Random(10) - 5;
vNewVector.x += nXPos;
vNewVector.y += nYPos;
lTargetLoc = Location(oTargetArea, vNewVector, 0.0);
oMonster = CreateObject(OBJECT_TYPE_CREATURE, "stormconjurer", lTargetLoc);
DelayCommand(DELAY,ApplyEffectToObject(DURATION_TYPE_INSTANT,eLight,oMonster));
}
SetLocalInt(OBJECT_SELF,"IS_ACTIVE",1);
DelayCommand(600.0,SetLocalInt(OBJECT_SELF,"IS_ACTIVE",0));
}
}