Try this
- script mvp_chest -1,{
OnNPCKillEvent:
if ( getmonsterinfo( killedrid, MOB_MVPEXP ) ) {
getmapxy(.@map$,.@x,.@y,0);
monster .@map$,rand(.@x,.@x-3),rand(.@y-3,.@y),"--ja--",1324,1;
}
end;
}
Idk if there's a script that get the killed monster coordinates. But this script will summon the treasure chest near the killer.
EDIT:
If you want it to be dropped spawned exactly where the monster was killed maybe you can use this patch LINK