Source Fixxes
Hello,
I show you today how you can fix the
"onekill / invisible / summon / teleport" bug from Toms Hack
Copyright @ Yannickmama !!
1. You go first into the DPShttp://forum.ragezone.com/newthread.php?do=newthread&f=457rvr.cpp
2. You are looking for the following functions:
and change this :
to
If you dont define __HACK_0516 go and define it :-*
for the Create Item fix from Toms Hack Programm go to :
CDPSrvr::OnBuyingInfo
and edit this acutually with you code
Then you have fixed allready the biggest problems
have fun and good luck <3
I show you today how you can fix the
"onekill / invisible / summon / teleport" bug from Toms Hack
Copyright @ Yannickmama !!
1. You go first into the DPShttp://forum.ragezone.com/newthread.php?do=newthread&f=457rvr.cpp
2. You are looking for the following functions:
PHP:
CDPSrvr::OnModifyMode
CDPSrvr::OnSummonPlayer
CDPSrvr::OnTeleportPlayer
and change this :
PHP:
#ifdef __HACK_0516
DPID dpid;
ar >> dpid;
if( pUser->m_Snapshot.dpidUser != dpid )
{
Error( "[%s] try to hack : PACKETTYPE_MODIFYMODE", pUser->GetName() );
return;
}
#endif // __HACK_0516
to
PHP:
#ifdef __HACK_0516
DPID dpid;
ar >> dpid;
if( pUser->m_Snapshot.dpidUser != dpid )
{
Error( "[%s] try to hack : PACKETTYPE_MODIFYMODE", pUser->GetName() );
return;
}
if( !pUser->IsAuthHigher(AUTH_GAMEMASTER) )
{
Error( "[%s] try to hack with dpid : PACKETTYPE_MODIFYMODE", pUser->GetName() );
return;
}
#endif // __HACK_0516
If you dont define __HACK_0516 go and define it :-*
for the Create Item fix from Toms Hack Programm go to :
CDPSrvr::OnBuyingInfo
and edit this acutually with you code
PHP:
void CDPSrvr::OnBuyingInfo( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
{/*
BUYING_INFO2 bi2;
ar.Read( (void*)&bi2, sizeof(BUYING_INFO2) );
CWorld* pWorld;
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );
SERIALNUMBER iSerialNumber = 0;
if( IsValidObj( pUser ) && ( pWorld = pUser->GetWorld() ) )
{
bi2.dwRetVal = 0;
CItemElem itemElem;
itemElem.m_dwItemId = bi2.dwItemId;
itemElem.m_nItemNum = (short)bi2.dwItemNum;
itemElem.m_bCharged = TRUE;
BYTE nId;
bi2.dwRetVal = pUser->CreateItem( &itemElem, &nId );
#ifdef __LAYER_1015
g_dpDBClient.SavePlayer( pUser, pWorld->GetID(), pUser->GetPos(), pUser->GetLayer() );
#else // __LAYER_1015
g_dpDBClient.SavePlayer( pUser, pWorld->GetID(), pUser->GetPos() );
#endif // __LAYER_1015
if( bi2.dwRetVal )
{
CItemElem* pItemElem = pUser->m_Inventory.GetAtId( nId );
if( pItemElem )
{
iSerialNumber = pItemElem->GetSerialNumber();
pItemElem->m_bCharged = TRUE;
if( bi2.dwSenderId > 0 )
{
// %s을 %s님으로부터 선물 받았습니다.
}
}
}
}
g_dpDBClient.SendBuyingInfo( &bi2, iSerialNumber );
// FILEOUT( "buyinginfo.txt", "dwServerIndex = %d\tdwPlayerId = %d\tdwItemId = %d\tdwItemNum = %d\n",
// bi2.dwServerIndex, bi2.dwPlayerId, bi2.dwItemId, bi2.dwItemNum );
static char lpOutputString[260] = { 0, };
sprintf( lpOutputString, "dwServerIndex = %d\tdwPlayerId = %d\tdwItemId = %d\tdwItemNum = %d",
bi2.dwServerIndex, bi2.dwPlayerId, bi2.dwItemId, bi2.dwItemNum );
OutputDebugString( lpOutputString );
*/}
Then you have fixed allready the biggest problems
have fun and good luck <3
Last edited: