Register for your free account! | Forgot your password?

You last visited: Today at 22:49

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

Advertisement



Yet another question

Discussion on Yet another question within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old 12/12/2011, 02:31   #16


 
CptSky's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 1,445
Received Thanks: 1,176
Quote:
Originally Posted by Fаng View Post
I haven't coded the message system in a long time... but i'm pretty sure that the meshes are sent in the message packet (1004).
Yes.
CptSky is offline  
Thanks
1 User
Old 12/12/2011, 03:00   #17
 
12k's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 218
Received Thanks: 33
Sweeeeeeeeet. Thanks a lot 2 both of u. I was looking of both elite-coemu and old LOTF for packets, neither had the mesh in there haha. But thanks a lot. :P
12k is offline  
Old 12/12/2011, 03:25   #18
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Quote:
Originally Posted by 12k View Post
Sweeeeeeeeet. Thanks a lot 2 both of u. I was looking of both elite-coemu and old LOTF for packets, neither had the mesh in there haha. But thanks a lot. :P
<_<

from elite coemu...

Code:
public static byte[] Chat(int MessageID, string From, string To, string Message, uint Mesh, int Level, Struct.ChatType CType)
        {
            PacketBuilder Packet = new PacketBuilder(1004, 32 + From.Length + To.Length + Message.Length);
            Packet.Int(225); //Color - Red
            Packet.Int(225); //Color - Blue
            Packet.Short(225); //Color - Red
            Packet.Short((int)CType); //Chat Type
            Packet.Short(0); //Unknown
            Packet.Long(MessageID); //Message ID
            Packet.Long(Mesh); //Unknown
            Packet.Long(Mesh); //Unknown
            Packet.Int(4); //Strings+1
            Packet.Int(From.Length);
            Packet.Text(From.Replace("~", " "));
            Packet.Int(To.Replace("~", " ").Length);
            Packet.Text(To.Replace("~", " "));
            Packet.Int(0); //Unknown
            Packet.Int(Message.Replace("~", " ").Length);
            Packet.Text(Message.Replace("~", " "));
            Packet.Int(Level);
            Packet.Int(Level);
            Packet.Int(Level);
            return Packet.getFinal();
        }
Obviously it's not 'correct' but still... There's definitely a mesh value in there :P
pro4never is offline  
Old 12/12/2011, 04:09   #19
 
12k's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 218
Received Thanks: 33
o.o must have a diff version then you. These are what i got.

Quote:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using WorldServer.Calculations;
using WorldServer.Connections;
using WorldServer.Database;
using WorldServer.Entities;
using WorldServer.Handlers;
using WorldServer.Packets;
using WorldServer.Structs;

namespace WorldServer.Packets
{
public partial class ConquerPacket
{
public static byte[] Chat(int MessageID, string From, string To, string Message, Struct.ChatType CType)
{
PacketBuilder Packet = new PacketBuilder(1004, 32 + From.Length + To.Length + Message.Length);
Packet.Int(225); //Color - Red
Packet.Int(225); //Color - Blue
Packet.Short(225); //Color - Red
Packet.Short((int)CType); //Chat Type
Packet.Short(0); //Unknown
Packet.Long(MessageID); //Message ID
Packet.Long(0); //Unknown
Packet.Long(0); //Unknown
Packet.Int(4); //Strings+1
Packet.Int(From.Length);
Packet.Text(From);
Packet.Int(To.Length);
Packet.Text(To);
Packet.Int(0); //Unknown
Packet.Int(Message.Length);
Packet.Text(Message);
Packet.Int(0);
Packet.Int(0);
Packet.Int(0);
return Packet.getFinal();
}
public static byte[] Chat(int MessageID, string From, string To, string Message, string Color, Struct.ChatType CType)
{
int r = 150;
int g = 150;
int b = 150;
switch(Color)
{
case "red":
{
r = 255;
g = 0;
b = 0;
break;
}
case "blue":
{
r = 0;
g = 0;
b = 255;
break;
}
case "yellow":
{
r = 255;
g = 225;
b = 0;
break;
}
case "green":
{
r = 0;
g = 255;
b = 0;
break;
}
}
PacketBuilder Packet = new PacketBuilder(1004, 32 + From.Length + To.Length + Message.Length);
Packet.Int(b); //Color - Red
Packet.Int(g); //Color - Blue
Packet.Short(r); //Color - Red
Packet.Short((int)CType); //Chat Type
Packet.Short(0); //Unknown
Packet.Long(MessageID); //Message ID
Packet.Long(0); //Unknown
Packet.Long(0); //Unknown
Packet.Int(4); //Strings+1
Packet.Int(From.Length);
Packet.Text(From);
Packet.Int(To.Length);
Packet.Text(To);
Packet.Int(0); //Unknown
Packet.Int(Message.Length);
Packet.Text(Message);
Packet.Int(0);
Packet.Int(0);
Packet.Int(0);
return Packet.getFinal();
}
}
}
12k is offline  
Reply


Similar Threads Similar Threads
[Question] Wie ruft man in AutoIt eine Website per knopfdruck auf [Question]
08/04/2011 - AutoIt - 7 Replies
Wie ruft man eine Website per knopfdruck in AutoIt auf? Wenn geht Code und nochbesser Erklärung bei :D Danke schonmal im voraus :handsdown:



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


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