Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 03:28

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

Advertisement



[Release] Extremely basic (but working/bugless) C# Source

Discussion on [Release] Extremely basic (but working/bugless) C# Source within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Closed Thread
 
Old 01/24/2012, 06:55   #316
 
12k's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 218
Received Thanks: 33
Granted its not hard; You made a character creation packet yet dont no how to make a console command?
12k is offline  
Old 01/24/2012, 16:27   #317
 
elite*gold: 0
Join Date: Oct 2008
Posts: 270
Received Thanks: 10
haha yeah it was late so i didn't even try because i was really tired. ill give it a shot later when i have time though. The only thing is i'm not completely sure how i would go about saving the account info to the file with the other accounts.


#EDIT
ok i guess i do need some help on making the command :/. Could someone give me an example or maybe a tip?
corbit15 is offline  
Old 01/25/2012, 13:33   #318
 
elite*gold: 0
Join Date: Dec 2011
Posts: 1,537
Received Thanks: 785
pseudo
Code:
void NewCharacter(string name, string password) {
IniFile ini = new IniFile("database\\accounts\\" + name + ".ini", "Account");
ini.WriteString("Account", name);
ini.WriteString("Password", password)
}
I don't have a username is offline  
Old 01/25/2012, 13:51   #319

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Well since this source and Project Manifest are similar in many ways, here's my account creating command for that source:
Code:
                        case "/account":
                        {
                            ServerDatabase.NewUsername(Commands[1], Commands[2]);
                            break;
                        }
Code:
        public static void NewUsername(string Username, string Password)
        {
            IniFile ini = new IniFile(Path + "\\Accounts\\" + Username + ".ini");
            if (File.Exists(ini.FileName))
            {
                Program.WriteLine("Username is taken.");
            }
            else
            {
                ini.WriteString("Account", "Username", Username);
                ini.WriteString("Account", "Password", Password);
                ini.WriteString("Character", "Name", "INVALIDNAME");
                DirectoryInfo info = new DirectoryInfo(Path + "\\Accounts\\");
                ini.WriteString("Character", "UID", "1000000" + info.GetFiles().Length);
                ini.WriteString("Character", "GM", "2");
                Program.WriteLine("Account was successfully created.");
            }
        }
Shouldn't be too hard to change.
Kiyono is offline  
Old 01/25/2012, 16:49   #320
 
elite*gold: 0
Join Date: Oct 2008
Posts: 270
Received Thanks: 10
Quote:
Originally Posted by Kiyono View Post
Well since this source and Project Manifest are similar in many ways, here's my account creating command for that source:
Code:
                        case "/account":
                        {
                            ServerDatabase.NewUsername(Commands[1], Commands[2]);
                            break;
                        }
Code:
        public static void NewUsername(string Username, string Password)
        {
            IniFile ini = new IniFile(Path + "\\Accounts\\" + Username + ".ini");
            if (File.Exists(ini.FileName))
            {
                Program.WriteLine("Username is taken.");
            }
            else
            {
                ini.WriteString("Account", "Username", Username);
                ini.WriteString("Account", "Password", Password);
                ini.WriteString("Character", "Name", "INVALIDNAME");
                DirectoryInfo info = new DirectoryInfo(Path + "\\Accounts\\");
                ini.WriteString("Character", "UID", "1000000" + info.GetFiles().Length);
                ini.WriteString("Character", "GM", "2");
                Program.WriteLine("Account was successfully created.");
            }
        }
Shouldn't be too hard to change.

Alright well i got everything changed with no errors but when i use the command the account isn't created.
i put the NewUsername void in Database.cs
and the command in Commands.cs
Did i misplace them?
corbit15 is offline  
Old 01/25/2012, 17:14   #321

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
I don't know, didn't try it with this source. Tried breakpointing? And just to be sure you did use it in this format right? /account <username> <password>
Kiyono is offline  
Old 01/26/2012, 00:59   #322
 
elite*gold: 0
Join Date: Oct 2008
Posts: 270
Received Thanks: 10
Quote:
Originally Posted by Kiyono View Post
I don't know, didn't try it with this source. Tried breakpointing? And just to be sure you did use it in this format right? /account <username> <password>
Just got home so i'll try breakpointing now. And yeah i did it in that format.

