Alessio 177 Posted February 24, 2023 Share Posted February 24, 2023 I need to reduce to 0 the chance of dealing more damage trough critical hits and perf hits, is there already someone who did that? Link to comment Share on other sites More sharing options...
Active Member Draveniou1 720 Posted February 24, 2023 Active Member Share Posted February 24, 2023 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) Link to comment Share on other sites More sharing options...
Alessio 177 Posted February 24, 2023 Author Share Posted February 24, 2023 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 Link to comment Share on other sites More sharing options...
Baltazar 116 Posted February 24, 2023 Share Posted February 24, 2023 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); } } } 1 Link to comment Share on other sites More sharing options...
Active Member Draveniou1 720 Posted February 24, 2023 Active Member Share Posted February 24, 2023 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 1 Link to comment Share on other sites More sharing options...
Alessio 177 Posted February 24, 2023 Author Share Posted February 24, 2023 2 minutes ago, Draveniou1 said: and for damage normal you go in char_skill i also needed to know that, thanks Link to comment Share on other sites More sharing options...
Active Member Draveniou1 720 Posted February 24, 2023 Active Member Share Posted February 24, 2023 @ Baltazar Critical filters will also be affected by this method I have tried it Link to comment Share on other sites More sharing options...
Alessio 177 Posted February 24, 2023 Author Share Posted February 24, 2023 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 Link to comment Share on other sites More sharing options...
Active Member Draveniou1 720 Posted February 24, 2023 Active Member Share Posted February 24, 2023 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 Link to comment Share on other sites More sharing options...
Alessio 177 Posted February 24, 2023 Author Share Posted February 24, 2023 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) Link to comment Share on other sites More sharing options...
Active Member Draveniou1 720 Posted February 24, 2023 Active Member Share Posted February 24, 2023 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 ? Link to comment Share on other sites More sharing options...
Alessio 177 Posted February 24, 2023 Author Share Posted February 24, 2023 (edited) 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 February 24, 2023 by Alessio Link to comment Share on other sites More sharing options...
Active Member Draveniou1 720 Posted February 24, 2023 Active Member Share Posted February 24, 2023 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 Link to comment Share on other sites More sharing options...
Alessio 177 Posted February 24, 2023 Author Share Posted February 24, 2023 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? 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