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

Status
Not open for further replies.

Rudde

Member
Nov 12, 2011
38
3
Can you make it possible so we can turn donation (putting things in others room) off and on?

Sorry if this isn't what the thread is for :(
 

Zak

Posting Freak
Mar 12, 2011
848
453

Well the standard system worked like people with rights could place down furniture.
So it all depends on if the user has the right.
You could edit it by modifying the fuse ranks.


I may look for developers in a month when i got in-game working.

#Updates
Thanks to Geek i can use he's RC4 and Banner [Visa4life was supposed to do this but he retired].
Now to port the RC4. About time NET 4 can be some use by using it's new feature of BigInt
 

Zak

Posting Freak
Mar 12, 2011
848
453
Sorry, powersupply was bust. Got it fixed last night when my supply delivered.

I'm importing carrots Banner gen. Then SSO should be complete.
I'll setup swfs after that and get some screens in by tonight.
 

Zak

Posting Freak
Mar 12, 2011
848
453
Spent 10 mins on finding out why the System numerics namespace was not working.

Then i noticed i forgot to re-add the reference how nooby of me :)
 

Ayumi

Joshua Pike.
Sep 13, 2010
1,028
73
Spent 10 mins on finding out why the System numerics namespace was not working.

Then i noticed i forgot to re-add the reference how nooby of me :)
stoopid. :p

Also, will you be doing pets fully? e.g working horses etc.
 

JustElmoo

New Member
Feb 15, 2012
22
1
Hard is a simple task. I'm still learning more C# i wanna make this advanced as possible it's a shame if it's a shit emulator and and a fucking epic cms eh?
I think so. It's standing there. Advanced als possible ;)
 

Zak

Posting Freak
Mar 12, 2011
848
453
Sorry for delay.

I have just spend my ass on finding a good MD5 class in NET.4 framework.
Did find one. So the InitMessageEvent [4000] [ReadRelease] will be complete.

Cheers,
Zak
 

Zak

Posting Freak
Mar 12, 2011
848
453
I listened to what Manuel said so i did a major cleanup

Root:


Requirements:


Revisions:


Codes:

ServerMessage Re-written

Code:
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace RevEmu.Requirements.PacketHandling.ServerSideHandling
{
    internal class ServerMessageHandling
    {
        private short _iMessageId;

        private readonly List<byte> _context = new List<byte>();

        public MemoryStream ChannelStream;

        public ServerMessageHandling(int i)
        {
            this._iMessageId = (short) i;
            ChannelStream = new MemoryStream(1024);
        }

        public void WriteByte(int b)
        {
            this.ChannelStream.WriteByte((byte) b);
        }

        private void WriteBytes(byte[] bytes, ReverseResult type)
        {
            if (type == ReverseResult.Reversed)
            {
                for (int i = (bytes.Length - 1); i > -1; i--)
                {
                    this.ChannelStream.Write(new[] {bytes[i]}, 0, bytes.Length);
                }
            }
            else
            {
                _context.AddRange(bytes);
            }
        }

        public void WriteString(string str)
        {
            if (string.IsNullOrEmpty(str))
            {
                this.ChannelStream.WriteByte((byte) 0);
                return;
            }
            this.WriteShort((short) str.Length);
            this.WriteBytes(Encoding.ASCII.GetBytes(str), ReverseResult.Fresh);

        }

        public void WriteChar(char b)
        {
            BitConverter.GetBytes(b);
        }

        public void WriteInt(int i)
        {
            this.WriteBytes(BitConverter.GetBytes(i), ReverseResult.Reversed);
        }

        public void WriteShort(short i)
        {
            this.WriteBytes(BitConverter.GetBytes(i), ReverseResult.Reversed);
        }

        public short GetMessageId()
        {
            return _iMessageId;
        }

        public string GetBodyString()
        {
            return ChannelStream.ToString();
        }
    }
}

