Register for your free account! | Forgot your password?

You last visited: Today at 22:14

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

Advertisement



1022 Packet

Discussion on 1022 Packet within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
cruey's Avatar
 
elite*gold: 0
Join Date: Oct 2007
Posts: 698
Received Thanks: 857
Question 1022 Packet

Hello

Can someone help me understand this?


im trying to understand what "It is worth noting that InteractType.Magic is hashed using the character ID/Timestamp values." means.


because this packet is sent when my character asks to use magictype 3000


20 00 FE 03 D4 91 3D 01 C9 02 E4 00 74 85 89 CD 27 BE 07 DF 15 00 00 00 4B CD 21 E3 00 00 00 00

but as u can see i cant find the data 3000. i think its probably stored at this part 4B CD 21 E3 but im not sure how to convert the value to 3000.

(also im coding a source for EO, most of the packet structures are the same, im greatful for any help here!)
cruey is offline  
Old 06/01/2020, 16:29   #2
 
~Crystaline's Avatar
 
elite*gold: 0
Join Date: Jun 2012
Posts: 179
Received Thanks: 55
I believe when you’re casting Magic. You have to decrypt the spell id, x and y. And maybe that’s why you can’t see the magictype 3000 directly. I could be wrong tho, someone can correct me if I’m wrong.
~Crystaline is offline  
Old 06/01/2020, 21:23   #3
 
pintinho12's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 943
Received Thanks: 408
Quote:
Originally Posted by ~Crystaline View Post
I believe when you’re casting Magic. You have to decrypt the spell id, x and y. And maybe that’s why you can’t see the magictype 3000 directly. I could be wrong tho, someone can correct me if I’m wrong.
Yep, you're right. And most sources has the implementation for that.

Code:
byte[] dataArray = BitConverter.GetBytes(Data);
                    ushort magicType = Convert.ToUInt16((dataArray[0] & 0xFF) | ((dataArray[1] & 0xFF) << 8));
                    magicType ^= 0x915d;
                    magicType ^= (ushort) client.Identity;
                    magicType = (ushort) ((magicType << 0x3) | (magicType >> 0xd));
                    magicType -= 0xeb42;

                    dataArray = BitConverter.GetBytes(TargetIdentity);
                    TargetIdentity = ((uint)dataArray[0] & 0xFF) | (((uint)dataArray[1] & 0xFF) << 8) |
                                    (((uint)dataArray[2] & 0xFF) << 16) | (((uint)dataArray[3] & 0xFF) << 24);
                    TargetIdentity = ((((TargetIdentity & 0xffffe000) >> 13) | ((TargetIdentity & 0x1fff) << 19)) ^ 0x5F2D2463 ^ client.Identity) -
                        0x746F4AE6;

                    dataArray = BitConverter.GetBytes(PosX);
                    long xx = (dataArray[0] & 0xFF) | ((dataArray[1] & 0xFF) << 8);
                    dataArray = BitConverter.GetBytes(PosY);
                    long yy = (dataArray[0] & 0xFF) | ((dataArray[1] & 0xFF) << 8);
                    xx = xx ^ (client.Identity & 0xffff) ^ 0x2ed6;
                    xx = ((xx << 1) | ((xx & 0x8000) >> 15)) & 0xffff;
                    xx |= 0xffff0000;
                    xx -= 0xffff22ee;
                    yy = yy ^ (client.Identity & 0xffff) ^ 0xb99b;
                    yy = ((yy << 5) | ((yy & 0xF800) >> 11)) & 0xffff;
                    yy |= 0xffff0000;
                    yy -= 0xffff8922;
                    PosX = Convert.ToUInt16(xx);
                    PosY = Convert.ToUInt16(yy);
Data is Effect
pintinho12 is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
>>>БłΞТΞ MłЛΞϾЯΛŦТ ΛϾϾ"S,SТΞΛM ΛϾϾ"S,ФЯłGłЛ ΛϾϾ"S<<<
02/08/2013 - Trading - 12 Replies
Hallöchen :) Ich biete hier Folgende dinge an Minecraft Accounts mit und ohne Mail Steam Accounts Origin Accounts Zurzeit sind 300 Minecraft Accounts ohne mail pro Account 1€ Paypal / 20e"g + Grarantie



All times are GMT +1. The time now is 22:17.


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.