Jump to content

Looking for a way do deny critical and perf hits


Recommended Posts

You add bonus anti-critical in weapon 

 

BATTLE.CPP

search:
	if (pkWeapon)
		switch (pkWeapon->GetSubType())
		{
			case WEAPON_SWORD:
				iDam = iDam * (150 - pkVictim->GetPoint(POINT_RESIST_SWORD)) / 150;

change EXABLE:
	if (pkWeapon)
		switch (pkWeapon->GetSubType())
		{
			case WEAPON_SWORD:
				iDam = iDam * (150 - pkVictim->GetPoint(POINT_RESIST_SWORD)) / 150;
				iDam = iDam * (-25 - pkVictim->GetPoint(POINT_ANTI_CRITICAL)) / -25; //critical 0% in hit


ony critical
	if (pkWeapon)
		switch (pkWeapon->GetSubType())
		{
			case WEAPON_SWORD:
				iDam = iDam * (150 - pkVictim->GetPoint(POINT_RESIST_SWORD)) / 150;
				iDam = iDam * (-25 - pkVictim->GetPoint(POINT_ANTI_CRITICAL)) / -25; //critical 25% + if X player anti-crit ;)





 

you should see anti-critical to not have crit reduction 

 

you can also with perforation or add perforation 

 

 

25 and -25 if you can 0 critical change with -25  (you test first)

3 minutes ago, Draveniou1 said:

You add bonus anti-critical in weapon 

 

BATTLE.CPP

search:
	if (pkWeapon)
		switch (pkWeapon->GetSubType())
		{
			case WEAPON_SWORD:
				iDam = iDam * (150 - pkVictim->GetPoint(POINT_RESIST_SWORD)) / 150;

change EXABLE:
	if (pkWeapon)
		switch (pkWeapon->GetSubType())
		{
			case WEAPON_SWORD:
				iDam = iDam * (150 - pkVictim->GetPoint(POINT_RESIST_SWORD)) / 150;
				iDam = iDam * (-25 - pkVictim->GetPoint(POINT_ANTI_CRITICAL)) / -25; //critical 0% in hit


ony critical
	if (pkWeapon)
		switch (pkWeapon->GetSubType())
		{
			case WEAPON_SWORD:
				iDam = iDam * (150 - pkVictim->GetPoint(POINT_RESIST_SWORD)) / 150;
				iDam = iDam * (-25 - pkVictim->GetPoint(POINT_ANTI_CRITICAL)) / -25; //critical 25% + if X player anti-crit ;)





 

you should see anti-critical to not have crit reduction 

 

you can also with perforation or add perforation 

 

 

25 and -25 if you can 0 critical change with -25  (you test first)

thx a lot

Char_battle.cpp
 

else if (type == DAMAGE_TYPE_NORMAL || type == DAMAGE_TYPE_NORMAL_RANGE)
	{
		[]...
			int iCriticalPct = pAttacker->GetPoint(POINT_CRITICAL_PCT);

			if (!IsPC())
				iCriticalPct += pAttacker->GetMarriageBonus(UNIQUE_ITEM_MARRIAGE_CRITICAL_BONUS);

			if (iCriticalPct)
			{
				iCriticalPct -= GetPoint(POINT_RESIST_CRITICAL);

				if (number(1, 100) <= iCriticalPct)
				{
					IsCritical = true;
					dam *= 2; // dam = dam * 2, if you change it to dam *= 1 the damage you are dealing with critical attacks will be same like normal hits
					EffectPacket(SE_CRITICAL);
				}
			}

 and this one is for skills
 

	if (type == DAMAGE_TYPE_MELEE || type == DAMAGE_TYPE_RANGE || type == DAMAGE_TYPE_MAGIC)
	{
		if (pAttacker)
		{
			int iCriticalPct = pAttacker->GetPoint(POINT_CRITICAL_PCT);

			if (!IsPC())
				iCriticalPct += pAttacker->GetMarriageBonus(UNIQUE_ITEM_MARRIAGE_CRITICAL_BONUS);

			if (iCriticalPct)
			{
				if (iCriticalPct >= 10)
					iCriticalPct = 5 + (iCriticalPct - 10) / 4;
				else
					iCriticalPct /= 2;

				iCriticalPct -= GetPoint(POINT_RESIST_CRITICAL);

				if (number(1, 100) <= iCriticalPct)
				{
					IsCritical = true;
					dam *= 2;

					EffectPacket(SE_CRITICAL);

					if (IsAffectFlag(AFF_MANASHIELD))
					{
						RemoveAffect(AFF_MANASHIELD);
					}
				}
			}

 

  • Love 1
Just now, Alessio said:

thx a lot

and for damage normal you go in char_skill

					if (pkWeapon)
						switch (pkWeapon->GetSubType())
						{
							case WEAPON_SWORD:

char skill.cpp

 

1 minute ago, Baltazar said:

Char_battle.cpp
 

else if (type == DAMAGE_TYPE_NORMAL || type == DAMAGE_TYPE_NORMAL_RANGE)
	{
		[]...
			int iCriticalPct = pAttacker->GetPoint(POINT_CRITICAL_PCT);

			if (!IsPC())
				iCriticalPct += pAttacker->GetMarriageBonus(UNIQUE_ITEM_MARRIAGE_CRITICAL_BONUS);

			if (iCriticalPct)
			{
				iCriticalPct -= GetPoint(POINT_RESIST_CRITICAL);

				if (number(1, 100) <= iCriticalPct)
				{
					IsCritical = true;
					dam *= 2; // dam = dam * 2, if you change it to dam *= 1 the damage you are dealing with critical attacks will be same like normal hits
					EffectPacket(SE_CRITICAL);
				}
			}

 and this one is for skills
 

	if (type == DAMAGE_TYPE_MELEE || type == DAMAGE_TYPE_RANGE || type == DAMAGE_TYPE_MAGIC)
	{
		if (pAttacker)
		{
			int iCriticalPct = pAttacker->GetPoint(POINT_CRITICAL_PCT);

			if (!IsPC())
				iCriticalPct += pAttacker->GetMarriageBonus(UNIQUE_ITEM_MARRIAGE_CRITICAL_BONUS);

			if (iCriticalPct)
			{
				if (iCriticalPct >= 10)
					iCriticalPct = 5 + (iCriticalPct - 10) / 4;
				else
					iCriticalPct /= 2;

				iCriticalPct -= GetPoint(POINT_RESIST_CRITICAL);

				if (number(1, 100) <= iCriticalPct)
				{
					IsCritical = true;
					dam *= 2;

					EffectPacket(SE_CRITICAL);

					if (IsAffectFlag(AFF_MANASHIELD))
					{
						RemoveAffect(AFF_MANASHIELD);
					}
				}
			}

 

this method have problem with pottion critical + my friends

  • Love 1

when editing these files do i need to edit them like how i do with item_proto? client / navicat / winscp?

 

1 hour ago, Draveniou1 said:

You add bonus anti-critical in weapon 

do you know the values for giving anti-critical in weapon? item_proto values

58 minutes ago, Alessio said:

when editing these files do i need to edit them like how i do with item_proto? client / navicat / winscp?

 

do you know the values for giving anti-critical in weapon? item_proto values

iDam = iDam * (-25 - pkVictim->GetPoint(POINT_ANTI_CRITICAL))

I Think anti-critical 

you should now put anti-critical in the game you can with missions or anything else you can think of

18 minutes ago, Draveniou1 said:

iDam = iDam * (-25 - pkVictim->GetPoint(POINT_ANTI_CRITICAL))

I Think anti-critical 

you should now put anti-critical in the game you can with missions or anything else you can think of

i tried to insert the bonus inside a sword, i changed the file item_proto.txt from winscp but now when i try to start the server i get connection refused error, btw the ID of POINT_ANTI_CRITICAL is -25 or 25? i mean the id that i need to put inside item_proto (navicat)

1 minute ago, Alessio said:

i tried to insert the bonus inside a sword, i changed the file item_proto.txt from winscp but now when i try to start the server i get connection refused error, btw the ID of POINT_ANTI_CRITICAL is -25 or 25? i mean the id that i need to put inside item_proto (navicat)

 

Your serverfiles working this bonus ANTI-CRITICAL ?

5 minutes ago, Draveniou1 said:

 

Your serverfiles working this bonus ANTI-CRITICAL ?

yes, and i changed item_proto.txt, i went to the item 34 and changed APPLY_BONUS_SPEED 27 in POINT_ANTI_CRITICAL 25, also tried with -25

6 minutes ago, Draveniou1 said:

 

Your serverfiles working this bonus ANTI-CRITICAL ?

https://photos.app.goo.gl/rrLT3n67Ri8AhgqU7

i did the back up of item_proto.txt file and then i changed again the values of the item 34(instead of APPLY_BONUS_SPEED 27 i writed POINT_ANTI_CRITICAL 1)and then i changed item_proto files inside client and inside navicat and i changed item 34 with appltype0 = -25 and applyvalue0 = 1 now the server starts with no problems but the bonus isn't working. I'm sorry for making you losing time with this, if you want to leave me by myself i will understand it, i already apreciate what you shared with me untill now

Edited by Alessio
3 hours ago, Alessio said:

yes, and i changed item_proto.txt, i went to the item 34 and changed APPLY_BONUS_SPEED 27 in POINT_ANTI_CRITICAL 25, also tried with -25

https://photos.app.goo.gl/rrLT3n67Ri8AhgqU7

i did the back up of item_proto.txt file and then i changed again the values of the item 34(instead of APPLY_BONUS_SPEED 27 i writed POINT_ANTI_CRITICAL 1)and then i changed item_proto files inside client and inside navicat and i changed item 34 with appltype0 = -25 and applyvalue0 = 1 now the server starts with no problems but the bonus isn't working. I'm sorry for making you losing time with this, if you want to leave me by myself i will understand it, i already apreciate what you shared with me untill now

Check bonus anti-critical if work in your server

 

if anti-crit doesn't work on your server it won't be able to do what you're asking

46 minutes ago, Draveniou1 said:

Check bonus anti-critical if work in your server

 

if anti-crit doesn't work on your server it won't be able to do what you're asking

How can i check if it work?

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.