Jump to content
Returning Members: Password Reset Required ×

Server: Comet, Open Source


Recommended Posts

Posted

I now have Game/RPC Network in Comet.Game.config set to 0.0.0.0, and Network in Comet.Game.config set to 0.0.0.0.

My realm table has my VPS IP for Game and 0.0.0.0 set for RPC, and realm matches my clients name.

Used Port Checker, and 9958, 5618, and 5817 are all open on my VPS.

Still stuck on "Connecting to account server. Please wait a moment."

With a "Missing packet 1051, Length 52." on Comet, Account Server.

Do things need to be setup different since this is hosted on my VPS?

Oh, do you have the right version of the source downloaded? Sorry, I didn't see the missing packet message. Make sure that the branch you have cloned is the version of the client you want to run.

Woah, you're right, do you know why It's picking 5187 source when I choose 5017 source when trying to clone it via HTTPs link?

I only knew it was 5187 after comparing it to 5017 source because I seen you have 9960 port in Comet.Account, unlike 5017.

  • Replies 70
  • Created
  • Last Reply

Top Posters In This Topic

Posted

I now have Game/RPC Network in Comet.Game.config set to 0.0.0.0, and Network in Comet.Game.config set to 0.0.0.0.

My realm table has my VPS IP for Game and 0.0.0.0 set for RPC, and realm matches my clients name.

Used Port Checker, and 9958, 5618, and 5817 are all open on my VPS.

Still stuck on "Connecting to account server. Please wait a moment."

With a "Missing packet 1051, Length 52." on Comet, Account Server.

Do things need to be setup different since this is hosted on my VPS?

Oh, do you have the right version of the source downloaded? Sorry, I didn't see the missing packet message. Make sure that the branch you have cloned is the version of the client you want to run.

Woah, you're right, do you know why It's picking 5187 source when I choose 5017 source when trying to clone it via HTTPs link?

I only knew it was 5187 after comparing it to 5017 source because I seen you have 9960 port in Comet.Account, unlike 5017.

Well, the git clone pulls the main branch. Since the main branch is registered as the highest patch, that's just the default. If you want to switch branches, you either have to download a copy of the branch from GitLab or switch branches in git after cloning. Sorry for that confusion. I'll consider making a new "main" branch that acts as a common branch for documentation and cloning versions, maybe.

Posted

I can't seem to build the project when I just download it from GitLab and add the files to my workspace in Visual Studio Code, but when I clone it and open the link in Visual Studio Code it'll build?

Do you know why?

I can't even just launch Comet.sln, it just opens nothing but the Comet.sln file.

Posted

I can't seem to build the project when I just download it from GitLab and add the files to my workspace in Visual Studio Code, but when I clone it and open the link in Visual Studio Code it'll build?

Do you know why?

I can't even just launch Comet.sln, it just opens nothing but the Comet.sln file.

Sorry, was out for a few days. Should be exactly the same, no difference. Might need to do a "dotnet restore", though.

  • 4 weeks later...
Posted

i'm using 5187 source

game ip in realm database set to hamachi ip

rcp ip set to 127.0.0.1

all ips in source config set to 0.0.0.0

i tried switching ips to hamachi ip or ethernet ip but i get the same

when i open accout server and game server

i get account server has connected (on game server) but i don't get the same on account server

and when i try to login i get invalid id or password

the ports are all open

any help?

Posted

i'm using 5187 source

game ip in realm database set to hamachi ip

rcp ip set to 127.0.0.1

all ips in source config set to 0.0.0.0

i tried switching ips to hamachi ip or ethernet ip but i get the same

when i open accout server and game server

i get account server has connected (on game server) but i don't get the same on account server

and when i try to login i get invalid id or password

the ports are all open

any help?

I can't really help unless you post more details about which addresses you changed. If you provide your config settings, then please mask any Hamachi IP addresses you're using. If you're getting invalid password, then have you created an account with a password yet?

Posted
ok I am stuck I have been looking for servers to play after quitting 10 years ago and can't find one I like so I wanted to make one for me and my family but i am stuck on the very first part lol. I don't understand the .NET restore and build stuff can anyone help this dummy make figure it out??
Posted

ok I am stuck I have been looking for servers to play after quitting 10 years ago and can't find one I like so I wanted to make one for me and my family but i am stuck on the very first part lol. I don't understand the .NET restore and build stuff can anyone help this dummy make figure it out??

This probably isn't the source for you then, unless you plan on learning C# and developing a server from scratch. This is a skeleton project, meaning it only logs you in and that's it. You'd have to program all of the world functions like walking, maps, portals, attacks, NPCs, etc.

Posted
Quote

o ok could u point me in a better direction to help me out i just want a good server to play without paying 2 arms and 2 legs lol!

Yeah, there's a pinned thread at the top of the section that outlines servers you can download, and what they're good for:

Redux is a very popular source that you might find helpful. The full guide for that hasn't been ported over, so I might work on that at some point. But here's the current location for the guide:  https://www.elitepvpers.com/forum/co2-pserver-guides-releases/2692305-redux-v2-official-5065-classic-source.html.

  • 1 month later...
