Alright, so what do you guys say to an SDK that can provide the following:
- Packet Creation
- MRS File Scanning (using GunZ)
- Loading/Unloading models.
- Loading/Unloading XML files.
- Handling packets.
- Safe database interaction.
- Thread Id checking.
- Function return address scanning (bypassable)
- Chat Commands (no hooks)
An example of how it would work:
Notice: I just whipped that code on the fly so no bitching if syntax/issues fgts.Code:#include <windows.h>
#include <stdio.h>
#include <GunZDK.h>
#include <vector>
#pragma comment(lib, "GunZSDK.lib")
//Ignore structure.
struct IgnoreUser
{
MUID *PlayerId;
char CharName[64];
};
std::vector<IgnoreUser*> IgnoredUsers;
//These are our 'hook' events.
HOOK_DECL OnChannelChat(MCommand* packet);
HOOK_DECL OnUserWhisper(MCommand* packet);
HOOK_DECL OnChatRoomChat(MCommand* packet);
HOOK_DECL OnStageChat(MCommanhd* packet);
HOOK_DECL OnClanChat(MCommand* packet);
//This is our 'command' events.
COMMAND_DECL OnIgnoreUser(ing argc, char** argv);
BOOL WINAPI DllMain(HMDULE hBase, DWORD dwReason, LPVOID lpReserved)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hBase);
InitializeSDK(GUNZ_2007);
AddPacketHook(CHANNEL_CHAT_RESPONSE, OnChannelChat);
AddPacketHook(MATCH_WHISPER, OnUserWhisper);
AddPacketHook(CHATROOM_CHAT, OnChatRoomChat);
AddPacketHook(STAGE_CHAT, OnStageChat);
AddPacketHook(ClAN_CHAT, OnClanChat);
AddCommand("/ignore", 0, 1, OnIgnoureUser);
}
return TRUE;
}
bool IsIgnored(char *player, MUID *playerId = NULL)
{
std::vector<IgnoreUser*>::iterator i;
for (i = IgnoredUsers.begin(); i < IgnoredUsers.end(); i++)
{
IgnoreUser* user = (*i);
if (player != NULL && !stricmp(user->CharName, player))
{
if (playerId != NULL && user->PlayerId == NULL)
user->PlayerId = playerId;
return true;
}
if (playerId != NULL && user->playerId != NULL)
{
if (playerId->uidHigh == user->PlayerId->secondId)
{
strcpy (user->CharName, player);
return true;
}
}
}
return false;
}
HOOK_DECL OnChannelChat(MCommand* packet)
{
MUID uidChannel;
char player[32];
char chat[128];
unsinged int access;
if (!packet->GetParameter(&uidChannel, 0, MPT_UID) ||
!packet->GetParameter(&player, 1, MPT_STRING, 32) ||
!packet->GetParameter(&chat, 2, MPT_STRING, 128) ||
!packet->GetParameter(&access, 3, MPT_UINT))
{
return PACKET_PARSE_FAIL;
}
if (IsIgnored(player))
{
return DROP_PACKET;
}
return HOOK_ENDED;
}
HOOK_DECL OnUserWhisper(MCommand* packet)
{
char sender[32];
char player[32];
char chat[128];
if (!packet->GetParameter(&sender, 0, MPT_STRING, 32) ||
!packet->GetParameter(&player, 1, MPT_STRING, 32) ||
!packet->GetParameter(&chat, 2, MPT_STRING, 128))
{
return PACKET_PARSE_FAIL;
}
if (IsIgnored(sender))
{
return DROP_PACKET;
}
return HOOK_ENDED;
}
HOOK_DECL OnChatRoomChat(MCommand* packet)
{
char chatroom[32];
char player[32];
char chat[128];
if (!packet->GetParameter(&chatroom, 0, MPT_STRING, 32) ||
!packet->GetParameter(&player, 1, MPT_STRING, 32) ||
!packet->GetParameter(&chat, 2, MPT_STRING, 128))
{
return PACKET_PARSE_FAIL;
}
if (IsIgnored(player))
{
return DROP_PACKET;
}
return HOOK_ENDED;
}
HOOK_DECL OnStageChat(MCommand* packet)
{
char StageId;
char PlayerId;
char chat[128];
if (!packet->GetParameter(&StageId, 0, MPT_UID) ||
!packet->GetParameter(&PlayerId, 1, MPT_UID) ||
!packet->GetParameter(&chat, 2, MPT_STRING, 128))
{
return PACKET_PARSE_FAIL;
}
if (IsIgnored(NULL, &PlayerId))
{
return DROP_PACKET;
}
return HOOK_ENDED;
}
HOOK_DECL OnClanChat(MCommand* packet)
{
char player[32];
char chat[128];
if (!packet->GetParameter(&player, 0, MPT_STRING, 32) ||
!packet->GetParameter(&chat, 1, MPT_STRING, 128))
{
return PACKET_PARSE_FAIL;
}
if (IsIgnored(player))
{
return DROP_PACKET;
}
return HOOK_ENDED;
}
COMMAND_DECL OnIgnoreUser(ing argc, char** argv)
{
if (argc > 1)
{
if (!IsIgnored(argv[1])
{
IgnoreUser* user = new IgnoreUser;
strcpy(user->CharName, argv[1]);
IgnoredUsers.push_back(user);
NotifyPlayer ("Player: '%s' has been added to the ignore list.", argv[1]);
}
}
}
What does that code do? It's a basic ignore feature where you just do:
/ignore player_name
So, anyone want this?

