5165 PROBLEM/Bug(s) Needing-Help.

07/25/2010 23:39 killersub#1
alright so here's da problem...I am makin my 5165 source and modifying a few things into it and outa it...so then IDK wat I did wrong but I even tried restoring everythin back from what I did...as in I commented out some stuff and I had da prob den I UNCOMMENTED everythin and still I am havin da problem as when U make u character and u relog it doesnt save ANYTHIN jus da level and reborns...and it only saves 2 gears (ears,and a weapon) and all ur gears are gone...what might be da problem?

what I tried to do is comment everythin dat had Tower/Fan/Steed in it since I did not like those in my source...I.E. I commented the sendScreen method of the Tower/Fan/Steed and also the part in skills.cs about steed stamina...practically I tried taking off/erasing EVERYTHIN dat had to do with STEEDS,FANS,AND TOWERS...so I commented them...I got the error...dats fine...wat really got me workin is when I added everythin back and I still get dat error...

In my source window(black cmd) I get an error in Character.cs on line 10662 which is very weird becuz all I have in that line is something about my blessing...

Code:
[COLOR="Red"]LINE 10662--->[/COLOR]if (BlessingLasts > 0 && DateTime.Now > BlessingStarted.AddDays(BlessingLasts))
                {
                    BlessingLasts = 0;
                    StatEff.Remove(StatusEffectEn.Blessing);
                    MyClient.LocalMessage(2000, "Your heaven blessing has expired.");
                }
so does any one know wat I am missing/doing wrong or wat the problem might be?

Thanks... Regards,
killersub
07/26/2010 00:36 Fish*#2
I tried this once, where i added something in SaveCharacter
07/26/2010 01:25 killersub#3
Quote:
Originally Posted by grillmad View Post
I tried this once, where i added something in SaveCharacter
well here is my SaveCharacter void:

Code:
public static void SaveCharacter(Game.Character C, string Acc)
        {
            try
            {
                FileStream FS = new FileStream(@"C:\CoSX\Database\Users\Characters\" + C.Name + ".chr", FileMode.Open);
                BinaryWriter BW = new BinaryWriter(FS);

                int DoubleExp = C.DoubleExpLeft;
                if (C.DoubleExp)
                    DoubleExp -= (int)(DateTime.Now - C.ExpPotionUsed).TotalSeconds;

                BW.Write(Acc);
                BW.Write(C.EntityID);
                BW.Write(C.Avatar);
                BW.Write(C.Body);
                BW.Write(C.Hair);//Hair
                BW.Write(C.Loc.Map);//Map
                BW.Write(C.Loc.X);//X
                BW.Write(C.Loc.Y);//Y
                BW.Write(C.Loc.PreviousMap);//Previous Map
                BW.Write(C.Job);
                BW.Write(C.PreviousJob1);//Previous Job, 1st RB
                BW.Write(C.Level);//Level
                BW.Write(C.Experience);//Experience        
                BW.Write(C.Str);
                BW.Write(C.Agi);
                BW.Write(C.Vit);
                BW.Write(C.Spi);
                BW.Write(C.StatPoints);//Stat Points
                BW.Write(C.CurHP);
                BW.Write(C.CurMP);//MP
                BW.Write(C.Nobility.Donation);
                BW.Write(C.Silvers);//Silvers
                BW.Write(C.CPs);
                BW.Write(C.WHSilvers);//Warehouse Silvers
                BW.Write(C.VP);//Virtue Points
                BW.Write(C.PKPoints);//PK Points
                if (C.MyGuild != null)
                {
                    BW.Write(C.MyGuild.GuildID);//Guild
                    BW.Write(C.GuildDonation);//Guild Donation
                    BW.Write((byte)C.GuildRank);//Guild Rank
                }
                else BW.Write(new byte[7]);
                C.Equips.WriteThis(BW);
                BW.Write((byte)C.Inventory.Count);
                foreach (Game.Item I in C.Inventory)
                    I.WriteThis(BW);
                C.Warehouses.WriteThis(BW);
                BW.Write((byte)C.Skills.Count);
                foreach (Game.Skill I in C.Skills.Values)
                    I.WriteThis(BW);
                BW.Write((byte)C.Profs.Count);
                foreach (Game.Prof I in C.Profs.Values)
                    I.WriteThis(BW);
                BW.Write((byte)C.Friends.Count);
                foreach (Game.Friend I in C.Friends.Values)
                    I.WriteThis(BW);
                BW.Write((byte)C.Enemies.Count);
                foreach (Game.Enemy I in C.Enemies.Values)
                    I.WriteThis(BW);
               
                BW.Write(C.DoubleExp);
                BW.Write(DoubleExp);
                BW.Write(C.BlessingLasts);
                BW.Write(C.BlessingStarted.Ticks);
                if (C.GettingLuckyTime)
                {
                    if (!C.Prayer)
                        C.LuckyTime += (uint)(DateTime.Now - C.PrayDT).TotalSeconds;
                    else
                        C.LuckyTime += (uint)(DateTime.Now - C.PrayDT).TotalSeconds * 3;
                    C.PrayDT = DateTime.Now;
                }
                BW.Write(C.LuckyTime);
                BW.Write(C.ExpBallsUsedToday);
                BW.Write(C.Reborns);
                BW.Write((byte)C.Merchant);// 
                BW.Write(C.VipLevel);//   
                BW.Write(DateTime.Now.Ticks);//When logged off, for otg feature purposes
                BW.Write((ushort)(C.TrainTimeLeft + ((DateTime.Now - C.LoggedOn).TotalMinutes * 10)));//Train time left (in minutes)
                BW.Write(C.InOTG);
                BW.Write(C.LotteryUsed);
                BW.Write(C.VipMapToday);
                BW.Write(C.ClaimGWWinnings);
                BW.Write(C.VotedToday);
                BW.Write(C.WHPassword);
                BW.Write(C.Spouse);
                BW.Write(C.UniversityPoints);//Quiz Pts    
                BW.Write(C.Top);
                BW.Write(C.Locked);

                BW.Flush();
                FS.Flush();
                BW.Close();
                FS.Close();
            }
            catch (Exception Exc) { Console.WriteLine(Exc); }
        }
Is that wrong?
07/26/2010 01:39 Fish*#4
I cant remember how i fixed it.
Did u change anything in database.cs?
07/26/2010 02:17 killersub#5
Quote:
Originally Posted by grillmad View Post
I cant remember how i fixed it.
Did u change anything in database.cs?
Code:
BW.Write(C.Locked);
I added dat in the SaveCharacter void lol...IDK if dats da prob since its just saving the locked items...I doubt dats even it...I converted some mysql shit from elite-coemu into my 5165 flat file...its basically all the itemlock stuff lmao...
07/26/2010 15:08 _DreadNought_#6
Yeah, Itemlock if done wrong can seriously f**k up your source.
07/26/2010 17:22 killersub#7
Quote:
Originally Posted by Eliminationn View Post
Yeah, Itemlock if done wrong can seriously f**k up your source.
mhm...well I'll appreciate some help. mind adding me on msn so u can help me in a few probs I got wit ItemLock... I needa understand it more :P

[Only registered and activated users can see links. Click Here To Register...]