Register for your free account! | Forgot your password?

You last visited: Today at 20:08

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

Advertisement



DonationReset

Discussion on DonationReset within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
5supertao's Avatar
 
elite*gold: 0
Join Date: Feb 2010
Posts: 89
Received Thanks: 19
DonationReset

Would this be a cause of the Nobility Donations reseting?

Code:
        [COLOR="Red"]public static void DonationReset()[/COLOR]
        {
            foreach (string Path in [COLOR="red"]Directory.GetFiles(@"C:\OldCODB\Users\Characters\"))[/COLOR]
            {
                if (Path.Remove(0, Path.Length - 4) == ".chr")
                {
                    try
                    {
                        string Name = Path.Substring(Path.LastIndexOf("\\") + 1, Path.LastIndexOf('.') - Path.LastIndexOf("\\") - 1);
                        Game.Character C;
                        C = Game.World.CharacterFromName2(Name);
                        if (C == null)
                        {
                            string Account = "";
                            C = LoadCharacter(Name, ref Account);
                            if (C != null)
                            {
                                C.Nobility.Donation = 0;
                                SaveCharacter(C, Account);
                            }
                        }
                        else
                        {
                            C.Nobility.Donation = 0;
                        }
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine(e.ToString());
                    }
                }
            }
        }
5supertao is offline  
Old 02/17/2010, 21:27   #2

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Can't you just open Nobility.dat and remove everything?
Kiyono is offline  
Old 02/17/2010, 21:38   #3
 
ramix's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 272
Received Thanks: 61
Quote:
Originally Posted by 5supertao View Post
Would this be a cause of the Nobility Donations reseting?

Code:
        [COLOR="Red"]public static void DonationReset()[/COLOR]
        {
            foreach (string Path in [COLOR="red"]Directory.GetFiles(@"C:\OldCODB\Users\Characters\"))[/COLOR]
            {
                if (Path.Remove(0, Path.Length - 4) == ".chr")
                {
                    try
                    {
                        string Name = Path.Substring(Path.LastIndexOf("\\") + 1, Path.LastIndexOf('.') - Path.LastIndexOf("\\") - 1);
                        Game.Character C;
                        C = Game.World.CharacterFromName2(Name);
                        if (C == null)
                        {
                            string Account = "";
                            C = LoadCharacter(Name, ref Account);
                            if (C != null)
                            {
                                C.Nobility.Donation = 0;
                                SaveCharacter(C, Account);
                            }
                        }
                        else
                        {
                            C.Nobility.Donation = 0;
                        }
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine(e.ToString());
                    }
                }
            }
        }
that is for reset nobility rank in players... only... for exemple if u donate and do that command in console your player donation go to 0 but in game you have that donation you have putted... if you donate again will appear the same name in rank...

you need delete nobility.dat too... because that code is to reset nobility in characteres
ramix is offline  
Old 02/17/2010, 21:58   #4
 
5supertao's Avatar
 
elite*gold: 0
Join Date: Feb 2010
Posts: 89
Received Thanks: 19
No, what I mean is like... If I donate... and a few players donated to.. After a few restarts... I have to donate again... then TWO of my names show up..
5supertao is offline  
Old 02/17/2010, 22:08   #5
 
ramix's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 272
Received Thanks: 61
nope that is if you use the command to do reset...

you mean not save the nobility
ramix is offline  
Reply




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


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.