xyxzero Posted August 29, 2018 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 90 Reputation: 6 Joined: 12/11/12 Last Seen: December 11, 2018 Share Posted August 29, 2018 Code in status.cpp case SC_FREEZE: if (status->luk == 300) return 0; sc_def = status->mdef*100; sc_def2 = status->luk*10 + status_get_lv(bl)*10 - status_get_lv(src)*10; tick_def2 = status->luk*10 + status_src->luk*-10; // Caster can increase final duration with luk break; still gets frozen even luk is 300 any help? Quote Link to comment Share on other sites More sharing options...
0 Ninja Posted August 29, 2018 Group: Members Topic Count: 54 Topics Per Day: 0.01 Content Count: 513 Reputation: 84 Joined: 08/11/12 Last Seen: July 4, 2024 Share Posted August 29, 2018 (edited) 2 hours ago, xyxzero said: case SC_FREEZE: if (status->luk == 300) return 0; sc_def = status->mdef*100; sc_def2 = status->luk*10 + status_get_lv(bl)*10 - status_get_lv(src)*10; tick_def2 = status->luk*10 + status_src->luk*-10; // Caster can increase final duration with luk break; Your code would only work IF AND ONLY IF the target has EXACTLY 300 luk. trying using >= instead of ==, also you have to add a check if the target is a player, else, any target, may it be a mob or a player will not be frozen if it has more than or equal to 300 luk. case SC_FREEZE: if (bl->type == BL_PC && status->luk >= 300) return 0; sc_def = status->mdef*100; sc_def2 = status->luk*10 + status_get_lv(bl)*10 - status_get_lv(src)*10; tick_def2 = status->luk*10 + status_src->luk*-10; // Caster can increase final duration with luk break; Edited August 29, 2018 by Ninja it is better to do it in status_get_sc_def for a more standardized approach. Quote Link to comment Share on other sites More sharing options...
0 xyxzero Posted August 29, 2018 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 90 Reputation: 6 Joined: 12/11/12 Last Seen: December 11, 2018 Author Share Posted August 29, 2018 Thank you @Ninja Quote Link to comment Share on other sites More sharing options...
Question
xyxzero
Code in status.cpp
case SC_FREEZE:
if (status->luk == 300)
return 0;
sc_def = status->mdef*100;
sc_def2 = status->luk*10 + status_get_lv(bl)*10 - status_get_lv(src)*10;
tick_def2 = status->luk*10 + status_src->luk*-10; // Caster can increase final duration with luk
break;
still gets frozen even luk is 300
any help?
Link to comment
Share on other sites
2 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.