[Help] COEmu 2 on LAN

06/08/2009 20:42 Andrew.A#16
Well to you it may not be hard but I'm an idiot when it comes to this. So pleaseee help me =)


So my server.dat looks like this
Code:
 <?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">101</field>
		<field name="ServerName">PixelEmpire</field>
		<field name="ServerPort">9958</field>
		<field name="ServerIP">127.0.0.1</field>
                          <field name="FlashName">PixelEmpire</field>
		<field name="FlashIcon">Group3/server2.swf</field>
		<field name="FlashHint"></field>
		<field name="Child">0</field>
	</row>
	<row>
		<field name="id">102</field>
		<field name="ServerName">UnderConstruction</field>
		<field name="ServerIP">127.0.0.1</field>
		<field name="ServerPort">9958</field>
		<field name="FlashName">UnderConstruction</field>
		<field name="FlashIcon">Group3/server8.swf</field>
		<field name="FlashHint"></field>
		<field name="Child">0</field>
	</row>
	</table_data>
</database>
</mysqldump>

and the one i give to my friend looks like
Code:
 <?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">101</field>
		<field name="ServerName">PixelEmpire</field>
		<field name="ServerIP">127.0.0.1</field
		<field name="ServerPort">9958</field>
		<field name="FlashName">PixelEmpire</field>
		<field name="FlashIcon">Group3/server2.swf</field>
		<field name="FlashHint"></field>
		<field name="Child">0</field>
	</row>
	<row>
		<field name="id">102</field>
		<field name="ServerName">UnderConstruction</field>
		<field name="ServerIP">127.0.0.1</field>
		<field name="ServerPort">9958</field>
		<field name="FlashName">UnderConstruction</field>
		<field name="FlashIcon">Group3/server8.swf</field>
		<field name="FlashHint"></field>
		<field name="Child">0</field>
	</row>
	</table_data>
</database>
</mysqldump>
If I get it wrong can you correct them both please =/ I am really confused...
06/09/2009 05:26 editor05#17
Quote:
Originally Posted by yuko View Post
mmm oki here we go again.
gameserver
mastersocket.cs
server_ip = 192.168.0.187
site Ip = whatever

databaseconnection.cs
server = 127.0.0.1


loginserver
server_ip = 192.168.0.187
site Ip = whatever

databaseconnection.cs
server = 127.0.0.1



this is in order to host the server on the computer with the IP = 192.168.0.187
now lets say pc2 and pc3 wanna connect to pc1(192.168.0.187)
they need to connect on CoEmu (server.dat with the ip = 192.168.0.187)
now to connect pc1 to the server he needs to connect trough 127.0.0.1 wich is named LocCoEmu
and you don't have to enable any firewall on the router caus local connections are open. you only might need to disable windows firewall
else it should work perfectly
i use this system all the time
Hi Yuko... thanks again for the spare time helping out this sort of thing :D

Anyways, i have done all what you said and still i can't connect from PC2 and Pc3 to the server...

below will be my code for what i have..

GameServer
Master Sockett
protected Socket ServerSocket;
protected const int LOGIN_PORT = 9958;
protected const string SERVER_IP = "192.168.0.187";
protected const string SITE_IP = "74.54.200.178";
protected const int AUTH_PORT = 5817;
protected const int GAME_PORT = 5816;
protected string ServerName;
protected static bool Continue = true;

Database Connection
public const string USER_NAME = "root";
public const string PASSWORD = "creative";
public const string SERVER = "127.0.0.1";
public const string DATA_BASE = "conqueremu";
public static MySqlConnection DBConnection = null;
public static MySqlConnection NewConnection()

Login Server

Auth Socket
/// <summary>
/// Description of AuthSocket.
/// </summary>
public static class AuthSocket
{
private static Socket Auth;
private const string SERVER_IP = "127.0.0.1";
public const string NANO_IP = "127.0.0.1";
private const int AUTH_PORT = 5817;

public static bool Authorize(string user, uint key, bool nano)
{

Master Socket
protected Socket LoginSocket;
protected const int LOGIN_PORT = 9958;
protected const string SERVER_IP = "127.0.0.1";
protected const string SITE_IP = "74.54.200.178";
protected const int AUTH_PORT = 5817;
protected const int GAME_PORT = 5816;
protected string ServerName;
protected static bool Continue = true;

Database Connection
public const string USER_NAME = "root";
public const string PASSWORD = "creative";
public const string SERVER = "127.0.0.1";
public const string DATA_BASE = "conqueremu";
public static MySqlConnection NewConnection()
{

Packet Processor
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))//enable everyone else to connect

{
CSocket.Send(Packets.AuthResponse("192.168.0.187", Key1, Key2));
}
else
{
CSocket.Disconnect();
}
}
else if (ServerName == "LocCoEmu")//enable PC1 to Connect

