Jump to content

Recommended Posts

Hi everyone,

i have a questions.

how to hit any monster by 1 per hit?

 

Ex code: https://metin2.download/picture/7XzQ2749bX8qT2zfOm2cFH34yk4w6yEo/.png

 

but something is causing it to deal too much damage

https://metin2.download/picture/80MYl3919mcx3Ju6z24Gieop7zy8nUTl/.gif

how can I do that?

Edited by Metin2 Dev International
Core X - External 2 Internal
Link to comment
https://metin2.dev/topic/30887-max-1-damage/
Share on other sites

  • Honorable Member

Depending on where you inserted it, bonuses like penetrating hits could be at fault.

Be sure to place the check after bonuses such as critical and penetrating get evaluated, or simply return after setting damage to 1.

Edited by Syreldar

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
https://metin2.dev/topic/30887-max-1-damage/#findComment-157818
Share on other sites

3 minutes ago, Syreldar said:

Depending on where you inserted it, penetrating hits could be at fault.

Be sure to place the check after the critical and penetrating calculation has been done, or simply return after setting damage to 1.

https://metin2.download/picture/g0yavnu1uKIpilYa3iBRNYQhM9Xq5zo6/.png

 

char_battle.cpp here

Edited by Metin2 Dev International
Core X - External 2 Internal
Link to comment
https://metin2.dev/topic/30887-max-1-damage/#findComment-157819
Share on other sites

Hi @mrtcnglrr

Search:

 

			if (pAttacker->GetPoint(POINT_STEAL_HP))
			{
				int pct = 1;

				if (number(1, 10) <= pct)
				{
					int iHP = MIN(dam, MAX(0, iCurHP)) * pAttacker->GetPoint(POINT_STEAL_HP) / 100;

					if (iHP > 0 && GetHP() >= iHP)
					{
						CreateFly(FLY_HP_SMALL, pAttacker);
#ifdef YOUR_DEFINE
						if (!IsNPC())
						{
							pAttacker->PointChange(POINT_HP, iHP);
							PointChange(POINT_HP, -iHP);
						}
#else
						pAttacker->PointChange(POINT_HP, iHP);
						PointChange(POINT_HP, -iHP);
#endif
					}
				}
			}


What I did in this code was omit the HP absorb damage on the monsters.

Works.

  • Love 1
Link to comment
https://metin2.dev/topic/30887-max-1-damage/#findComment-157820
Share on other sites

  • Solution
3 hours ago, caanmasu said:

Hi @mrtcnglrr

Search:

 

			if (pAttacker->GetPoint(POINT_STEAL_HP))
			{
				int pct = 1;

				if (number(1, 10) <= pct)
				{
					int iHP = MIN(dam, MAX(0, iCurHP)) * pAttacker->GetPoint(POINT_STEAL_HP) / 100;

					if (iHP > 0 && GetHP() >= iHP)
					{
						CreateFly(FLY_HP_SMALL, pAttacker);
#ifdef YOUR_DEFINE
						if (!IsNPC())
						{
							pAttacker->PointChange(POINT_HP, iHP);
							PointChange(POINT_HP, -iHP);
						}
#else
						pAttacker->PointChange(POINT_HP, iHP);
						PointChange(POINT_HP, -iHP);
#endif
					}
				}
			}


What I did in this code was omit the HP absorb damage on the monsters.

Works.

Thx dude

Link to comment
https://metin2.dev/topic/30887-max-1-damage/#findComment-157822
Share on other sites

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.