Register for your free account! | Forgot your password?

You last visited: Today at 13:25

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



CoEmuv2

Discussion on CoEmuv2 within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2006
Posts: 828
Received Thanks: 235
Question CoEmuv2

What do I have to change in my coemu source to allow people to connect with my hamachi ip. Right now I'm connecting to my server with ip in server.dat 127.0.0.1 what do I need to change in the source so that I can put my hamachi ip in server.dat so I can connect with it and other people can connect as well?
blade911 is offline  
Old 09/11/2009, 00:59   #2
 
Zion~'s Avatar
 
elite*gold: 20
Join Date: Aug 2009
Posts: 1,344
Received Thanks: 651
Change the ip in master socket too 127.0.0.1 also
and in the packet processor make sure the ips are your external ip.
You can find that here,

Then change the ip in your server.dat too your external ip.
You can make your server.dat 127.0.0.1 and still be able to connect, just make sure others make it your external ip.

Hit thanks if I helped you.
If you need more help, add me on msn.
Zion~ is offline  
Old 09/11/2009, 01:01   #3
 
elite*gold: 0
Join Date: May 2006
Posts: 828
Received Thanks: 235
Quote:
Originally Posted by Zion~ View Post
Change the ip in master socket too 127.0.0.1 also
and in the packet processor make sure the ips are your external ip.
You can find that here,

Then change the ip in your server.dat too your external ip.
You can make your server.dat 127.0.0.1 and still be able to connect, just make sure others make it your external ip.

Hit thanks if I helped you.
If you need more help, add me on msn.
I use hamachi so I can't make it my external ip. And idk your msn lol.
blade911 is offline  
Old 09/11/2009, 01:18   #4
 
Zion~'s Avatar
 
elite*gold: 20
Join Date: Aug 2009
Posts: 1,344
Received Thanks: 651
Quote:
Originally Posted by blade911 View Post
I use hamachi so I can't make it my external ip. And idk your msn lol.


Try replacing your external ip with your hamachi ip then.
Zion~ is offline  
Old 09/11/2009, 01:24   #5
 
elite*gold: 0
Join Date: May 2006
Posts: 828
Received Thanks: 235
Okay well I changed the packet processor IP but now when I try to connect it says "Please reinstall the game".

