Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 02:49

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

Advertisement



[Help] I need someone to translate me this codes

Discussion on [Help] I need someone to translate me this codes within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2009
Posts: 62
Received Thanks: 11
[Help] I need someone to translate me this codes

Well need someone to explain me this codes on a simple way which they would've been understandable.
PHP Code:
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Collections;

namespace 
COServer_Project
{
    public 
unsafe class Packets
    
{
        public 
byte[] StallWindow(uint IDCharacter C)
        {
            
ushort PacketType 0x3f2;
            
byte[] Packet = new byte[24];
            
fixed (bytePtr Packet)
            {
                *((
ushort*)(Ptr)) = (ushort)Packet.Length;
                *((
ushort*)(Ptr 2)) = (ushort)PacketType;
                *((
uint*)(Ptr 4)) = (uint)758292;
                *((
uint*)(Ptr 8)) = (uint)C.UID;
                *((
uint*)(Ptr 12)) = (uint)ID;
                *((
ushort*)(Ptr 16)) = (ushort)272;
                *((
ushort*)(Ptr 18)) = (ushort)198;
                *((
ushort*)(Ptr 20)) = (ushort)6;
                *((
ushort*)(Ptr 22)) = (ushort)110;
            }
            return 
Packet;
        }
        public 
byte[] GuildInfo(Guild TheGuildCharacter Player)
        {
            
ushort PacketType 0x452;
            
string[] Splitter TheGuild.Creator.Split(':');

            
byte[] Packet = new byte[40];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
ushort*)(4)) = (ushort)TheGuild.GuildID;
                *((
uint*)(8)) = (uint)Player.GuildDonation;
                *((
uint*)(12)) = (uint)TheGuild.Fund;
                *((
uint*)(16)) = (uint)TheGuild.MembersCount;
                *(
20) = Player.GuildPosition;

                for (
int i 0Splitter[0].Lengthi++)
                {
                    *(
21 i) = Convert.ToByte(Splitter[0][i]);
                }
            }

            return 
Packet;
        }
        public 
byte[] SendGuild(uint GuildIDbyte Type)
        {
            
ushort PacketType 0x453;
            
byte[] Packet = new byte[12];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *(
4) = Type;
                *((
uint*)(8)) = (uint)GuildID;
            }
            return 
Packet;
        }
        public 
byte[] GuildName(ushort IDstring Name)
        {
            
ushort PacketType 0x3f7;
            
byte[] Packet = new byte[11 Name.Length];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
ushort*)(4)) = (ushort)ID;
                *(
8) = 3;
                *(
9) = 1;
                *(
10) = (byte)Name.Length;

                for (
int i 0Name.Lengthi++)
                {
                    *(
11 i) = Convert.ToByte(Name[i]);
                }
            }
            return 
Packet;
        }
        public 
byte[] FriendEnemyInfoPacket(Character Charbyte Enemy)
        {
            
ushort PacketType 0x7f1;
            
byte[] Packet = new byte[36];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)Char.UID;
                *((
uint*)(8)) = uint.Parse((Char.Avatar.ToString() + Char.Model.ToString()));
                *(
12) = Char.Level;
                *(
13) = Char.Job;
                *((
ushort*)(14)) = (ushort)Char.PKPoints;
                *(
36) = Enemy;
            }
            return 
Packet;
        }
        public 
byte[] FriendEnemyPacket(uint uidstring namebyte Modebyte Online)
        {
            
ushort PacketType 0x3fb;
            
byte[] Packet = new byte[36];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)uid;

                *(
8) = Mode;
                *(
9) = Online;
                *(
10) = 0;
                *(
11) = 0;
                *(
12) = 0;
                *(
13) = 0;
                *(
14) = 0;
                *(
15) = 0;
                *(
16) = 0;
                *(
17) = 0;
                *(
18) = 0;
                *(
19) = 0;

                for (
int i 0name.Lengthi++)
                {
                    *(
20 i) = Convert.ToByte(name[i]);
                }
            }
            return 
Packet;
        }
        public 
byte[] TradeItem(uint ItemUIDstring Item)
        {
            
ushort PacketType 0x3f0;
            
byte[] Packet = new byte[32];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)ItemUID;

                
string[] Splitter Item.Split('-');

                *((
uint*)(8)) = uint.Parse(Splitter[0]);
                *(
12) = 0xff;
                *(
14) = 0xff;
                *(
16) = 0xff;
                *(
18) = 0xff;
                *(
19) = 0;
                *(
20) = 0;
                *(
21) = 0;
                *(
22) = 0;
                *(
23) = 0;
                *(
24) = byte.Parse(Splitter[4]);
                *(
25) = byte.Parse(Splitter[5]);
                *(
26) = 1;
                *(
27) = 2;
                *(
28) = byte.Parse(Splitter[1]);
                *(
29) = byte.Parse(Splitter[2]);
                *(
30) = byte.Parse(Splitter[3]);
            }
            return 
Packet;
        }
        public 
byte[] TradePacket(uint UIDbyte Type)
        {
            
ushort PacketType 0x420;
            
byte[] Packet = new byte[12];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)UID;
                *((
uint*)(8)) = (uint)Type;
            }
            return 
Packet;
        }
        public 
byte[] PlayerJoinsTeam(Character Player)
        {
            
ushort PacketType 0x402;
            
uint Model uint.Parse(Convert.ToString(Player.Avatar) + Convert.ToString(Player.Model));

            
byte[] Packet = new byte[36];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *(
5) = 1;

                for (
int i 0Player.Name.Lengthi++)
                {
                    *(
i) = Convert.ToByte(Player.Name[i]);
                }
                *((
uint*)(24)) = (uint)Player.UID;
                *((
uint*)(28)) = (uint)Model;
                *((
ushort*)(32)) = (ushort)Player.MaxHP;
                *((
ushort*)(34)) = (ushort)Player.CurHP;
            }
            return 
Packet;
        }
        public 
