If it's a level npc and you're using triggeraction, then you catch the event on the serverside via onActionActionname(), not onActionServerSide().
In your case:
PHP Code:
triggerAction(this.x+1, this.y+1, "Midi", t[1]);
Would call the following on the serverside:
PHP Code:
function onActionMidi() {
//Do stuff
}
EDIT: Also, you can't use triggerClient() in level NPCs, you would have to do another triggerAction() on the serverside (making sure you're keeping the setshape on both clientside and serverside) to trigger back to the client.