HoS_PRC8/_mod/_module/nss/pol_shaft_hb.nss
Jaysyn904 04165202c0 Initial upload
Initial upload
2024-11-25 19:36:07 -05:00

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);
}
}