Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2
You last visited: Today at 03:10

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Send attack to target c++ code

Discussion on Send attack to target c++ code within the Metin2 forum part of the Popular Games category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2020
Posts: 7
Received Thanks: 1
Send attack to target c++ code

Hello, i'm trying to make my first send hack without asm inline code but the client crashes at injection and i dont know why
That's the code for calling the send attack function i'm fighting with:
Code:
DWORD baseaddr = (DWORD)GetModuleHandleW(NULL);
uint32_t targetvid = ((baseaddr + 0x000B4EF3) + (baseaddr + 0x000FA4FA));
uint8_t push0 = (uint8_t)(baseaddr + 0x000F7C66);
uint32_t movlast = (uint32_t)(baseaddr + 0x000F7C67);

void SendAttackPacket(const uint32_t movlast, const uint8_t push0, const uint32_t targetvid)
{
	typedef bool(__thiscall* tSendAttackPacket)(int, const uint32_t, const uint8_t, const uint32_t);
	const auto fSendAttackPacket = reinterpret_cast<tSendAttackPacket>(baseaddr + 0x000F7C6A); /* SendAttackPacket Function Call */

	if (fSendAttackPacket)
		fSendAttackPacket(*reinterpret_cast<uintptr_t*>(baseaddr + 0x000F7C57), movlast, push0, targetvid); /* CNetworkStream Class Pointer Instance */
}
and that's the main function
Code:
void(Main)
			while (true)

		{

			SendAttackPacket(movlast, push0, targetvid);
			Sleep(10);
		}
this is the code in cheat engine



if someone has any ideea i'm all ears
mildegusti is offline  
Old 02/15/2021, 10:04   #2
 
cioace9's Avatar
 
elite*gold: 0
Join Date: Apr 2012
Posts: 70
Received Thanks: 62
Arrow

Quote:
Originally Posted by mildegusti View Post
Hello, i'm trying to make my first send hack without asm inline code but the client crashes at injection and i dont know why
That's the code for calling the send attack function i'm fighting with:
Code:
DWORD baseaddr = (DWORD)GetModuleHandleW(NULL);
uint32_t targetvid = ((baseaddr + 0x000B4EF3) + (baseaddr + 0x000FA4FA));
uint8_t push0 = (uint8_t)(baseaddr + 0x000F7C66);
uint32_t movlast = (uint32_t)(baseaddr + 0x000F7C67);

void SendAttackPacket(const uint32_t movlast, const uint8_t push0, const uint32_t targetvid)
{
	typedef bool(__thiscall* tSendAttackPacket)(int, const uint32_t, const uint8_t, const uint32_t);
	const auto fSendAttackPacket = reinterpret_cast<tSendAttackPacket>(baseaddr + 0x000F7C6A); /* SendAttackPacket Function Call */

	if (fSendAttackPacket)
		fSendAttackPacket(*reinterpret_cast<uintptr_t*>(baseaddr + 0x000F7C57), movlast, push0, targetvid); /* CNetworkStream Class Pointer Instance */
}
and that's the main function
Code:
void(Main)
			while (true)

		{

			SendAttackPacket(movlast, push0, targetvid);
			Sleep(10);
		}
this is the code in cheat engine



if someone has any ideea i'm all ears
It's very simple, you call that function bad, below i wrote right parameters for that function and what are:

typedef bool(__thiscall* tSendAttackPacket)(void* pthis, UINT uMotAttack, DWORD dwVIDVictim);
tSendAttackPacket SendAttackPacket = (tSendAttackPacket)0xCCCCCCCC; // address for that function from memory

As you can see, the first parameter of this function is "pThis", now you probably ask me what is it? That parameter is instance pointer address of this class: "CPythonNetworkStream" (you need to be sure if the address for this class is correctly, else you receive crash from application), next parameter is "type of motion attack" where the default value is 0 (type of attack) and the last parameter is "VID" (you must be sure again if the VID for target entity is valid as well).

From your capture, i seen this instruction: "mov [ebp - 24], eax", where after this instruction: "call 00D020F0" you receive in "eax" register, address for "CPythonNetworkStream"

Now, when you have all address, you must call something like this that function "SendAttackPacket":

DWORD CPythonNetworkStream = 0xAAAAAAAA; // address for CPythonNetworkStream
DWORD uMotAttack = 0; // type of motion attack
DWORD dwVIDVictim = 0XBBBBBBBB; // your target vid, usually i recommand to use GetTargetVID function from to return correct VID from the target

SendAttackPacket((void*)(*(DWORD*)CPythonNetworkSt ream), uMotAttack, dwVIDVictim);

Now, after this, the function will send a hit to that entity with that "VID", is simple.
cioace9 is offline  
Thanks
3 Users
Old 09/27/2021, 21:53   #3
 
Real Sheeza's Avatar
 
elite*gold: 0
Join Date: Jan 2015
Posts: 35
Received Thanks: 12
is there any .exe?
Real Sheeza is offline  
Reply


Similar Threads Similar Threads
[Buying] Metin2 Send DMG to target / auch send dmg to target on attack
05/28/2014 - Metin2 Trading - 5 Replies
Moinsen Freunde, ich suche hier mal einen gescheiten Coder der mir einen Hack/Bot/Tool schreiben kann. Es geht um das was im Titel steht. Ich möchte das so haben wie lalaker1 es hier publiziert hatte, da es aber auf den meisten Servern nicht mit dieser Geschwindigkeit geklappt hat möchte ich nur für mich privat sowas haben. Genaue Infos gibt es per PN, natürlich muss das zwischenmenschliche auch stimmen, die Bezahlung stimmt auf jeden Fall.
Send attack to target FIX ?!
05/17/2014 - Metin2 - 4 Replies
Hi ... i really need help to fix Send attack to target on my client ... any tutorial or help ? :handsdown:
Wie kann man send attack to target fixen ?
05/28/2013 - Metin2 Private Server - 2 Replies
Guten Abend Elitepvpers. Weiß einer wie man send attack to target fixxen kann auser die Injection zu hindern?
[Help] Invalid Target/Cannot find Target(ZSZC)
05/29/2010 - SRO Private Server - 4 Replies
Some write they have Problems with ZSZC SRO-DB, by mobs for example "Ishade/Penon/Ujigi(lvl50-56)", in the Textbox right side down a message: "Invalid Target" or " Cannot Find Target", All have this Problem, a good message, i have the solution! You need Use SRO-DB Bot V0.8 and NOT V0.9a! +++Use this and you will have Fun by Botting+++



All times are GMT +1. The time now is 03:10.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.