InitMessage [Not Complete but i'm getting there.]

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using RevEmu.Requirements.Habbo.RC4.R63B.Banner;
using RevEmu.Requirements.Habbo.RC4.R63B.Crypto;
using RevEmu.Requirements.PacketHandling.Interface;
using RevEmu.Requirements.PacketHandling.ServerSideHandling;
using RevEmu.Requirements.Session;

namespace RevEmu.Revisions.R63B.Packets.Login
{
    class InitMessageEvent : IHabboPacketEvents
    {
        private static String ConvertToHex(byte[] data)
        {
            var buf = new StringBuilder(50);
            for (var i = 0; i < data.Length; i++)
            {
                int halfbyte = (data[i] += 4) & 0x0F;
                int twoHalfs = 0;
                do
                {
                    if ((0 <= halfbyte) && (halfbyte <= 9))
                        buf.Append((char) ('0' + halfbyte));
                    else
                        buf.Append((char) ('a' + (halfbyte - 10)));
                    halfbyte = data[i] & 0x0F;
                } while (twoHalfs++ < 1);
            }
            return buf.ToString();
        }

        public void Handle(Session session, ServerMessageHandling serverMessage)
        {
            try
            {
                var crypto = new Crypto();

                var bannerGenerator = new BannerGenerator();
                bannerGenerator.Timestamp = (int) (RevEnvironment.CurrentTimeMillis() + 3);
                var timeString = int.Parse(bannerGenerator.Timestamp.ToString()).ToString();

                var md5 = new MD5CryptoServiceProvider();
                md5.ComputeHash(Encoding.ASCII.GetBytes(timeString), 0, timeString.Length);
               
            }

            catch (Exception)
            {

                throw;
            }
        }
    }
}
 

Zak

Posting Freak
Mar 12, 2011
848
453
Query handling was rather shit, so i updated it to a better code. Credits to Google for some Help on the Net Sql classes.

Code:
public SqlDataReader WriteQuery(string sQuery)
        {
            // Open Connection and Set Query
            var command = new SqlCommand(sQuery,
                                         new SqlConnection(
                                             RevEmu.Requirements.MySql.MySqlClientManagement.ConnectionString));
            // Read the query
            var reader = command.ExecuteReader();

            // Return the reader, while reading the query.
            return reader;
        }

Example of usage

Code:
 PageSerialize(set.GetInt32(Convert.ToInt32("id")), set.GetInt32(Convert.ToInt32("icon_image")), set.GetInt32(Convert.ToInt32("icon_color")),
                              set.GetString(Convert.ToInt32("name")), Convert.ToInt32(set.GetString(Convert.ToInt32("categoryid"))), set.GetString(Convert.ToInt32("page_extra")),
                              set.GetString(Convert.ToInt32("page_headline")), set.GetString(Convert.ToInt32("page_teaser")), set.GetString(Convert.ToInt32("page_text")),
                              set.GetString(Convert.ToInt32("page_othertext")), set.GetString(Convert.ToInt32("page_text_details")),
                              set.GetString(Convert.ToInt32("page_text_teaser")));

Still working on the InitMessageEvent as we speak.
 

Zak

Posting Freak
Mar 12, 2011
848
453
Update i used the wrong class i used the ADO.NET class, supposed to use the MySql.NET class.

Code:
        public MySqlDataReader DataReader(string sQuery)
        {
            try
            {
                // Start the reader for the query.
                return MySqlHelper.ExecuteReader(MySqlClientManagement.ConnectionString, sQuery, Parameters.ToArray());
            }

            catch(MySqlException exception)
            {
                Console.WriteLine(@"Error with DataReader " + exception.ToString());
            }

            return null;
        }
 

Zak

Posting Freak
Mar 12, 2011
848
453


Sorry i was busy with above :) .NET 4.5 BETA HERE I COME!!!!
 

Rudde

Member
Nov 12, 2011
38
3
Could you add a function that send out an email if server get a error that prevent it from holding the hotel up? And the server need manual support from admin?
 

Zak

Posting Freak
Mar 12, 2011
848
453
I'll work on it later.

I could make a separate program which will monitor Rev and send out emails.
 
Status
Not open for further replies.

Users who are viewing this thread

Top