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 09:31

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

Advertisement



[Release] Delete Characters (CoEmu v2)

Discussion on [Release] Delete Characters (CoEmu v2) within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
LetterX's Avatar
 
elite*gold: 20
Join Date: May 2007
Posts: 1,125
Received Thanks: 332
[Release] Delete Characters (CoEmu v2)

Note: This will need to be changed a little bit if warehouse passwords are implemented.

Step 1: Go to CoEmu v2 GameServer -> Database -> Database.cs. Under the static int NewCharacter, put:
Code:
        public static void DeleteCharacter(int CharID) //LetterX Codes
        {
            MySqlCommand Cmd = new MySqlCommand("DELETE from `characters` WHERE `CharID` = " + CharID + "", DatabaseConnection.NewConnection());
            Cmd.ExecuteNonQuery();
            Cmd.Connection.Close();
            Cmd.Dispose();
            MySqlCommand Cmd2 = new MySqlCommand("DELETE from `items` WHERE `CharID` = " + CharID + "", DatabaseConnection.NewConnection());
            Cmd2.ExecuteNonQuery();
            Cmd2.Connection.Close();
            Cmd2.Dispose();
            MySqlCommand Cmd3 = new MySqlCommand("DELETE from `prof` WHERE `CharID` = " + CharID + "", DatabaseConnection.NewConnection());
            Cmd3.ExecuteNonQuery();
            Cmd3.Connection.Close();
            Cmd3.Dispose();
            MySqlCommand Cmd4 = new MySqlCommand("DELETE from `skills` WHERE `CharID` = " + CharID + "", DatabaseConnection.NewConnection());
            Cmd4.ExecuteNonQuery();
            Cmd4.Connection.Close();
            Cmd4.Dispose();
            MySqlCommand Cmd5 = new MySqlCommand("DELETE from `ignored` WHERE `CharID` = " + CharID + "", DatabaseConnection.NewConnection());
            Cmd5.ExecuteNonQuery();
            Cmd5.Connection.Close();
            Cmd5.Dispose();
        }
(Database function for deleting the row / character & the items associated with the character)

Step 2: Go to PacketProcessor.cs -> case 1010 (packet 0x3f2). Above case 97: //Confirm Guild, put this:
Code:
                                case 95: //Delete Character (LetterX Codes)
                                    {
                                        CSocket.Disconnect();
                                        Database.Database.DeleteCharacter(CSocket.Client.ID);
                                        
                                        break;
                                    }
(This is where the server comprehends the client's request and then disconnects and deletes the character).

So if you don't how to do it, all you do is when logged in, go to Options -> Delete and then click 'Okay', insert a ZERO (" 0 ") into the box, and then click "Okay" again and your character and items are completely deleted.

That's pretty much it. =d

edit: scottdavey found I forgot to delete character items. *Fixed*
edit2: Forgot to delete Skills and Profs *Fixed*
LetterX is offline  
Thanks
13 Users
Old 06/01/2009, 01:17   #2
 
scottdavey's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 684
Received Thanks: 238
You need to delete all the items that are associated with that UID also, pretty cool though.
scottdavey is offline  
Thanks
1 User
Old 06/01/2009, 01:18   #3
 
LetterX's Avatar
 
elite*gold: 20
Join Date: May 2007
Posts: 1,125
Received Thanks: 332
Quote:
Originally Posted by scottdavey View Post
You need to delete all the items that are associated with that UID also, pretty cool though.
Completely forgot about that. Used to LOTF's way of putting everything in the character table. ;D

edit: Fixed. Thank you for pointing out the error.
LetterX is offline  
Old 06/01/2009, 02:28   #4
 
scottdavey's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 684
Received Thanks: 238
Nice work, you need to delete from Ignored too though.
scottdavey is offline  
Old 06/01/2009, 03:09   #5
 
LetterX's Avatar
 
elite*gold: 20
Join Date: May 2007
Posts: 1,125
Received Thanks: 332
Quote:
Originally Posted by scottdavey View Post
Nice work, you need to delete from Ignored too though.
I'll add it in, but I searched in the source and nothing loads or uses the 'Ignored' table right now. xD
LetterX is offline  
Old 06/01/2009, 09:54   #6
 
scottdavey's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 684
Received Thanks: 238
Quote:
Originally Posted by LetterX View Post
I'll add it in, but I searched in the source and nothing loads or uses the 'Ignored' table right now. xD
Better to be safe than sorry :P
scottdavey is offline  
Reply


Similar Threads Similar Threads
[Release] Delete Character 5165
08/06/2010 - CO2 PServer Guides & Releases - 20 Replies
Not sure if this has been released or not but here it is First of add this to PacketHandler.cs in case 10010: case 95: //Delete Character { GC.Disconnect(); Database.DeleteCharacter(GC.MyChar.Name); break; }
how delete characters of other player with hack on wonderland online
04/13/2010 - General Coding - 2 Replies
how i can delete character of other player on wonderland online without know pass or id? there are any hack program?
[Release]My Edited Characters
09/24/2009 - Soldier Front Hacks, Bots, Cheats & Exploits - 49 Replies
E2 na po Rerelease ko na 24 hours ko lang po patatagalin d2 to. Press thanks nalang po sa pag release ko e2 po itsura nila GIGN to Iron Man
[Release] Delete AutoRestart
08/22/2008 - Conquer Online 2 - 1 Replies
Search Restart = new System.Timers.Timer (); general.cs in and eliminates this: :mofo:



All times are GMT +1. The time now is 09:33.


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.