Quote:
/*
* Created by SharpDevelop.
* User: sams
* Date: 3/8/2009
* Time: 12:38 PM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using CoEmu_v2_LoginServer.Connections;
using CoEmu_v2_LoginServer.Database;

namespace CoEmu_v2_LoginServer
{
/// <summary>
/// Allows for handling of packets from the client->loginserver or client->gameserver.
/// </summary>
public static class PacketProcessor
{
public static void ProcessPacket(byte[] Data, ClientSocket CSocket)
{
int Type = (Data[3] << 8) + Data[2];
switch(Type)
{
case 1086:
{
RequestLogin(Data, CSocket);
break;
}
default:
{
Console.WriteLine("[LoginServer] Unknown packet type: " + Type);
break;
}
}
}
public static void RequestLogin(byte[] Data, ClientSocket CSocket)
{
string AccountName = "";
string Password = "";
string ServerName = "";
if(Data.Length >= 276)
{
for (int i = 4; i < 0x114; i++)
{
if (i >= 0x14 && i < 0xf9)
{
if(Data[i] != 0x00)
Password += (Convert.ToString(Data[i], 16)).PadLeft(2, '0');
}
if (i < 0x14)
if (Data[i] != 0x00)
AccountName += Convert.ToChar(Data[i]);
if (i > 0xfa)
if (Data[i] != 0x00)
ServerName += Convert.ToChar(Data[i]);
}
}
else
{
return;
}
/* if(AccountName != "dsfreak")
{
CSocket.Disconnect();
return;
}*/
System.Random Random = new System.Random();
Console.WriteLine("[LoginServer] " + AccountName + " logging in to " + ServerName);
string DBPass = Database.Database.Password(AccountName);
//TODO: Check for ban.
if(DBPass != "ERROR")
{
if(DBPass == Password)
{
//OKAY to login!
uint Key = (uint)(Random.Next(10000000) << 32);
Key = Key << 32;
Key = (uint)(Key | (uint)Random.Next(10000000));
byte[] Key1 = new byte[4];
byte[] Key2 = new byte[4];
Key1[0] = (byte)(((ulong)Key & 0xff00000000000000L) >> 56);
Key1[1] = (byte)((Key & 0xff000000000000) >> 48);
Key1[2] = (byte)((Key & 0xff0000000000) >> 40);
Key1[3] = (byte)((Key & 0xff00000000) >> 32);
Key2[0] = (byte)((Key & 0xff000000) >> 24);
Key2[1] = (byte)((Key & 0xff0000) >> 16);
Key2[2] = (byte)((Key & 0xff00) >> 8);
Key2[3] = (byte)(Key & 0xff);
if(ServerName == "TazerCo")
{
/*if(AuthSocket.Authorize(AccountName, Key, false))
{
CSocket.Send(Packets.AuthResponse("66.187.101.86", Key1, Key2));
}
else
{
CSocket.Disconnect();
}*/
if(AuthSocket.Authorize(AccountName, Key, false))
{
CSocket.Send(Packets.AuthResponse("5.228.231.16", Key1, Key2));
}
else
{
CSocket.Disconnect();
}
}
else if(ServerName == "CoEmu.Nano")
{
if(AuthSocket.Authorize(AccountName, Key, true))
{
CSocket.Send(Packets.AuthResponse("70.190.77.101", Key1, Key2));
}
else
{
CSocket.Disconnect();
}
}
}
else if(DBPass == "")
{
Console.WriteLine("[LoginServer](Diagnostic) Set password for " + AccountName);
Database.Database.SetPass(AccountName, Password);
//OKAY to login!
uint Key = (uint)(Random.Next(10000000) << 32);
Key = Key << 32;
Key = (uint)(Key | (uint)Random.Next(10000000));
byte[] Key1 = new byte[4];
byte[] Key2 = new byte[4];
Key1[0] = (byte)(((ulong)Key & 0xff00000000000000L) >> 56);
Key1[1] = (byte)((Key & 0xff000000000000) >> 48);
Key1[2] = (byte)((Key & 0xff0000000000) >> 40);
Key1[3] = (byte)((Key & 0xff00000000) >> 32);
Key2[0] = (byte)((Key & 0xff000000) >> 24);
Key2[1] = (byte)((Key & 0xff0000) >> 16);
Key2[2] = (byte)((Key & 0xff00) >> 8);
Key2[3] = (byte)(Key & 0xff);
if(ServerName == "CoEmu")
{
/*if(AuthSocket.Authorize(AccountName, Key, false))
{
CSocket.Send(Packets.AuthResponse("66.187.101.86", Key1, Key2));
}
else
{
CSocket.Disconnect();
}*/
if(AuthSocket.Authorize(AccountName, Key, false))
{
CSocket.Send(Packets.AuthResponse("66.187.101.86", Key1, Key2));
}
else
{
CSocket.Disconnect();
}
}
else if(ServerName == "CoEmu.Nano")
{
if(AuthSocket.Authorize(AccountName, Key, true))
{
CSocket.Send(Packets.AuthResponse("70.190.77.101", Key1, Key2));
}
else
{
CSocket.Disconnect();
}
}
}
else
{
CSocket.Send(Packets.WrongPass());
CSocket.Disconnect();
}
}
else
{
Console.WriteLine("DBPass equals ERROR: " + DBPass);
CSocket.Disconnect();
}
}
}
}
Umm all I change is what's in red right? That's where 127.0.0.1 used to be.
blade911 is offline  
Old 09/11/2009, 01:28   #6
 
Zion~'s Avatar
 
elite*gold: 20
Join Date: Aug 2009
Posts: 1,344
Received Thanks: 651
Hmph!
Post your server.dat
Zion~ is offline  
Old 09/11/2009, 01:34   #7
 
elite*gold: 0
Join Date: May 2006
Posts: 828
Received Thanks: 235
Here is my server.dat when I connected with 127.0.0.1 IP. It said "Please reinstall the game" when I changed mastersocket.cs to 5.228.231.16 and server.dat to that and tried to connect.

