Jump to content

[C++] Anti Wait hack


Robert
 Share

Recommended Posts

Vamos a battle.cpp

Y agregamos al final de los include:

#include "db.h" 

Luego buscamos:

bool IS_SPEED_HACK(LPCHARACTER ch, LPCHARACTER victim, DWORD current_time)

Y remplazamos con esto:

#define ENABLE_SYSCHAT_NOTICE
#define ENABLE_SYSLOG_NOTICE
#define ENABLE_BAN_WAITHACK
bool IS_SPEED_HACK(LPCHARACTER ch, LPCHARACTER victim, DWORD current_time)
{
if (ch->m_kAttackLog.dwVID == victim->GetVID())
{
if (current_time - ch->m_kAttackLog.dwTime < GET_ATTACK_SPEED(ch))
{
INCREASE_SPEED_HACK_COUNT(ch);
if (test_server)
{
sys_log(0, "%s attack hack! time (delta, limit)=(%u, %u) hack_count %d",
ch->GetName(),
current_time - ch->m_kAttackLog.dwTime,
GET_ATTACK_SPEED(ch),
ch->m_speed_hack_count);
ch->ChatPacket(CHAT_TYPE_INFO, "%s attack hack! time (delta, limit)=(%u, %u) hack_count %d",
ch->GetName(),
current_time - ch->m_kAttackLog.dwTime,
GET_ATTACK_SPEED(ch),
ch->m_speed_hack_count);
}
SET_ATTACK_TIME(ch, victim, current_time);
SET_ATTACKED_TIME(ch, victim, current_time);
return true;
}
}
SET_ATTACK_TIME(ch, victim, current_time);
if (victim->m_AttackedLog.dwPID == ch->GetPlayerID())
{
if (current_time - victim->m_AttackedLog.dwAttackedTime < GET_ATTACK_SPEED(ch))
{
INCREASE_SPEED_HACK_COUNT(ch);
if (ch->m_speed_hack_count > 50)
{
#ifdef ENABLE_SYSLOG_NOTICE
sys_log(0, "%s Attack Speed HACK! time (delta, limit)=(%u, %u), hack_count = %d",
ch->GetName(),
current_time - victim->m_AttackedLog.dwAttackedTime,
GET_ATTACK_SPEED(ch),
ch->m_speed_hack_count);
#endif
#ifdef ENABLE_SYSCHAT_NOTICE
ch->ChatPacket(CHAT_TYPE_INFO, "Attack Speed Hack(%s), (delta, limit)=(%u, %u), hack_count = %d",
ch->GetName(),
current_time - victim->m_AttackedLog.dwAttackedTime,
GET_ATTACK_SPEED(ch),
ch->m_speed_hack_count);
#endif 
#ifdef ENABLE_BAN_WAITHACK 
std::auto_ptr<SQLMsg> msg(DBManager::instance().DirectQuery("UPDATE account.account SET status= 'BLOCK' WHERE id = %d", ch->GetDesc()->GetAccountTable().id));
#endif
ch->GetDesc()->DelayedDisconnect(3);
}
SET_ATTACKED_TIME(ch, victim, current_time);
return true;
}
}
SET_ATTACKED_TIME(ch, victim, current_time);
return false;
}

Debería quedar algo así:

3f58ea34df881e798e12f14f413eee5d.png

babf767727.png

 

Y un video de la prueba:

Debes iniciar sesión para ver el contenido del enlace en esta publicación.

Link to comment
Share on other sites

  • 3 months later...
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...