Esempio n. 1
0
 public static byte[] String(int UniqueID, int SubType, params string[] Strings)
 {
     int stringLengths = 0;
     foreach (string str in Strings)
     {
         stringLengths += str.Length;
         stringLengths++;
     }
     PacketBuilder Packet = new PacketBuilder(1015, 12 + stringLengths);
     Packet.Long(UniqueID);
     Packet.Short(SubType);
     Packet.Byte(Strings.Length);
     foreach (string str in Strings)
     {
         Packet.Byte(str.Length);
         Packet.Text(str);
     }
     Packet.Byte(0);
     return Packet.getFinal();
 }
Esempio n. 2
0
        public static byte[] SpawnMonster(int UID, int Mesh, int X, int Y, string Name, int HP, int Level, int Direction)
        {
            PacketBuilder Packet = new PacketBuilder(1014, 89 + Name.Length);
            Packet.Long(UID);
            Packet.Long(Mesh);
            Packet.Long(0);//@TODO: Monster Status Mask

            Packet.Long(0);
            Packet.Long(0);
            Packet.Long(0);

            Packet.Long(HP);

            Packet.Long(0);
            Packet.Long(0);

            Packet.Long(HP);
            Packet.Long(Level);
            Packet.Short(X);
            Packet.Short(Y);

            Packet.Long(0);

            Packet.Long(Direction);
            Packet.Long(1010);//@TODO: Monstertype?

            Packet.Long(0);
            Packet.Long(0);
            Packet.Long(0);
            Packet.Long(0);
            Packet.Long(0);
            Packet.Short(0);
            Packet.Byte(0);
            Packet.Byte(1);//StringCount
            Packet.Byte(Name.Length);
            Packet.Text(Name);

            return Packet.getFinal();
        }