Hadeszeus 15 Posted July 20, 2014 (edited) how can I limit the reading to 2 instead of 4? Base on Official Server. You can only Preserved 2 Skill without Summoning any ball. Right now I can Read 4 Spellbook and Released them all.Can you help for quick fix pls? // Warlock Spellbooks. [LimitLine/3CeAM]int skill_spellbook (struct map_session_data *sd, int nameid) { int i, max_preserve, skill_id, point; struct status_change *sc; nullpo_ret(sd); sc = status->get_sc(&sd->bl); status_change_end(&sd->bl, SC_STOP, INVALID_TIMER); for(i=SC_SPELLBOOK1; i <= SC_SPELLBOOK7; i++) if( sc && !sc->data[i] ) break; if( i > SC_SPELLBOOK7 ) { clif->skill_fail(sd, WL_READING_SB, USESKILL_FAIL_SPELLBOOK_READING, 0); return 0; } ARR_FIND(0,MAX_SKILL_SPELLBOOK_DB,i,skill->spellbook_db[i].nameid == nameid); // Search for information of this item if( i == MAX_SKILL_SPELLBOOK_DB ) return 0; if( !pc->checkskill(sd, (skill_id = skill->spellbook_db[i].skill_id)) ) { // User don't know the skill sc_start(&sd->bl, &sd->bl, SC_SLEEP, 100, 1, skill->get_time(WL_READING_SB, pc->checkskill(sd,WL_READING_SB))); clif->skill_fail(sd, WL_READING_SB, USESKILL_FAIL_SPELLBOOK_DIFFICULT_SLEEP, 0); return 0; } max_preserve = 4 * pc->checkskill(sd, WL_FREEZE_SP) + (status_get_int(&sd->bl) + sd->status.base_level) / 10; point = skill->spellbook_db[i].point - 2; if( sc && sc->data[SC_READING_SB] ) { if( (sc->data[SC_READING_SB]->val2 + point) > max_preserve ) { clif->skill_fail(sd, WL_READING_SB, USESKILL_FAIL_SPELLBOOK_PRESERVATION_POINT, 0); return 0; } for(i = SC_SPELLBOOK7; i >= SC_SPELLBOOK1; i--){ // This is how official saves spellbook. [malufett] if( !sc->data[i] ){ sc->data[SC_READING_SB]->val2 += point; // increase points sc_start4(&sd->bl,&sd->bl, (sc_type)i, 100, skill_id, pc->checkskill(sd,skill_id), point, 0, INVALID_TIMER); break; } } Edited July 20, 2014 by Hadeszeus Quote Share this post Link to post Share on other sites
0 ぽろり 1 Posted July 21, 2014 src/map/skill.h #define MAX_SKILL_SPELLBOOK_DB 17 and you have to configure preserve points in db/spellbook_db.txt Quote Share this post Link to post Share on other sites
0 Hadeszeus 15 Posted July 21, 2014 (edited) src/map/skill.h #define MAX_SKILL_SPELLBOOK_DB 17 and you have to configure preserve points in db/spellbook_db.txt Thanks for your reply. But what Im saying is the skill effect of Reading & Release. When you read a Spellbook you are allowed to READ 4 SPELLBOOK. Then Release it 4x. The correct effect of this should only allow to ready TWICE and RELEASE TWICE also not 4x. Edited July 21, 2014 by Hadeszeus Quote Share this post Link to post Share on other sites
0 ぽろり 1 Posted July 21, 2014 so you wanna read 2 spell books then release it 2x? Quote Share this post Link to post Share on other sites
0 Hadeszeus 15 Posted July 21, 2014 so you wanna read 2 spell books then release it 2x? Yes that's what I need. Do u know which part of the source should I look? Quote Share this post Link to post Share on other sites
0 ぽろり 1 Posted July 21, 2014 changing max_preserve = 4 * pc->checkskill(sd, WL_FREEZE_SP) + (status_get_int(&sd->bl) + sd->status.base_level) / 10; to max_preserve = 2; is a way that works for me, although you have to configure every "PreservePoints" in spellbook_db.txt to 1 since each of the skills have their own preserve points 14,1,6190 // limits cold bolt to 2 reads and 2 release. Quote Share this post Link to post Share on other sites
0 Hadeszeus 15 Posted July 21, 2014 Thank you changing max_preserve = 4 * pc->checkskill(sd, WL_FREEZE_SP) + (status_get_int(&sd->bl) + sd->status.base_level) / 10; to max_preserve = 2; is a way that works for me, although you have to configure every "PreservePoints" in spellbook_db.txt to 1 since each of the skills have their own preserve points 14,1,6190 // limits cold bolt to 2 reads and 2 release. Thank you so much for this I will try later.. Thanks again! Quote Share this post Link to post Share on other sites
how can I limit the reading to 2 instead of 4?
Base on Official Server. You can only Preserved 2 Skill without Summoning any ball.
Right now I can Read 4 Spellbook and Released them all.
Can you help for quick fix pls?
Share this post
Link to post
Share on other sites