Posted

Comet has been upgraded to .NET 6 / C# 10. Some asynchronous patterns have also been updated, but should be easy to merge into existing projects.

Edit: Also added docker support.

  • 9 months later...
  • 2 weeks later...
Posted

Just to confirm, you're not using the same character ID as the character already on screen, right? Have you tried using a different name as well?

I have tried different names / UID / Mesh ... about every value that I could change in all kinds of combinations. Have tried spawn monster.

@Spirited

Edit: patch - 4274

Hey man. Can you help me with the monster spawn packet? I can't seem to find the right packet structure to spawn one on the screen. I tried to copy CoFuture4267/RedemptionCo 1014 structure but no cookie. I have tried to brute-force some random packet sizes and values aswell.

short packetL = 0x39;//(short)new Random().Next(54, 70);
           string name = "Pheasant";

           PacketBuilder Packet = new PacketBuilder(new byte[packetL + name.Length]);
           Packet.WriteUInt16(packetL + name.Length);
           Packet.WriteUInt16(1014);
           Packet.WriteUInt32((uint)new Random().Next(1000, 90000));
           Packet.WriteUInt32(104);

           Packet.WriteUInt32(0);
           Packet.WriteUInt32(0);
           Packet.WriteUInt32(0);
           Packet.WriteUInt32(0);
           Packet.WriteUInt32(0);
           Packet.WriteUInt32(0);
           Packet.WriteUInt32(0);

           Packet.WriteUInt16(33);
           Packet.WriteUInt16(1);

           Packet.WriteUInt16(character.X);
           Packet.WriteUInt16(character.Y);

           Packet.WriteUInt16(0);
           Packet.WriteByte(7);
           Packet.WriteByte(100);
           Packet.WriteByte(1);
           Packet.WriteStringWithLength(name);

           return Packet.Packet;

Posted

Just to confirm, you're not using the same character ID as the character already on screen, right? Have you tried using a different name as well?

I have tried different names / UID / Mesh ... about every value that I could change in all kinds of combinations. Have tried spawn monster.

@Spirited

Edit: patch - 4274

Hey man. Can you help me with the monster spawn packet? I can't seem to find the right packet structure to spawn one on the screen. I tried to copy CoFuture4267/RedemptionCo 1014 structure but no cookie. I have tried to brute-force some random packet sizes and values aswell.

short packetL = 0x39;//(short)new Random().Next(54, 70);
           string name = "Pheasant";

           PacketBuilder Packet = new PacketBuilder(new byte[packetL + name.Length]);
           Packet.WriteUInt16(packetL + name.Length);
           Packet.WriteUInt16(1014);
           Packet.WriteUInt32((uint)new Random().Next(1000, 90000));
           Packet.WriteUInt32(104);

           Packet.WriteUInt32(0);
           Packet.WriteUInt32(0);
           Packet.WriteUInt32(0);
           Packet.WriteUInt32(0);
           Packet.WriteUInt32(0);
           Packet.WriteUInt32(0);
           Packet.WriteUInt32(0);

           Packet.WriteUInt16(33);
           Packet.WriteUInt16(1);

           Packet.WriteUInt16(character.X);
           Packet.WriteUInt16(character.Y);

           Packet.WriteUInt16(0);
           Packet.WriteByte(7);
           Packet.WriteByte(100);
           Packet.WriteByte(1);
           Packet.WriteStringWithLength(name);

           return Packet.Packet;

On Comet you don't need to set the packet size, it will be done when the packet is being sent.

Posted

On Comet you don't need to set the packet size, it will be done when the packet is being sent.

An example is not using PacketWriter. It just shows an imported packet structure from another source that doesn't work either.

Using the PackteWriter I have same result

 public override byte[] Encode()
       {
           Console.WriteLine("Sending MsgPlayer packet");

           string name = "Pheasant";

           var writer = new PacketWriter();
           writer.Write((ushort)1014); //PacketType.MsgPlayer);// 2 - packet type
           uint newId = (uint)new Random().Next(200000, 600000);
           writer.Write(newId); // 4 - UID
           writer.Write(104); //Pheasant 8 - MODEL
           writer.Write((uint)0); // character status // 12 - STATUS FLAG

           //guild
           writer.Write((ushort)0); // Guild // 16 - GuildID
           writer.Write((byte)0); // // 18 ??
           writer.Write((byte)0); // guild rank  // 19 - guild position

           //items
           writer.Write((uint)0); // 20 - left
           writer.Write((uint)0); // 24 - right
           writer.Write((uint)0); // 28 - arrmor
           writer.Write((uint)0); // 32 - head

           //unknown?
           writer.Write((uint)0); // 36

           // hp
           writer.Write((ushort)33); // 40 - hitpoints
           writer.Write((ushort)1); // 42 - level 

           //cords
           writer.Write((ushort)65); // 44 - X
           writer.Write((ushort)105); //46 - Y 

           //hairstyle
           writer.Write((ushort)0); // 48 - Hairstyle

           writer.Write((byte)3); // direction // 50 - facinng angle
           writer.Write((byte)100); // 51 - action


           //writer.Write((byte)1); // 52 - How many strings?
           //writer.Write(name);// Legth + 53 
           // name = 54 + 8 = 62
           writer.Write(new List<string>{
               name
           });

           return writer.ToArray();

       }

