Jump to content
  • 0

skill point per job level


HaoBradley

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  05/01/18
  • Last Seen:  

Hi,

Is there a way to make X class to gain X skillpoints per job level ?

Like, lets say a Mage gaining 3 skill points instead of 1, when it level up job

I know i can increase max job level but i dont wanna do that, i want the max job level for each class remains the same as original

Thank you in advance

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  47
  • Reputation:   3
  • Joined:  05/04/14
  • Last Seen:  

You can go into pc.cpp in your source and look for this line:

 

int pc_checkjoblevelup(map_session_data *sd)
{
    t_exp next = pc_nextjobexp(sd);

    nullpo_ret(sd);
    if(!next || sd->status.job_exp < next || pc_is_maxjoblv(sd))
        return 0;

    uint32 job_level = sd->status.job_level;

    do {
        sd->status.job_exp -= next;
        //Kyoki pointed out that the max overcarry exp is the exp needed for the previous level -1. [Skotlex]
        if( ( !battle_config.multi_level_up || ( battle_config.multi_level_up_job > 0 && sd->status.job_level >= battle_config.multi_level_up_job ) ) && sd->status.job_exp > next-1 )
            sd->status.job_exp = next-1;

        sd->status.job_level ++;
        sd->status.skill_point++;

        if( pc_is_maxjoblv(sd) ){
            sd->status.job_exp = u64min(sd->status.job_exp,MAX_LEVEL_JOB_EXP);
            break;
        }
    } while ((next=pc_nextjobexp(sd)) > 0 && sd->status.job_exp >= next);

    clif_updatestatus(sd,SP_JOBLEVEL);
    clif_updatestatus(sd,SP_JOBEXP);
    clif_updatestatus(sd,SP_NEXTJOBEXP);
    clif_updatestatus(sd,SP_SKILLPOINT);
    status_calc_pc(sd,SCO_FORCE);
    clif_misceffect(&sd->bl,1);
    if (pc_checkskill(sd, SG_DEVIL) && ((sd->class_&MAPID_THIRDMASK) == MAPID_STAR_EMPEROR || pc_is_maxjoblv(sd)) )
        clif_status_change(&sd->bl, EFST_DEVIL1, 1, 0, 0, 0, 1); //Permanent blind effect from SG_DEVIL.

    npc_script_event(sd, NPCE_JOBLVUP);
    for (; job_level <= sd->status.job_level; job_level++)
        achievement_update_objective(sd, AG_GOAL_LEVEL, 1, job_level);

    pc_show_questinfo(sd);
    return 1;
}


where you can find "sd->status.skill_point++;"
which you can change to "sd->status.skill_point += 3; so every job gets 3 skill points for every job level. but you can also use if statements if you want to only enable that for certain jobs.
Example:

 

    do {
        sd->status.job_exp -= next;
        if( ( !battle_config.multi_level_up || ( battle_config.multi_level_up_job > 0 && sd->status.job_level >= battle_config.multi_level_up_job ) ) && sd->status.job_exp > next-1 )
            sd->status.job_exp = next-1;

        sd->status.job_level++;

        // Check if the character is a Swordsman and apply different skill point logic.
        if (sd->class_ == JOB_SWORDMAN) {             
            sd->status.skill_point += 3; // Swordsman gets 3 skill points
        } else {
            sd->status.skill_point++; // Others get 1 skill point
        }

        if( pc_is_maxjoblv(sd) ){
            sd->status.job_exp = u64min(sd->status.job_exp, MAX_LEVEL_JOB_EXP);
            break;
        }
    } while ((next=pc_nextjobexp(sd)) > 0 && sd->status.job_exp >= next);

which will only give swordsman 3 skillpoints when leveling up job and everyone else the same 1 skillpoint per level.

If you use this in your source be aware that giving yourselfs joblevel with @jlvl command will only still give you 1 skillpoint regardless of what you input here.

Maybe someone else could give better details on that

Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...