Official 5165 FAQ/Question thread

02/22/2010 22:30 alottafagina#1096
hey i had a question. With the "[GUIDE] How to eet your project to 32bit only" Um, even if I follow the instructions as told in the guide, it still does not fix the libeay.dll problem. I'm using Express 2008, once i hit build, it does not place the libeay.dll into the folder containing the server. Is there a missing reference to libeay.dll or is it more than that? I also tried just hitting debug (The play button) nothing managed to get the dll.
02/22/2010 22:56 Arcо#1097
Quote:
Originally Posted by alottafagina View Post
hey i had a question. With the "[GUIDE] How to eet your project to 32bit only" Um, even if I follow the instructions as told in the guide, it still does not fix the libeay.dll problem. I'm using Express 2008, once i hit build, it does not place the libeay.dll into the folder containing the server. Is there a missing reference to libeay.dll or is it more than that? I also tried just hitting debug (The play button) nothing managed to get the dll.
Once you follow that guide you will not use the debug folder anymore.
There will be a folder called x86 I think and you use the exe in there.
02/23/2010 00:49 mAr1u$#1098
why /kick command is not working for me anymore? I tryed to add it again chat.cs but same
02/23/2010 01:05 alottafagina#1099
.Acro, I know about the x86 folder lol, but once i open it its broken down again into Debug and Release. I figured out after changing the Solution config to release and debug it edits those 2 folders. But no libeay.dll in either. Im just gunna try to copy paste the dll from the original dll folder, and see if that works. If it doesnt work maybe its because im using Windows 7 Ultimate 64bit. I dunno lmao.

EDIT: Looked at the post for the guide again, searched a little though the thread. I guess I need the po version. So ill be getting it soon.
02/23/2010 05:35 azi0npride#1100
ok i put my oldcodb in the c/:
now a error comes up wen i try to run it..wat do i do now?
02/23/2010 05:40 Arcо#1101
Quote:
Originally Posted by azi0npride View Post
ok i put my oldcodb in the c/:
now a error comes up wen i try to run it..wat do i do now?
Be specific on what error you are receiving.
02/23/2010 05:57 alottafagina#1102
Quote:
Originally Posted by azi0npride View Post
ok i put my oldcodb in the c/:
now a error comes up wen i try to run it..wat do i do now?
:D Sounds like you just need to edit your Config.ini, but if that is all right, then make sure that the folders name is exact, not renamed. Make sure to port forward the port yo are trying to use to connect, and make sure that the program is indeed allowed in the firewall. If nothing works, then i suggest re-extract, and copy the folder over again replacing everything. Then edit the Config.ini.

