RATDOG/_module/nss/object_respawner.nss
Jaysyn904 d168e90e83 Remade Dungeon Level One: Central
Remade Dungeon Level One: Central.  Added Didiamus' creature overrides.  Full compile.
2023-09-17 23:08:55 -04:00

31 lines
972 B
Plaintext

//::///////////////////////////////////////////////
//:: Name: Object Respawner
//:: FileName: object_respawner
//:://////////////////////////////////////////////
/*
Respawn an object after its destroyed.
*/
//:://////////////////////////////////////////////
//:: Created By: VorpalBlade
//:: Created On: 7/21/02
//:://////////////////////////////////////////////
void RespawnObject(int nType, string sTemp, location lRespawn);
void RespawnObject(int nType, string sTemp, location lRespawn)
{
CreateObject(nType, sTemp, lRespawn);
}
void main()
{
// Get the object's spawn point, Type and the template name as the Tag.
location lSpawn = GetLocation(OBJECT_SELF);
string sResref = GetResRef(OBJECT_SELF);
int nObjectType = GetObjectType(OBJECT_SELF);
// Send Respawn command to the module so it will execute even
// after this object is dead and buried
AssignCommand(GetModule(), DelayCommand(900.0, RespawnObject(nObjectType, sResref, lSpawn)));
}