Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server
You last visited: Today at 17:24

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

Advertisement



[C#] 7021 Movement Packet

Discussion on [C#] 7021 Movement Packet within the SRO Private Server forum part of the Silkroad Online category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2015
Posts: 150
Received Thanks: 6
[C#] 7021 Movement Packet

Hey guys, am trying to send movement packet (7021) , it's working good with (+) Cords but (-) Cords isn't.
That's the calculation iam using

Code:
int xPosition = Convert.ToInt32((x % 192) * 10);
            int yPosition = Convert.ToInt32((y % 192) * 10);
            int xSector = Convert.ToInt32((x - xPosition / 10) / 192 + 135);
            int ySector = Convert.ToInt32((y - yPosition / 10) / 192 + 92);
- Also if someone can tell me parsing of B021 would be thankful
Kardil is offline  
Old 02/21/2017, 19:16   #2
 
elite*gold: 0
Join Date: Sep 2015
Posts: 150
Received Thanks: 6
push
Kardil is offline  
Old 02/21/2017, 21:32   #3
 
elite*gold: 0
Join Date: Mar 2009
Posts: 291
Received Thanks: 164
Code:
uint xPos = 0;
uint yPos = 0;

if (X > 0 && Y > 0)
{
	xPos = (uint)((X % 192) * 10);
	yPos = (uint)((Y % 192) * 10);
}
else
{
	if(X < 0 && Y > 0)
	{
		xPos = (uint)((192 + (X % 192)) * 10);
		yPos = (uint)((Y % 192) * 10);
	}
	else
	{
		if (X > 0 && Y < 0)
		{
			xPos = (uint)((X % 192) * 10);
			yPos = (uint)((192 + (Y % 192)) * 10);
		}
	}
}

byte xSector = (byte)((X - (int)(xPos / 10)) / 192 + 135);
byte ySector = (byte)((Y - (int)(yPos / 10)) / 192 + 92);
Credits goes to Zeteris
M4n1ak is offline  
Closed Thread


Similar Threads Similar Threads
SRO Movement Packet (B021)
06/03/2011 - Silkroad Online - 3 Replies
Does anyone know the structure of this packet? so far i have worked out the following, any additional insight would be helpful. 01 35 87 05 // ID 01 // Has Destination 50 // X Section 68 // Y Section 28 01 // X Offset 70 FF // Z - pos 62 05 // Y Offset



All times are GMT +2. The time now is 17:24.


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