Jump to content
  • 0
Sign in to follow this  
Hadeszeus

Regarding Reading Skill

Question

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 by Hadeszeus

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

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 by Hadeszeus

Share this post


Link to post
Share on other sites
  • 0

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.

Share this post


Link to post
Share on other sites
  • 0

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!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.