Jump to content

How To Fix DMG Hack SVSIDE


Rakancito

Recommended Posts

  • Contributor
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

 

Ehm... this is a first fix for dmg hack in your Server Side ^^

  • Metin2 Dev 71
  • kekw 1
  • Dislove 1
  • Sad 2
  • Cry 1
  • Think 4
  • Confused 1
  • Scream 1
  • Lmao 1
  • Good 23
  • Love 1
  • Love 40
Link to comment
Share on other sites

  • Forum Moderator
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;

 

  • Love 3
Link to comment
Share on other sites

  • Contributor
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

  • Contributor
hace 12 minutos, sonyc73 dijo:
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 by Metin2 Dev
Core X - External 2 Internal
  • Good 1
Link to comment
Share on other sites

  • Contributor
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

  • Contributor
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/.gif

You need to add a condition to verify if the attacker is PC and not NPC...

 

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 4
  • Good 1
  • Love 1
Link to comment
Share on other sites

Acum 19 minute, Rakancito a spus:

I can attack Metin Stone in my Test Server.

Evidence: https://metin2.download/picture/xyA9B4PIX13HYQEf6P8ak85UE5Kp04D7/.gif

You need to add a condition to verify if the attacker is PC and not NPC...

 

 

Can you give to me ?

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

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 by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 9
  • Angry 1
  • Think 1
  • Good 1
  • Love 1
  • Love 1

I completely abandoned working on the files for this game. I do not respond to private messages.

.png

Link to comment
Share on other sites

  • Contributor
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.
 

 

 

  • Love 4
Link to comment
Share on other sites

  • 6 months later...
  • 1 year later...

Announcements



×
×
  • 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.