Jump to content
  • 0

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


Question

Posted (edited)

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

18 answers to this question

Recommended Posts

Posted

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...
Posted (edited)

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
Posted (edited)

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
Posted (edited)

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
Posted (edited)

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
Posted (edited)

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
Posted (edited)

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
Posted

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;

Posted (edited)

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...