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

22 lines
1005 B
Plaintext

void main()
{
object oPC = GetLastUsedBy();
if (!IsInConversation(oPC))
{
if (GetLocalInt(OBJECT_SELF, "iActivated") == 1)
{
PlaySound("as_mg_telepin1");
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect (VFX_FNF_SOUND_BURST), oPC);
object oLandGateDest = GetObjectByTag(GetLocalString(OBJECT_SELF, "CurrentDest"));
AssignCommand(oPC, DelayCommand(1.0, JumpToObject(GetNearestObjectByTag("LandGatePortal", oLandGateDest, 1))));
AssignCommand(OBJECT_SELF, DelayCommand(20.0, PlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)));
AssignCommand(OBJECT_SELF, DelayCommand(20.5, SetLocalInt(OBJECT_SELF, "iActivated", 0)));
SetLocalString(oPC, "DialValue1", "");
SetLocalString(oPC, "DialValue2", "");
SetLocalString(oPC, "DialValue3", "");
}
else
AssignCommand(GetLastUsedBy(), SpeakString("The LandGate is not yet activated"));
}
}