Official 5165 FAQ/Question thread

12/19/2009 18:00 Korvacs#301
Quote:
Originally Posted by tere14 View Post
Windows xp pro
version 2002
SP 3
32bit or 64bit?
12/19/2009 18:09 tere14#302
32 bit
12/19/2009 18:10 lesley21#303
well i got it up the server.. but... !
when i try to login.. its give me a black screen..
------------------------------------------------- founded the error.

is there any SQL file to add to the database ? or whatever ?

_________________________________________________

Or how to start MySqL ?
12/19/2009 18:48 lesley21#304
Okay i found an error.. my MYSQL doesn't start.. what's the reason ?
12/19/2009 19:39 Arcо#305
Quote:
Originally Posted by lesley21 View Post
Okay i found an error.. my MYSQL doesn't start.. what's the reason ?

You don't use MySQL for this server.
It's database is OldCODB.
12/19/2009 22:18 -impulse-#306
Update: Nearly perfect exp ball calculation:
Code:
public uint ExpBallExp
        {
            get
            {
                ulong exp = Database.LevelExp[Level];
                return (uint)(exp * 22064 / (ulong)((Level * Level * Level / 12) + 1)); ;
            }
        }
To make it work really good, you have to modify the "IncreaseExp" void in Character.cs something like this:

Code:
public void IncreaseExp(uint Amount, bool isTeamExp,bool justIt)
        {
            if (justIt)
            {
                ulong CurExp = Experience;
                byte CurLevel = Level;

                CurExp += Amount;
                while (CurLevel < 137 && CurExp > Database.LevelExp[CurLevel])
                {
                    CurExp -= Database.LevelExp[CurLevel];
                    CurLevel++;

                    if (CurLevel >= 3)
                    {
                        if (Job <= 55 && Job >= 50)
                            NewSkill(new Skill() { ID = 6011 });
                        else if (Job <= 45 && Job >= 40)
                            NewSkill(new Skill() { ID = 8002 });
                        else if (Job >= 10 && Job <= 15)
                            NewSkill(new Skill() { ID = 1110 });
                        else if (Job >= 20 && Job <= 25)
                            NewSkill(new Skill() { ID = 1025 });
                    }
                }
                if (CurLevel > Level)
                {
                    World.Action(this, Packets.GeneralData(EntityID, 0, 0, 0, 92).Get);
                    if (Reborn || CurLevel >= 120)
                    {
                        if (Reborn)
                            StatPoints += (ushort)((CurLevel - Level) * 3);
                        else
                        {
                            if (Level < 120)
                                Level = 120;
                            StatPoints += (ushort)((CurLevel - Level) * 3);
                        }
                    }
                    CurHP = MaxHP;
                }
                if (CurLevel > Level)
                    Level = CurLevel;
                Experience = CurExp;
                return;
            }
            else
            {
                if (Loc.Map == 1039)
                {
                    if (Amount > Level / 2)
                        Amount /= (uint)(Level / 2);
                }
                if (Level < 137)
                {
                    Amount = (uint)(Amount * EqStats.GemExtraExp * World.ExperienceRate);
                    Amount = (uint)(Amount * (EqStats.eq_pot + Level + 100 + Reborns * 5) / 100);
                    if (World.KOBoard[0].Name == Name) Amount *= 2;
                    if (DoubleExp) Amount *= 2;
                    if (BlessingLasts > 0) Amount = (uint)((double)Amount * 1.2);
                    if (Reborns >= 2)
                        Amount /= 3;
                    if (MyGuild != null)
                        Amount = (Amount * (100 + MyGuild.Wins)) / 100;

                    bool noobexp = false;
                    bool marrieexp = false;

                    #region checkmyteam for extras
                    if (MyTeam != null && isTeamExp)
                    {
                        foreach (Character C in MyTeam.Members)
                        {
                            if (C != null)
                            {
                                if (EntityID != C.EntityID)
                                {
                                    if (Level > C.Level + 20)
                                        noobexp = true;

                                    if (C.Spouse == C.Name)
                                        marrieexp = true;
                                }
                            }
                        }
                    }
                    #endregion

                    if (noobexp)
                        Amount *= 2;
                    if (marrieexp)
                        Amount *= 2;

                    #region Experience points Messages
                    if (!noobexp && !marrieexp && !isTeamExp && Loc.Map != 1039)
                        MyClient.LocalMessage(2005, Amount + " extra experience points gained for killing.");
                    else if (!noobexp && !marrieexp && isTeamExp && Loc.Map != 1039)
                        MyClient.LocalMessage(2005, Amount + " team experience points gained.");
                    else if (noobexp && !marrieexp && isTeamExp && Loc.Map != 1039)
                        MyClient.LocalMessage(2005, "You gained  " + Amount + " team experience points with additional rewarding experience points due to low level teammates.");
                    else if (!noobexp && marrieexp && isTeamExp && Loc.Map != 1039)
                        MyClient.LocalMessage(2005, "You gained  " + Amount + " team experience points with additional rewarding experience points due to marriage teammates.");
                    else if (noobexp && !marrieexp && isTeamExp && Loc.Map != 1039)
                        MyClient.LocalMessage(2005, "You gained  " + Amount + " team experience points with additional rewarding experience points due to low level and marriage teammates.");
                    #endregion

                    ulong CurExp = Experience;
                    byte CurLevel = Level;

                    CurExp += Amount;
                    while (CurLevel < 137 && CurExp > Database.LevelExp[CurLevel])
                    {
                        CurExp -= Database.LevelExp[CurLevel];
                        CurLevel++;

                        if (CurLevel >= 3)
                        {
                            if (Job <= 55 && Job >= 50)
                                NewSkill(new Skill() { ID = 6011 });
                            else if (Job <= 45 && Job >= 40)
                                NewSkill(new Skill() { ID = 8002 });
                            else if (Job >= 10 && Job <= 15)
                                NewSkill(new Skill() { ID = 1110 });
                            else if (Job >= 20 && Job <= 25)
                                NewSkill(new Skill() { ID = 1025 });
                        }
                    }
                    if (CurLevel > Level)
                    {
                        World.Action(this, Packets.GeneralData(EntityID, 0, 0, 0, 92).Get);
                        if (Reborn || CurLevel >= 120)
                        {
                            if (Reborn)
                                StatPoints += (ushort)((CurLevel - Level) * 3);
                            else
                            {
                                if (Level < 120)
                                    Level = 120;
                                StatPoints += (ushort)((CurLevel - Level) * 3);
                            }
                        }
                        CurHP = MaxHP;
                    }
                    if (CurLevel > Level)
                        Level = CurLevel;
                    Experience = CurExp;
                }
            }
        }