EDIT: forgot to ask, but I need MySQL installed for this to work right. I just got XAMPP and installled set password and whatever, and had a friend test if he could connect to some PHP i wrote, and he said it was fine. So the connection isnt the problem. But It wasn't very clearly stated if you needd MySQL or not, I just dled cus it asked for MySQL info in Config.ini
02/23/2010 09:39 StarEvaAfta!~#1103
Quote:
Originally Posted by .Arco View Post
Try replacing with this
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NewestCOServer
{
    public struct coords
    {
        public int X;
        public int Y;

        public coords(int x, int y)
        {
            this.X = x;
            this.Y = y;
        }
    }
    public static class MyMath
    {
        public static bool Contains(this coords[] Coords, coords Check)
        {
            foreach (coords Coord in Coords)
                if (Coord.X == Check.X && Check.Y == Coord.Y)
                    return true;
            return false;
        }
        public static List<coords> LineCoords(ushort userx, ushort usery, ushort shotx, ushort shoty, byte length)
        {
            double dir = Math.Atan2(shoty - usery, shotx - userx);
            double f_x = (Math.Cos(dir) * length) + userx;
            double f_y = (Math.Sin(dir) * length) + usery;

            return bresenham(userx, usery, (int)f_x, (int)f_y);
        }
        public static void Add(this List<coords> Coords, int x, int y)
        {
            coords add = new coords((ushort)x, (ushort)y);
            if (!Coords.Contains(add))
                Coords.Add(add);
        }
        public static List<coords> bresenham(int x0, int y0, int x1, int y1)
        {
            List<coords> ThisLine = new List<coords>();

            int dy = y1 - y0;
            int dx = x1 - x0;
            int stepx, stepy;

            if (dy < 0) { dy = -dy; stepy = -1; } else { stepy = 1; }
            if (dx < 0) { dx = -dx; stepx = -1; } else { stepx = 1; }
            dy <<= 1;
            dx <<= 1;

            ThisLine.Add(x0, y0);
            if (dx > dy)
            {
                int fraction = dy - (dx >> 1);
                while (x0 != x1)
                {
                    if (fraction >= 0)
                    {
                        y0 += stepy;
                        fraction -= dx;
                    }
                    x0 += stepx;
                    fraction += dy;
                    ThisLine.Add(x0, y0);
                }
            }
            else
            {
                int fraction = dx - (dy >> 1);
                while (y0 != y1)
                {
                    if (fraction >= 0)
                    {
                        x0 += stepx;
                        fraction -= dy;
                    }
                    y0 += stepy;
                    fraction += dx;
                    ThisLine.Add(x0, y0);
                }
            }
            return ThisLine;
        }
        static Random Rnd = new Random();
        public static double LevelDifference(byte Lev1, byte Lev2)
        {
            if (Lev1 > Lev2)
            {
                double Rt = (Lev1 - Lev2 + 7) / 5;
                return Rt = ((Rt - 1) * 0.8) + 1;
            }
            return 1;
        }
        public static bool ChanceSuccess(double Chance)
        {
            int e = Rnd.Next(10000000);
            double a = ((double)e / (double)10000000) * 100;
            return Chance >= a;
        }
        public static double PointDirecton(double x1, double y1, double x2, double y2)
        {
            double direction = 0;

            double AddX = x2 - x1;
            double AddY = y2 - y1;
            double r = (double)Math.Atan2(AddY, AddX);

            if (r < 0) r += (double)Math.PI * 2;

            direction = 360 - (r * 180 / (double)Math.PI);
            return direction;
        }
        public static double PointDirectonRad(double x1, double y1, double x2, double y2)
        {
            double AddX = x2 - x1;
            double AddY = y2 - y1;
            double r = (double)Math.Atan2(AddY, AddX);

            return r;
        }
        public static double PointDirecton2(double x1, double y1, double x2, double y2)
        {
            double direction = 0;

            double AddX = x2 - x1;
            double AddY = y2 - y1;
            double r = (double)Math.Atan2(AddY, AddX);

            direction = (r * 180 / (double)Math.PI);
            return direction;
        }
        public static double RadianToDegree(double r)
        {
            if (r < 0) r += (double)Math.PI * 2;

            double direction = 360 - (r * 180 / (double)Math.PI);
            return direction;
        }
        public static double DegreeToRadian(double degr)
        {
            return degr * Math.PI / 180;
        }
        public static int PointDistance(double x1, double y1, double x2, double y2)
        {
            return (int)Math.Sqrt(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2)));
        }
        public static bool InBox(double x1, double y1, double x2, double y2, byte Range)
        {
            return (Math.Max(Math.Abs(x1 - x2), Math.Abs(y1 - y2)) <= Range);
        }
    }
}
Code:
                    foreach (Character C in World.H_Chars.Values)
                    {
                        if (C.Alive && (C != User || Info.Damageing == DamageType.HealHP || Info.Damageing == DamageType.HealMP))
                        {
                            if ((!RangeFromChar && MyMath.PointDistance(AimX, AimY, C.Loc.X, C.Loc.Y) <= Info.MaxDist) || MyMath.PointDistance(User.Loc.X, User.Loc.Y, C.Loc.X, C.Loc.Y) <= Info.MaxDist)
                                if (Info.Targetting == TargetType.Sector && InSector(C.Loc.X, C.Loc.Y) || Info.Targetting != TargetType.Sector)
                                    if (Info.Targetting == TargetType.Linear && [COLOR="Red"]LineThanks, it works but it still gives me error on .Contains(new coords(C.Loc.X, C.Loc.Y)) || Info.Targetting != TargetType.Linear)
                                        if (C.PKAble(User.PKMode, User) && !PlayerTargets.Contains(C) && !World.NoPKMaps.Contains(User.Loc.Map) || Info.ExtraEff == ExtraEffect.UnMount)
                                            if (Game.World.NoPKMaps.Contains(User.Loc.Map) && GetDamage(C) == 0 || !Game.World.NoPKMaps.Contains(User.Loc.Map) || (Info.ExtraEff == ExtraEffect.UnMount && C.StatEff.Contains(StatusEffectEn.Ride)) && C.Equips.Steed.Plus < User.Equips.Steed.Plus)
                                                if (true)
                                                    PlayerTargets.Add(C, GetDamage(C));
                        }
                    }
