Register for your free account! | Forgot your password?

You last visited: Today at 08:04

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

Advertisement



character name

Discussion on character name within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2010
Posts: 29
Received Thanks: 8
character name

Guys, i'm having a problem with the name of chars, i cant whisper or use /ctele, /find, /recall... so i saw at name of characters all of them has 2spaces after the names like player(space)(space), i tried to use that commands with 2 spaces but didnt work i looked at script i found this but seems like ok:

namespace NewestCOServer.PacketHandling
{
class CharacterMaking
{
public static void Handle(Main.GameClient GC, byte[] Data)
{
string CharName ="";
for (int i = 0; i < 16; i++)
if (Data[20 + i] != 0)
CharName += Convert.ToChar(Data[20 + i]);

ushort Body = BitConverter.ToUInt16(Data, 52);
byte Job = Data[54];
if (GC.ValidName(CharName))
{
GC.AddSend(Packets.PopUpMessage(GC.MessageID, Database.CreateCharacter(GC.AuthInfo.Account, CharName, Body, Job)));
}
else
GC.AddSend(Packets.PopUpMessage(GC.MessageID, "Invalid character name!"));
}
}
}

Anyone know anything about that?
PrettyGodness is offline  
Old 05/18/2010, 02:52   #2
 
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
How I get mine:
Code:
string Name = Encoding.ASCII.GetString(Data, 20, 16).Trim(new char[] { (char)0x0000 });
The Trim method removes the character from the front and back of the string.

Based on Hybrid's.
kinshi88 is offline  
Old 05/18/2010, 03:37   #3
 
elite*gold: 0
Join Date: May 2010
Posts: 29
Received Thanks: 8
sorry i'm so noob but i need to change this:

string CharName ="";

By This:
string Name = Encoding.ASCII.GetString(Data, 20, 16).Trim(new char[] { (char)0x0000 });

???
PrettyGodness is offline  
Old 05/18/2010, 05:17   #4
 
elite*gold: 0
Join Date: May 2010
Posts: 29
Received Thanks: 8
Didnt work =\
PrettyGodness is offline  
Old 05/18/2010, 05:24   #5
 
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
Code:
        public static void Handle(byte[] Data, ClientEntity Client)
        {
            string Name = Encoding.ASCII.GetString(
                        Data, 20, 16).Trim(new char[] { (char)0x0000 });

            ....
No loops required.
kinshi88 is offline  
Old 05/18/2010, 05:57   #6
 
elite*gold: 0
Join Date: May 2010
Posts: 29
Received Thanks: 8
hey i think i found my problem was in the website script when i make chars by /newacc it works good i'll confirm so i tell u
PrettyGodness is offline  
Reply


Similar Threads Similar Threads
WTT iSRO(RedSea)lvl 106 character for rSRO Artemis character!
09/07/2010 - Silkroad Online Trading - 10 Replies
Hey guys/girls, I want to trade my lvl 106 rogue/bard on RedSea server. Rev6.com - The 6th Revolution Character information: -name : SrO_Diabolik -build : rogue/bard full STR -skills : rogue/bard lvl 106 with skills up to date with about 250 k sp left -items:+2 +3 items with blue,101+5 dagger crit 18,shield 101+5 br 18 -never banned
WTT Cabal EU Character for Dekaron EU Character
08/29/2008 - Dekaron Trading - 6 Replies
WTT Cabal Force Archer for Dekaron EU Bagi Warrior / The two blade race (i don`t know the name) / Dils Cabal Character Details : Force Archer Lvl : 83 Ranks : Grand Master (50 skills and Completer)/ Appretience(almost Regular) All Skiils Bought Quests from 60+ are not done because of skilling at dark bladers so from lvl 64 i made 83 by skilling Class Rank : 9
WTT Cabal EU Character for Dekaron EU Character
08/23/2008 - Dekaron Trading - 2 Replies
WTT Cabal Force Archer for Dekaron EU Bagi Warrior Cabal Character Details : Force Archer Lvl : 83 Ranks : Grand Master (50 skills and Completer)/ Appretience(almost Regular) All Skiils Bought Quests from 60+ are not done because of skilling at dark bladers so from lvl 64 i made 83 by skilling Class Rank : 9



All times are GMT +1. The time now is 08:05.


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.