Register for your free account! | Forgot your password?

You last visited: Today at 12:22

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

Advertisement



[Release]Fixed Delete Character

Discussion on [Release]Fixed Delete Character within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2007
Posts: 340
Received Thanks: 38
[Release]Fixed Delete Character

Ok. As title says here's a fixed delete character (I used the one that didn't allow you to remake the character and made it so that you can make another character) (5165)

go to Database.cs and search for
Code:
        public static void Dispose()
above / under that void put this
Code:
 public static void DeleteCharacter(string Charname, string AccName)
        {
            if (File.Exists(@"C:\OldCODB\Users\Characters\" + Charname + ".chr"))
                File.Delete(@"C:\OldCODB\Users\Characters\" + Charname + ".chr");
            if (File.Exists(@"C:\OldCODB\Users\" + AccName + ".usr"))
            {
                FileStream FS = new FileStream(@"C:\OldCODB\Users\" + AccName + ".usr", FileMode.Open);
                BinaryReader BR = new BinaryReader(FS);
                string RealPassword = Encoding.ASCII.GetString(BR.ReadBytes(BR.ReadByte()));
                string status = Encoding.ASCII.GetString(BR.ReadBytes(BR.ReadByte()));
                BR.Close();
                FS.Close();
                File.Delete(@"C:\OldCODB\Users\" + AccName + ".usr");
                FS = new FileStream(@"C:\OldCODB\Users\" + AccName + ".usr", FileMode.CreateNew);
                BinaryWriter BW = new BinaryWriter(FS);
                BW.Write(RealPassword);
                BW.Write(status);
                BW.Close();
                FS.Close();
            }
            
        }
go to PacketHandler.cs and search for
Code:
                                    case 99:
under / above that put this :
Code:
                                    case 95: //Delete Character
                                        {
                                            GC.Disconnect();
                                            Database.DeleteCharacter(GC.MyChar.Name, GC.AuthInfo.Account);
                                            break;
                                        }
+Thanks to me
ryuchetval is offline  
Thanks
6 Users
Old 10/03/2010, 23:53   #2
 
elite*gold: 0
Join Date: Oct 2010
Posts: 148
Received Thanks: 57
Nice, but I guess this should have been posted in the release section (:

so #reported to request move
_Vodka is offline  
Old 10/04/2010, 11:48   #3
 
12tails's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 782
Received Thanks: 458
you forgot to make it read the Pasword data.... but nice ^^
12tails is offline  
Old 10/04/2010, 11:51   #4
 
elite*gold: 0
Join Date: Feb 2007
Posts: 340
Received Thanks: 38
Quote:
Originally Posted by 12tails View Post
you forgot to make it read the Pasword data.... but nice ^^
what do you mean?
it reads it....and you can't delete the character if your not logged in
ryuchetval is offline  
Old 10/04/2010, 15:32   #5
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Quote:
Originally Posted by ryuchetval View Post
what do you mean?
it reads it....and you can't delete the character if your not logged in
he means warehouse password: Aka what you have to enter when deleting the character.
pro4never is offline  
Old 10/04/2010, 16:21   #6
 
elite*gold: 0
Join Date: Feb 2007
Posts: 340
Received Thanks: 38
yes well that idk about that...i'm still a begginer at coding


EDIT: here is a possible solution (didn't test)

go to NPCDialog.cs and searc for
Code:
static string ReadString(byte[] Data)
make it
Code:
        public static string ReadString(byte[] Data)
then at packethandler.cs at case 95 put this
Code:
                                            string pass = PacketHandling.NPCDialog.ReadString(Data);
                                            if (pass == GC.MyChar.WHPassword)
                                            {
                                                GC.Disconnect();
                                                Database.DeleteCharacter(GC.MyChar.Name, GC.AuthInfo.Account);
                                            }
                                            else
                                                GC.LocalMessage(2005, "Wrong password!");
I didn't test it so idk if it works
ryuchetval is offline  
Old 10/04/2010, 17:39   #7
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
uh why are u removing the account? It's a delete character
_DreadNought_ is offline  
Old 10/04/2010, 20:34   #8
 
elite*gold: 0
Join Date: Feb 2007
Posts: 340
Received Thanks: 38
couldn't make it replace the character with "" (as the client crashed) so i removed the acc and remade it
ryuchetval is offline  
Old 10/04/2010, 20:39   #9
 
elite*gold: 0
Join Date: Oct 2010
Posts: 148
Received Thanks: 57
just disconnect, then delete file.
_Vodka is offline  
Old 10/04/2010, 20:50   #10
 
elite*gold: 0
Join Date: Feb 2007
Posts: 340
Received Thanks: 38
if you just delete the character file then you wouldn't be able to login
the info in the account files is pass, status, character and character file is missing
by writing into the account file pass, status, "" it crashed the client idk why...as in the authenticate place if the character is "" it would take you to make a new character....but it crashes the client
ryuchetval is offline  
Old 10/04/2010, 21:29   #11
 
elite*gold: 0
Join Date: Oct 2010
Posts: 148
Received Thanks: 57
I meant.
Quote:
1. find wich char to delete + get info
2. disconnect
3. delete char + account file
4. create new acc
_Vodka is offline  
Old 10/05/2010, 01:26   #12
 
elite*gold: 0
Join Date: Feb 2009
Posts: 700
Received Thanks: 79
I released something similar to this but this one is more advanced I guess because it disconnects the character lol.
copz1337 is offline  
Old 10/05/2010, 03:15   #13
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Quote:
Originally Posted by copz1337 View Post
I released something similar to this but this one is more advanced I guess because it disconnects the character lol.
Yours didn't work
It deleted the character file, but inside the account file, the character still existed.
Arcо is offline  
Old 10/05/2010, 03:23   #14
 
elite*gold: 0
Join Date: Feb 2009
Posts: 700
Received Thanks: 79
Quote:
Originally Posted by Аrco View Post
Yours didn't work
It deleted the character file, but inside the account file, the character still existed.
And that is why I had also had an ACCOUNT cmd. So lol?
copz1337 is offline  
Old 10/05/2010, 06:39   #15
 
elite*gold: 0
Join Date: Feb 2007
Posts: 340
Received Thanks: 38
this is useful for a public server not a server where you play by yourself and can make easily an account for you...
ryuchetval is offline  
Thanks
2 Users
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; }
delete character
08/13/2009 - Cabal Online - 12 Replies
hi, if i delete the character lvl 2 where i used level hack and got screen shotted in buddy list by some one, will my account be safe?thx
[GUIDE] How to Delete a Character
12/01/2008 - Metin2 Guides & Templates - 44 Replies
Achtung: Dieser Thread ist offiziell © by klebstreifen 1.Geht auf Metin2 - Oriental Action MMORPG 2.Loggt euch ein 3.Klickt ihr auf Benutzerdaten
how do i delete my character in sf?
04/26/2008 - Soldier Front - 5 Replies
how do i delete my character in sf?



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


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.