byte[] TeamPacket(uint CharIDbyte Mode)
        {
            
ushort PacketType 0x3ff;
            
byte[] Packet = new byte[12];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)Mode;
                *((
uint*)(8)) = (uint)CharID;
            }

            return 
Packet;
        }
        public 
byte[] WhItems(Character Playerbyte WHushort NPCID)
        {
            
byte Count 0;
            if (
WH == 0)
                
Count Player.TCWHCount;
            if (
WH == 1)
                
Count Player.PCWHCount;
            if (
WH == 2)
                
Count Player.ACWHCount;
            if (
WH == 3)
                
Count Player.DCWHCount;
            if (
WH == 4)
                
Count Player.BIWHCount;
            if (
WH == 5)
                
Count Player.MAWHCount;

            
string[] WareHouse;
            if (
WH != 5)
                
WareHouse = new string[] { nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull };
            else
                
WareHouse = new string[] { nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull };
            if (
WH == 0)
                
WareHouse Player.TCWH;
            if (
WH == 1)
                
WareHouse Player.PCWH;
            if (
WH == 2)
                
WareHouse Player.ACWH;
            if (
WH == 3)
                
WareHouse Player.DCWH;
            if (
WH == 4)
                
WareHouse Player.BIWH;
            if (
WH == 5)
                
WareHouse Player.MAWH;

            
ushort PacketType 1102;
            
byte[] Packet = new byte[16 + (20 Count)];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)NPCID;
                *((
uint*)(12)) = (uint)Count;

                
int count 0;

                foreach (
string item in WareHouse)
                {
                    if (
item != null)
                    {
                        
string[] Splitter item.Split('-');

                        *((
uint*)(+ +16 count 20)) = (uint)Player.WHIDs[WH][count];
                        *((
uint*)(+ +20 count 20)) = uint.Parse(Splitter[0]);
                        *(
25 count 20) = byte.Parse(Splitter[4]);
                        *(
26 count 20) = byte.Parse(Splitter[5]);
                        *(
29 count 20) = byte.Parse(Splitter[1]);
                        *(
30 count 20) = byte.Parse(Splitter[2]);
                        *(
32 count 20) = byte.Parse(Splitter[3]);
                    }
                    
count++;
                }
            }
            return 
Packet;
        }

        public 
byte[] OpenWarehouse(uint NPCIDuint Money)
        {
            
ushort PacketType 1009;
            
byte[] Packet = new byte[20];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)NPCID;
                *((
uint*)(8)) = (uint)Money;
                *(
12) = (byte)(0xff);
            }

            return 
Packet;
        }

        public 
byte[] ETCPacket(Character Charushort Type)
        {
            
ushort PacketType 1010;
            
byte[] Packet = new byte[24];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(8)) = (uint)Char.UID;
                *((
uint*)(12)) = (uint)Type;
                *(
16) = 0xcf;
                *(
17) = 2;
                *(
18) = 34;
                *(
19) = 2;
                *(
20) = 3;
                *(
22) = 126;
            }
            return 
Packet;
        }

        public 
byte[] Status3(long CharId)
        {
            
ushort PacketType 1017;
            
byte[] Packet = new byte[28];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)CharId;
                *(
8) = 1;
                *(
12) = 12;
                *(
16) = 0x61;
                *(
17) = 0xb3;
                *(
18) = 0x1e;
            }
            return 
Packet;
        }
        public 
byte[] Status2(long CharIdint Val)
        {
            
ushort PacketType 1017;
            
byte[] Packet = new byte[28];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)CharId;
                *(
8) = (byte)(0xff);
                *(
12) = (byte)(26 0xff);
                *(
16) = (byte)(Val 0xff);
                *(
17) = (byte)((Val >> 8) & 0xff);
            }
            return 
Packet;
        }
        public 
byte[] Status1(long CharIdint Val)
        {
            
ushort PacketType 1017;
            
byte[] Packet = new byte[28];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)CharId;
                *(
8) = (byte)(0xff);
                *(
12) = (byte)(12 0xff);
                *(
16) = 225;
                *(
17) = 226;
                *(
18) = (byte)(Val 0xff);
                *(
19) = (byte)((Val >> 8) & 0xff);
            }

            return 
Packet;
        }
        public 
byte[] Death(Character Char)
        {
            
ushort PacketType 1017;
            
byte[] Packet = new byte[36];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)Char.UID;
                *(
8) = 2;
                *(
13) = 0xff;
                *(
14) = 0xff;
                *(
15) = 0xff;
                *(
16) = 0xff;
                *(
21) = 26;
            }

            return 
Packet;
        }
        public 
byte[] ViewEquip(Character Char)
        {
            
ushort PacketType 0x3f7;
            
string spouse "None";

            
byte[] Packet = new byte[11 spouse.Length];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)Char.UID;
                *(
8) = 0x10;
                *(
9) = 0x01;
                *(
10) = (byte)spouse.Length;

                for (
int i 0spouse.Lengthi++)
                {
                    *(
11 i) = Convert.ToByte(spouse[i]);
                }
            }
            return 
Packet;
        }

        public 
byte[] MobSkillUse(SingleMob MobCharacter Attackeduint DMGushort SkillIdbyte SkillLevel)
        {
            
ushort PacketType 1105;
            
byte[] Packet = new byte[32];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)Mob.UID;
                *((
ushort*)(8)) = (ushort)Attacked.LocX;
                *((
ushort*)(10)) = (ushort)Attacked.LocY;
                *((
ushort*)(12)) = (ushort)SkillId;
                *((
ushort*)(14)) = (ushort)SkillLevel;
                *(
16) = 1;
                *((
uint*)(20)) = (uint)Attacked.UID;
                *((
uint*)(24)) = (uint)DMG;
            }
            return 
Packet;
        }

        public 
