Jump to content

Recommended Posts

Hey guys I added the Quiver function (unlimited arrows) to my char_battle.cpp and it's great no arrow counting, except that I haven't discovered yet how to make the quiver's damage ignore the archer's distance from the target. What do I mean by that:

If the archer equips the quiver in the official server and is 1 meter away from his target, the damage he causes is the same as if he was 5 meters away from the target. In my quiver this is not happening - the distance reduces the arrow's damage. Is there someone who can show me how to make the quiver ignore the distance and make the arrow shots have the same damage from everywhere?

  • Replies 11
  • Created
  • Last Reply

Top Posters In This Topic

battle.cpp, search for:

int CalcArrowDamage(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, LPITEM pkBow, LPITEM pkArrow, bool bIgnoreDefense)

under int iPercent = 100 - (iGap * 5);
    if (pkArrow->GetSubType() == WEAPON_QUIVER)
    {
        iPercent = 100;
    }

Kind Regards

Legend

15 minutes ago, Legend said:

battle.cpp, search for:

int CalcArrowDamage(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, LPITEM pkBow, LPITEM pkArrow, bool bIgnoreDefense)

under int iPercent = 100 - (iGap * 5);
    if (pkArrow->GetSubType() == WEAPON_QUIVER)
    {
        iPercent = 100;
    }

Kind Regards

Legend

Thanks friend but what am I doing wrong here?

Spoiler

int iGap = (iDist / 100) - 5 - pkAttacker->GetPoint(POINT_BOW_DISTANCE);
    int iPercent = 100 - (iGap * 5);

    if (pkArrow->GetVnum() = 79504)
    {
        iPercent = 100;
    }

    if (iPercent <= 0)
        return 0;
    else if (iPercent > 100)
        iPercent = 100;

    int iDam = 0;

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

Edited by Metin2 Dev
Core X - External 2 Internal
7 minutes ago, Veneno said:

Thanks friend but what am I doing wrong here?

  Hide contents

int iGap = (iDist / 100) - 5 - pkAttacker->GetPoint(POINT_BOW_DISTANCE);
    int iPercent = 100 - (iGap * 5);

    if (pkArrow->GetVnum() = 79504)
    {
        iPercent = 100;
    }

    if (iPercent <= 0)
        return 0;
    else if (iPercent > 100)
        iPercent = 100;

    int iDam = 0;

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

You cant use item ID for this, use subtype.

Edited by Metin2 Dev
Core X - External 2 Internal
4 minutes ago, Veneno said:

But in item_proto quiver has a subtype of ARROW

Archery Quiver System is much more than this, make different subtype only for quiver, the subtype should be called WEAPON_QUIVER

  • 6 months later...

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.