Quote:
<?xml version="1.0"?>
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<database name="cq2">
<table_structure name="outenserver">
<field Field="id" Type="smallint(1) unsigned zerofill" Null="NO" Key="PRI" Default="0" Extra="" />
<field Field="ServerName" Type="varchar(32)" Null="YES" Key="" Extra="" />
<field Field="ServerIP" Type="varchar(15)" Null="YES" Key="" Extra="" />
<field Field="ServerPort" Type="int(1) unsigned" Null="YES" Key="" Extra="" />
<field Field="FlashName" Type="varchar(32)" Null="YES" Key="" Extra="" />
<field Field="FlashIcon" Type="varchar(32)" Null="YES" Key="" Extra="" />
<field Field="FlashHint" Type="varchar(128)" Null="YES" Key="" Extra="" />
<field Field="Child" Type="tinyint(1) unsigned zerofill" Null="NO" Key="" Default="0" Extra="" />
<key Table="outenserver" Non_unique="0" Key_name="id" Seq_in_index="1" Column_name="id" Collation="A" Cardinality="97" Null="" Index_type="BTREE" Comment="" />
<options Name="outenserver" Engine="MyISAM" Version="10" Row_format="Dynamic" Rows="97" Avg_row_length="58" Data_length="5644" Max_data_length="281474976710655" Index_length="2048" Data_free="0" Create_time="2008-11-26 08:33:09" Update_time="2008-12-18 08:39:35" Collation="latin1_swedish_ci" Create_options="" Comment="" />
</table_structure>
<table_data name="outenserver">
<row>
<field name="id">0</field>
<field name="ServerName"></field>
<field name="ServerIP"></field>
<field name="ServerPort">0</field>
<field name="FlashName"></field>
<field name="FlashIcon"></field>
<field name="FlashHint"></field>
<field name="Child">1</field>
</row>
<row>
<field name="id">1</field>
<field name="ServerName"></field>
<field name="ServerIP"></field>
<field name="ServerPort">0</field>
<field name="FlashName">Group1</field>
<field name="FlashIcon">Group11.swf</field>
<field name="FlashHint"></field>
<field name="Child">1</field>
</row>
<row>
<field name="id">101</field>
<field name="ServerName">TazerCo</field>
<field name="ServerIP">127.0.0.1</field>
<field name="ServerPort">9958</field>
<field name="FlashName">TazerCo</field>
<field name="FlashIcon">Group3/server2.swf</field>
<field name="FlashHint"></field>
<field name="Child">0</field>
</row>
</table_data>
</database>
</mysqldump>
blade911 is offline  
Old 09/11/2009, 01:45   #8
 
elite*gold: 0
Join Date: May 2006
Posts: 828
Received Thanks: 235
Men respond.
blade911 is offline  
Old 09/11/2009, 01:47   #9
 
Zion~'s Avatar
 
elite*gold: 20
Join Date: Aug 2009
Posts: 1,344
Received Thanks: 651
Make your server.dat ip,
5.228.231.16
Zion~ is offline  
Old 09/11/2009, 01:51   #10
 
danielachraf's Avatar
 
elite*gold: 20
Join Date: Mar 2008
Posts: 958
Received Thanks: 494
Quote:
Originally Posted by blade911 View Post
Here is my server.dat when I connected with 127.0.0.1 IP. It said "Please reinstall the game" when I changed mastersocket.cs to 5.228.231.16 and server.dat to that and tried to connect.
if you are using hamachi you must use the 127.0.0.1 in your client and you must have the full server.dat..

Code:
	<row>
		<field name="id">102</field>
		<field name="ServerName">[COLOR="Red"]CoEternity[/COLOR]</field>
		<field name="ServerIP">127.0.0.1</field>
		<field name="ServerPort">9958</field>
		<field name="FlashName">[COLOR="red"]CoEternity[/COLOR]</field>
		<field name="FlashIcon">Group3/server2.swf</field>
		<field name="FlashHint"></field>
		<field name="Child">0</field>
	</row>
Edit your server name...
Attached Files
File Type: rar server.rar (2.3 KB, 6 views)
danielachraf is offline  
Old 09/11/2009, 01:51   #11
 
Zion~'s Avatar
 
elite*gold: 20
Join Date: Aug 2009
Posts: 1,344
Received Thanks: 651
Reading this over I found the possible error.

