Files
dsrc/sku.0/sys.server/compiled/game/script/npc/cb_deflarian_courier.script
T

27 lines
699 B
Plaintext

/***** INCLUDES ********************************************************/
include library.utils;
/***** TRIGGERS ********************************************************/
trigger OnAttach()
{
setBaseWalkSpeed(self, 6.0f);
setHibernationDelay(self, 5.0f * 24.0f * 60.0f * 60.0f); // 5 days
return SCRIPT_CONTINUE;
}
trigger OnHibernateBegin()
{
if( !utils.hasScriptVar(self, "intCleanedUp") )
{
utils.setScriptVar(self, "intCleanedUp", 1);
obj_id objParent = getObjIdObjVar(self, "objParent");
float fltRespawnTime = getFloatObjVar(self, "fltRespawnTime");
messageTo(objParent, "spawnDestroyed", null, fltRespawnTime, false);
}
destroyObject(self);
return SCRIPT_CONTINUE;
}