byte[] SkillUse(Character CharrHashtable TargetsHashtable PTargetsHashtable NPCTargetsshort AimXshort AimYshort SkillIdbyte SkillLvlbyte Switch, uint OneTargetuint TargetDMG)
        {
            
ushort PacketType 1105;
            
int Len 32;
            if (Switch == 
0)
                
Len 20 Targets.Count 12 PTargets.Count 12 NPCTargets.Count 12;

            
byte[] Packet = new byte[Len];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;

                *((
uint*)(4)) = (uint)Charr.UID;

                if (Switch == 
|| Switch == 2)
                {
                    *((
ushort*)(8)) = (ushort)AimX;
                    *((
ushort*)(10)) = (ushort)AimY;
                }
                else if (Switch == 
1)
                    *((
uint*)(8)) = (uint)OneTarget;

                *((
ushort*)(12)) = (ushort)SkillId;
                *((
ushort*)(14)) = (ushort)SkillLvl;

                if (Switch == 
0)
                    *((
uint*)(16)) = (uint)(Targets.Count PTargets.Count NPCTargets.Count);
                else
                    *(
16) = 1;


                
int Count 0;

                if (Switch == 
0)
                {
                    foreach (
DictionaryEntry DE in Targets)
                    {
                        *((
uint*)(+ +20 Count)) = (uint)((SingleMob)DE.Key).UID;
                        *((
uint*)(+ +24 Count)) = (uint)(uint)DE.Value;

                        
Count += 12;
                    }
                    foreach (
DictionaryEntry DE in PTargets)
                    {
                        *((
uint*)(+ +20 Count)) = (uint)((Character)DE.Key).UID;
                        *((
uint*)(+ +24 Count)) = (uint)(uint)DE.Value;

                        
Count += 12;
                    }
                    foreach (
DictionaryEntry DE in NPCTargets)
                    {
                        *((
uint*)(+ +20 Count)) = (uint)((SingleNPC)DE.Key).UID;
                        *((
uint*)(+ +24 Count)) = (uint)(uint)DE.Value;

                        
Count += 12;
                    }
                }
                else
                {
                    *((
uint*)(20)) = (uint)OneTarget;
                    *((
uint*)(24)) = (uint)TargetDMG;
                }
            }

            return 
Packet;
        }

        public 
byte[] ViewEquipAdd(uint ViewedCUIDuint ItemIdbyte Plusbyte Blessbyte Enchantbyte Soc1byte Soc2byte Locationuint MaxDurauint CurDura)
        {
            
ushort PacketType 1008;
            
byte[] Packet = new byte[36];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)ViewedCUID;
                *((
uint*)(8)) = (uint)ItemId;
                if (
ItemId == 1050002 || ItemId == 1050001 || ItemId == 1050000)
                {
                    *((
ushort*)(12)) = (ushort)CurDura;
                    *((
ushort*)(14)) = (ushort)MaxDura;
                }
                else
                {
                    *(
12) = (byte)((byte)Math.Abs(200 CurDura) & 0xff);
                    *(
13) = (byte)((byte)((CurDura) / 2.56) & 0xff);
                    *(
14) = (byte)((byte)Math.Abs(200 MaxDura) & 0xff);
                    *(
15) = (byte)((byte)((MaxDura) / 2.56) & 0xff);
                }
                *(
16) = 4;
                *(
18) = Location;
                *(
19) = Soc1;
                *(
24) = Soc1;
                *(
25) = Soc2;
                *(
28) = Plus;
                *(
29) = Bless;
                *(
30) = Enchant;
            }
            return 
Packet;
        }

        public 
byte[] MobMoves(uint MobUIDbyte Dir)
        {
            
ushort PacketType 1005;
            
byte[] Packet = new byte[12];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)MobUID;
                *(
8) = Dir;
                *(
9) = 1;
            }
            return 
Packet;
        }

        public 
byte[] ItemDrop(uint ItemUIDuint ItemIduint Xuint Y)
        {
            
ushort PacketType 1101;
            
byte[] Packet = new byte[20];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)ItemUID;
                *((
uint*)(8)) = (uint)ItemId;
                *((
ushort*)(12)) = (ushort)X;
                *((
ushort*)(14)) = (ushort)Y;
                *(
16) = 1;
            }
            return 
Packet;
        }

        public 
byte[] ItemDropRemove(uint ItemUID)
        {
            
ushort PacketType 1101;
            
byte[] Packet = new byte[20];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)ItemUID;
                *(
8) = 0x4d;
                *(
9) = 0xa2;
                *((
ushort*)(10)) = (ushort)General.Rand.Next(19);
                *((
ushort*)(12)) = (ushort)General.Rand.Next(99153);
                *((
ushort*)(14)) = (ushort)General.Rand.Next(208217);
                *(
16) = 2;
            }
            return 
Packet;
        }

        public 
byte[] MobFade(long uid)
        {
            
ushort PacketType 1017;
            
byte[] Packet = new byte[28];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)uid;

                *(
8) = 1;
                *(
12) = 26;
                *((
ushort*)(16)) = (ushort)2080;
            }
            return 
Packet;
        }

        public 
byte[] Attack(uint UIDuint Targetshort TargetXshort TargetYbyte AttackTypeuint Damage)
        {
            
ushort PacketType 1022;
            
byte[] Packet = new byte[28];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(8)) = (uint)UID;
                *((
uint*)(12)) = (uint)Target;
                *((
ushort*)(16)) = (ushort)TargetX;
                *((
ushort*)(18)) = (ushort)TargetY;
                *((
uint*)(20)) = (uint)AttackType;
                *((
uint*)(24)) = (uint)Damage;
            }
            return 
Packet;
        }

        public 
byte[] SpawnMob(SingleMob Mob)
        {
            
ushort PacketType 0x3f6;
            
byte[] Packet = new byte[85 Mob.Name.Length];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)Mob.UID;
                *((
uint*)(8)) = (uint)Mob.Mech;
                *((
ushort*)(48)) = (ushort)Mob.CurHP;
                *((
ushort*)(50)) = (ushort)Mob.Level;
                *((
ushort*)(52)) = (ushort)Mob.PosX;
                *((
ushort*)(54)) = (ushort)Mob.PosY;

                *(
58) = Mob.Pos;
                *(
59) = 100;
                *(
80) = 1;
                *(
81) = (byte)Mob.Name.Length;

                for (
int i 0Mob.Name.Lengthi++)
                {
                    *(
82 i) = Convert.ToByte(Mob.Name[i]);
                }
            }
            return 
