xilence01 Posted August 28, 2018 Posted August 28, 2018 (edited) I tried adding this code in skill.c if (skill_id == SL_PRIEST) { 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))); } To Automatically receives Lv.7 "Reflect Shield" status that will make melee attacks to be reflected. It worked fine when a Soul Linker Job casts the spell on the priest. But when i created an item with this item bonus: skilleffect "SL_PRIEST",0; sc_start4 SC_SPIRIT,350000,5,454,0,0; After the using item, the soul link doesn't work. I provided screenshots: a) When used an item with the given itembonus. NOT WORKING b) When a Soul Linker casts the spell. WORKING Edited August 28, 2018 by xilence01 Quote
1 Ninja Posted August 30, 2018 Posted August 30, 2018 (edited) 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. Edited August 30, 2018 by Ninja 1 Quote
0 xilence01 Posted August 30, 2018 Author Posted August 30, 2018 1 hour ago, Ninja said: 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. Its working fine now. Thanks a lot! Quote
0 Ninja Posted August 30, 2018 Posted August 30, 2018 anytime. please mark my response as the answer so the thread will be closed. Quote
Question
xilence01
I tried adding this code in skill.c
To Automatically receives Lv.7 "Reflect Shield" status that will make melee attacks to be reflected.
It worked fine when a Soul Linker Job casts the spell on the priest.
But when i created an item with this item bonus:
After the using item, the soul link doesn't work.
I provided screenshots:
a) When used an item with the given itembonus. NOT WORKING
b) When a Soul Linker casts the spell. WORKING
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.