you can try this...
src\custom\script.inc
BUILDIN_FUNC(specialeffect3)
{
struct block_list *bl = NULL;
int id = 0;
int type = script_getnum(st,2);
enum send_target target = script_hasdata(st,3) ? (send_target)script_getnum(st,3) : AREA;
if (script_hasdata(st,4)) {
id = script_getnum(st,4);
bl = map_id2bl(id);
}
else {
bl = st->rid ? map_id2bl(st->rid) : map_id2bl(st->oid);
}
if(bl == NULL)
return SCRIPT_CMD_SUCCESS;
if( type <= EF_NONE || type >= EF_MAX ){
ShowError( "buildin_specialeffect: unsupported effect id %d\n", type );
return SCRIPT_CMD_FAILURE;
}
if (target == SELF) {
TBL_PC *sd;
if (script_rid2sd(sd))
clif_specialeffect_single(bl,type,sd->fd);
} else {
clif_specialeffect(bl, type, target);
}
return SCRIPT_CMD_SUCCESS;
}
src\custom\script_def.inc
BUILDIN_DEF(specialeffect3,"i??"),
usage example
// GID examples...
.@gid = getcharid(3);
//.@gid = $@mobid[0];
//.@gid = killerrid;
//.@gid = killergid;
specialeffect3 EF_HIT1,AREA,.@gid;