[Development] C# sources

07/27/2010 06:06 hio77#91
Quote:
Originally Posted by funhacker View Post
Just took a quick look at the account server code looks good. I just have a suggestion since there is obviously going to be a lot of specialised output like green/red text I have this suggestion see the code box for new method and quick modification to the code.

Code:
using System;
using System.Threading;
using LoginServer.Database;

namespace LoginServer
{
    class Program
    {
        public  void Main(string[] args)
        {
            Console.Title = "Eudemons C# Login Server © Hio77";
            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine("--------------------------------------------");
            Console.WriteLine("---Eudemons C# LoginServer - Starting up!---");
            Console.WriteLine("--------------------------------------------");
            Console.ResetColor();
            Console.WriteLine("");
            Console.WriteLine("Account Server Created by Hio77");
            Console.WriteLine("This Account Server has been based off the COEMUv2 source");
            Console.WriteLine("COEMUv2 was created by andyd123");
            Console.WriteLine("The CoEMUv2 source can be found at: http://tinyurl.com/coemuv2");
            Console.WriteLine("");
            Console.WriteLine("This is made to work with the game server created by hio77 not any eo binary!");
            Console.WriteLine("");
            Console.WriteLine("[LoginServer] Starting MasterSocket Thread.");
            Connections.MasterSocket LoginSocket = new Connections.MasterSocket("LoginServer");
            new Thread(LoginSocket.AcceptNewConnections).Start();
            Console.WriteLine("[LoginServer] Init OK.");
            Console.WriteLine("[LoginServer] Connecting to Mysql.");
            if (Database.Database.TestConnect())
            {
                WriteSpecialText("green","[Database] Connection OK.",true);
            }
            else
            {
                WriteSpecialText("Red","[Database] Connection FAIL.",false);
                LoginSocket.Close();
                WriteSpecialText("Red", "[LoginServer-End-ERROR] Mastersocket closed, thread killed.",false);
                WriteSpecialText("Red", "[LoginServer-End-ERROR] Server Shutdown",true);
            }
            Console.WriteLine("[LoginServer] Searching for the Game Server....");
            Console.WriteLine("[LoginServer] Press enter to kill the server.");
            Console.Read();
            Console.WriteLine("");
            LoginSocket.Close();
            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine("[LoginServer-End] Mastersocket closed, thread killed.");
            Console.WriteLine("[LoginServer-End] Server Shutdown");
        }


        /// <summary>
        /// Writes a special message with low level formating
        /// </summary>
        /// <param name="colour">Colour the text is to be written in. (Red/Green)</param>
        /// <param name="text">Message to be written to console.</param>
        /// <param name="emptyline">True will allow for a proceding empty line after the message.</param>
        public void WriteSpecialText(string colour, string text, bool emptyline)
        {
            switch (colour.ToLower())
            {
                case "green":
                    Console.ForegroundColor=ConsoleColor.Green;
                    break;
                case "red":
                    Console.ForegroundColor = ConsoleColor.Red;
                        break;
                default:
                    Console.ResetColor();
                    break;
            }
            Console.WriteLine(text);
            if (emptyline) { Console.WriteLine(); }
            Console.ResetColor();
        }
    }

}
thanks for that :) the colors are just so people can see it easily really but i how its coded with the whole [ACCSERVER] etc stuff it makes it rather clear :)

i never really thought of putting it into a method like that though lol
08/06/2010 01:21 Beta Limit#92
Im a newb coder in C#, understand most stuff accept for the packets.

Played with CO Servers and that.

Count me in, im willing to help/learn along the way.
08/07/2010 03:30 conal#93
u can tell me for how i can get this port

5817; <authentication port
08/07/2010 05:35 DEADP00L#94
Quote:
Originally Posted by conal View Post
u can tell me for how i can get this port

5817; <authentication port

you still are not listening, this is a DEMO not a release.

user infracted yet again for not listening



ps i love my new siggy..lol
08/07/2010 10:43 hio77#95
Quote:
Originally Posted by Beta Limit View Post
Im a newb coder in C#, understand most stuff accept for the packets.

Played with CO Servers and that.

Count me in, im willing to help/learn along the way.
awesome :)

Quote:
Originally Posted by DEADP00L View Post
you still are not listening, this is a DEMO not a release.

user infracted yet again for not listening



ps i love my new siggy..lol
ty :)

@everyone wanting to help :)

anyone whos wanting to help and understands the packets could they give me a hand with the order of the game server login packets?
08/08/2010 01:30 Beta Limit#96
Lemme know when i can help :)

and i would love to learn the packets if anyone would teach me about them.

Beta
08/08/2010 03:12 hio77#97
Quote:
Originally Posted by Beta Limit View Post
Lemme know when i can help :)

and i would love to learn the packets if anyone would teach me about them.

Beta
i can teach you to use them etc i just don't really know the order for the login to game server lol :)
08/22/2010 08:06 hio77#98
*bump* this isnt a dead project just to let everyone know ... i just got sick ... in a few days ima have a svn with full code up so anyone can join in :)

just hope im fully better soon so i can get this project off its feet
08/22/2010 11:26 CharmedOne#99
what the function of this could someone tell me coz too hard to understand there
08/22/2010 16:39 ICP#100
that is so nice good job halo nice to see improvments in this
me i dont know C# but if i could help ya out i would bro XD i found this post verry intersting just wanted to post here and say nice job keep up the good work bro XD:p
08/23/2010 05:02 hio77#101
Quote:
Originally Posted by CharmedOne View Post
what the function of this could someone tell me coz too hard to understand there
this project is to create a server code base in which server owners can use to make about 50X more things possible and also to push the version number eo private servers use all the way to current :)


Quote:
Originally Posted by ICP View Post
that is so nice good job halo nice to see improvments in this
me i dont know C# but if i could help ya out i would bro XD i found this post verry intersting just wanted to post here and say nice job keep up the good work bro XD:p

thanks :)
08/26/2010 17:01 Escapex#102
#102 person

LOL WOW O: i always forgot to post on this thread.

kay this is amazing o.O!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

if ppl start coding C# Sources. soon TQ wont have shut us down C:
cause its non bin o.O TQ only use mySQL and stuff dont they?

but anywayis this still on going?

P.S: im not too good in C# so i cant help much o.O

but willing to wait for this source/everything

and then i will give you a "DAMN!" BIG THANK YOU O:
08/26/2010 21:32 hio77#103
Quote:
Originally Posted by Escapex View Post
#102 person

LOL WOW O: i always forgot to post on this thread.

kay this is amazing o.O!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

if ppl start coding C# Sources. soon TQ wont have shut us down C:
cause its non bin o.O TQ only use mySQL and stuff dont they?

but anywayis this still on going?

P.S: im not too good in C# so i cant help much o.O

but willing to wait for this source/everything

and then i will give you a "DAMN!" BIG THANK YOU O:

its almost never the binary that they send letters about or anything its the client.... they can still get us but nobody's scared by a letter now lmao
08/26/2010 23:39 sawickas#104
Hio77 Any progres in game server?
08/27/2010 06:18 hio77#105
Quote:
Originally Posted by sawickas View Post
Hio77 Any progres in game server?
login works a bit now ... im just working on showing others around the player (calucations need changing a bit) and then talking should work all good as well

npcs work im sure (if they don't its an easy fix i had npcs in it at first but took them out to make fixing bits easier)