Jump to content
  • 0

How can i make parrying, allowed to use even if the user/player use one handed sword only


RN1986

Question


  • Group:  Members
  • Topic Count:  153
  • Topics Per Day:  0.03
  • Content Count:  439
  • Reputation:   2
  • Joined:  05/04/12
  • Last Seen:  

How can i make?? parrying be allowed to use even if the user/player use one handed sword only *Note: Only Allowed to use Parrying if the user is buffed with a Soul Link.

Edited by RN1986
Link to comment
Share on other sites

18 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  764
  • Reputation:   220
  • Joined:  11/14/11
  • Last Seen:  

Open your skill_require_db.txt (../db/pre-re and/or ../db/re) and find this line:

356,0,0,50,0,0,0,3,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //LK_PARRYING#ƒpƒŠƒCƒ“ƒO#

Field #8 (the 3) contains the allowed weapon types. Allowing two-handed and one-handed swords would look lke:

356,0,0,50,0,0,0,2:3,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //LK_PARRYING#ƒpƒŠƒCƒ“ƒO#

*Note: Only Allowed to use Parrying if the user is buffed with a Soul Link.
When using a one handed sword? Always? Please give details...
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

The way I do it, I remove the weapon requirement from skill_require_db.txt and add checks in the source.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  153
  • Topics Per Day:  0.03
  • Content Count:  439
  • Reputation:   2
  • Joined:  05/04/12
  • Last Seen:  

atlast someone answer my question Kenpachi thank you very much......will try it

i want to allowed it when buffed with a Soul Link..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

bump for this!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Try this code in battle.c (Line 539)

if( (sce=sc->data[sC_PARRYING]) && (sc->data[sC_SPIRIT] && sc->data[sC_SPIRIT]->val2 == SL_KNIGHT) && flag&BF_WEAPON && skill_num != WS_CARTTERMINATION && rnd()%100 < sce->val2 )
{ // attack blocked by Parrying
clif_skill_nodamage(bl, bl, LK_PARRYING, sce->val1,1);
return 0;
}

Edited by darristan
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

thanks darristan, but it doesnt worked.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Oops mistaken, try this again. Forget to put check is enemy.

if( (sce=sc->data[sC_PARRYING]) && (sce=sc->data[sC_SPIRIT] && sce=sc->data[sC_SPIRIT]->val2 == SL_KNIGHT) && flag&BF_WEAPON && skill_num != WS_CARTTERMINATION && rnd()%100 < sce->val2 )
{ // attack blocked by Parrying
clif_skill_nodamage(bl, bl, LK_PARRYING, sce->val1,1);
return 0;
}

Edited by darristan
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

i have error on compile :(

1>e:\ro test\rathena\src\map\battle.c(539) : error C2106: '=' : left operand must be l-value
1>e:\ro test\rathena\src\map\battle.c(539) : warning C4047: '=' : 'status_change_entry *' differs in levels of indirection from 'int'

Edited by Rage
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

LOL. Didn't realize I was so stupid to add that check in battle.c

Go to skill.c, find and remove:

case LK_PARRYING:
case MS_PARRYING:

Find these line:

clif_skill_nodamage(src,bl,skillid,skilllv,
  sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
 break;

Now add this below:

case LK_PARRYING:
case MS_PARRYING:

if( !(sc && sc->data[sC_SPIRIT]) ) { // SC_SPIRIT Check
clif_skill_fail(sd,skillid,USESKILL_FAIL_LEVEL,0);
return 0;
}

clif_skill_nodamage(src,bl,skillid,skilllv,
sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
break;

Well, I tested it myself now. It works.

Edited by darristan
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

i still got this error,


1>e:\ro test\rathena\src\map\skill.c(5212) : error C2065: 'sc' : undeclared identifier
1>e:\ro test\rathena\src\map\skill.c(5212) : error C2065: 'sc' : undeclared identifier
1>e:\ro test\rathena\src\map\skill.c(5212) : error C2223: left of '->data' must point to struct/union

Edited by Rage
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Lol how come I can use, alright let's try this:


case LK_PARRYING:
case MS_PARRYING:
if(!(sc && sc->data[sC_SPIRIT] && sc->data[sC_SPIRIT]->val2 == SL_KNIGHT)) {
clif_skill_fail(sd,skillid,USESKILL_FAIL_LEVEL,0);
break;
}
clif_skill_nodamage(src,bl,skillid,skilllv,
sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
break;

Sorry for keeping you error :P

Edited by darristan
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

still got compile error :( i thought it worked on you?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Yes but I'm in my hometown, maybe I check the code when I get back

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

ok darristan.. thank you for your help.. please post the code here :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  31
  • Reputation:   0
  • Joined:  08/29/12
  • Last Seen:  

Up for this.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  210
  • Reputation:   10
  • Joined:  11/20/11
  • Last Seen:  

Way around.

Open your skill_require_db.txt (../db/pre-re and/or ../db/re) and find this line:

356,0,0,50,0,0,0,3,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //LK_PARRYING#ƒpƒŠƒCƒ“ƒO#

Field #8 (the 3) contains the allowed weapon types. Allowing two-handed and one-handed swords would look lke:

356,0,0,50,0,0,0,2:3,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //LK_PARRYING#ƒpƒŠƒCƒ“ƒO#

*Note: Only Allowed to use Parrying if the user is buffed with a Soul Link.
When using a one handed sword? Always? Please give details...

0x8 to make it spirit skill. this skill would be level 1 all the time.

../db/.../skill_db.txt

356,0,6,4,0,0x1,0,10,1,no,0,0x8,0,weapon,0,	LK_PARRYING,Parrying

../src/map/status.c

  	 case SC_PARRYING:
   	 val2 = 20 + val1*3; //Block Chance <<< change the values to fit your needs.
		break;

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

if you want for certain weapon, you can make the 2-handed sword, but the position only on right hand..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  31
  • Reputation:   0
  • Joined:  08/29/12
  • Last Seen:  

Topic Starter meant was.

When Lord Knight Class is on soul link, they can use Parrying with One Hand Sword. Without soul link they cannot use parrying with one hand sword.

Edited by kamoteka
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...