Packet;
        }

        public 
byte[] ItemUsage(long ItemUIDint Positionint Packettype)
        {
            
ushort PacketType 1009;
            
byte[] Packet = new byte[20];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)ItemUID;
                *((
uint*)(8)) = (uint)Position;
                *((
uint*)(12)) = (uint)Packettype;
            }
            return 
Packet;
        }

        public 
byte[] LearnSkill(short skill_idbyte lvluint skill_exp)
        {
            
ushort PacketType 1103;
            
byte[] Packet = new byte[12];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)skill_exp;
                *((
ushort*)(8)) = (ushort)skill_id;
                *((
ushort*)(10)) = (ushort)lvl;
            }

            return 
Packet;
        }

        public 
byte[] Vital(long CharIdint Typeulong Value)
        {
            
ushort PacketType 1017;
            
byte[] Packet = new byte[28];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)CharId;
                *(
8) = 1;
                *((
uint*)(12)) = (uint)Type;
                *((
uint*)(16)) = (uint)Value;
            }

            return 
Packet;
        }

        public 
byte[] NPCSay(string Text)
        {
            
ushort PacketType 2032;
            
byte[] Packet = new byte[16 Text.Length];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *(
10) = 0xff;
                *(
11) = 1;
                *(
12) = 1;
                *(
13) = (byte)Text.Length;
                for (
int i 0Text.Lengthi++)
                {
                    *(
14 i) = Convert.ToByte(Text[i]);
                }
            }
            return 
Packet;
        }        

        public 
byte[] NPCLink(string Textbyte DialNr)
        {
            
ushort PacketType 2032;
            
byte[] Packet = new byte[16 Text.Length];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *(
10) = DialNr
                *(
11) = 2;
                *(
12) = 1;
                *(
13) = (byte)Text.Length;
                for (
int i 0Text.Lengthi++)
                {
                    *(
14 i) = Convert.ToByte(Text[i]);
                }
            }
            return 
Packet;
        }
        public 
byte[] NPCLink2(string Textbyte DialNr)
        {
            
ushort PacketType 2032;
            
byte[] Packet = new byte[16 Text.Length];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *(
10) = DialNr;
                *(
11) = 3;
                *(
12) = 1;
                *(
13) = (byte)Text.Length;
                for (
int i 0Text.Lengthi++)
                {
                    *(
14 i) = Convert.ToByte(Text[i]);
                }
            }
            return 
Packet;
        }
        public 
byte[] NPCSetFace(short Face)
        {
            
ushort PacketType 2032;
            
byte[] Packet = new byte[16];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *(
4) = 10;
                *(
6) = 10;
                *((
ushort*)(8)) = (ushort)Face;
                *(
10) = 0xff;
                *(
11) = 4;
            }
            return 
Packet;
        }
        public 
byte[] NPCFinish()
        {
            
ushort PacketType 2032;
            
byte[] Packet = new byte[16];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *(
10) = 0xff;
                *(
11) = 100;
            }

            return 
Packet;
        }
        public 
byte[] Prof(short Typebyte Lvluint Exp)
        {
            
ushort PacketType 0x401;
            
byte[] Packet = new byte[16];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)Type;
                *((
uint*)(8)) = (uint)Lvl;
                *((
uint*)(12)) = (uint)Exp;
            }

            return 
Packet;
        }

        public 
byte[] Prof2(short Typebyte Lvluint Exp)
        {
            
ushort PacketType 1005;
            
byte[] Packet = new byte[12];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)Exp;
                *((
ushort*)(8)) = (ushort)Type;
                *((
ushort*)(10)) = (ushort)Lvl;
            }

            return 
Packet;
        }


        public 
byte[] SpawnNPC(SingleNPC NPC)
        {
            
ushort PacketType 2030;
            
byte[] Packet = new byte[20];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)NPC.UID;
                *((
ushort*)(8)) = (ushort)NPC.X;
                *((
ushort*)(10)) = (ushort)NPC.Y;
                *((
ushort*)(12)) = (ushort)NPC.Type;
                *((
ushort*)(14)) = (ushort)NPC.Flags;
                *(
16) = NPC.Dir;
            }

            return 
Packet;
        }

        public 
byte[] RemoveItem(long UIDbyte posbyte type)
        {
            
ushort PacketType 1009;
            
byte[] Packet = new byte[20];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)UID;
                *((
uint*)(8)) = (uint)pos;
                *((
uint*)(12)) = (uint)type;
            }

            return 
Packet;
        }

        public 
byte[] AddItem(long UIDint itemidbyte Plusbyte Blessbyte Enchantbyte soc1byte soc2byte Locationint CurArrowsint MaxArrows)
        {
            
ushort PacketType 0x3f0;
            
string IDE Convert.ToString(itemid).Remove(2Convert.ToString(itemid).Length 2);

            
byte[] Packet = new byte[36];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;

                *((
uint*)(4)) = (uint)UID;
                *((
uint*)(8)) = (uint)itemid;

                if (
itemid == 1050002 || itemid == 1050001 || itemid == 1050000)
                {
                    *((
ushort*)(12)) = (ushort)CurArrows;
                    *((
ushort*)(14)) = (ushort)MaxArrows;
                }
                else if (
IDE == "72" || IDE == "10" || IDE == "79" || IDE == "78" || IDE == "72" || IDE == "71" || IDE == "70" && itemid != 1050002 && itemid != 1050001 && itemid != 1050000)
                { }
                else
                {
                    *(
12) = (byte)(Math.Abs(200 CurArrows) & 0xff);
                    *(
13) = (byte)((byte)(CurArrows 2.56) & 0xff);
                    *(
14) = (byte)(Math.Abs(200 MaxArrows) & 0xff);
                    *(
15) = (byte)((byte)(MaxArrows 2.56) & 0xff);
                }
                *(
16) = 1;
                *(
18) = Location;
                *(
19) = soc1;
                *(
24) = soc1;
                *(
25) = soc2;
                *(
28) = Plus;
                *(
29) = Bless;
                *(
30) = Enchant;
            }
            return 