Code:
if(ServerName == "[COLOR="Red"]CoEmu[/COLOR]")
{
/*if(AuthSocket.Authorize(AccountName, Key, false))
{
CSocket.Send(Packets.AuthResponse("[COLOR="Red"]66.187.101.86[/COLOR]", Key1, Key2));
}
else
{
CSocket.Disconnect();
}*/
if(AuthSocket.Authorize(AccountName, Key, false))
{
CSocket.Send(Packets.AuthResponse("[COLOR="Red"]66.187.101.86[/COLOR]", Key1, Key2));
}
else
{
CSocket.Disconnect();
}
}
else if(ServerName == "[COLOR="Red"]CoEmu.Nano[/COLOR]")
{
if(AuthSocket.Authorize(AccountName, Key, true))
{
CSocket.Send(Packets.AuthResponse("[COLOR="Red"]70.190.77.101[/COLOR]", Key1, Key2));
}
else
{
CSocket.Disconnect();
}
}
}
else
{
CSocket.Send(Packets.WrongPass());
CSocket.Disconnect();
}
}
else
{
Console.WriteLine("DBPass equals ERROR: " + DBPass);
CSocket.Disconnect();
}
}
}
}
It should be the name of your server in the server.dat
IP should be your hamachi ip.
Changing Comu.Nano doesn't matter but I always change it.
Zion~ is offline  
Old 09/11/2009, 01:52   #12
 
elite*gold: 0
Join Date: May 2006
Posts: 828
Received Thanks: 235
daniel, but how do people connect to my server? they can't use IP 127.0.0.1
blade911 is offline  
Old 09/11/2009, 01:53   #13
 
danielachraf's Avatar
 
elite*gold: 20
Join Date: Mar 2008
Posts: 958
Received Thanks: 494
Quote:
Originally Posted by blade911 View Post
daniel, but how do people connect to my server? they can't use IP 127.0.0.1
make hamachi rooms and in their server.dat they have your ip not 127.0.0.1
danielachraf is offline  
Old 09/11/2009, 02:00   #14
 
elite*gold: 0
Join Date: May 2006
Posts: 828
Received Thanks: 235
Quote:
Originally Posted by danielachraf View Post
make hamachi rooms and in their server.dat they have your ip not 127.0.0.1
I know that -.- your the one that told me that..

Btw Zion I changed all those to my Hamachi's IP and still nothing.
blade911 is offline  
Old 09/11/2009, 02:05   #15
 
Zion~'s Avatar
 
elite*gold: 20
Join Date: Aug 2009
Posts: 1,344
Received Thanks: 651
Quote:
Originally Posted by blade911 View Post
I know that -.- your the one that told me that..

Btw Zion I changed all those to my Hamachi's IP and still nothing.
Port forward and get it over with.
Hamachi wont benefit your server in anyway.
Zion~ is offline  
Reply


Similar Threads Similar Threads
[Fix] 64-Bit Fix for CoEmuV2
02/14/2011 - CO2 PServer Guides & Releases - 11 Replies
Ok believe ive got a fix for the 64-bit problem for CoEmuV2. Go to "CoEmu v2\CoEmu v2 GameServer\bin\Debug" and replace the "libeay32.dll" with the .dll in this .zip file. This will fix it. I am running Vista 64-bit and Running CoEmuV2 :) Good Luck.
CoEmuV2
11/20/2009 - CO2 Private Server - 1 Replies
Is this source only compatible with a 5095 client or are there other clients that it can be connected to?
[HELP]CoemuV2
08/30/2009 - CO2 Private Server - 0 Replies
poeple can connect to my ip but i cant when i sqitch it to 127.0.0.1 i can connect cuz that my personal ip thing but when i chnage it to turn my erver up i cant log in but other can
Help Me Please With CoEmuV2
06/12/2009 - CO2 Private Server - 6 Replies
Please All I need some help when i try To Make The Server It`s Give me Error Look At The Error http://www10.0zz0.com/2009/06/02/19/320280174.jpg
[IPs] CoEmuv2
06/10/2009 - CO2 Private Server - 4 Replies
Hello everyone! I have a problem. I have a friend that wants to host my server. He port forwarded the ports necessary in order to play. What I'm having trouble with is, I don't know which IP I should use from him. His internet IP (gateway IP?) or his computer IP (DMS?) Can anyone please tell me. On another hand, I've been doing trial and error by putting in the IPS in different places in master/data/packet files, and I've done everything and it still doesn't work. Really confused on this last...



All times are GMT +1. The time now is 13:26.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.