mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
31 lines
570 B
Plaintext
31 lines
570 B
Plaintext
trigger OnInitialize()
|
|
{
|
|
messageTo(self, "handleCleanUp", null, 300.0f, false);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnLostItem(obj_id destContainer, obj_id transferer, obj_id item)
|
|
{
|
|
int items = getFilledVolume(self);
|
|
|
|
if(items == 0)
|
|
messageTo(self, "handleCleanUp", null, 5.0f, false);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAboutToReceiveItem(obj_id srcContainer, obj_id transferer, obj_id item)
|
|
{
|
|
if(isIdValid(transferer))
|
|
return SCRIPT_OVERRIDE;
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
messageHandler handleCleanUp()
|
|
{
|
|
destroyObject(self);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
} |