This trigger fires before an item is destroyed and can be caught by the room in which they die or by any mobiles or objects present in the room. The trigger allows for a script to prevent the destruction of the item. The following variables are made available to the script:
@n, @source - The source, if any, of the destruction.
@t, @target - The target item that is being destroyed, just before it is purged.
@destroyType - The manner of destruction occurring.
To prevent the item from being destroyed the script must return a value that evaluates to true.
The type of destruction occuring can be determined by the value of @destroyType. So far the following values exist:
damage - this generally occurs in combat
repair - attempt at repair failed |