To send commands to the server you must:
1. Get your code into the kal process.
Use an injector, or use the recently popular dsound.dll > bot.dll technique (what would we technically call this???).
2. Find the send function address.
Plenty of public code for this around, but let's use this common source (if you originally wrote this code, claim it because I don't know).
Code:
DWORD Send_To_Server_Main_ = SearchPattern("55 8B EC 83 EC 18 83 3D x x x x 00 74 07 33 C0 E9 x x x x 8A 45 08",0x00400000,0x007FFFFF);
DWORD Send_To_Server_Main = SearchPattern("55 8B EC 83 EC 18 83 3D x x x x 00 74 07 33 C0 E9 x x x x 8A 45 08", Send_To_Server_Main_+1,0x007FFFFF);
3. Send command to server using simple inline assembly to push values on the stack and call the send function by address. I'm basically using the same declarations for variables as in the public source.
The following will make you sit down.
Code:
LPTSTR Format = "b";
DWORD Flag = 1;
DWORD SendType = 0x1C;
__asm
{
PUSH Flag;
PUSH Format;
PUSH SendType;
call Send_To_Server_Main;
}
* The old command for sit, and a few others will give you autoban. If you know what commands will give autoban, kindly reply in this thread please.
BONUS: The following will change your Z position. Run it in a loop or call it a number of times to make you go underground.
Code:
LPTSTR Format = "bbb";
DWORD SendType = 0x12;
__asm
{
PUSH 128;
PUSH 0;
PUSH 0;
PUSH Format;
PUSH SendType;
call Send_To_Server_Main;
}
BONUS 2: In the public source, there's a STRUCT for mobs. Use it to attack a mob.
Code:
memcpy((void*)&(MOBID),(void*)&Mob[mob_you_want_to_kill].MID,4);
LPTSTR Format = "bbd";
DWORD SendType = 0x0d;
__asm
{
PUSH MOBID;
PUSH 1;
PUSH 4;
PUSH Format;
PUSH SendType;
call Send_To_Server_Main;
}
If you think my code sucks, FUCK YOU, and release something better. There's many ways to do this, and if you know a better/simpler way, be kind and point others the way.