i used this:
i made the /expballs a nobility clear command:
PHP Code:
public static void ExpBallReset()
{
foreach (string Path in Directory.GetFiles(@"C:\OldCODB\Users\Characters\"))
{
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.ExpBallsUsedToday = 0;
C.LotteryUsed = 0;
C.UniversityPoints = 0;
C.Nobility.Donation = 0;
SaveCharacter(C, Account);
}
}
else
{
C.UniversityPoints = 0;
C.ExpBallsUsedToday = 0;
C.LotteryUsed = 0;
C.Nobility.Donation = 0;
}
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
}
}
}
id
After doing i opened my nobilty.dat delete all of it then do that command!(/expballs) in console! And then reset my server . it gets rid of all nobility, how ever this isnt the problem im havin my problem i wanna SAVE nobility.