Packet;
        }

        public 
byte[] SendMsg(long MessageIdstring fromstring tostring msgshort type)
        {
            
ushort PacketType 1004;
            
byte[] Packet = new byte[29 from.Length to.Length msg.Length];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *(
5) = 0xff;
                *(
6) = 0xff;
                *((
ushort*)(8)) = (ushort)type;
                *((
uint*)(12)) = (uint)MessageId;

                *(
24) = 4;
                *(
25) = (byte)from.Length;

                for (
int i 0from.Lengthi++)
                {
                    *(
26 i) = Convert.ToByte(from[i]);
                }

                *(
26 from.Length) = (byte)to.Length;

                for (
int i 0to.Lengthi++)
                {
                    *(
27 from.Length) = Convert.ToByte(to[i]);
                }
                *(
27 from.Length to.Length) = 0;
                *(
28 from.Length to.Length) = (byte)msg.Length;

                for (
int i 0msg.Lengthi++)
                {
                    *(
29 from.Length to.Length) = Convert.ToByte(msg[i]);
                }
            }
            return 
Packet;
        }

        public 
byte[] SendMsg2(long MessageIdstring fromstring tostring msgbool First)
        {
            
ushort PacketType 1004;
            
byte[] Packet = new byte[29 from.Length to.Length msg.Length];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *(
4) = 0xff;
                *(
5) = 0xff;
                *(
6) = 0xff;
                if (
First)
                    *(
8) = 0x3c;
                else
                    *(
8) = 0x3d;
                *(
9) = 8;
                *((
uint*)(12)) = (uint)MessageId;

                *(
24) = 4;
                *(
25) = (byte)from.Length;

                for (
int i 0from.Lengthi++)
                {
                    *(
26 i) = Convert.ToByte(from[i]);
                }

                *(
26 from.Length) = (byte)to.Length;

                for (
int i 0to.Lengthi++)
                {
                    *(
27 from.Length) = Convert.ToByte(to[i]);
                }
                *(
27 from.Length to.Length) = 0;
                *(
28 from.Length to.Length) = (byte)msg.Length;

                for (
int i 0msg.Lengthi++)
                {
                    *(
29 from.Length to.Length) = Convert.ToByte(msg[i]);
                }
            }
            return 
Packet;
        }


        public 
byte[] GeneralData(long Identifierlong Value1ushort Value2ushort Value3short Type)
        {
            
ushort PacketType 1010;
            
byte[] Packet = new byte[24];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)Environment.TickCount;
                *((
uint*)(8)) = (uint)Identifier;
                *((
uint*)(12)) = (uint)Value1;
                *((
ushort*)(16)) = (ushort)Value2;
                *((
ushort*)(18)) = (ushort)Value3;
                *((
ushort*)(22)) = (ushort)Type;
            }

            return 
Packet;
        }

        public 
byte[] SpawnSobNPC(SingleNPC NPC)
        {
            
ushort PacketType 1109;
            
byte[] Packet = new byte[28];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)NPC.UID;
                *((
uint*)(8)) = (uint)NPC.MaxHP;
                *((
uint*)(12)) = (uint)NPC.CurHP;
                *((
ushort*)(16)) = (ushort)NPC.X;
                *((
ushort*)(18)) = (ushort)NPC.Y;
                *((
ushort*)(20)) = (ushort)(NPC.Type +NPC.Dir);
                *((
ushort*)(22)) = (ushort)NPC.Flags;
                *(
24) = 17;
            }
            return 
Packet;
        }
        public 
byte[] SpawnShopFlag(SingleNPC NPC)
        {
            
ushort PacketType 1109;
            
byte[] Packet = new byte[28];

            
fixed (bytePacket)
            {                
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)NPC.UID;
                *((
ushort*)(16)) = (ushort)NPC.X;
                *((
ushort*)(18)) = (ushort)NPC.Y;
                *((
ushort*)(20)) = (ushort)1086;
                *((
ushort*)(22)) = (ushort)16;
            }
            return 
Packet;
        }
        public 
byte[] SpawnSobNPC2(SingleNPC NPC)
        {
            
ushort PacketType 1109;
            
byte[] Packet = new byte[28];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)NPC.UID;
                *((
ushort*)(16)) = (ushort)NPC.X;
                *((
ushort*)(18)) = (ushort)NPC.Y;
                *((
ushort*)(20)) = (ushort)(NPC.Type NPC.Dir);
                *((
ushort*)(22)) = (ushort)NPC.Flags;
                *(
24) = 17;
            }
            return 
Packet;
        }
        
        public 
byte[] SpawnSob(SingleNPC NPC)
        {
            
ushort PacketType 1109;
            
byte[] Packet = new byte[28];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)NPC.UID;
                *((
uint*)(8)) = (uint)NPC.MaxHP;
                *((
uint*)(12)) = (uint)NPC.CurHP;
                *((
ushort*)(16)) = (ushort)NPC.X;
                *((
ushort*)(18)) = (ushort)NPC.Y;
                *((
ushort*)(20)) = (ushort)NPC.Type;
                *(
22) = 26;
                *(
24) = 21;
            }
            return 
Packet;
        }
        public 
