You are looking at a command called play

play with {$object}
play {object}

Visually interact with an object.

play with the ball

If you omit the word 'with' you play the object like a musical instrument.

play the piano


scripting notes
Playing with an object generates a trigger keyword of 'play'
Playing to make music generates a trigger keyword of 'music';

So if you want an object to react to being played with do this:
if target of play then havesomefun;
##havesomefun:
print "[$actor] really enjoys the companyof [$init_obj]";


Or to react to being played as an instrument do this:
if target of music then iwasplayed;
##iwasplayed:
print "You hear a string snap from [$actor]. [$init_obj] was a bit to rough";
Code