Register for your free account! | Forgot your password?

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

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

Advertisement



[Help] with Ini Acc Making from Client

Discussion on [Help] with Ini Acc Making from Client within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 20
Join Date: May 2008
Posts: 1,103
Received Thanks: 254
[Help] with Ini Acc Making from Client

Ok here a problem i found this is making accounts with Ini file. What happens is it deletes the account and remakes it lol. Any Ideal on how i can fix this here is my code.

public static byte Authenticate(string Username, string Password)
{
if (Username.StartsWith("NEW"))
{
string CreateName = Username.Remove(0, 3);
string File = System.Windows.Forms.Application.StartupPath + "\\Accounts\\" + CreateName + ".acc";
IniFile Ini = new IniFile(File);
Ini.IniWriteValue("Account", "AccountID", CreateName);
Ini.IniWriteValue("Account", "Password", Password);
Ini.IniWriteValue("Account", "LogonType", "2");
Ini.IniWriteValue("Account", "LogonCount", "0");
Ini.IniWriteValue("Account", "Status", "0");
Ini.IniWriteValue("Account", "Charr", "");
Ini.IniWriteValue("Account", "Online", "0");
}
if (System.IO.File.Exists(System.Windows.Forms.Applic ation.StartupPath + @"\accounts\\" + Username + ".acc"))
{
Ini SR = new Ini(System.Windows.Forms.Application.StartupPath + @"\accounts\\" + Username + ".acc");

string Acc = SR.ReadValue("Account", "AccountID");
string Pass = SR.ReadValue("Account", "Password");
uint LogonType = uint.Parse(SR.ReadValue("Account", "LogonType"));
int LogonCount = Convert.ToInt16(SR.ReadValue("Account", "LogonCount"));

if (Pass == Password || Pass == "")
{
if (Pass == "")
{
SR.WriteString("Account", "Password", Password);
}

LogonCount++;
SR.WriteString("Account", "LogonCount", Convert.ToString(LogonCount));
return Convert.ToByte((uint)LogonType);
}
else
{
return 0;
}

}
else return 0;
}
}
}
Pete1990 is offline  
Old 04/30/2009, 21:05   #2
 
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
Check if the file (account) already exists before making the new account.
kinshi88 is offline  
Old 04/30/2009, 22:00   #3
 
elite*gold: 20
Join Date: May 2008
Posts: 1,103
Received Thanks: 254
Alrdy done it still doing same thing maybe im messing up some where
Pete1990 is offline  
Old 04/30/2009, 23:35   #4
 
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
Code:
public static byte Authenticate(string Username, string Password)
{
     if (Username.StartsWith("NEW"))
     {
          Username = Username.Remove(0, 3);
          if (System.IO.File.Exists(System.Windows.Forms.Applic ation.StartupPath + @"\accounts\\" + Username + ".acc"))
               return; // Will stop from a new account being made
          string File = System.Windows.Forms.Application.StartupPath + "\\Accounts\\" + Username + ".acc";
          IniFile Ini = new IniFile(File);
          Ini.IniWriteValue("Account", "AccountID", Username);
          Ini.IniWriteValue("Account", "Password", Password);
          Ini.IniWriteValue("Account", "LogonType", "2");
          Ini.IniWriteValue("Account", "LogonCount", "0");
          Ini.IniWriteValue("Account", "Status", "0");
          Ini.IniWriteValue("Account", "Charr", "");
          Ini.IniWriteValue("Account", "Online", "0");
     }

     ...
kinshi88 is offline  
Reply


Similar Threads Similar Threads
Need Help Making 5065 client
09/10/2010 - CO2 Private Server - 5 Replies
Hey Everyone I want to know if its easier to make a 5065 client than a 5165 client i dont want ninjas only thier skills so if anyone could show me a guide or something so i can try to make one thanks all help is appreciated
Making client Smaller
12/27/2009 - SRO Private Server - 4 Replies
Hello, i knew tthere was a combination of keys on your keyboard to make the sro client smaller, only problem is, i cant remember it.. So if anyone knows it, then please post it, and dont come here with alt+f4 bullshit, because then we all know that you are to childish to even give a normal reply..
Problem making client
12/10/2009 - EO PServer Hosting - 14 Replies
when i try to replace my target box with "C:\Server\Soul.exe"blacknull it doesnt let me it says specified in Target box is not valid. Make sure path and file name are correct.
Making Multi Client
06/02/2009 - Conquer Online 2 - 7 Replies
could anyone help me on how to create multi client with visible time and day?????:confused:
Making [DeParenthesized] Multi-Client?
09/01/2007 - Conquer Online 2 - 1 Replies
I know there are instructions for making the regular Multi Client. But there are none for making the "DeParenthesized" Version. Can anyone direct me to these instructions?



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


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.