Veneno 6 Posted November 24, 2015 Share Posted November 24, 2015 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? Link to comment Share on other sites More sharing options...
Legend 186 Posted November 24, 2015 Share Posted November 24, 2015 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 Link to comment Share on other sites More sharing options...
Veneno 6 Posted November 24, 2015 Author Share Posted November 24, 2015 (edited) 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 September 1, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Legend 186 Posted November 24, 2015 Share Posted November 24, 2015 (edited) 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 September 1, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Veneno 6 Posted November 24, 2015 Author Share Posted November 24, 2015 But in item_proto quiver has a subtype of ARROW Link to comment Share on other sites More sharing options...
Legend 186 Posted November 24, 2015 Share Posted November 24, 2015 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 Link to comment Share on other sites More sharing options...
Veneno 6 Posted November 24, 2015 Author Share Posted November 24, 2015 Thanks I will try Link to comment Share on other sites More sharing options...
Legend 186 Posted November 24, 2015 Share Posted November 24, 2015 Just now, Veneno said: Thanks I will try Good luck. Link to comment Share on other sites More sharing options...
Veneno 6 Posted November 24, 2015 Author Share Posted November 24, 2015 Hey I fixed it by ItemVnum finally I just had to insert a double = Oh, btw can anybody give me a tut about adding the blue arrow effect at the quiver? Link to comment Share on other sites More sharing options...
Legend 186 Posted November 24, 2015 Share Posted November 24, 2015 9 minutes ago, Veneno said: Hey I fixed it by ItemVnum finally I just had to insert a double = Good. Link to comment Share on other sites More sharing options...
Veneno 6 Posted November 25, 2015 Author Share Posted November 25, 2015 Does anybody have a tut for the blue arrow effect? (Source - dinary - packs) Link to comment Share on other sites More sharing options...
myenglishisbad 0 Posted June 12, 2016 Share Posted June 12, 2016 and if i want use this system with all arrow I only need to int iPercent = 100 - (iGap * 5); Replace to int iPercent = 100; ? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now