Jump to content

Recommended Posts

hi i have a request for you in C++.

I would like to use the bonus bow_distance but i have some problem with him:

1: bonus work only with the skills, the basic attack arrow dont work

2: the range of the skill grow up with the bonus but didnt make damage.

 

hope you can help me.

Link to comment
https://metin2.dev/topic/11344-bonus-bow_distance/
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

open battle.cpp

look inside int CalcArrowDamage function

 

Spoiler

int iDist = (int) (DISTANCE_SQRT(pkAttacker->GetX() - pkVictim->GetX(), pkAttacker->GetY() - pkVictim->GetY()));
    int iGap = (iDist / 100) - 5 - pkAttacker->GetPoint(POINT_BOW_DISTANCE);
    int iPercent = 100 - (iGap * 5);

    if (iPercent <= 0)
        return 0;

We can understand from here that iPercent is the calculation of the range from mob - bonus of  bow_distance.

But,if the range is too big then iPercent will become 0 and the function will return 0(nothing).

There are 2 ways to "fix" it.

1 way, is to set iPercent value to the minimum(1) and then it will still do damage but very low.

change to

Spoiler

 if (iPercent <= 0)
       iPercent = 1;

or,there 2nd way is to disable the range-damage factor that means that with every range it will do maximum damage

change int iPercent = 100 - (iGap * 5);

to:

Spoiler

int iPercent = 100;

 

good luck!

Link to comment
https://metin2.dev/topic/11344-bonus-bow_distance/#findComment-66271
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.