24 lines
598 B
Plaintext
24 lines
598 B
Plaintext
// POL Shaft heartbeat
|
|
void main()
|
|
{
|
|
object oMe=OBJECT_SELF;
|
|
object oHost=GetLocalObject(oMe,"oHost");
|
|
int nVal1=GetLocalInt(oHost,"nInPlace1");
|
|
int nVal2=GetLocalInt(oHost,"nInPlace2");
|
|
effect eVis=EffectVisualEffect(VFX_IMP_LIGHTNING_M);
|
|
if (oHost!=OBJECT_INVALID)
|
|
{
|
|
if (nVal1>0&&nVal2>0)
|
|
{
|
|
nVal1=d100();
|
|
if (nVal1<21) ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oMe,3.0);
|
|
}
|
|
else { DestroyObject(oMe); }
|
|
} // not main one
|
|
else
|
|
{
|
|
nVal1=d100();
|
|
if (nVal1<21) ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oMe,3.0);
|
|
}
|
|
}
|