Files
dsrc/sku.0/sys.server/compiled/game/script/npe/npe_target_crate.script
T

47 lines
1.0 KiB
Plaintext

include library.create;
include library.utils;
include library.npe;
include library.groundquests;
include library.sequencer;
include library.static_item;
trigger OnAttach()
{
setInvulnerable(self, true);
return SCRIPT_CONTINUE;
}
trigger OnInitialize()
{
setInvulnerable(self, true);
return SCRIPT_CONTINUE;
}
trigger OnObjectDisabled (obj_id killer)
{
setInvulnerable(self, true);
messageTo( self, "destroyDisabledLair", null, 0, false );
return SCRIPT_CONTINUE;
}
trigger OnObjectDamaged(obj_id attacker, obj_id weapon, int damage)
{
return SCRIPT_CONTINUE;
}
trigger OnDestroy()
{
obj_id building = getTopMostContainer(self);
messageTo(building, "crateDestroyed", null, 0 , false);
return SCRIPT_CONTINUE;
}
messageHandler destroyDisabledLair()
{
location death = getLocation( self );
playClientEffectObj(self, "clienteffect/combat_explosion_lair_large.cef", self, "");
playClientEffectLoc(self, "clienteffect/combat_explosion_lair_large.cef", death, 0);
destroyObject( self );
return SCRIPT_CONTINUE;
}