Revolution Emulator [C#, R63B, Encryption Cracked, DAO, Fluent NHibernate, Lua Plugin, Mono]

Status
Not open for further replies.

Zak

Posting Freak
Mar 12, 2011
848
453
Ew, I think you should use the uberHotel-type logo. Remember the logo that came with uberCMS orginally? Yea, that one.

Would look better, that one looks... fugly IMHO.
Yeah i suck at this shit. I did only use paint haha.

Anyway updates on Crypto:
Code:
/*
 *  Credits To LitteJ for coding the Class Libary 
 *  Credits To Zak For Setting It Up
 *  Bye Bye New Crypto.
 *  2011 ~ LittleJ
 *  2011 ~ RevEmu
 */


namespace RevEmu.Habbo_Encoding
{
    public static class Encoding
    {
        #region Encode Int32,Int16
        public static void cypherInt(int v)
        {
           HabboEncoding.HabboEncoding.cypherInt(v);
        }

        public static void cypherShort(int v)
        {
            HabboEncoding.HabboEncoding.cypherShort(v);
        }
        #endregion

        #region Decode Int32,Int16
        public static void decypherInt(string v)
        {
            HabboEncoding.HabboEncoding.decypherInt(v);
        }

        public static void decypherShort(string v)
        {
            HabboEncoding.HabboEncoding.decypherShort(v);
        }
        #endregion

        #region Encoding Etc
        public static void Init(string publicKey, string privateKey)
        {
            HabboEncoding.HabboEncoding.init(publicKey, privateKey);
        }
        #endregion

        #region Crypto Utilities
        public static void PrepareCryptoSystem()
        {
            HabboEncoding.CryptoUtils.PrepareCryptoSystem();
        }

        #endregion

        #region LJ282 Setup Crypto
        public static void SetUpCrypto(string cryptoHash)
        {
            HabboEncoding.LJ382.SetupCyrpto(cryptoHash);
        }
        #endregion

        #region LJ282 Encode String
        public static void EncodeString(string str)
        {
            HabboEncoding.LJ382.EncodeString(str);
        }
        #endregion

        #region LJ282 Decode String
        public static void DecodeString(string str)
        {
            HabboEncoding.LJ382.DecodeString(str);
        }
        #endregion
    }
}

Credits to Alex/Quackster for packet logs!
 

Supersup

Member
Dec 23, 2010
43
5
So I guess after compiling the packets and sockets together the server will work with less stability, which is when?

Good job and take your time bro.
 

Zak

Posting Freak
Mar 12, 2011
848
453
So I guess after compiling the packets and sockets together the server will work with less stability, which is when?

Good job and take your time bro.

Yeah a good server takes a good amount of time a patience.

The packets will not be together they will have there own systems the old system did do that but i decided to do a whole new system.
 

Zak

Posting Freak
Mar 12, 2011
848
453
Code:
/**********************************
 *  RevEmu ~ 2011                  
 *  By Zak                               
 *                                            
 *  RevCMS ~ 2011                  
 *  By Kryptos                          
 *                                             
 *  Devbest Community Project 
 *                                             
 *  rConfig Version: 1 Build: 0.1 
 **********************************/
/*****************************************************
 *  rSql ~ 2011                                                   
 *  A stable lightweight MySql database engine. 
 *  Supported For RevEmu Only
 *****************************************************/
rSql.Host=
rSql.Port=
rSql.UserName=
rSql.Password=
rSql.DatabaseName=
rSql.MaxiumPooling=
rSql.MiniumPooling=
rSql.Database.Type=

/*********************************************
 * rSockets ~ 2011
 * A stable advanced socket system       
 * Supported For RevEmu Only            
 * SuperSockets ~ 2011
 *********************************************/
rSockets.InternetProtocol=
rSockets.Port =
rSockets.Crypto.Type =

/*************************************************
 * rChecker ~ 2011                                        
 * A checker for new plugins and updates
 * Supported For RevEmu Only
 *************************************************/
rChecker.RevCmsUpdateCheck=
rChecker.RevEmuUpdateCheck=
rChecker.PluginUpdateCheck=

/****************************************
 * rPlugins ~ 2011
 * A advanced plugin system
 * Supported For RevEmu Only
 ****************************************/
rPlugin.RPFeatures=
rPlugin.OneWayGates=
rPlugin.CODFeatures=

Just for the people wondering some hidden secrets in there to!
 

Zak

Posting Freak
Mar 12, 2011
848
453
Code:
      private void Initialize()
        {
            var connectionBuilder = new MySqlConnectionStringBuilder();
            connectionBuilder.Server = Config.GetString("rSql.Host");
            connectionBuilder.Port = Convert.ToUInt16(Config.GetInt32("rSql.Port"));
            connectionBuilder.UserID = Config.GetString("rSql.Username");
            connectionBuilder.Password = Config.GetString("rSql.Password");
            connectionBuilder.Database = Config.GetString("rSql.DatabaseName");
            connectionBuilder.MinimumPoolSize = Convert.ToUInt32(Config.GetInt32("rSql.MaxiumPool"));
            connectionBuilder.MaximumPoolSize = Convert.ToUInt32(Config.GetInt32("rSql.MiniumPool"));
            connectionBuilder.Pooling = true;
            connectionString = connectionBuilder.ConnectionString;
        }

Finally got the config coded So sockets Mysql and plugins can be read from the file.
 

Zak

Posting Freak
Mar 12, 2011
848
453
To be honest, i can't give a exact release date as they may be unexpected events and delays but it will a long and hopefully a change to the whole Habbo community [stop idiots making profit from there hotels].

That is my plan.
 

Zak

Posting Freak
Mar 12, 2011
848
453
Sorry for the lack of updates.
There where loads of updates but not posted.

Well here they are.
Previous updates [not posted]:
Coded Server and Client message in rPlugin [With new protocol support]
Coded the headers in rPlugin [rHeaders] using short [Int16] [2] [Bits].

Today:
Well, today i was fully working on the sockets here's a diagram.

o_SuperSocket.jpg
 

Zak

Posting Freak
Mar 12, 2011
848
453
It's confirmed that RevEmu can now officially take over 10k amount of connections with decent specs.

[Shown from analysis of SuperSockets from there Documentation]

Yeah the In-game will soon come up. I didn't expect these sockets to be so hard but after reading a little tut about it. Bam these sockets are pretty easy. I am making a config for Socketbase as we speak and then i will test to see if connections are being picked up.
 

Zak

Posting Freak
Mar 12, 2011
848
453
Code:
   public class rServer : AppServer<rSession>
    {
        private Dictionary<string, List<string>> broadcastDict = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase);
        private object broadcastSyncRoot = new object();

        private Dictionary<string, rSession> broadcastSessionDict = new Dictionary<string, rSession>(StringComparer.OrdinalIgnoreCase);
        private object syncRoot = new object();

        public rServer()
        {
            lock (broadcastSyncRoot)
            {
                broadcastDict["C001"] = new List<string> { "V001" };
                broadcastDict["C002"] = new List<string> { "V001", "V002" };
                broadcastDict["C003"] = new List<string> { "V002" };
            }
        }

        internal void RegisterNewSession(rSession session)
        {
            if (string.IsNullOrEmpty(session.DeviceNumber))
                return;

            lock (syncRoot)
            {
                broadcastSessionDict[session.DeviceNumber] = session;
            }
        }

        internal void RemoveOnlineSession(rSession session)
        {
            if (string.IsNullOrEmpty(session.DeviceNumber))
                return;

            lock (syncRoot)
            {
                broadcastSessionDict.Remove(session.DeviceNumber);
            }
        }

        internal void BroadcastMessage(rSession session, string message)
        {
            List<string> targetDeviceNumbers;

            lock (broadcastSyncRoot)
            {
                if (!broadcastDict.TryGetValue(session.DeviceNumber, out targetDeviceNumbers))
                    return;
            }

            if (targetDeviceNumbers == null || targetDeviceNumbers.Count <= 0)
                return;

            List<rSession> sessions = new List<rSession>();

            lock (syncRoot)
            {
                rSession s;

                foreach (var key in targetDeviceNumbers)
                {
                    if (broadcastSessionDict.TryGetValue(key, out s))
                        sessions.Add(s);
                }
            }

            Async.Run(() =>
                {
                    sessions.ForEach(s => s.SendResponse(message));
                });
        }

        protected override void OnAppSessionClosed(object sender, AppSessionClosedEventArgs<rSession> e)
        {
            RemoveOnlineSession(e.Session);
            base.OnAppSessionClosed(sender, e);
        }
    }

Sockets.

Kty bye.
-Lol
 

Quackster

a devbest user says what
Aug 22, 2010
1,765
1,245
Looks nice!
But too fancy for beginners to learn from ;D
Anyway, eager to see ingame shots :D
 
Status
Not open for further replies.

Users who are viewing this thread

Top