check_can_attach

Response Typescript
EntitiesObjects
Parameters-

    This trigger will fire for a attachment receptacle when someone attempts
to "attach" something "to" it. The script should return 0 to prevent the
item from being attached, or 1 to allow the attachment. If a 0 is returned
then it is the script's responsibility to output something to the actor
indicating why the item could not be put into the container. If 1 is
returned then the standard put messages will be output.

@n - The mobile that is "attaching" the object.
@actor

@o - The object that the mobile is "attaching".
@attachment

@receptacle - The item that will receive the attachment.


Example:

if( !%stringFind( "green", @attachment->keywords ) )
{
echoto char @actor Only green gems can be attached to this item.
return 0
}
endif

return 1