#EDIT
Alright well nothing happened when i used breakpoints.
Maybe i messed up something in one of the codes?

My command:
case "/account":
{
Database.NewUsername(args[1], args[2]);
break;
}

NewUsername void:
public static void NewUsername(string Username, string Password)
{
IniFile wrtr = new IniFile(DatabasePath + @"\Accounts\" + Username + ".ini");
if (File.Exists(wrtr.FileName))
{
Console.WriteLine("Username is taken.");

}
else
{
wrtr.Write("Account", "Username", Username);
wrtr.Write("Account", "Password", Password);
wrtr.Write("Character", "Name", "INVALIDNAME");
DirectoryInfo info = new DirectoryInfo(DatabasePath + @"\Accounts\");
wrtr.Write("Character", "UID", "1000000" + info.GetFiles().Length);
wrtr.Write("Character", "GM", "2");
Console.WriteLine("Account was successfully created.");
}
}


P.S sorry i don't know how to make spoilers :/
corbit15 is offline  
Old 01/29/2012, 09:26   #323
 
elite*gold: 0
Join Date: May 2009
Posts: 67
Received Thanks: 2
is there anyone can give a merror of the DL link of the first page files please....
mauripan is offline  
Old 01/29/2012, 14:40   #324
 
F i n c h i's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 785
Received Thanks: 422
Merror? o.o
F i n c h i is offline  
Thanks
1 User
Old 01/30/2012, 01:42   #325
 
elite*gold: 0
Join Date: Aug 2010
Posts: 93
Received Thanks: 18
Mirror-Link o.o?
sitdownson is offline  
Old 01/30/2012, 07:02   #326
 
elite*gold: 0
Join Date: Oct 2008
Posts: 270
Received Thanks: 10
If you go back about 2 or 3 pages i posted a link.
corbit15 is offline  
Old 02/15/2012, 19:43   #327
 
xBlackPlagu3x's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 286
Received Thanks: 71
Does anybody have an opinion on which revision to use? I mainly just want this source to use as a reference, so which ever rev would help out with that the best, is the rev I'd like to use.
xBlackPlagu3x is offline  
Old 02/15/2012, 19:59   #328

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Quote:
Originally Posted by xBlackPlagu3x View Post
Does anybody have an opinion on which revision to use? I mainly just want this source to use as a reference, so which ever rev would help out with that the best, is the rev I'd like to use.
The newest; revision 3 but I guess that Arco's versions would be fine too. Oh and tao posted a slightly changed version (referred to as 3.1).
Kiyono is offline  
Old 03/17/2012, 19:15   #329
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
Mirror:
Spirited is offline  
Thanks
1 User
Old 03/29/2012, 23:08   #330
 
elite*gold: 0
Join Date: Apr 2007
Posts: 223
Received Thanks: 30
i know this is an old post but can anyone re-upload as meagupload links dont work anymore ?
PKDemon is offline  
Closed Thread


Similar Threads Similar Threads
[Huge-Release] All-In-One Basic NPC Scripts For The 5165 Source!
02/19/2010 - CO2 PServer Guides & Releases - 30 Replies
Well I'm sorry that I spammed the whole forum full of my posts So pro4never and .Ryu gave me the idea of making this All-In-One thread about all my NPC's! THESE ARE UPDATED DAILY! NOTE: TO PEOPLE... SOME OF THE CODES ARE NOT MADE BY ME! I USUALLY JUST FIXED/UPDATED THE BASIC ONES! SORRY I'M LEARNING ON HOW TO CODE! 1. Birth-Island-NPC's(The NPC text is not from "REAL CONQUER" SORRY!...) #region BirthOldGeneralYang case 425: {
[FINAL RELEASE]HuB- Source (BASIC) (Original LOTF easier workable)
11/14/2009 - CO2 PServer Guides & Releases - 25 Replies
#REMOVED
[RELEASE] Basic LOTF Source
09/03/2009 - CO2 PServer Guides & Releases - 17 Replies
hey this is a basic lotf source edited based off shadowco, if you dont like it then dont post here... flames will be told on!!! :D i will tell on you to the mods if you flame What it has... - LuckyTime - Guard - 24/7 GW



All times are GMT +1. The time now is 03:28.


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