Register for your free account! | Forgot your password?

You last visited: Today at 10:50

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

Advertisement



Sending Packets

Discussion on Sending Packets within the PW Hacks, Bots, Cheats, Exploits forum part of the Perfect World category.

Reply
 
Old 07/25/2011, 07:38   #226
 
elite*gold: 0
Join Date: Jan 2009
Posts: 23
Received Thanks: 3
Here are the packages read from the reserved memory:

Packet1:
0000853397C386756AC421E76343853397C386756AC421E763 43E8030105610A00
Packet2:
0000853397C386756AC421E76843853397C386756AC421E768 43E8030105610B00
Packet3:
0000853397C386756AC421E76D43853397C386756AC421E76D 43E8030105610C00
Packet4:
0700853397C386756AC421E77243010500610D00E803

The character position was read using nomadmemory.au3 and _MemoryRead($pchar + $oposx, $pid, 'float') into a variable. The startposition converted to hex is:

Char position converted to hex:
x: FFFFFED2, y: FFFFFC57, z: 000000DE

As floats:
x: -302.402496337891, y: -937.836303710938, z: 222.902847290039

Char position as floats modified with 4000 and 5500 and divided with 10 it's:369.759750366211, 456.216369628906, 22.2902847290039

The coordinates was writen to the package as a float, maybe that's why they differ from the variables

I read the coordinates with this:

Dim $oposx = 0x3c, $oposy = 0x44, $oposz = 0x40
$charInfo[$IX] = _MemoryRead($pchar + $oposx, $pid, 'float')
$charInfo[$IY] = _MemoryRead($pchar + $oposy, $pid, 'float')
$charInfo[$IZ] = _MemoryRead($pchar + $oposz, $pid, 'float')

I'm not sure if what I think is Y is really Y but maybe it's z instead. I might put the wrong coordinate in the wrong position in the package, making the server to ignore the message.

Could I use an actionstructure and do a move instead of sending packages as long as I only move as much as the speed allows? If so is it move type 0? I would perhaps need to find what different values there are for different moves like regular, fly, swimming.

Edit: I found this promising post:

and it with the check on height it initialises some more for flying up or down. By using that would I still need to create several actions to reach the destination regarding to the flyspeed?
Sturolv is offline  
Old 07/25/2011, 10:55   #227
 
Sᴡoosh's Avatar
 
elite*gold: 20
Join Date: May 2009
Posts: 1,290
Received Thanks: 326
in D3d Coordinate systems, Y is what you may know as Z, and Z is either left or right axis.



So thats correct.

Using actionstruct to move up is possible, yes, but you need to set the flags according to this. Interest07's post contains everything you need. After this, write Your current coords to the X/Y offsets in action struct and then your desired height in Z (Yes I call Z for height too even though its actually called Y even by the game).

Hope this was a bit of help.

Cheers
Sᴡoosh is offline  
Old 07/25/2011, 10:56   #228
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
Yeah you're right, you have swapped the Y and the Z values.

You can use actionstructs, but not to fly straight up, only at a 45 degree angle (I think something like that). For swimming/walking/flying its all the same, the moveType is something that would technically be for when you press space or jump or whatever if I recall correctly, but I never managed to get that working.

With actionstructs you don't need to take into account flyspeed etcetera as the game will do this for you :P

edit:
Even in graphs the XYZ axes would be like they are in game, I'm not sure why people swap Y and Z around, could somebody explain that to me?
Interest07 is offline  
Old 07/25/2011, 11:02   #229
 
Sᴡoosh's Avatar
 
elite*gold: 20
Join Date: May 2009
Posts: 1,290
Received Thanks: 326
I dont know why people swap that, but personally, I do to.

Maybe this has to do with the fact that the ingame coords are called X and Y, and height was refered to as Z (when I was still playing).

I dont think it matters much though how you call the vars in your code, as long as you know how the person who documented it decided to call it
Sᴡoosh is offline  
Old 07/25/2011, 13:16   #230
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
Quote:
Originally Posted by 2981611 View Post
I dont know why people swap that, but personally, I do to.

Maybe this has to do with the fact that the ingame coords are called X and Y, and height was refered to as Z (when I was still playing).

I dont think it matters much though how you call the vars in your code, as long as you know how the person who documented it decided to call it
True, it's caused confusion plenty of times before lol
Interest07 is offline  
Old 07/25/2011, 15:19   #231
 
elite*gold: 0
Join Date: Mar 2009
Posts: 112
Received Thanks: 123
Quote:
Originally Posted by Interest07
Even in graphs the XYZ axes would be like they are in game, I'm not sure why people swap Y and Z around, could somebody explain that to me
It comes from semantics used for 2D systems.
When you use 2D systems, you use X and Y.