byte[] SpawnSobNPCNamed(SingleNPC NPCstring Name)
        {
            
ushort PacketType 1109;
            
byte[] Packet = new byte[28+Name.Length];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)NPC.UID;
                *((
uint*)(8)) = (uint)NPC.MaxHP;
                *((
uint*)(12)) = (uint)NPC.CurHP;
                *((
ushort*)(16)) = (ushort)NPC.X;
                *((
ushort*)(18)) = (ushort)NPC.Y;
                *((
ushort*)(20)) = (ushort)(NPC.Type + +NPC.Dir);
                *((
ushort*)(22)) = (ushort)NPC.Flags;
                *(
24) = 11;
                *(
26) = 1;
                *(
27) = (byte)Name.Length;
                for (
int i 0Name.Lengthi++)
                {
                    *(
28 i) = Convert.ToByte(Name[i]);
                }
            }
            return 
Packet;
        }
        public 
byte[] SpawnCarpet(Character Characterint ID)
        {
            
ushort PacketType 1109;
            
byte[] Packet = new byte[28 Character.Name.Length];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)ID;
                *((
ushort*)(16)) = (ushort)(Character.LocX 1);
                *((
ushort*)(18)) = (ushort)Character.LocY;
                *((
ushort*)(20)) = (ushort)(406);
                *((
ushort*)(22)) = (ushort)14;
                *(
24) = 11;
                *(
26) = 1;
                *(
27) = (byte)Character.Name.Length;
                for (
int i 0Character.Name.Lengthi++)
                {
                    *(
28 i) = Convert.ToByte(Character.Name[i]);
                }
            }
            return 
Packet;
        }

        public 
byte[] StringGuild(long CharIdbyte Typestring namebyte Count)
        {
            
ushort PacketType 1015;
            
byte[] Packet = new byte[12 name.Length];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)CharId;

                *(
8) = Type;
                *(
9) = (byte)Count;

                for (
int i 0name.Lengthi++)
                {
                    *(
10 i) = Convert.ToByte(name[i]);
                }
            }

            return 
Packet;
        }

        public 
byte[] String(long CharIdbyte Typestring name)
        {
            
ushort PacketType 1015;
            
byte[] Packet = new byte[13 name.Length];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)CharId;

                *(
8) = Type;
                *(
9) = 1;
                *(
10) = (byte)name.Length;

                for (
int i 0name.Lengthi++)
                {
                    *(
11 i) = Convert.ToByte(name[i]);
                }
            }

            return 
Packet;
        }


        public 
byte[] SpawnEntity(Character Player)
        {
            
string[] equip;
            
long HeadId 0;
            
long ArmorId 0;
            
long RightHandId 0;
            
long LeftHandId 0;
            
long GarmentId 0;

            if (
Player.Equips[1] != null)
            {
                
equip Player.Equips[1].Split('-');
                
HeadId Convert.ToInt64(equip[0]);
            }

            if (
Player.Equips[3] != null)
            {
                
equip Player.Equips[3].Split('-');
                
ArmorId Convert.ToInt64(equip[0]);
            }

            if (
Player.Equips[4] != null)
            {
                
equip Player.Equips[4].Split('-');
                
RightHandId Convert.ToInt64(equip[0]);
            }

            if (
Player.Equips[5] != null)
            {
                
equip Player.Equips[5].Split('-');
                
LeftHandId Convert.ToInt64(equip[0]);
            }

            if (
Player.Equips[9] != null)
            {
                
equip Player.Equips[9].Split('-');
                
GarmentId Convert.ToInt64(equip[0]);
            }

            
long ToArmor;

            if (
Player.Equips[9] != null)
                
ToArmor GarmentId;
            else
                
ToArmor ArmorId;

            
uint Model;
            if (
Player.Alive)
                
Model uint.Parse(Convert.ToString(Player.Avatar) + Convert.ToString(Player.Model));
            else
            {
                if (
Player.Model == 1003 || Player.Model == 1004)
                    
Model uint.Parse(Convert.ToString(Player.Avatar) + 1098.ToString());
                else
                    
Model uint.Parse(Convert.ToString(Player.Avatar) + 1099.ToString());
            }

            
ushort PacketType 0x3f6;
            
byte[] Packet = new byte[85 Player.Name.Length];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)Player.UID;
                *((
uint*)(8)) = (uint)Model;
                *((
uint*)(12)) = (uint)Player.GetStat();
                *((
ushort*)(20)) = (ushort)Player.GuildID;
                *(
23) = Player.GuildPosition;

                if (
Player.Alive)
                {
                    *((
uint*)(28)) = (uint)HeadId;
                    *((
uint*)(32)) = (uint)ToArmor;
                    *((
uint*)(36)) = (uint)RightHandId;
                    *((
uint*)(40)) = (uint)LeftHandId;
                }
                *((
ushort*)(52)) = (ushort)Player.LocX;
                *((
ushort*)(54)) = (ushort)Player.LocY;
                *((
ushort*)(56)) = (ushort)Player.Hair;

                *(
58) = Player.Direction;
                *(
59) = Player.Action;
                *(
80) = 1;
                *(
81) = (byte)Player.Name.Length;
                for (
int i 0Player.Name.Lengthi++)
                {
                    *(
82 i) = Convert.ToByte(Player.Name[i]);
                }
            }
            return 
Packet;
        }

        public 
byte[] PlacePacket1(Character Charr)
        {
            
ushort PacketType 0x3f2;
            
byte[] Packet = new byte[24];
            
uint Timer = (uint)Environment.TickCount;

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)Timer;
                *((
ushort*)(8)) = (ushort)Charr.LocMap;
                *((
ushort*)(12)) = (ushort)Charr.LocMap;
                *((
ushort*)(16)) = (ushort)Charr.LocX;
                *((
ushort*)(18)) = (ushort)Charr.LocY;
                *(
22) = (byte)(0x4a 0xff);
            }

            return 
Packet;
        }

        public 
byte[] PlacePacket2(Character Charr)
        {
            
ushort PacketType 0x456;
            
byte[] Packet = new byte[24];
            
uint Timer = (uint)Environment.TickCount;
            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)Timer;
                *((
uint*)(8)) = (uint)Charr.UID;
                *(
12) = 0xff;
                *(
13) = 0xff;
                *(
14) = 0xff;
                *(
15) = 0xff;
                *((
ushort*)(16)) = (ushort)Charr.LocX;
                *((
ushort*)(18)) = (ushort)Charr.LocY;
                *(
22) = 0x68;
            }

            return 
