[(Awesome)RELEASE] CoEmuv2.Nano(5095) Source Code

06/05/2009 20:03 adoptado111#556
yeah um mysql backupfile i backed it up and theres was no mosnters id no npc id were do i get it and how am i going to add it.
06/05/2009 20:28 adoptado111#557
can someone teach me how to add npc to mysql and server plis.
06/05/2009 21:16 yuko#558
INSERT INTO `conqueremu`.`npcs` (

`NpcID` ,
`NpcType` ,
`SubType` ,
`MapID` ,
`Xcord` ,
`Ycord` ,
`Direction` ,
`Flag`
)
VALUES (
'0', '0', '0', '0', '0', '0', '0', '0'
)
06/05/2009 22:03 tao4229#559
Quote:
Originally Posted by editor05 View Post
Here's one thing that confuses me... if i "Debug" the projects (gameserver and loginserver) it work fine... but when i "Build" i got 15 errors concerning OpenSSL in GameEncryption.cs and Nano.cs

Any one can help me out here nor enlighten me :D
ManagedOpenSSL.dll needs to be in both bin\Debug AND bin\Release
06/05/2009 22:04 Andrew.A#560
When im executing batch file i get this:
[Err] 1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=latin1' at line 10
[Err] CREATE TABLE `accounts` (
`AccountID` varchar(16) DEFAULT NULL,
`Password` varchar(40) DEFAULT NULL,
`Type` int(11) NOT NULL DEFAULT '100',
`Auth` int(11) NOT NULL DEFAULT '1',
`Address` int(11) DEFAULT '0',
`Email` varchar(100) DEFAULT NULL,
`SecretNumber` varchar(20) NOT NULL,
UNIQUE KEY `AccountID` (`AccountID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
[Msg] Finished - Unsuccessfully
--------------------------------------------------
06/05/2009 22:41 nTL3fTy#561
Quote:
Originally Posted by Andrew.A View Post
When im executing batch file i get this:
[Err] 1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=latin1' at line 10
[Err] CREATE TABLE `accounts` (
`AccountID` varchar(16) DEFAULT NULL,
`Password` varchar(40) DEFAULT NULL,
`Type` int(11) NOT NULL DEFAULT '100',
`Auth` int(11) NOT NULL DEFAULT '1',
`Address` int(11) DEFAULT '0',
`Email` varchar(100) DEFAULT NULL,
`SecretNumber` varchar(20) NOT NULL,
UNIQUE KEY `AccountID` (`AccountID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
[Msg] Finished - Unsuccessfully
--------------------------------------------------
You are most likely using an older version of the MySQL daemon than what Andy exported the dump with. Try upgrading.
06/05/2009 22:56 Vortex.#562
People are still posting.

Erm. Homosexuals .
06/05/2009 22:56 Vortex.#563
People are still posting.

Erm. Homosexuals .
06/05/2009 22:58 kinshi88#564
Quote:
Originally Posted by Vortex. View Post
Erm. Homosexuals .
DAMN! You know my secret!
>.>
..
<.<
06/06/2009 01:47 Andrew.A#565
solved
06/06/2009 02:36 LetterX#566
Quote:
Originally Posted by Andrew.A View Post
When I am compiling i get this [Only registered and activated users can see links. Click Here To Register...]

This is the code for database:
Code:
/*
 * Created by SharpDevelop.
 * User: sams
 * Date: 3/8/2009
 * Time: 1:13 PM
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using MySql.Data.MySqlClient;

namespace CoEmu_v2_LoginServer.Database
{
	/// <summary>
	/// Provides MySql resource connections, for multiple connections to a single MySql database.
	/// This is due to the fact that the server is multi-threaded, so allowing a single connection would
	/// likely result in errors, or general loss of performance.
	/// </summary>
	public static class DatabaseConnection
	{
		public const string USER_NAME = "ACCOUNT"; <--- CHANGE THAT
		public const string PASSWORD = "PASSWORD"; <--- CHANGE THAT
		public const string SERVER = "MY IP HERE"; <--- CHANGE THAT
		public const string DATA_BASE = "conqueremu";
		public static MySqlConnection NewConnection()
		{
			MySqlConnection C = null;
			try{
			C = new MySqlConnection("Server=" + SERVER + ";Database='" + DATA_BASE + "';Username='" + USER_NAME + "';Password='" + PASSWORD + "'");
			[B]C.Open();[/B]
			}
			catch(Exception e)
			{
				Console.WriteLine(e.ToString());
				return null;
			}
			return C;
		}
	}
}
Bold = Line 30
For PROTECTION, I HIGHLY recommend you GET RID of your IP, and MYSQL USERNAME/PASSWORD; You need to change the password A.S.A.P., so no one else can gain access to your mysql server.

I did so behind a proxy in a couple of seconds, and I can do shit you don't want me doing (I'm not going to do stuff, but I can).

edit: forgot to remove credentials from my post.
06/06/2009 03:29 Andrew.A#567
Can someone help me because when i try and log in i get stuck on the connectiong to accoutn server, i have changed the thing under CoEmu and I have portforwarded.
06/06/2009 03:47 LetterX#568
Quote:
Originally Posted by Andrew.A View Post
Can someone help me because when i try and log in i get stuck on the connectiong to accoutn server, i have changed the thing under CoEmu and I have portforwarded.
did you port forward 5817 too?

So you should have port forwarded 9958 (login), 5816 (game), and 5817 (communication between login/game).

If you didn't port forward 5817, that's why you get a 'login freeze'
06/06/2009 03:47 Zeroxelli#569
Quote:
Originally Posted by Andrew.A View Post
Can someone help me because when i try and log in i get stuck on the connectiong to accoutn server, i have changed the thing under CoEmu and I have portforwarded.
Check to make sure that the name in the source and server.dat are the same, and that your LoginServer project is pointing to the same IP.



Also, Doing good so far. Hopefully this will be public soon

[Only registered and activated users can see links. Click Here To Register...]
06/06/2009 03:59 Andrew.A#570
They all say 127.0.0.1 apart from the ones in MasterSocket.cs



Code:
			        if(ServerName == "Pixel†Empire")
			        {
                        /*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("127.0.0.1", Key1, Key2));
				        }
				        else
				        {
				        	CSocket.Disconnect();
				        }
			        }
			        else if(ServerName == "CoEmu.Nano")
			        {
			        	if(AuthSocket.Authorize(AccountName, Key, true))
				        {
                            CSocket.Send(Packets.AuthResponse("66.187.101.86", Key1, Key2));
				        }
				        else
				        {
				        	CSocket.Disconnect();
				        }
			        }
	        	}
ALL my ports are port forwarded and 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">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">Pixel†Empire</field>
		<field name="ServerIP">127.0.0.1</field>
		<field name="ServerPort">9958</field>
		<field name="FlashName">Pixel†Empire</field>
		<field name="FlashIcon">Group3/server2.swf</field>
		<field name="FlashHint"></field>
		<field name="Child">0</field>
	</row>
	</table_data>
</database>
</mysqldump>
Can somebody please help me?

all ports are forwarded