Contributor Rakancito 4816 Posted September 23, 2019 Contributor Share Posted September 23, 2019 Spoiler battle.cpp // Search int battle_melee_attack(LPCHARACTER ch, LPCHARACTER victim) { // Add after if(ch->IsPC()) { const bool bAttacking = (get_dword_time() - ch->GetLastAttackTime()) < ch->IsRiding() ? 800 : 750; if (!bAttacking) return BATTLE_NONE; //if (test_server&&ch->IsPC()) // ch->ChatPacket(CHAT_TYPE_INFO, "Melee Attack: %d", get_dword_time() - ch->GetLastAttackTime()); if (!battle_distance_valid(ch, victim)) return BATTLE_NONE; } // Search int battle_hit(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, int & iRetDam) { // Add after if(pkAttacker->IsPC()) { const bool bAttacking = (get_dword_time() - pkAttacker->GetLastAttackTime()) < pkAttacker->IsRiding() ? 800 : 750; if (!bAttacking) return BATTLE_NONE; //if (test_server&&pkAttacker->IsPC()) // pkAttacker->ChatPacket(CHAT_TYPE_INFO, "Melee Attack: %d", get_dword_time() - pkAttacker->GetLastAttackTime()); if (!battle_distance_valid(pkAttacker, pkVictim)) return BATTLE_NONE; } This is the hidden content, please Sign In or Sign Up Ehm... this is a first fix for dmg hack in your Server Side ^^ 74 1 1 2 1 4 1 1 1 23 1 43 Link to comment Share on other sites More sharing options...
Honorable Member Mali 41759 Posted September 24, 2019 Honorable Member Share Posted September 24, 2019 (edited) ehm... Edited August 26, 2022 by Metin2 Dev Core X - External 2 Internal 2 Link to comment Share on other sites More sharing options...
Contributor Rakancito 4816 Posted September 24, 2019 Author Contributor Share Posted September 24, 2019 (edited) hace 10 minutos, Mali61 dijo: ehm... My bad, just remove the duplicate and gg, sorry xD Edited August 26, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Forum Moderator VegaS™ 10266 Posted September 25, 2019 Forum Moderator Share Posted September 25, 2019 On 9/23/2019 at 10:29 PM, Rakancito said: if (pkAttacker->IsRiding()) { bool bAttacking = (get_dword_time() - pkAttacker->GetLastAttackTime()) < 800; if (!bAttacking) return BATTLE_NONE; } else { bool bAttacking = (get_dword_time() - pkAttacker->GetLastAttackTime()) < 750; if (!bAttacking) return BATTLE_NONE; } Let's don't kill the source with dozens of useless lines and duplicated. const bool bAttacking = (get_dword_time() - pkAttacker->GetLastAttackTime()) < pkAttacker->IsRiding() ? 800 : 700; if (!bAttacking) return BATTLE_NONE; 3 Check my GitHub Profile Click to find all the threads started by me [TOOL] Text file loader + JSON Link to comment Share on other sites More sharing options...
Contributor Rakancito 4816 Posted September 25, 2019 Author Contributor Share Posted September 25, 2019 hace 11 minutos, VegaS™ dijo: Let's don't kill the source with dozens of useless lines and duplicated. const bool bAttacking = (get_dword_time() - pkAttacker->GetLastAttackTime()) < pkAttacker->IsRiding() ? 800 : 700; if (!bAttacking) return BATTLE_NONE; Thanks, I will update it. Link to comment Share on other sites More sharing options...
r00t3r 67 Posted September 25, 2019 Share Posted September 25, 2019 (edited) Test before update -> https://metin2.download/picture/3RDcqWNnSQHTb0DHMdEd865G3JVPKQc1/.png Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal 7 1 2 1 3 Link to comment Share on other sites More sharing options...
Contributor Rakancito 4816 Posted September 25, 2019 Author Contributor Share Posted September 25, 2019 (edited) hace 12 minutos, sonyc73 dijo: Test before update -> https://metin2.download/picture/ETyVBxI001a8tgU4DsMkr45pk50Xxol5/.png int battle_hit(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, int & iRetDam) Change: ch-> for: pkAttacker-> and in int battle_melee_attack(LPCHARACTER ch, LPCHARACTER victim) Change: pkAttacker-> for: ch-> Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
r00t3r 67 Posted September 25, 2019 Share Posted September 25, 2019 (edited) https://metin2.download/picture/fBM615G2UIa9VOFd3W4w1chTWo4U1VbH/.png pkAttacker-> 642 = ch->ChatPacket(CHAT_TYPE_INFO, "Melee Attack: %d", get_dword_time() - ch->GetLastAttackTime()); Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal 1 1 Link to comment Share on other sites More sharing options...
Contributor Rakancito 4816 Posted September 25, 2019 Author Contributor Share Posted September 25, 2019 Justo ahora, sonyc73 dijo: pkAttacker-> 642 = ch->ChatPacket(CHAT_TYPE_INFO, "Melee Attack: %d", get_dword_time() - ch->GetLastAttackTime()); You should check the statements. int battle_hit(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, int & iRetDam) pkAttacker ->ChatPacket(CHAT_TYPE_INFO, "Melee Attack: %d", get_dword_time() - pkAttacker->GetLastAttackTime()); int battle_melee_attack(LPCHARACTER ch, LPCHARACTER victim) ch ->ChatPacket(CHAT_TYPE_INFO, "Melee Attack: %d", get_dword_time() - ch->GetLastAttackTime()); Link to comment Share on other sites More sharing options...
r00t3r 67 Posted September 25, 2019 Share Posted September 25, 2019 Now is ok, update the github for all Link to comment Share on other sites More sharing options...
r00t3r 67 Posted September 28, 2019 Share Posted September 28, 2019 Tested on live server, and you can`t attack metin stone Link to comment Share on other sites More sharing options...
Contributor Rakancito 4816 Posted September 28, 2019 Author Contributor Share Posted September 28, 2019 (edited) hace 1 hora, sonyc73 dijo: Tested on live server, and you can`t attack metin stone I can attack Metin Stone in my Test Server. Evidence: https://metin2.download/picture/xyA9B4PIX13HYQEf6P8ak85UE5Kp04D7/.gifYou need to add a condition to verify if the attacker is PC and not NPC... Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal 4 1 1 Link to comment Share on other sites More sharing options...
r00t3r 67 Posted September 28, 2019 Share Posted September 28, 2019 (edited) Acum 19 minute, Rakancito a spus: I can attack Metin Stone in my Test Server. Evidence: https://metin2.download/picture/xyA9B4PIX13HYQEf6P8ak85UE5Kp04D7/.gifYou need to add a condition to verify if the attacker is PC and not NPC... Can you give to me ? Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Nirray 192 Posted September 28, 2019 Share Posted September 28, 2019 (edited) You mean dmg hack svside check from clientside .mse file? Or waithack from SendAttackPacket? If waithack - it is still working (hidden for example) Also, because of first check "GetLastAttackTime" there's a input "lag" (you need to attack twice new mob to deal damage [even visible in your gyazo gif with metin stone @Rakancito]) It's more like workaround To fix it correctly we should change the CalcMeleeDamage CalcArrowDamage iDam = 0; like char_battle.cpp does with bow if (IS_SPEED_HACK(m_me, pkVictim, dwCurrentTime)) iDam = 0; I didn't want to be rude I also want to fix it and I'm here to help input lag:https://metin2.download/picture/aEms6DYU1h5Z4jY0qutm2jZdy1NbkQL7/.gif dmghack after second hit:https://metin2.download/picture/lRF61Ykk8p2uT2kywncvys7cE67gm4KE/.gif Edited August 27, 2022 by Metin2 Dev Core X - External 2 Internal 9 1 1 1 1 1 I completely abandoned working on the files for this game. I do not respond to private messages. Link to comment Share on other sites More sharing options...
Contributor Rakancito 4816 Posted September 28, 2019 Author Contributor Share Posted September 28, 2019 hace 1 minuto, Nirray dijo: You mean dmg hack svside check from clientside .mse file? Or waithack from SendAttackPacket? If waithack - it is still working (hidden for example) Also, because of first check "GetLastAttackTime" there's a input "lag" (you need to attack twice new mob to deal damage [even visible in your gyazo gif with metin stone @Rakancito]) It's more like workaround To fix it correctly we should change the CalcMeleeDamage CalcArrowDamage iDam = 0; like char_battle.cpp does with bow if (IS_SPEED_HACK(m_me, pkVictim, dwCurrentTime)) iDam = 0; I didn't want to be rude I also want to fix it and I'm here to help Ya... sure, i repeat, is the first... I explain. The biggest problem of Metin2 is that it's complete code is on the Internet, itsn't private, that causes the hacks to be more sophisticated and apart from the existence of a business, it's very complicated to fix hacks when those who create the hacks also create the anti hacks, (Good business, i create a hack to deny it with my own anti hack "MONEY, MONEY, MONEY, MONEY AND MORE MONEY, MONEY, MONEY").Just note that the one who sells the solution to fix the DMG Hack by the server also sells one of the most famous and low-cost hacks (MONEY, MONEY, MONEY, MONEY, MONEY). If the code of Metin2 was not on the Internet, i assure you two things. 1. Metin would probably already be offline.2. There wouldn't be so many hacks or they wouldn't be so sophisticated. "Hacks have always been a deficiency of exceptions in the code. " DMG Hack correctly doesn't work, but Wait Hack does, to fix Wait Hack it's necessary to change the headers of the packages or the sending of target packages in attack, however that implies modification of client and reviewing the client with an Analyzer of Memory is not complicated. For WaitHack only one attack speed check is necessary. When you attack, you get an amount of milliseconds of time after that attack, usually DMG Hack will place an attack between 10,000 to 200,000 in time, I don't know why, however Wait Hack no, this will continue to place a similar time analyzer , but it will advance next to your attack speed according to what I observed, if you place a Speed hack checker, the system will count speeds alternately and will expel the user from the server. There are probably more solutions for fixing these two hacks and this can be a good one, I have tested it a lot and the DMG Hack doesn't work at all. The real option against these problems has always been a good anti hack, for that you will need to study a bit of Windows Libraries such as Process32Next, Process32First and CreateToolhelp32Snapshot, review processes and understand that if there is a malicious program, you must close, it's also easy to with a Break Point, but you can search all and close. Now i ask you, what do you prefer? Do you lose a basic in exchange for fixing DMG Hack or do you submit to rent the fix for what he sells himself?. I have no problems with this, since the business is understood and if there is business, there will be people with interest, the interesting thing here would be to increase the part of code that i have placed and improve it. But I think it is up to each one to improve it, for my part if I see that I can improve this, I will publish it (maybe), so we can fix several defects among all. 4 Link to comment Share on other sites More sharing options...
AKUROS 27 Posted April 6, 2020 Share Posted April 6, 2020 It gives me a lot of problems, even if players don't use hacks they don't inflict damage on mobs, or they inflict them but not always. How can i solve? Link to comment Share on other sites More sharing options...
NqeX1911 0 Posted August 29, 2021 Share Posted August 29, 2021 working? 3 Link to comment Share on other sites More sharing options...
Recommended Posts