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);
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; }
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; }
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; }