I think you'd rather put it in status.c instead of skill.c. This is because script.c BUILDIN(sc_start) directly accesses status.c's status_change_start() instead of skill.c's skill_castend_nodamage_id(). So you'll never achieve it if using your current implementation.
hence:
status.c
status_change_start
case SC_SPIRIT:
//1st Transcendent Spirit works similar to Marionette Control
if(sd && val2 == SL_HIGH) {
int stat,max_stat;
struct status_data *status2 = status_get_base_status(bl);
val3 = 0;
val4 = 0;
max_stat = (status_get_lv(bl)-10<50)?status_get_lv(bl)-10:50;
stat = max(0, max_stat - status2->str); val3 |= cap_value(stat,0,0xFF)<<16;
stat = max(0, max_stat - status2->agi ); val3 |= cap_value(stat,0,0xFF)<<8;
stat = max(0, max_stat - status2->vit ); val3 |= cap_value(stat,0,0xFF);
stat = max(0, max_stat - status2->int_); val4 |= cap_value(stat,0,0xFF)<<16;
stat = max(0, max_stat - status2->dex ); val4 |= cap_value(stat,0,0xFF)<<8;
stat = max(0, max_stat - status2->luk ); val4 |= cap_value(stat,0,0xFF);
}
if (sd && val2 == SL_PRIEST) {
int skill_id = val2;
int skill_lv = val1;
clif_skill_nodamage(src, bl, skill_id, skill_lv,
sc_start4(src, bl, SC_REFLECTSHIELD, 100, 7, skill_id, 0, 0, skill_get_time(skill_id, skill_lv)));
}
break;
I noticed that you are still using ".c" which means you're not using the latest rA. I've tested this in latest rA and might not work for you. Try it nonetheless.