Uh, you should be able to copy the snippets directly from an up to date script.c
I'll add the code blocks to this post shortly. Though I don't see how this is client related, I imagine you meant outdated source files.
https://github.com/rathena/rathena/blob/master/src/map/script.c
/*==========================================
* Play a BGM on a single client [Rikter/Yommy]
*------------------------------------------*/
BUILDIN_FUNC(playBGM)
{
struct map_session_data* sd;
if( ( sd = script_rid2sd(st) ) != NULL ) {
clif_playBGM(sd, script_getstr(st,2));
}
return SCRIPT_CMD_SUCCESS;
}
static int playBGM_sub(struct block_list* bl,va_list ap)
{
const char* name = va_arg(ap,const char*);
clif_playBGM(BL_CAST(BL_PC, bl), name);
return 0;
}
static int playBGM_foreachpc_sub(struct map_session_data* sd, va_list args)
{
const char* name = va_arg(args, const char*);
clif_playBGM(sd, name);
return 0;
}
/*==========================================
* Play a BGM on multiple client [Rikter/Yommy]
*------------------------------------------*/
BUILDIN_FUNC(playBGMall)
{
const char* name;
name = script_getstr(st,2);
if( script_hasdata(st,7) ) {// specified part of map
const char* mapname = script_getstr(st,3);
int x0 = script_getnum(st,4);
int y0 = script_getnum(st,5);
int x1 = script_getnum(st,6);
int y1 = script_getnum(st,7);
map_foreachinarea(playBGM_sub, map_mapname2mapid(mapname), x0, y0, x1, y1, BL_PC, name);
}
else if( script_hasdata(st,3) ) {// entire map
const char* mapname = script_getstr(st,3);
map_foreachinmap(playBGM_sub, map_mapname2mapid(mapname), BL_PC, name);
}
else {// entire server
map_foreachpc(&playBGM_foreachpc_sub, name);
}
return SCRIPT_CMD_SUCCESS;
}