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

23 lines
500 B
Plaintext

// Random Shadow Teleport
void main()
{
object oPC=GetEnteringObject();
object oWP=GetWaypointByTag("SR_JUMP_"+IntToString(d6()));
int nCount=GetLocalInt(oPC,"nShadowJump");
int nMax=GetLocalInt(GetModule(),"nMaxShadowJumps");
if (nMax==0) nMax=10;
nMax=nMax-1;
if (nCount>nMax)
{
nCount=0;
oWP=GetWaypointByTag("SR_JUMP_6");
}
else
nCount++;
SetLocalInt(oPC,"nShadowJump",nCount);
AssignCommand(oPC,ClearAllActions());
AssignCommand(oPC,JumpToObject(oWP));
}