Packet;
        }

        public 
byte[] PlacePacket3(Character Charr)
        {
            
ushort PacketType 0x456;
            
byte[] Packet = new byte[16];
            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
ushort*)(4)) = (ushort)Charr.LocMap;
                *((
ushort*)(8)) = (ushort)Charr.LocMap;
            }

            return 
Packet;
        }

        public 
byte[] LogonPacket()
        {
            
ushort PacketType 0x3f9;
            
byte[] Packet = new byte[28];
            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *(
4) = 0x57;
                *(
5) = 0x1d;
                *(
6) = 0x12 0xff;
                *(
8) = 0x01 0xff;
                *(
12) = (byte)((0x09) & 0xff);
                *(
16) = (byte)((0x64) & 0xff);
            }

            return 
Packet;
        }

        public 
byte[] ShowMinimap(bool ff)
        {
            
ushort PacketType 0x3f8;
            
byte[] Packet = new byte[20];
            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *(
4) = ff ? (byte)0x01 : (byte)0x00;
                *(
12) = (byte)((0x14) & 0xff);
            }
            return 
Packet;
        }

        public 
byte[] AfterChar()
        {
            
ushort PacketType 0x3f9;
            
byte[] Packet = new byte[36];
            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)1187159;
                *(
8) = 0x01;
                *(
12) = 0x1a;
            }
            return 
Packet;
        }

        public 
byte[] CharacterInfo(Character Charr)
        {
            
ushort PacketType 0x3ee;
            
string Spouse "None";
            
short Length = (short)(70 Charr.Name.Length Spouse.Length);

            
byte[] Packet = new byte[Length];

            
long Model Convert.ToInt64(Convert.ToString(Charr.Avatar) + Convert.ToString(Charr.Model));

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)Charr.UID;
                *((
uint*)(8)) = (uint)Model;
                *((
ushort*)(12)) = (ushort)Charr.Hair;
                *((
uint*)(14)) = (uint)Charr.Silvers;
                *((
uint*)(18)) = (uint)Charr.CPs;
                *((
uint*)(22)) = (uint)Charr.Exp;
                *((
ushort*)(42)) = (ushort)5130;
                *((
ushort*)(46)) = (ushort)Charr.Str;
                *((
ushort*)(48)) = (ushort)Charr.Agi;
                *((
ushort*)(50)) = (ushort)Charr.Vit;
                *((
ushort*)(52)) = (ushort)Charr.Spi;
                *((
ushort*)(54)) = (ushort)Charr.StatP;
                *((
ushort*)(56)) = (ushort)Charr.CurHP;
                *((
ushort*)(58)) = (ushort)Charr.MaxMana();
                *((
ushort*)(60)) = (ushort)Charr.PKPoints;

                *(
62) = Charr.Level;
                *(
63) = Charr.Job;
                *(
66) = 1;
                *(
67) = 2;
                *(
68) = (byte)Charr.Name.Length;

                for (
int i 0Charr.Name.Lengthi++)
                {
                    *(
69 i) = Convert.ToByte(Charr.Name[i]);
                }

                *(
70 Charr.Name.Length) = (byte)Spouse.Length;

                for (
int i 0Spouse.Lengthi++)
                {
                    *(
Charr.Name.Length 71 i) = Convert.ToByte(Spouse[i]);
                }
            }

            
/*
           Len|ID |UID |Modell n Avatar |Hair |Silvers |
           Cps| Exp| 16 nulls| Nobility rank| str| agi| vit| spi| statp|
           hp| nulls| pkp| level| class| nulls| 1 n 2| name..spouse

           55 00| ee 03| fa 56 17 00| cb 97 04 00| 7f 02| ba 68  ; U....V.........h
           00 00| 00 00 00 00| 66 96 01 00| 00 00 00 00 00 00  ; ......f.........
           00 00 00 00 00 00 00 00 00 00| 0a 14 00 00| e3 00|  ; ................
           42 00| 2f 00| 00 00| 00 00| 2b 08| 00 00| 00 00| 6f| 19|  ; B./.....+.....o.
           00 00| 01 02| 0b 50 72 69 6d 65 4b 6e 69 67 68 74  ; .....PrimeKnight
           04 4e 6f 6e 65| 
             *
           */

            
return Packet;
        }

        public 
byte[] LanguageResponse(uint MessageId)
        {
            
ushort PacketType 1004;
            
byte[] Packet = new byte[55];
            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *(
4) = 0xff;
                *(
5) = 0xff;
                *(
6) = 0xff;
                *(
7) = 0x00;
                *(
8) = 0x35;
                *(
9) = 0x08;
                *(
10) = 0x00;
                *(
11) = 0x00;

                *((
uint*)(12)) = MessageId;

                *(
16) = 0x00;
                *(
17) = 0x00;
                *(
18) = 0x00;
                *(
19) = 0x00;
                *(
20) = 0x00;
                *(
21) = 0x00;
                *(
22) = 0x00;
                *(
23) = 0x00;

                *(
24) = 0x04;
                *(
25) = 0x06;
                *(
26) = 0x53;
                *(
27) = 0x59;
                *(
28) = 0x53;
                *(
29) = 0x54;
                *(
30) = 0x45;
                *(
31) = 0x4d;
                *(
32) = 0x08;
                *(
33) = 0x41;
                *(
34) = 0x4c;
                *(
35) = 0x4c;
                *(
36) = 0x55;
                *(
37) = 0x53;
                *(
38) = 0x45;
                *(
39) = 0x52;
                *(
40) = 0x53;
                *(
41) = 0x00;
                *(
42) = 0x09;
                *(
43) = 0x41;
                *(
44) = 0x4e;
                *(
45) = 0x53;
                *(
46) = 0x57;
                *(
47) = 0x45;
                *(
48) = 0x52;
                *(
49) = 0x5f;
                *(
50) = 0x4f;
                *(
51) = 0x4b;
            }

            return 