and theres another Waring on GameClient.cs and thats it

[Only registered and activated users can see links. Click Here To Register...][/COLOR]
02/23/2010 10:26 Korvacs#1104
Warnings arnt anything to worry about really, if your worried then remove that line "Monitor.Enter(this);" for the life of me i dont know what thats doing there, having something obtain a lock on itself is...really stupid, the caller should obtain a lock.

As for the "line" error, rename it to "LineCoords".
02/23/2010 12:24 sneaky06#1105
Plz Need Help to config server.dat Pllzzzzzzzzz (And [Gm] you're config not work for me but thks anyway)))))))
i put in server ip : 127.0.0.1 and port 9958
but when i try to log it says "Failed to connect to game server, please try again later "
02/23/2010 14:30 [GM]#1106
Quote:
Originally Posted by sneaky06 View Post
Plz Need Help to config server.dat Pllzzzzzzzzz (And [Gm] you're config not work for me but thks anyway)))))))
i put in server ip : 127.0.0.1 and port 9958
but when i try to log it says "Failed to connect to game server, please try again later "
i gave u my server.dat and its working -.-

are u sure that u put ur hamachi ip in config.ini?

and u don't have to edit anything in ip or port just put it,it will work
02/23/2010 14:54 StarEvaAfta!~#1107
Quote:
Originally Posted by Korvacs View Post
Warnings arnt anything to worry about really, if your worried then remove that line "Monitor.Enter(this);" for the life of me i dont know what thats doing there, having something obtain a lock on itself is...really stupid, the caller should obtain a lock.

As for the "line" error, rename it to "LineCoords".
Still gimme error

PHP Code:
Error    2    The name 'LineCoords' does not exist in the current context    C:\rikardo updated\Features\Skills.cs    312    81    NewestCOServer 
any ideas ?!
02/23/2010 16:10 sneaky06#1108
Quote:
Originally Posted by [GM] View Post
i have u my server.dat and its working -.-

are u sure that u put ur hamachi ip in config.ini?

and u don't have to edit anything in ip or port just put it,it will work
TYYYYYYYYYYYYYYYYY VERYYYYYYYYYYYY MUCH DUDDDDDDEEEEE AND ARCO TO OMG OMG OMG MY FIRSt PRIVATE SERVER
02/23/2010 16:58 mAr1u$#1109
why console spamming all the time there is an error at this line from database.cs:
FileStream FS = new FileStream(@"C:\OldCODB\Users\Characters\" + C.Name + ".chr", FileMode.Open);
02/23/2010 22:37 Finch#1110
Hello i have seen here a lot of guides, i make it step by step, a lot of times, and nothing, i have still this error:


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

My system configuration(and software what i installed):
  • C# - installed
  • Windows XP SP2
  • Net framework 3.5
  • AppServer - installed

Maybe its something missed, please help me

And i use A LOT OF different sources every time i had same error/bug whatever.