Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Coding Corner
You last visited: Today at 11:35

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

Advertisement



how to read packet from S>C party

Discussion on how to read packet from S>C party within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2012
Posts: 53
Received Thanks: 0
how to read packet from S>C party

i want read packet from S>C like packet party . How i can read list char and char creat party .
here is packet
Code:
[9/12/2016 7:45:33 PM] {S->C} code :  3065] => 0000000000   FF 15 00 00 00 0F 00 00 00 05 03 FF 0F 00 00 00   ÿ..........ÿ....
0000000016   07 00 5A 5A 5A 5A 5A 5A 5A 22 3A 00 00 78 AA AA   ..ZZZZZZZ":..xªª
0000000032   5F 11 02 EF FF 34 00 01 00 01 00 00 00 04 00 00   _..ïÿ4..........
0000000048   00 00 00 00 00 00 FF 0E 00 00 00 03 00 5A 5A 5A   ......ÿ......ZZZ
0000000064   79 07 00 00 78 AA AA 5E CD 01 EF FF 78 07 01 00   y...xªª^Í.ïÿx...
0000000080   01 00 00 00 04 00 00 00 00 00 00 00 00 FF 04 00   .............ÿ..
0000000096   00 00 02 00 34 31 7D 07 00 00 78 AA AA 5F 02 02   ....41}...xªª_..
0000000112   EC FF 5A 00 01 00 01 00 00 00 04 00 00 00 00 00   ìÿZ.............
0000000128   00 00 00                                          ................
itatknic is offline  
Old 09/13/2016, 06:12   #2
 
elite*gold: 0
Join Date: Jan 2009
Posts: 312
Received Thanks: 666
Looking at they already give you the most basic scenario for this packet. It is prone to errors as it does not check for any types/flags but maybe this helps to begin with.

Code:
        public static byte[] Party_DataMember(party p)
        {
            //Create new packet writer
            PacketWriter Writer = new PacketWriter();
            //Add opcode
            Writer.Create(Systems.SERVER_PARTYMEMBER_DATA);
            //Write static byte
            Writer.Byte(0xFF);
            //Write party id
            Writer.DWord(p.ptid);
            //Write leader id
            Writer.DWord(p.LeaderID);
            //Write byte party type
            Writer.Byte(p.Type);
            //Write total amount of members in party
            Writer.Byte(p.Members.Count);
            //Repeat for each member in party -1
            for (byte b = 0; b <= p.Members.Count -1; b++)
            {
                //Get player detail information
                Systems PartyMemberInfo = Systems.GetPlayer(p.Members[b]);
                //Calculate hp and mp
                int partyPercentMP = (int)Math.Round((decimal)(PartyMemberInfo.Character.Stat.SecondMP * 10) / PartyMemberInfo.Character.Stat.Mp) << 4;
                int partyPercentHP = (int)Math.Round((decimal)(PartyMemberInfo.Character.Stat.SecondHp * 10) / PartyMemberInfo.Character.Stat.Hp);
                //Set percent
                int partyPercent = partyPercentHP | partyPercentMP;
                //Write static byte
                Writer.Byte(0xff);
                //Write unique member id
                Writer.DWord(PartyMemberInfo.Character.Information.UniqueID);
                //Write character name
                Writer.Text(PartyMemberInfo.Character.Information.Name);
                //Write character model
                Writer.DWord(PartyMemberInfo.Character.Information.Model);
                //Write character level
                Writer.Byte(PartyMemberInfo.Character.Information.Level);
                //Write stat hp mp information
                Writer.Byte((byte)partyPercent);
                //Write x and y sector
                Writer.Byte(PartyMemberInfo.Character.Position.xSec);
                Writer.Byte(PartyMemberInfo.Character.Position.ySec);
                //Write x z y
                Writer.Word(Formule.packetx(PartyMemberInfo.Character.Position.x, PartyMemberInfo.Character.Position.xSec));
                Writer.Word(PartyMemberInfo.Character.Position.z);
                Writer.Word(Formule.packety(PartyMemberInfo.Character.Position.y, PartyMemberInfo.Character.Position.ySec));
                //Write double word 1
                Writer.Word(1);
                Writer.Word(1);
                //If player has a guild
                if (PartyMemberInfo.Character.Network.Guild.Name != null)
                    //Write guild name
                    Writer.Text(PartyMemberInfo.Character.Network.Guild.Name);
                //If player has no guild
                else
                    //Write word 0 value
                    Writer.Word(0);
                //Write static byte
                Writer.Byte(0);
                //Write dword 
                Writer.DWord(0);
                Writer.DWord(0);
            }
            //Return all bytes for sending
            return Writer.GetBytes();
        }
DaxterSoul is offline  
Thanks
2 Users
Old 09/13/2016, 07:15   #3
 
elite*gold: 0
Join Date: Jan 2012
Posts: 53
Received Thanks: 0
thanks you !
itatknic is offline  
Old 09/20/2016, 05:04   #4
 
MrMiroBear's Avatar
 
elite*gold: 0
Join Date: Jul 2013
Posts: 120
Received Thanks: 13
how you got this packet from S>C ? this work for filters right?
MrMiroBear is offline  
Reply


Similar Threads Similar Threads
how to read packet from S>C
09/04/2016 - SRO Coding Corner - 2 Replies
i want read packet from S>C like packet kill Unique how i can read it and put it in C# for exmaple if (packet == packet kill Unique) { do something }
[Help] how can I read Sro packet
08/18/2016 - SRO Coding Corner - 3 Replies
Hey ,guys now I have learned c# I need to read the packets of sro know what each packet mean in the game .. there are steps or video or pictures..
[Release] Packet Edit Party Timer
11/21/2009 - Mabinogi Hacks, Bots, Cheats & Exploits - 1 Replies
Real Simple... Just Push the recruit on button capture the packets, Then just resend the packet when ever you want to turn recruiting on.. Hell it might even spam the global chat.. Should look like this.. (Might Change) 881500000000FEDC3431764432100F1CB32B4B5A69 Size is 21 Bytes
Party join accept Packet
06/26/2008 - Silkroad Online - 0 Replies
Does anyone know what data is in the packet send to sro-server when someone asks to join a party via party match? its a 15 Byte packet (including 2 Bytes length,2 Bytes Opcode,2 Bytes security-->9Bytes remaining) Opcode of this packet is 0x30FA any information would be great



All times are GMT +1. The time now is 11:35.


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.