When using quotes within quotes in GS2, you will need to put a back-slash before the quote that will be read as inside the string, a thanks to Malinko for pointing this fact out for me:
PHP Code:
putnpc2(player.x + 0.5 + vecx(player.dir),player.y + 1 + vecy(player.dir),"join(\"mud_item\");");
And since mousex and mousey are clientside-only you would just need to send them with the trigger.