i'm asking if i can make NPC Talk With Arabic Language please
CO2 uses CP1252 by default. But, it is probably possible to set the locale to CP1256 (Windows Arabic Code Page). So, I would say yes.Quote:
i'm asking if i can make NPC Talk With Arabic Language please
public string Text {
get { return Encoding.UTF7.GetString(Buffer, 14, Buffer[13]); }
set {
int realloc = value.Length + 8 + 17;
if (realloc != Buffer.Length) {
byte[] new_Packet = new byte[realloc];
System.Buffer.BlockCopy(Buffer, 0, new_Packet, 0, 24);
Buffer = new_Packet;
}
WriteUInt16((ushort)(value.Length + 17), 0, Buffer);
WriteStringWithLength(value[#59687
public static void WriteString(string arg, int offset, byte[] buffer)
{
if (buffer == null)
return;
if (offset > buffer.Length - 1)
return;
if (buffer.Length >= offset + arg.Length)
{
var bytes = Encoding.Default.GetBytes(arg);
{
ushort i = 0;
while (i < arg.Length)
{
buffer[(ushort)(i + offset)] = bytes[i];
i = (ushort)(i + 1);
}
}
}
}
Encoding.utf7 work on chat but not work on NPCQuote:
then try to use this
& if u will get strings from sql db, don't forget to set charset to "utf8"Code:public static void WriteString(string arg, int offset, byte[] buffer) { if (buffer == null) return; if (offset > buffer.Length - 1) return; if (buffer.Length >= offset + arg.Length) { var bytes = Encoding.Default.GetBytes(arg); { ushort i = 0; while (i < arg.Length) { buffer[(ushort)(i + offset)] = bytes[i]; i = (ushort)(i + 1); } } } }
public static void WriteStringWithLength(string arg, int offset, byte[] buffer)
public static void WriteStringWithLength(string arg, int offset, byte[] buffer)
{
if (buffer == null)
return;
if (offset > buffer.Length - 1)
return;
int till = buffer.Length - offset;
till = Math.Min(arg.Length, till);
buffer[offset] = (byte)arg.Length;
offset++;
ushort i = 0;
var bytes = Encoding.Default.GetBytes(arg);
while (i < till)
{
buffer[(ushort)(i + offset)] = bytes[i];
i = (ushort)(i + 1);
}
}
Thanks 2sllam for your help it's work now :):handsdown: thx ya gamelQuote:
how about using Qahr client just get ur dll files and Conquer.exe and run ur server