Length:62
0000:  3E 00 F6 03 B6 0B 06 00  68 00 00 00 00 00 00 00  | >.......h....... |
0010:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  | ................ |
0020:  00 00 00 00 00 00 00 00  21 00 01 00 41 00 69 00  | ........!...A.i. |
0030:  00 00 03 64 01 08 50 68  65 61 73 61 6E 74        | ...d..Pheasant |

  • 2 months later...
Posted (edited)

I cant seem to get past invalid database configuration.. I imported and executed the SQL files via heidisql (I tried other DBM tools too prior if that matters), I added my Internal IP address to the account cfg, game cfg, loaderset and on gameIPaddress on realm table but everything I have tried ends up with me getting "invalid database configuration" and comet closing after running it from vscode. 


EDIT: Well, the server is now "listening for new connections" at least, but now when I launch ConquerLoader and try to log in (I inserted username and password to account table and changed IPaddresses and Name in realm) the client goes to loading and crashes pretty much immediately without giving an error message, any ideas? 

Edited by sasork
Posted
4 hours ago, sasork said:

I cant seem to get past invalid database configuration.. I imported and executed the SQL files via heidisql (I tried other DBM tools too prior if that matters), I added my Internal IP address to the account cfg, game cfg, loaderset and on gameIPaddress on realm table but everything I have tried ends up with me getting "invalid database configuration" and comet closing after running it from vscode. 


EDIT: Well, the server is now "listening for new connections" at least, but now when I launch ConquerLoader and try to log in (I inserted username and password to account table and changed IPaddresses and Name in realm) the client goes to loading and crashes pretty much immediately without giving an error message, any ideas? 

I think I already did it somewhere, but I will do it again. Mentioning @Santa on epvp:

Quote

Problem:
The client typically does not allow you to directly connect to a local IP address, be it 127.x.x.x, any loop-back, or hamachi. When developing a private server or bot this is very problematic. Sure, you could use Nullables loader but that's a hassle if you want to develop your own loader or memory based bot.

What this does:This allows you to connect to any IP address without getting the annoying "Failed to load Server.dat" message.

Step 1:
Open up Conquer.exe using ollydbg or simple attach olly to an already opened client.

Step 2:
Make sure you are viewing the Conquer module in the cpu window. To do this hit Alt+E and find conquer.exe in the list that pops up. It's usually located towards the top of the list.

Digging through the client I discovered that they compare the first part of the ip (eg. 127 in 127.0.0.1) to 0x7F, or 127, using the CMP op-code.

Step 3:
Right-Click in the CPU window. Select "Search For -> All Commands..." In the window that appears type CMP AL, 7F. Another window should now appear with all the locations that command was found. In my case it is 2 places.

Step 4:
Double click on the first occurrence in the window that appeared, it should take you to op-code, highlighting it, in the CPU window. Just below this op-code you will have a jump command (JNE or JE in my case).

Case 1: JNE SHORT XXXXXX

JNE stands for, I believe "jump if not equal." If you set a breakpoint and debug this function you would see that it takes the jump if the first part of your IP does not equal 127.
Step 4.1a:Double-Click JNE SHORT XXXXXX.
Step 4.1b:In the window that appears change JNE to JMP so it will always take the jump, not matter what the IP.

Case 2: JE SHORT XXXXXX

JE stands for, I believe "jump if equal." Again, debug it to see if the jump is taken, if you want.
Step 4.2a:Double-Click JE SHORT XXXXXX
Step 4.2b:In the window that appears, change JE SHORT XXXXXX to NOP so no jump is taken and the code continues along like nothing happened.

Alright, if you just wanted to be able to use 127.x.x.x to log-in to your server or w/e this is where you could stop.

 

Posted (edited)
52 minutes ago, Konichu said:

I think I already did it somewhere, but I will do it again. Mentioning @Santa on epvp:

 

I was just about to edit as you replied, I got past the specific problem by doing something else, but now I am getting "Missing packet MsgAccount, Length 52" on my Comet, Game Server console when trying to log in and the login hangs instead.
Ill double check your reply to see if the problem would be fixed by implementing the correct fix in case I just did some shitty bypass and triggered another error instead, but in case the problem indeed is the missing msgaccount packet, how would I go on about fixing that? 

Edited by sasork
Posted
15 hours ago, sasork said:

I was just about to edit as you replied, I got past the specific problem by doing something else, but now I am getting "Missing packet MsgAccount, Length 52" on my Comet, Game Server console when trying to log in and the login hangs instead.
Ill double check your reply to see if the problem would be fixed by implementing the correct fix in case I just did some shitty bypass and triggered another error instead, but in case the problem indeed is the missing msgaccount packet, how would I go on about fixing that? 

You're getting that on your game server console? You may have your client misconfigured. It should be sending a request to the Account server, which should be hosting the server on a port between 9958-9960 (depending on the patch).

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...