LoD_PRC8/_module/nss/teleport.nss
Jaysyn904 94990edc60 Initial Upload
Initial Upload
2023-09-21 21:20:34 -04:00

21 lines
761 B
Plaintext

void main()
{
if (GetLocalInt(OBJECT_SELF, "IsDm") == 0)
{
if (GetLocalInt(OBJECT_SELF, "EJAIL") == TRUE)
{
FloatingTextStringOnCreature("There is no escape for you, " + GetName(OBJECT_SELF),OBJECT_SELF,FALSE);
return;
}
if (GetLocalInt(GetModule(), "war") == TRUE)
{
FloatingTextStringOnCreature("Cannot Teleport in time of war",OBJECT_SELF,FALSE);
return;
}
}
SetLocalLocation(OBJECT_SELF, "lBack", GetLocation(OBJECT_SELF));
AssignCommand(OBJECT_SELF, ClearAllActions());
ExecuteScript("teleporteff", OBJECT_SELF);
DelayCommand(0.5,AssignCommand(OBJECT_SELF,ActionJumpToLocation(GetLocation(GetLocalObject(OBJECT_SELF, "Dest")))));
}