ConquerServer_Basic (5071)

03/02/2013 01:23 .Xori^#1
#request close

Problem solved thanks to Justin(lostsolder05), & everyone else who posted!
03/02/2013 01:34 Lateralus#2
Set a breakpoint and trace through the source from login.
03/02/2013 01:51 pro4never#3
That error literally means it never connected to the server.

Ensure that the login port matches up between the loader and source. Login ports changed between old clients and new and is likely the cause.


Step 1: Ensure that ports match
Step 2: Ensure that ip+port combo is accessible (hamachi/internal or properly forwarded external)
Step 3: Breakpoint the initial connection routine (the msg you are getting means there was no server to accept the connection request but breakpoints are always nice to have)
03/02/2013 02:00 .Xori^#4
Quote:
Originally Posted by Lateralus View Post
Set a breakpoint and trace through the source from login.
I did and my problem is coming from around here..


Code:
 Kernel.AuthPool.Add(Hero.Identifier, Hero);

                            Hero.AuthPhase = AuthPhases.AuthComplete;

                            if (Sender.Connection.RemoteEndPoint.ToString().Split(':')[0] != "127.0.0.1")
                                Sender.Send(PacketBuilder.AuthResponse(Database.IP, Hero.Identifier, 255, 5816));
                            else
                                Sender.Send(PacketBuilder.AuthResponse("192.168.1.1", Hero.Identifier, 255, 5816));
@Pro4Never

My ports in loader setting/server setting are targeted at 9958 and 127.0.0.1, and the incoming connection is logged to 9958 127.0.0.1 .. What could I possibly be doing wrong.

#EDIT My problem is coming from here.

Code:
Sender.Send(PacketBuilder.AuthResponse(Database.IP, Hero.Identifier, 255, 5816));
03/02/2013 04:01 _DreadNought_#5
127.0.0.1 Can very often cause problems.

Download hamachi and use that IP. :)
03/02/2013 04:04 .Xori^#6
Quote:
Originally Posted by _DreadNought_ View Post
127.0.0.1 Can very often cause problems.

Download hamachi and use that IP. :)
Thanks for your reply! Although I already port forwarded and tried my IP.. Still the same problem. So I tried hamachi, AGAIN. Still nothing :/ Is the md5 hash encryption required for client login at 5065->5071
03/02/2013 04:18 Spirited#7
Honestly, I would just keep the MD5 hash. Although it might not be necessary if you host the database on a vps that has closed ports for the service, it's a nice security to have for the members (staff members can't see their passwords). MD5 isn't required for login on those patches. Basically, the result of the decryption for the password is hashed using MD5, and if it matches the MD5 hash in the database (the password hash for the account), then it's correct.
03/02/2013 04:19 .Xori^#8
Quote:
Originally Posted by Fаng View Post
Honestly, I would just keep the MD5 hash. Although it might not be necessary if you host the database on a vps that has closed ports for the service, it's a nice security to have for the members (staff members can't see their passwords). MD5 isn't required for login on those patches. Basically, the result of the decryption for the password is hashed using MD5, and if it matches the MD5 hash in the database (the password hash for the account), then it's correct.
Thanks for your input Fang! Any clue what my problem could be?
03/02/2013 04:25 Spirited#9
Quote:
Originally Posted by .Xori^ View Post
Thanks for your input Fang! Any clue what my problem could be?
I didn't really read into your current issue. It seems like it's connecting to the server but not making it past the password check to the server transfer (to the game server). Check your account server methods and step through it using breakpoints as Lateralus suggested.
03/02/2013 04:51 .Xori^#10
Quote:
Originally Posted by Fаng View Post
I didn't really read into your current issue. It seems like it's connecting to the server but not making it past the password check to the server transfer (to the game server). Check your account server methods and step through it using breakpoints as Lateralus suggested.
Your right, its completing the auth check but then failing at

Code:
                                Sender.Send(PacketBuilder.AuthResponse(Database.IP, Hero.Identifier, 255, 5816));
Any help? I'm not to great with breakpoints but I've gotten this far :/
03/02/2013 05:37 Spirited#11
If it fails after that packet is sent, then most likely the world server isn't configured correctly (because the ip address or port from the database is incorrect), or the packet is incorrect (which is doubtful if this is a public source). I recommend you google how to breakpoint in Visual Studio. It's a key component in debugging a project.
03/02/2013 05:45 .Xori^#12
Quote:
Originally Posted by Fаng View Post
If it fails after that packet is sent, then most likely the world server isn't configured correctly (because the ip address or port from the database is incorrect), or the packet is incorrect (which is doubtful if this is a public source). I recommend you google how to breakpoint in Visual Studio. It's a key component in debugging a project.
Yea its Arcos 5071.

#Edit Found that the problem is coming from here. Seems that Arco didn't setup character creation to well when he converted from flat->sql. Check this out and let me know what you think is wrong Fang.

Code:
public static bool LoadEntity(GameClient Hero)
        {
            bool res = false;
            MysqlCommand cmd = new MysqlCommand(CommandType.SELECT);
            cmd.Select("Characters").Where("EntityID", Hero.Identifier).Done();
                
            if (cmd.DataReader.Read())
            [COLOR="SeaGreen"]//Connection ends after this line if it doesn't find a character.[/COLOR]
            {
                [COLOR="SeaGreen"]//Connection is successful and client logs in completely if character is found[/COLOR]
                res = true;
                Hero.Entity.UID = Convert.ToUInt32(cmd.DataReader["EntityID"]);
                Hero.Entity.Name = Convert.ToString(cmd.DataReader["Name"]);
               [COLOR="SeaGreen"] //Below I assume is where it checks if user was found and opens character creation. BUT it don't make it this far.. Why? I'm so lost.[/COLOR]
                if (Hero.Entity.Name == "")
                {
                    Hero.Send(new MessagePacket("NEW_ROLE", "ALLUSERS", 0xFFFFFF, MessagePacket.Dialog));
                }
03/02/2013 17:28 _DreadNought_#13
What line in that code is throwing an error? Put a breakpoint on "bool res = false" and then use the "Step over" button until something weird happens.

I bet its the cmd.DataRead.Read()) :P
03/02/2013 21:22 .Xori^#14
Quote:
Originally Posted by _DreadNought_ View Post
What line in that code is throwing an error? Put a breakpoint on "bool res = false" and then use the "Step over" button until something weird happens.

I bet its the cmd.DataRead.Read()) :P
Managed to solve my problem. Lets just say this source needs a lot of work to even get started. Requires a couple checks in the auth -> game to determine if the user has created a character or not. Along with a couple of packets that needed to be updated;Mob;Name. And the screening had to be redone for mobs aswell. I managed to get these parts done with help from Justin.

& to everyone who was helping me thank you.

I will keep this thread open and post my progress on the source along with posting errors that need to be fixed for those who decide to use it.
03/02/2013 22:42 Arco.#15
Depending on where you got that source, it might not even be my 5071. I've seen people post my 5071 source and end up just being my 5017 or 5018 source.