I haven't tried this, but this -should- work (gani script):
PHP Code:
function onCreated()
{
play(params[0]);
}
If that doesn't work, try this in the wNPC:
PHP Code:
player.attr[20] = "songtoplay.mid";
setani("flute2");
And then this in the gani:
PHP Code:
function onPlayerEnters()
{
play(player.attr[20]);
}