mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-13 22:01:04 -04:00
33 lines
963 B
Plaintext
33 lines
963 B
Plaintext
/*
|
|
trigger OnIncapacitated(obj_id attacker)
|
|
{
|
|
obj_id mom = getObjIdObjVar (self, "creater");
|
|
messageTo (mom, "creatureDied", null, 0, true);
|
|
LOG("DeathMother", "Message from Incap");
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
*/
|
|
|
|
trigger OnDestroy()
|
|
{
|
|
string creatureTemplate = getTemplateName(self);
|
|
LOG("Newbie_Spawn", "Message in onDestroy: Creature died of type - "+ creatureTemplate);
|
|
|
|
dictionary webster = new dictionary();
|
|
webster.put ("deadGuy", self);
|
|
obj_id mom = getObjIdObjVar (self, "creater");
|
|
|
|
/*
|
|
**Creating a delay in the Death Message - originally there was no delay which created**
|
|
**an instant respawn situation. Players repeatedly farmed these areas because of the**
|
|
** high rate of respawn. **
|
|
*/
|
|
int randSpawn = rand(180, 360);
|
|
messageTo (mom, "creatureDied", webster, randSpawn, false);
|
|
|
|
LOG("Newbie_Spawn", "Message in onDestroy: Sending message to mom - "+ mom + " from self - " + self);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|