When switching from 2D to 3D, you add one more axis and when you do, you are inclined to call it something different, like Z for example.

So you end up calling Z the new axis and it's usually height.
You write it down as XYZ (alphabetical order) meaning X, Y and height.

But in 3D systems, height is the middle value (I'm simplifying of course, in a random 3D system height can be anything you like, but for games, this should hold true majority of times), so people coming from 3D systems will write:
XYZ meaning: X, height, Z - keeping the alphabetical order, but meaning Y as height

Where as people used to 2D systems and working in 3D will prefer to write:
XZY meaning: X, height, Y - screw alphabet and make it sensible

By sensible I mean this: keep semantic values static when moving from 2D to 3D (ie,.. if X is width and Y is lenght in 2D system, moving to 3D system doesn't change that). This avoids confusion when coding, since number of axis is irrelevant to you (2 or 3), if X and Y always mean the same thing.

Opposite to it, if X means width and Y means length in 2D, moving to 3D changes that: Y now means height and Z means length.


Word of caution: note that terms like witdh, length and height in 3D world suffer from the similar semantic problem as XYZ. 90 dg. rotation around an axis can quickly turn width into length, so these terms aren't normally used.
Shareen is offline  
Old 07/25/2011, 16:30   #232
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
Quote:
Originally Posted by Shareen View Post
It comes from semantics used for 2D systems.
When you use 2D systems, you use X and Y.

When switching from 2D to 3D, you add one more axis and when you do, you are inclined to call it something different, like Z for example.

So you end up calling Z the new axis and it's usually height.
You write it down as XYZ (alphabetical order) meaning X, Y and height.

But in 3D systems, height is the middle value (I'm simplifying of course, in a random 3D system height can be anything you like, but for games, this should hold true majority of times), so people coming from 3D systems will write:
XYZ meaning: X, height, Z - keeping the alphabetical order, but meaning Y as height

Where as people used to 2D systems and working in 3D will prefer to write:
XZY meaning: X, height, Y - screw alphabet and make it sensible

By sensible I mean this: keep semantic values static when moving from 2D to 3D (ie,.. if X is width and Y is lenght in 2D system, moving to 3D system doesn't change that). This avoids confusion when coding, since number of axis is irrelevant to you (2 or 3), if X and Y always mean the same thing.

Opposite to it, if X means width and Y means length in 2D, moving to 3D changes that: Y now means height and Z means length.


Word of caution: note that terms like witdh, length and height in 3D world suffer from the similar semantic problem as XYZ. 90 dg. rotation around an axis can quickly turn width into length, so these terms aren't normally used.
Thanks

I suppose the difference is whether you start from a 2D perspective and add an axis, or start from a 3D persective right away. I'm used to looking at graphs for example, where X is left to right, Y is bottom to top, and (if it's a 3D graph) Z would be front to back. But it's understandable if you go from map coordinates to ingame coordinates that you put height last.

If there were decent alternatives for the X and Z variable names, I wouldn't mind changing Y to height and X and Z to whatever is appropriate, but I can't really think of any.
Interest07 is offline  
Old 07/25/2011, 20:27   #233
 
elite*gold: 0
Join Date: Jan 2009
Posts: 23
Received Thanks: 3
Alright! After swapping y and z the server now accepts the packages and the char moves up and down, though I only see the camera bouncing up one step at the time while the character remains still all the time untill I make a manual movement then it "teleports" to the new height + my manual movement.

I also tried with the actionstruct and only get that to work if I also make a movement along an other axis. And it seems to only change in height as long as there is still movement going on along the other axis.

Maybe I'm not using the actionstruct correctly.

Suggestions about how to make the movement smooth with packets or how to use the actionstruct better is appreciated, but maybe this belongs in an other thread.
Sturolv is offline  
Old 07/25/2011, 20:51   #234
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
if you dont see the character moving up also, you don't have all the correct offsets necessary for displaying the character position. I tried to explain earlier that with action structs you can't move straight up, only at an angle, so you'd have to move sideways to use this properly. You most likely are using them properly

Smoothness isn't really important for moving with packets, as it only looks choppy clientside.
Interest07 is offline  
Old 07/26/2011, 09:21   #235
 
elite*gold: 0
Join Date: Jan 2009
Posts: 23
Received Thanks: 3
Ok, I think I can live without the smoothness

As you say I don't have the correct offsets, I found 5 offsets that changes to the new z (I mean height by this), but one of those 5 don't have the correct x and y next to it.

I updated those 4 (with correct x, y next to them) but still the char don't move, only the camera. If I target myself I see the target circle in the right spot though, looks funny

Could you please help me with the offests? I found these and do the following update after the package is sent:

Code:
Dim $oposx = 0x3c, $oposy = 0x44, $oposz = 0x40
Dim $oposx2 = 0x7c, $oposy2 = 0x84, $oposz2 = 0x80
Dim $oposx3 = 0x918, $oposy3 = 0x920, $oposz3 = 0x91c
Dim $oposx4 = 0x92c, $oposy4 = 0x934, $oposz4 = 0x930

_MemoryWrite($pchar + $oposx, $pid, $curX, 'float')
_MemoryWrite($pchar + $oposy, $pid, $curY, 'float')
_MemoryWrite($pchar + $oposz, $pid, $curZ, 'float')
_MemoryWrite($pchar + $oposx2, $pid, $curX, 'float')
_MemoryWrite($pchar + $oposy2, $pid, $curY, 'float')
_MemoryWrite($pchar + $oposz2, $pid, $curZ, 'float')
_MemoryWrite($pchar + $oposx3, $pid, $curX, 'float')
_MemoryWrite($pchar + $oposy3, $pid, $curY, 'float')
_MemoryWrite($pchar + $oposz3, $pid, $curZ, 'float')
_MemoryWrite($pchar + $oposx4, $pid, $curX, 'float')
_MemoryWrite($pchar + $oposy4, $pid, $curY, 'float')
_MemoryWrite($pchar + $oposz4, $pid, $curZ, 'float')
Sturolv is offline  
Thanks
1 User
Old 07/26/2011, 17:28   #236
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
try
coords = 0x390
coords_x = base + 1c + 34 + 390 + 3c
coords_y = base + 1c + 34 + 390 + 40
coords_z = base + 1c + 34 + 390 + 44
Interest07 is offline  
Thanks
2 Users
Old 07/26/2011, 21:21   #237
 
elite*gold: 0
Join Date: Jan 2009
Posts: 23
Received Thanks: 3
Quote:
Originally Posted by Interest07 View Post
try
coords = 0x390
coords_x = base + 1c + 34 + 390 + 3c
coords_y = base + 1c + 34 + 390 + 40
coords_z = base + 1c + 34 + 390 + 44
Thanks, that did the trick
Sturolv is offline  
Old 07/27/2011, 04:05   #238
 
elite*gold: 0
Join Date: Jul 2009
Posts: 39
Received Thanks: 0
Where exactly do you set the breakpoint to see the unecrypted packet data?
Could you provide a screenshot of that once?
Shortpants is offline  
Old 07/27/2011, 06:53   #239
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
I use MHS to set a breakpoint at the sendPacketFunction (0x659450 in PWI atm) to run this script:

Code:
void On_BP_1(LPVOID lpvAddress, LPPROC_INFO_MHS lpProcInfo)
{
	DWORD pktSize_ptr = lpProcInfo->pcContext->Esp+8;
	DWORD pktSize = 0;
	
	ReadProcessMemory(lpProcInfo->hProcess, (void *)pktSize_ptr, &pktSize, 4, NULL);
	
	DWORD pkt_ptr_ptr = lpProcInfo->pcContext->Esp+4;
	DWORD pkt_ptr = 0;
	BYTE bp_newpacket[255] = {0};
	char bp_packet[1024] = {0};	

	ReadProcessMemory(lpProcInfo->hProcess, (void *)pkt_ptr_ptr, &pkt_ptr, 4, NULL);
	ReadProcessMemory(lpProcInfo->hProcess, (void *)pkt_ptr, &bp_newpacket, pktSize, NULL);
	
	for (int i = 0; i < pktSize; i++){
		SPrintF(&bp_packet[i*3], "%02X ", bp_newpacket[i]);
	}

	DWORD callingFunctionAddress = 0;
	DWORD callingfunctionAddress_ptr = lpProcInfo->pcContext->Esp;
	
	ReadProcessMemory(lpProcInfo->hProcess, (void *)callingfunctionAddress_ptr, &callingFunctionAddress, 4, NULL);
	



PrintF("[%08X] Packet: %s",callingFunctionAddress, bp_packet);
}
Interest07 is offline  
Thanks
3 Users
Old 07/27/2011, 17:10   #240
 
elite*gold: 0
Join Date: Jan 2009
Posts: 23
Received Thanks: 3
Assist

I didn't find if there is client information about an other players target.
Also I didn't find any post about an assist package so here is what I found out:

Package for assist:

Func AssistTarget($targetId, $pid)
local $packet, $packetSize

$packet = '3200'
$packet &= _hex($targetId)
$packetSize = 6
sendPacket($packet, $packetSize, $pid)
EndFunc
Sturolv is offline  
Reply


Similar Threads Similar Threads
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?



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


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.