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

39 lines
609 B
Plaintext

void Repeat(object oPC)
{
location lPC= GetLocation(oPC);
int nEffectNumber = Random(2);
switch (nEffectNumber)
{
case 0:
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), lPC);
break;
case 1:
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_RAISE_DEAD), lPC);
break;
}
int nPC = GetLocalInt(oPC,"rift");
if(nPC==1)
{
DelayCommand(20.0, Repeat(oPC));
}
else return;
}
void main()
{
object oPC = GetEnteringObject();
if (GetIsDM(oPC)) return;
SetLocalInt(oPC,"rift",1);
Repeat(oPC);
}