Jump to content
  • 0
Rebel

Working LK Soul Link Mod

Question

Requesting for a working Lord Knight Soul Link Modification..
If linked, LK_PARRYING skill can be used with One Handed Sword also.

Tested all the available src mods here in forums but its not working.

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 1

At skill.c

@@ -15709,7 +16049,9 @@ bool skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_i
         return false;
     }
 
-    if( require.weapon && !pc_check_weapontype(sd,require.weapon) ) {
+    if( require.weapon && !pc_check_weapontype(sd,require.weapon) ||
+        (skill_id == LK_PARRYING && sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_KNIGHT && sd->weapontype1 == W_1HSWORD)) {
         switch(skill_id) {
             case RA_AIMEDBOLT:
                 break;
@@ -15774,6 +16116,7 @@ bool skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id,
 	struct status_data *status;
 	int i;
 	short index[MAX_SKILL_ITEM_REQUIRE];
+	struct status_change *sc = &sd->sc;
 
 	nullpo_retr(false,sd);
 
@@ -15879,7 +16222,9 @@ bool skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id,
 		return false;
 	}
 
-	if( require.weapon && !pc_check_weapontype(sd,require.weapon) ) {
+	if( require.weapon && !(pc_check_weapontype(sd,require.weapon) ||
+		(skill_id == LK_PARRYING && sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_KNIGHT && sd->weapontype1 == W_1HSWORD))) {
 		clif_skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0);
 		return false;
 	}

status.c

@@ -9835,7 +9956,10 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
 			tick = -1; // Duration sent to the client should be infinite
 			break;
 		case SC_PARRYING:
-		    val2 = 20 + val1*3; // Block Chance
+			if (sd && sd->weapontype1 == W_1HSWORD)
+				val2 = val1 * 3;
+			else
+				val2 = 20 + val1*3; // Block Chance
 			break;
 
 		case SC_WINDWALK:

 

  • Love 1
Link to comment
Share on other sites

  • 0

Sorry im not exactly sure how to add weapon types to the src formulas . . . .

 

but what i see is your asking for a levelable skill to be linked , to be allowed to use a weapon type not originally allowed?

 

You can achieve what you want easily but id take another route

 

but thats just cause i dont know how to do the first step 🙂 

 

making a copy of the skill , then just letting that one be for 1h would be doable if you cant figure it out lol

 

Edited by lllaaazzz
Link to comment
Share on other sites

  • 0
On 9/25/2018 at 2:04 AM, idLaZ said:

If I remember correctly, I made it work in the latest rAthena. Will send you the fix, possible later when I'm in office.

Okay thank you. Will wait for it.

BUMP! Any dev that can help? 😤

@vBrenth Not working. Still cant use 1 hand sword when soul linked..

Link to comment
Share on other sites

  • 0
29 minutes ago, vBrenth said:

Weird its totally working on my side.

What git hash of rathena are you using?

Edited by Rebel
Link to comment
Share on other sites

  • 0

Open skill.c

Find: struct map_session_data *tsd = BL_CAST(BL_PC, target);

After, add: struct status_change *sc, *tsc;

Find the 2: if( require.weapon && !pc_check_weapontype(sd,require.weapon) ) {

Replace with: if(require.weapon && !(pc_check_weapontype(sd,require.weapon) || (skill_id == LK_PARRYING && sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_KNIGHT && sd->status.weapon == W_1HSWORD)) ){

Link to comment
Share on other sites

  • 0
2 hours ago, idLaZ said:

Open skill.c

Find: struct map_session_data *tsd = BL_CAST(BL_PC, target);

After, add: struct status_change *sc, *tsc;

Find the 2: if( require.weapon && !pc_check_weapontype(sd,require.weapon) ) {

Replace with: if(require.weapon && !(pc_check_weapontype(sd,require.weapon) || (skill_id == LK_PARRYING && sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_KNIGHT && sd->status.weapon == W_1HSWORD)) ){

skill.c? how outdated is your rathena?

Link to comment
Share on other sites

  • 0

*bump

Is this still working on Latest? Thank you!!! ❤️

On 9/26/2018 at 6:45 PM, vBrenth said:

At skill.c

@@ -15709,7 +16049,9 @@ bool skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_i
         return false;
     }
 
-    if( require.weapon && !pc_check_weapontype(sd,require.weapon) ) {
+    if( require.weapon && !pc_check_weapontype(sd,require.weapon) ||
+        (skill_id == LK_PARRYING && sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_KNIGHT && sd->weapontype1 == W_1HSWORD)) {
         switch(skill_id) {
             case RA_AIMEDBOLT:
                 break;
@@ -15774,6 +16116,7 @@ bool skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id,
 	struct status_data *status;
 	int i;
 	short index[MAX_SKILL_ITEM_REQUIRE];
+	struct status_change *sc = &sd->sc;
 
 	nullpo_retr(false,sd);
 
@@ -15879,7 +16222,9 @@ bool skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id,
 		return false;
 	}
 
-	if( require.weapon && !pc_check_weapontype(sd,require.weapon) ) {
+	if( require.weapon && !(pc_check_weapontype(sd,require.weapon) ||
+		(skill_id == LK_PARRYING && sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_KNIGHT && sd->weapontype1 == W_1HSWORD))) {
 		clif_skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0);
 		return false;
 	}

status.c

@@ -9835,7 +9956,10 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
 			tick = -1; // Duration sent to the client should be infinite
 			break;
 		case SC_PARRYING:
-		    val2 = 20 + val1*3; // Block Chance
+			if (sd && sd->weapontype1 == W_1HSWORD)
+				val2 = val1 * 3;
+			else
+				val2 = 20 + val1*3; // Block Chance
 			break;
 
 		case SC_WINDWALK:

 

I successfully addded it to my server and recompiled and no errors found but when I used SL_Knight Linked, and I still can't use One Handed Sword to use Parry Skill..

Link to comment
Share on other sites

  • 0
On 9/26/2018 at 6:45 AM, vBrenth said:

At skill.c

@@ -15709,7 +16049,9 @@ bool skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_i
         return false;
     }
 
-    if( require.weapon && !pc_check_weapontype(sd,require.weapon) ) {
+    if( require.weapon && !(pc_check_weapontype(sd,require.weapon) ||
+        (skill_id == LK_PARRYING && sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_KNIGHT && sd->weapontype1 == W_1HSWORD))) {
         switch(skill_id) {
             case RA_AIMEDBOLT:
                 break;
@@ -15774,6 +16116,7 @@ bool skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id,
 	struct status_data *status;
 	int i;
 	short index[MAX_SKILL_ITEM_REQUIRE];
+	struct status_change *sc = &sd->sc;
 
 	nullpo_retr(false,sd);
 
@@ -15879,7 +16222,9 @@ bool skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id,
 		return false;
 	}
 
-	if( require.weapon && !pc_check_weapontype(sd,require.weapon) ) {
+	if( require.weapon && !(pc_check_weapontype(sd,require.weapon) ||
+		(skill_id == LK_PARRYING && sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_KNIGHT && sd->weapontype1 == W_1HSWORD))) {
 		clif_skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0);
 		return false;
 	}

status.c

@@ -9835,7 +9956,10 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
 			tick = -1; // Duration sent to the client should be infinite
 			break;
 		case SC_PARRYING:
-		    val2 = 20 + val1*3; // Block Chance
+			if (sd && sd->weapontype1 == W_1HSWORD)
+				val2 = val1 * 3;
+			else
+				val2 = 20 + val1*3; // Block Chance
 			break;
 
 		case SC_WINDWALK:

 

It's Working 

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...

Important Information

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