12/19/2009 22:42 Arcо#307
I think i already released nearly perfect expball calcs.
12/19/2009 23:17 .Ryu#308
Quote:
Originally Posted by Hepatitis C View Post
I think i already released nearly perfect expball calcs.
I dont think he understand others poeple work

Atleast if he gave you credits that would be nice but he didnt =\
12/20/2009 14:54 -impulse-#309
Quote:
Originally Posted by Cømbat View Post
I dont think he understand others poeple work

Atleast if he gave you credits that would be nice but he didnt =\
Are you insane? I wrote that code 1 month or ever 2 months ago. ITS MINE!
12/21/2009 02:02 Adziunia#310
XD hello ppl ;p so the server is running without errors i have a lil question where i can change welcome message eg. welcome to my server.. bla bla, enjoy palying.. etc i was looking everywhere but cant find ;p
12/21/2009 02:05 Arcо#311
Quote:
Originally Posted by Adziunia View Post
XD hello ppl ;p so the server is running without errors i have a lil question where i can change welcome message eg. welcome to my server.. bla bla, enjoy palying.. etc i was looking everywhere but cant find ;p

At the bottom of teleport.cs.
12/21/2009 05:33 Nissaah#312
When I open NewestCOServer.exe it gives me a windows error where I can either send in the error report or not send it in. Doesn't do anything else. Here is exactly what I did: Downloaded the source from this thread in the very first post. Downloaded game client from same place. Put OldCODB in my C:/. Opened OldCODB folder, opened config.ini. Put my ip address there. Pressed ctrl+s. Closed it. Opened Fixed Source, bin, Debug, NewestCOServer. Error msg.
Can you tell me what I'm not doing right?

Thanks
12/21/2009 07:15 .Guru#313
show us the error you're getting. ss it or post what it says.
12/21/2009 19:52 Nissaah#314
Says NewestCOServer has encountered a problem and must close. Please excuse us for any inconvenience this may cause. Blah blah blah. Please signal this problem to Microsoft. We have created an error report you may send it. Blah blah blah. Send in the error report. Or don't send in.

I'm sure you've seen this window open for other problems sometimes. It's the typical windows error for programs that suddenly stop working.
12/21/2009 22:30 Adziunia#315
Quote:
Originally Posted by Hepatitis C View Post

At the bottom of teleport.cs.
thx thx XD