Register for your free account! | Forgot your password?

You last visited: Today at 05:21

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

Advertisement



Delete Char Command

Discussion on Delete Char Command within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2008
Posts: 10
Received Thanks: 9
Delete Char Command

I got tierd of going into mysql to delete and make a new account so heres the code for it.

In Database.cs >>>External<<<
Find
Code:
public static void Ban(string Acc)
above add

Code:
 public static void delete(string Acc)
    {//CreatedbyBloodBounty
        if (ExternalDatabase.AllowQuerys)
            DatabaseQueue.Enqueue(new MySqlCommand("DELETE FROM `Characters`  WHERE `Account` = '" + Acc + "'", Connection));
            DatabaseQueue.Enqueue(new MySqlCommand("UPDATE `Accounts` SET `LogonType` = 2 WHERE `AccountID` = '" + Acc + "'", Connection));
    }
Next to add the commands.

in Client.cs

Find
Code:
if (Message[0] == '/')
                        {
Under it add
Code:
if (Message == "/delete")
                                        {
                                            ExternalDatabase.delete(MyChar.MyClient.Account);
                                            MyChar.MyClient.Drop();
                                        }
and so gms can delete players accounts.

Find
Code:
if (Status == 8)
                                    {
below add.
Code:
if (Splitter[0] == "/deleteban")
                                        {
                                             foreach (DictionaryEntry DE in World.AllChars)
                                            {
                                                Character Char = (Character)DE.Value;

                                                if (Char.Name == Splitter[1])
                                                {
                                                    World.SendMsgToAll(Splitter[1] + " has been Deleted by " + MyChar.Name, "SYSTEM", 2011);
                                                    ExternalDatabase.delete(Char.MyClient.Account);
                                                    Char.MyClient.Drop();
                                                }
                                                 else
                                                {
                                                  SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "Sorry the Character:" + Splitter[1] + " is offline.", 2000));
                                                }
                                             }
BloodBounty is offline  
Old 11/30/2008, 19:20   #2
 
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
Expanding on this...
The delete character request is just a data packet.

under
Code:
case 1010:
of Client.cs

Add this to actually do this from ingame.(The delete button under options)

Code:
case 95:
{
    ExternalDatabase.delete(MyChar.MyClient.Account);
    MyChar.MyClient.Drop();
    break;
}
Other than that, good work!
Edit:: Didn't see i posted twice. Fixed/Deleted.
tao4229 is offline  
Old 11/30/2008, 19:27   #3


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
Mhmmm, a unique release, congratulations!
Korvacs is offline  
Old 11/30/2008, 20:04   #4
 
elite*gold: 0
Join Date: Dec 2007
Posts: 618
Received Thanks: 213
great release. anyway i had it working with wh password for like 1 month
alexbigfoot is offline  
Reply


Similar Threads Similar Threads
help i wanna command to ban char
08/07/2012 - EO PServer Hosting - 6 Replies
Hello guys i wanna command to ban char
WTT iSRO Char for SwSro2 char or ZSZC char
07/05/2010 - Silkroad Online Trading - 1 Replies
Im trading my Wizard/Cleric on Titan for an SwSRO 1 or 2, or ZSZC Info: Name:StarKiller Level:72 Class:Wizard (70) Cleric (30) Gear: NPC garm set 8D, +5 72 Staff Good Party Character. Great Plvl char. Notes: has 8 silk, and a couple of SOS weapons, and an SOM 24 Staff. Pic:
Is it possible to delete char quicker? i dont want to wait 7 days.
05/08/2008 - Silkroad Online - 4 Replies
plz help me im sure planty of other people want to no this to.
Delete all /command threads.
08/31/2007 - Conquer Online 2 - 21 Replies
They are all pointless. I already reported them(thats how everyone found and started spamming them) and they will be removed next patch.



All times are GMT +2. The time now is 05:21.


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.