Lord Knight [SL Modification]

Pandaaa

New member
Messages
170
Points
0
Location
Wonderland
Github
donthedonn
Emulator
A soul link modification for parrying skill of Lord Knight

heres the line

SKILL.C(Original)

if( require.weapon && !pc_check_weapontype(sd,require.weapon) ) {        
clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0);
        return 0;
    }
 
 to

SKILL.C(Mod for Parrying)

if( require.weapon && !pc_check_weapontype(sd,require.weapon) && skill_id == LK_PARRYING && !sd->sc.data[SC_SOULLINK] && !pc_check_weapontype(sd,2)) {
        clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0);
        return 0;
    }
  after compiling this parrying with one hand sword (soul linked) is working but the other jobs skills are freely used without any weapon requirements (like Sonic Blow that need katar to use but i can use without any weapon).... revierting to the original skill.c backs to normal that requires weapons on specific skills

HELP ANYONE? 
default_sad.png

 
 
well yeah, you forced it to only work when the skill is == parrying. you have to isolate the parry condition from the rest

if( require.weapon && !pc_check_weapontype(sd,require.weapon)) {

if( skill_id == LK_PARRYING && sd->sc.data[SC_SOULLINK]) {
        return 0;

    }

else {

clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0);

        return 0;

}

}

 
well yeah, you forced it to only work when the skill is == parrying. you have to isolate the parry condition from the rest

if( require.weapon && !pc_check_weapontype(sd,require.weapon)) {

if( skill_id == LK_PARRYING && sd->sc.data[SC_SOULLINK]) {

        return 0;

    }

else {

clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0);

        return 0;

}

}
Tried this thing it works but Parrying Skill doesn't respond when pressing/clicking with soul link.

 
oh right. that one made it so the case we needed to pass was gatekeepered

if( skill_id != LK_PARRYING && require.weapon && !pc_check_weapontype(sd,require.weapon)) {

clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0);

        return 0;

}

if( skill_id == LK_PARRYING && !sd->sc.data[SC_SOULLINK] && require.weapon && !pc_check_weapontype(sd,require.weapon)) {

clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0);

        return 0;

}

ifskill_id == LK_PARRYING && sd->sc.data[SC_SOULLINK]) {

        return 0;

    }

 
Last edited by a moderator:
oh right. that one made it so the case we needed to pass was gatekeepered

if( skill_id != LK_PARRYING && require.weapon && !pc_check_weapontype(sd,require.weapon)) {

clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0);

        return 0;

}

if( skill_id == LK_PARRYING && !sd->sc.data[SC_SOULLINK] && require.weapon && !pc_check_weapontype(sd,require.weapon)) {

clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0);

        return 0;

}

ifskill_id == LK_PARRYING && sd->sc.data[SC_SOULLINK]) {

        return 0;

    }
same 
default_sad.png


 
i see, so return 0 means fail the skill. just do

ifskill_id == LK_PARRYING && sd->sc.data[SC_SOULLINK]) {

    }

then

 
Anyone has a working copy for this? The solution above is not working in the latest hercules.

 
Find in skill.c

int skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id, uint16 skill_lv)


insert after

int index[MAX_SKILL_ITEM_REQUIRE];


this

struct status_change *sc = &sd->sc;


find in skill.c

if( require.weapon && !pc_check_weapontype(sd,require.weapon) ) {
clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0);
return 0;
}


change to

if( require.weapon && !(pc_check_weapontype(sd,require.weapon) ||
(skill_id == LK_PARRYING && sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_KNIGHT && sd->weapontype == W_1HSWORD))) {
clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0);
return 0;
}


Find again in skill.c

if( require.weapon && !pc_check_weapontype(sd,require.weapon) ) {
clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0);
return 0;
}


change to

if( require.weapon && !(pc_check_weapontype(sd,require.weapon) ||
(skill_id == LK_PARRYING && sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_KNIGHT && sd->weapontype == W_1HSWORD))) {
clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0);
return 0;
}


recompile.

 
Last edited by a moderator:
Back
Top