Register for your free account! | Forgot your password?

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

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

Advertisement



[Help] GameClient.cs and ALT Codes

Discussion on [Help] GameClient.cs and ALT Codes within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2005
Posts: 96
Received Thanks: 25
[Help] GameClient.cs and ALT Codes

I am just wondering if I am correct in thinking that if I add the ALT codes to the following code, that people would not be able to try make characters with the ALT codes

Code:
public bool ValidName(string Name)
        {
            if (Name.IndexOfAny(new char[14] {[COLOR="Red"] ' ', '[', ']', '#', '*', '\\', '/', '<', '>', ':', '"', '|', '?', '='[/COLOR]}) > -1) //this is all windows folder invalids characters
            {
                return false;
            }
            else
            {
                return true;
            }
        }
If so then wouldn't it be simpler to do something like this:

Code:
public bool ValidName(string Name)
        {
            if (Name.IndexOfAny(new char[14] {'insert english alphabet'}) > -1) //this is all windows folder invalids characters
            {
                return true;
            }
            else
            {
                return false;
            }
        }
HardNotTo is offline  
Old 04/11/2010, 21:29   #2
 
AndreaCo's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 510
Received Thanks: 104
yes
AndreaCo is offline  
Old 04/11/2010, 22:25   #3
 
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
Code:
        public bool ValidName(string name)
        {
            foreach (char ch in name)
            {
                byte c = Convert.ToByte(ch);
                if (!
                    ((c >= 48 && c <= 57) || 
                    (c >= 65 && c <= 90) || 
                    (c >= 97 && c <= 122))
                    )
                    return false;
            }
            return true;
        }
-impulse- is offline  
Thanks
2 Users
Old 04/12/2010, 18:02   #4
 
elite*gold: 0
Join Date: Aug 2005
Posts: 96
Received Thanks: 25
Quote:
Originally Posted by -impulse- View Post
Code:
        public bool ValidName(string name)
        {
            foreach (char ch in name)
            {
                byte c = Convert.ToByte(ch);
                if (!
                    [COLOR="Red"]((c >= 48 && c <= 57) || 
                    (c >= 65 && c <= 90) || 
                    (c >= 97 && c <= 122))[/COLOR]
                    )
                    return false;
            }
            return true;
        }
Ok, there is no doubt in my mind that something you make is going to work so I will use it, but one question, as a learning experience, I know what the code is doing, but on the red that i marked, is that the range numbers that define the alt codes or something? Im thinking those might be the numbers of the keys themselves that are on the keyboard. just asking for future reference.
oh and thanks for the help
HardNotTo is offline  
Old 04/12/2010, 18:44   #5
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
if (!((c >= 48 && c <= 57) || (c >= 65 && c <= 90) || (c >= 97 && c <= 122)))
{
//contains a invalid char so returns FALSE

// 48, 57, 65 ,90 , 97 ,122 Are ASCII Codes for the Symboles.
}
~Yuki~ is offline  
Thanks
1 User
Old 04/12/2010, 21:53   #6
 
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
Quote:
Originally Posted by ~Yuki~ View Post
if (!((c >= 48 && c <= 57) || (c >= 65 && c <= 90) || (c >= 97 && c <= 122)))
{
//contains a invalid char so returns FALSE

// 48, 57, 65 ,90 , 97 ,122 Are ASCII Codes for the Symboles.
}

ALT + 48 = 0
ALT + 57 = 9

Characters between 48 and 57 are numbers

Alt + 65 = A
Alt + 90 = Z

Characters between 65 and 90 are big characters

Alt + 97 = a
Alt + 122 = z

Characters between 97 and 122 are small characters
-impulse- is offline  
Thanks
1 User
Old 04/13/2010, 14:20   #7
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
:O blame me!
~Yuki~ is offline  
Reply


Similar Threads Similar Threads
[RELEASE] WORKING Fixed Serverfiles+English gameclient!
04/25/2013 - Dekaron Private Server - 1165 Replies
update:17.09.09 a full working image of a dekaron server for vmware was posted here --> http://www.elitepvpers.com/forum/2moons-pserver-hos ting/324502-release-1-click-dekaron-server.html update:18.03.09 my release had some errors. the server fixes are: - d-shop working - tele to space working
[RELEASE]working SMC tool+JP gameclient from ORIGINAL sl.rar (Leaked serverfiles)
08/20/2010 - SRO PServer Guides & Releases - 13 Replies
Since PushEDX made his DownloadManager thingy, Legendary was able to reverse the compression on the files. This is the full working smc + dlls etc. Since there was also a client in the folder (surely compatible with the server files) he fixed it as well.. you may use the smc files to gather some more infos about the incomplete database! here they are: smc: Megaupload Jsro client that was compressed in the sl.rar : MEGAUPLOAD - The leading online storage and file delivery service



All times are GMT +2. The time now is 19:09.


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.