Check the post in this thread where I explained how to send packets with C#. The moveAddress is just an address with enough memory allocated in the client to store your packet. You don't need to find this address as it is returned by the MemFunctions.AllocateMemory function.
Attach a debugger to the client, then set a breakpoint on the sendPacket function. When the breakpoint is triggered there will be several values on the stack:
[ESP + 0] = Address where the function has to jump back to after it is done. You can use this to figure out what function sent this particular packet.
[ESP + 4] = Packetsize, number of bytes contained in the packet
[ESP + 8] = Pointer to the packet. You can use this to find out what the packet is as follows (in semi code):
Code:
size = [ESP + 4]
pPacket = [ESP + 8]
for(int i = 0; i < size; i++)
{
bValue(i) = [pPacket + i * 1]
}
Use this to figure out what packets are sent whenever you perform an action.
Quote:
Originally Posted by unfaceguy
Hi mister interest07 , how do you find this ?
Code:
//Harvest resource
private int harvestResourceAddress;
private byte[] harvestResourceAddressRev;
private byte[] harvestResourcePkt = new byte[]
{
0x36, 0x00, //Header
0x00, 0x00, 0x00, 0x00, //uniqueId
0x00, 0x00, 0x1E, 0x00,
0x01, 0x0C, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
};
public void harvestResource(int uniqueId)
{
//Get size of the packet
int packetSize = harvestResourcePkt.Length;
if (harvestResourceAddress == 0)
{
//load packet in memory
loadPacket(harvestResourcePkt, ref harvestResourceAddress, ref harvestResourceAddressRev);
}
byte[] uniqueIdRev = BitConverter.GetBytes(uniqueId);
uniqueIdRev.Reverse();
MemFunctions.MemWriteBytes(pr_processHandle, harvestResourceAddress + 2, uniqueIdRev);
sendPacket(harvestResourceAddressRev, packetSize);
}
I see the code example you provided and understand how to read the values using a debugger. However I would like to read the values from my program. Is there a way to read (and show) the contents of the stack in my bot (btw it's autoit, but I can still translate as I get the idea). I have seen it, but don't have a clue how to do it.
Quote:
Originally Posted by Interest07
You can use this to find out what the packet is as follows (in semi code):
Code:
size = [ESP + 4]
pPacket = [ESP + 8]
for(int i = 0; i < size; i++)
{
bValue(i) = [pPacket + i * 1]
}
Use this to figure out what packets are sent whenever you perform an action.
Why would you want to read those values during botting? You only need to know what a packet looks like once and then hardcode that. I use MHS to execute a script that reads out the stack values everytime the breakpoint is hit instead of pausing the game. It works nicely for figuring out the parameters for other functions as well.
I wouldn't know how to do something like that from scratch though I'm afraid, although I did see some tool that looks up what packets are sent somewhere. You might wanna try track the creator of that down
Public Declare Function CreateRemoteThread Lib "Kernel32.dll" (
ByVal hProcess As IntPtr,
ByVal lpThreadAttributes As IntPtr,
ByVal dwStackSize As Integer,
ByVal lpStartAddress As IntPtr,
ByVal lpParameter As IntPtr,
ByVal dwCreationFlags As Integer,
ByRef lpThreadId As IntPtr
) As IntPtr
Please help me how to use sendpacket with vb express
I get the function address using 'findWQbotOffsets.exe'
(copy 'elementclient.exe' to 'findWQbotOffsets.exe' directory > run 'findWQbotOffsets.exe')
this result (pwindo)
I have tried with sending packages to make my character to fly up or down, but have failed.
I've tried to follow Interest07s guides: and
The result so far is that the camera moves in steps of the flight speed every time interval (ie. not smooth) and ends up where it should be but the character stays where it was from the start.
I paste some code (autoit) and hope you guys can help me out:
The offsets for coords2, 3 and 4 is something I'm not sure of if it's correct.
Those don't really matter, they're more for yourself to see what's happening (and whether you have the correct coords being sent), and also to make it a bit smoother to change from packet movement to regular movement. They won't influence the actual result though.
On first sight your function appears to work correctly. Which server do you play on? You might want to verify it's the correct packet structure if you're not playing on PWI, as some packets are known to differ slightly from PWI server on for example the Russian server.
I could read the complete message into a hex string and paste here if you wanna have a peak on them. I think it's about 4 or 5 messages including the stop-message.
Btw. I forgotten to mention what my purpose with this is:
To make a program that automates a cleric to follow me around healing and buffing when needed eventually also assisting. I started with this more then a year ago but putted everything on ice, now I'm back again.
I do think it's so fun to make this and I don't know if I really want to play the game when it's done
I could read the complete message into a hex string and paste here if you wanna have a peak on them. I think it's about 4 or 5 messages including the stop-message.
Btw. I forgotten to mention what my purpose with this is:
To make a program that automates a cleric to follow me around healing and buffing when needed eventually also assisting. I started with this more then a year ago but putted everything on ice, now I'm back again.
I do think it's so fun to make this and I don't know if I really want to play the game when it's done
Help with sending packets in autoit 08/16/2010 - AutoIt - 1 Replies ive been lookin around different sites for ways to send packets to the game server. the only examples i see is to create a server and a client which i dont need, i think. well to the point now, can someone lead me in a direction or tell me how to send packets to a game? also if i send packets then that means i dont need the game to be active, correct? Because in autoit when u use keys u need to have the game active, and control send does not work. ty
Sending Packets !!! 09/07/2008 - Kal Online - 14 Replies now i know how to sniff / analyse packets ... but what then ? :)
how can i send packets ?? to pimp or mix weapon for example
i just need the way to send , and then i can depend on myself :D
Sending Packets (need advice) 03/20/2008 - Conquer Online 2 - 7 Replies OK well im finaly trying to stop leaching off of everybodys work its been great n all download n play :D But im tired of being a begger n the past couple months ive been learning as much as i can about macros memery add blah blah you know ...
After playing around with ce and ahk the past couple months i stumbled across wpe pro, theres not alot of tuturals and its hard to find good help.
Well heres what ive been doing so far, open my CO then i attach it to my sniffer.
I change my...
Scamming by sending packets??? 04/15/2006 - Conquer Online 2 - 1 Replies Well my friend and i came up with the idea to send packets to the server to show a certain item in the trade window. We want to use this as a type of scam. I didnt see this in any other threads and was wondering if anyone knew if this is possible and if they could point use in the right direction. My friend was pretty good with packets in CO 1.0 but we arent really sure to go about doing it. If anyone one could please lend a helping hand?
P.S.- Before I get flamed for this because i know i...
Sending packets 10/12/2005 - Conquer Online 2 - 10 Replies I've a question. Is it possible to send 1 packet multiple times at the exact same time?