Yes, this looks like the right one. But it not only contains monsters I believe.
The basic idea you would follow is to iterate over the map and only apply the SendAttackPacket to the instances that are of type monster. Keep in mind that you also might have to teleport yourself to the monster first, send the packet, and teleport back, since the server checks the attack range.
TCharacterInstanceMap m_kAliveInstMap this one maybe?
and if i find the address i replace the targetvid with this?
no, its a map of DWORD, void* where void* ist actually a CInstanceBase if you have the source. You have to iterate over ever element in the map, get the dword and pass it to sendattackpacket. additionally, dont forget that you need to send the state packet if you want to attack mobs further away. you can use the CInstanceBase* to get the position of the monster, get the mob type (npc, player, mob, ..), isAlive and so on
no, its a map of DWORD, void* where void* ist actually a CInstanceBase if you have the source. You have to iterate over ever element in the map, get the dword and pass it to sendattackpacket. additionally, dont forget that you need to send the state packet if you want to attack mobs further away. you can use the CInstanceBase* to get the position of the monster, get the mob type (npc, player, mob, ..), isAlive and so on
There are 3 ways of doing (as far as i know):
1 - Like said before, get the adrress of TCharacterInstanceMap m_kAliveInstMap which is a map of CINstanceBase and then get the offset of the position, keep in mind, you either need to code a map iterator that will handle the version of std::map used in the binary or pray for your compiler std::map to be compatible with the binary one.
2- Hook recive function, find the packet that recive each character and save the positions alongside their vids, keep in mind to use this, you also need convert global positions to local positions.
3- Hook Recive function, find the packet that recive each character and save only the vids, find the address of a function that given a vid returns the position (You can use the C equivalent to GetPixelPosition) and you will be left with a list of vids.
In my opinion, the 3rd option is the best, you don't have to deal with compiler diferences or reverse/code a map iterator.
no, its a map of DWORD, void* where void* ist actually a CInstanceBase if you have the source. You have to iterate over ever element in the map, get the dword and pass it to sendattackpacket. additionally, dont forget that you need to send the state packet if you want to attack mobs further away. you can use the CInstanceBase* to get the position of the monster, get the mob type (npc, player, mob, ..), isAlive and so on
Sorry, i am dumb af and can't properly understand what i need to do, what CInstanceBase i need because i saw like 4 - 5 and when i find the right one i pass it in the function and it will work right?
Sorry, i am dumb af and can't properly understand what i need to do, what CInstanceBase i need because i saw like 4 - 5 and when i find the right one i pass it in the function and it will work right?
Maybe you should first start with some basics? It doesn't seem like you have enough knowledge to code that. He already explained it well enough.
i only asked how to get the function not rocket science this
doesnt help at all
But if you don't understand what one's-and-zeroes explained, you lack some knowledge. Therefore, you should start with simple things. I doubt that you know how to retrieve all elements in that map without knowing how to access that member at all.
Programming isn't about smashing code and not knowing what the code does and hope for it to work. In particular in reverse engineering (that's not even the case anymore since the source code got leaked a while now. One can just look everything up) you need to know how to access member variables, call or hook functions, know the correct calling conventions etc.
I read some questions here on the forums about how to get either the VIDs, or on how to send attack packets and so on. They all just don't know what they are doing and hope that someone gives them a code snippet. Learning how a program works and what is going under the hood would dismiss all the questions asked here on the forum. But people just want it the easy way.
Send attack to multiple targets around player (WAITHACK) 09/27/2021 - Metin2 - 6 Replies Hi, i want to do a waithack for p-servers but i dont know what to search for it, i dont know if i need the player pointer to take the attack range and mob pointer to kill them if they are in the range of player.
I made a send attack to target and it works but i need this one too, if someone could help with some ideas
Here's the send attack to target code:
bool status = false;
bool SendAtackPacket(int vId)
{
if (status == true)
[LIST] WarRock Privat Server List! [LIST] 07/27/2013 - WarRock - 46 Replies http://archiv.so/images/2013/03/01/bQaXx.png
Hallo elitepvpers Community!
Da es in letzter Zeit viele unnötige Threads, mit Fragen zu guten
Privat Servern gab, möchte ich es Neulingen (Newbies) etwas erleichern!
Und das ganze soll durch diese Liste an mir bekannten WarRock P-Servern
geschehen.
Sollten euch noch weitere Server bekannt sein, schreibt den
Thread-Link & Namen als Kommentar, damit ich diesen Server
eventueller Weise auch noch rein editieren kann.
mobs around player 09/18/2011 - SRO Coding Corner - 4 Replies how to capture packet for this event in silkroad? i dont think there is single opcode for this