There is nothing built-in as such, but you can add a change script to the object. In fact it will already have one, you need to modify it. Assuming you are working offline, go to the Attributes tab, and select changeparent in the list at the bottom. Now click the Make editable copy button, then click on the Code view icon. You will see this:
if (game.pov = this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue)
}
else {
OnEnterRoom (null)
}
if (game.gridmap) {
MergePOVCoordinates
}
}
You can get rid of that as the makeup will never by a player object. Replace it with this:
if (IsDefined("oldvalue")) {
if (oldvalue = player) {
msg ("You are no longer holding it")
}
}