{
if(AuthSocket.Authorize(AccountName, Key, true))
{
CSocket.Send(Packets.AuthResponse("127.0.0.1", Key1, Key2));
}
else
{
CSocket.Disconnect();
}
}
}
else if(DBPass == "")
{



Sorry again to ask.. am i missing somethin here?

A million THANKS
06/09/2009 11:41 yuko#18
Quote:
Originally Posted by editor05 View Post
GameServer
Master Sockett
protected Socket ServerSocket;
protected const int LOGIN_PORT = 9958;
protected const string SERVER_IP = "192.168.0.187";
protected const string SITE_IP = "74.54.200.178";
protected const int AUTH_PORT = 5817;
protected const int GAME_PORT = 5816;
protected string ServerName;
protected static bool Continue = true;

Database Connection
public const string USER_NAME = "root";
public const string PASSWORD = "creative";
public const string SERVER = "127.0.0.1";
public const string DATA_BASE = "conqueremu";
public static MySqlConnection DBConnection = null;
public static MySqlConnection NewConnection()

Login Server

Auth Socket
/// <summary>
/// Description of AuthSocket.
/// </summary>
public static class AuthSocket
{
private static Socket Auth;
[B]private const string SERVER_IP = "192.168.0.187";
public const string NANO_IP = "192.168.0.187";
private const int AUTH_PORT = 5817;

public static bool Authorize(string user, uint key, bool nano)
{

Master Socket
protected Socket LoginSocket;
protected const int LOGIN_PORT = 9958;
protected const string SERVER_IP = "192.168.0.187";
protected const string SITE_IP = "74.54.200.178";
protected const int AUTH_PORT = 5817;
protected const int GAME_PORT = 5816;
protected string ServerName;
protected static bool Continue = true;

Database Connection
public const string USER_NAME = "root";
public const string PASSWORD = "creative";
public const string SERVER = "127.0.0.1";
public const string DATA_BASE = "conqueremu";
public static MySqlConnection NewConnection()
{

Packet Processor
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("192.168.0.187"Key1, Key2));
}
else
{
CSocket.Disconnect();
}*/
if (AuthSocket.Authorize(AccountName, Key, false))//enable everyone else to connect

{
CSocket.Send(Packets.AuthResponse("192.168.0.187", Key1, Key2));
}
else
{
CSocket.Disconnect();
}
}
else if (ServerName == "LocCoEmu")//enable PC1 to Connect

{
if(AuthSocket.Authorize(AccountName, Key, true))
{
CSocket.Send(Packets.AuthResponse("127.0.0.1", Key1, Key2));
}
else
{
CSocket.Disconnect();
}
}
}
else if(DBPass == "")
{


next time send me privite message and i'll do it for you on teamviewer
06/09/2009 12:16 CokEHeaD#19
Quote:
Originally Posted by N6gesemees View Post
That is NOT your ip, a normal ip starts with 8x.xx.xx.xx or 5.xx.xx.xx or soemthing similar.
Dude for 1
MOST normal ips starts with 192.XXX.X.XX
a hamanchi ip starts with 5.XX.XX.XX
duh
06/09/2009 12:31 editor05#20
Quote:
Originally Posted by CokEHeaD View Post
Dude for 1
MOST normal ips starts with 192.XXX.X.XX
a hamanchi ip starts with 5.XX.XX.XX
duh
pardon their ignorance :D peace...

@yuko.. thanks a lot... if ain't gonna work, i go PM you...
06/09/2009 12:38 galdik#21
Quote:
Originally Posted by CokEHeaD View Post
Dude for 1
MOST normal ips starts with 192.XXX.X.XX
a hamanchi ip starts with 5.XX.XX.XX
duh
hey noobie on E*pvp forum stop fixing bullshit with another bullshits. thx a lot.
u have started to post on E*pvp just a hour ago and u r messing everywhere lol. u think paying to E*pvp to get advertisments out makes u special??
no its ur knowledge.

ok peps. this will be long but propably the most exact info from my area of datas
# 0.0.0.0/8 reserved for selfidentify
# 224.0.0.0/8 - 255.0.0.0/8 future use
#
# 169.254.0.0 /255.255.0.0 /16 link local
#
# 127.0.0.0 /255.0.0.0 /8 LOOPBACK
# 10.0.0.0 /255.0.0.0 /8 private
# 172.16[-31].0.0 /255.240.0.0 /12 private
# 192.168.0.0 /255.255.0.0 /16 private
# others Internet
is that copy paste clear enought for ya??

ou yea one note : the fact that hamachi use internet IPs 5.0.0.0/8 is propably possible only becuz in normal internet they are not used yet. or idk maybe hamachi got reserved that IP range
06/09/2009 13:49 editor05#22
@yuko... sent you a pm.. Cheers!
06/09/2009 14:21 Andrew.A#23
i also sent you a PM yuko hope to hear from you soon