Packet;
        }

        public 
byte[] CharCreated(int MessageId)
        {
            
ushort PacketType 1004;
            
byte[] Packet = new byte[55];
            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *(
4) = (0xff);
                *(
5) = (0xff);
                *(
6) = (0xff);
                *(
8) = (0x34);
                *(
9) = (0x08);
                *((
uint*)(12)) = (uint)MessageId;
                *(
24) = (4);
                *(
25) = (6);
                *(
26) = (83);
                *(
27) = (89);
                *(
28) = (83);
                *(
29) = (84);
                *(
30) = (69);
                *(
31) = (77);
                *(
32) = (8);
                *(
33) = (65);
                *(
34) = (76);
                *(
35) = (76);
                *(
36) = (85);
                *(
37) = (83);
                *(
38) = (69);
                *(
39) = (82);
                *(
40) = (83);
                *(
42) = (9);
                *(
43) = (65);
                *(
44) = (78);
                *(
45) = (83);
                *(
46) = (87);
                *(
47) = (69);
                *(
48) = (82);
                *(
49) = (95);
                *(
50) = (79);
                *(
51) = (75);
            }
            return 
Packet;
        }

        public 
byte[] UsedName(int MessageId)
        {
            
ushort PacketType 0x3ec;
            
byte[] Packet = new byte[0x44];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
            }
            return 
Packet;
        }

        public 
byte[] InvalidName(int MessageId)
        {
            
ushort PacketType 0x3ec;
            
byte[] Packet = new byte[4];
            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
            }
            return 
Packet;
        }

        public 
byte[] NewCharPacket(int MessageId)
        {
            
ushort PacketType 0x3ec;
            
byte[] Packet = new byte[54];
            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *(
4) = 0xff;
                *(
5) = (0xff);
                *(
6) = (0xff);
                *(
8) = (0x35);
                *(
9) = (0x08);
                *(
13) = (0x28);
                *(
14) = (0x03);                
                *(
24) = (0x04);
                *(
25) = (0x06);
                *((
uint*)(26)) = (uint)MessageId;
                *(
30) = (0x45);
                *(
31) = (0x4d);
                *(
32) = (0x08);
                *(
33) = (0x41);
                *(
34) = (0x4c);
                *(
35) = (0x4c);
                *(
36) = (0x55);
                *(
37) = (0x53);
                *(
38) = (0x45);
                *(
39) = (0x52);
                *(
40) = (0x53);
                *(
42) = (0x08);
                *(
43) = (0x4e);
                *(
44) = (0x45);
                *(
45) = (0x57);
                *(
46) = (0x5f);
                *(
47) = (0x52);
                *(
48) = (0x4f);
                *(
49) = (0x4c);
                *(
50) = (0x45);
            }

            return 
Packet;
        }

        public 
byte[] AuthResponse(string ipbyte[] key1byte[] key2)
        {
            
ushort PacketType 0x41f;
            
byte[] Packet = new byte[32];
            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *(
4) = key2[3];
                *(
5) = key2[2];
                *(
6) = key2[1];
                *(
7) = key2[0];
                *(
8) = key1[3];
                *(
9) = key1[2];
                *(
10) = key1[1];
                *(
11) = key1[0];
                for (
int i 0ip.Lengthi++)
                {
                    *(
12 i) = Convert.ToByte(ip[i]);
                }
                *(
28) = 0xb8;
                *(
29) = 0x16;
            }
            return 
Packet;
        }
    }

if you find a way you may make this understandable please post it here cuse i can't understand i mean i know how pointers works just dunno how to use them so it would be easier to understand how they're working and how to use them if you explain this to me .
folip5 is offline  
Old 04/17/2010, 18:23   #2
 
elite*gold: 0
Join Date: Apr 2010
Posts: 15
Received Thanks: 0
They are packets that are sent from Server to Client

Packet>Server>Client

or w.e sometimes

Server>Client>Server
TehMonster is offline  
Old 04/17/2010, 19:21   #3
 
elite*gold: 0
Join Date: Dec 2009
Posts: 62
Received Thanks: 11
Quote:
Originally Posted by TehMonster View Post
They are packets that are sent from Server to Client

Packet>Server>Client

or w.e sometimes

Server>Client>Server
Lol thanks i already know that im not that retarded just looking for someone to teach me or to explain me how to use pointers.
folip5 is offline  
Reply


Similar Threads Similar Threads
Suche dinar codes gebe accs oder messer codes
08/31/2013 - WarRock Trading - 6 Replies
Ja habe zurzeit : Lvl 43er mit Retails Lvl 60er mit Retails Lvl 33er mit gute KD Lvl 31er mit Retails Lvl 16er mit 2er KD Lvl 30er Ein lvl 32 mit Gold Prem und sehr vielen guten Waffen
vk promo codes , cx4storm , combat knife, m7, alle codes vk auch 1200g1 für 10euro
01/26/2011 - WarRock Trading - 3 Replies
vk promo codes und g1credits 1200g1+codes für 10euro psc skype:xxkillaxx12 schreibt mir eine nachricht ;)
vk promo codes , cx4storm , combat knife, m7, alle codes vk auch 1250g1 für 10euro
08/18/2010 - WarRock Trading - 4 Replies
hallo vk promo codes und g1punkte bietet mir was an
[translate] i got a Injecter but need translate.
07/26/2009 - GunZ - 1 Replies
http://up49.siz.co.il/up1/wu2nimy0yxzy.jpg http://up41.siz.co.il/up2/m4jnczyytt2z.jpg http://up38.siz.co.il/up2/gi1fy4jntymm.jpg here is what i know: Wall Hack Speed hack i guess it just make you fast/cant see the walls.. Massives Godmod



All times are GMT +2. The time now is 02:49.


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.