[C#] Arcturus Version 2.0 Emulator by The General [C#, .NET, Windows, Linux, Mac]

Results 1 to 25 of 25
  1. #1
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts

    [C#] Arcturus Version 2.0 Emulator by The General [C#, .NET, Windows, Linux, Mac]

    Introduction:
    Project Sirius: Arcturus 2.0 Emulator is an emulator trying to closely emulate Habbo. Duh

    Well, I've decided to ditch Java because the original Arcturus source code base is just a pile of shit. I mean, its just really difficult to maintain and easy to break something with every change. And as the author of it, its okay to say it (And should be a massive red flag!!). Fixing it up in order to bring it up to standards would've cost a lot of time, perhaps even more than starting from scratch. Sooooo I've started from scratch. Because I'm a bit done with Java, in my opinion its bloated, I decided to rebuild the emulator from scratch in C#. C# allows for beautiful elegant code. You'll love it :)

    The difference
    If you're running Arcturus, or any of its derived versions, you know stuff gets broken over and over again with each change and release, sometimes the same bug gets fixed a couple times. So whats new here? Well for a start I'm building it using backed unit tests. If you're unfamilar with unit tests, they basically try to take a small piece of code and verify its behavior against some inputs and known result. If you change the logic of a piece of code, it will come up that the behavior has been modified and no longer according to spec. Using this method, its the first defence preventing bugs being introduced.

    With the rise of all different client types, I decided to make it modular to use different clients. For now Flash is supported and soon Nitro will be integrated. With a simple to use interface, you can build any type of project against it, wether this is an Rest API, discord bots or custom protocols.

    Arcturus 2.0 is build using a modular architecture in mind with multiple components. For example, rooms can be hosted on multiple servers in order to distribute CPU work load. An unique feature of this makes it possible to do live testing on a hotel without rebooting the emulator or having to deal with portforwarding.

    The whole game logic & architecture is standalone implemented. This also allows smaller components to be tested and not having to deal with packets.

    Features:
    Build using Visual Studio Professional.
    C# .NET 5
    Microsoft Abstractions Dependency Injection.
    NUnit & Moq for unit testing.
    Multiple database support, MariaDB, PostgreSQL, SQLite etc.
    Dapper object mapper.
    JSON Configuration & live reload.
    Distributed architecture.
    Custom Game Protocol to communicate with different clients.

    Game Features:
    Quite a bit of features have already been implemented.
    - Furniture (Placing, Moving, Clicking, Picking up)
    - Bots
    - Mod Tools
    - Wired (Triggers, Effects & Conditions (Excluding Game Wired))
    - Catalog
    - Messenger
    - Flash landing view, hall of fame, news list.
    - User preferences
    - Navigator

    Examples:

    Here is how in in the latest Java Arcturus 1.21.2 version give badge command is implemented:

    Spoiler:

    Code:
    public class BadgeCommand extends Command
    {
        public BadgeCommand()
        {
            super("cmd_badge", Emulator.getTexts().getValue("commands.keys.cmd_badge").split(";"));
        }
    
         @Override
        public boolean handle(GameClient gameClient, String[] params) throws Exception
        {
            if(params.length == 1)
            {
                gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_badge.forgot_username"), RoomChatMessageBubbles.ALERT);
                return true;
            }
            if(params.length == 2)
            {
                gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_badge.forgot_badge").replace("%user%", params[1]), RoomChatMessageBubbles.ALERT);
                return true;
            }
    
            if(params.length == 3)
            {
                Habbo habbo = Emulator.getGameEnvironment().getHabboManager().getHabbo(params[1]);
    
                if(habbo != null)
                {
                    if (habbo.addBadge(params[2]))
                    {
                        gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_badge.given").replace("%user%", params[1]).replace("%badge%", params[2]), RoomChatMessageBubbles.ALERT);
                    }
                    else
                    {
                        gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_badge.already_owned").replace("%user%", params[1]).replace("%badge%", params[2]), RoomChatMessageBubbles.ALERT);
                    }
    
                    return true;
                }
                else
                {
                    try (Connection connection = Emulator.getDatabase().getDataSource().getConnection())
                    {
                        boolean found;
    
                        try (PreparedStatement statement = connection.prepareStatement("SELECT badge_code FROM users_badges INNER JOIN users ON users.id = user_id WHERE users.username = ? AND badge_code = ? LIMIT 1"))
                        {
                            statement.setString(1, params[1]);
                            statement.setString(2, params[2]);
                            try (ResultSet set = statement.executeQuery())
                            {
                                found = set.next();
                            }
                        }
    
                        if(found)
                        {
                            gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_badge.already_owns").replace("%user%", params[1]).replace("%badge%", params[2]), RoomChatMessageBubbles.ALERT);
                            return true;
                        }
                        else
                        {
                            try (PreparedStatement statement = connection.prepareStatement("INSERT INTO users_badges VALUES (null, (SELECT id FROM users WHERE username = ? LIMIT 1), 0, ?)"))
                            {
                                statement.setString(1, params[1]);
                                statement.setString(2, params[2]);
                                statement.execute();
                            }
    
                            gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_badge.given").replace("%user%", params[1]).replace("%badge%", params[2]), RoomChatMessageBubbles.ALERT);
                            return true;
                        }
                    }
                    catch (SQLException e)
                    {
                        Emulator.getLogging().logSQLException(e);
                    }
                }
            }
    
            return true;
        }
    }


    Here is the same thing in Arcturus 2.0:

    Spoiler:

    Code:
        public class BadgeCommand : ICommand
        {
            private readonly IBadgesService _badgesService;
            public string Key => "badge";
    
            public BadgeCommand(IBadgesService badgesService)
            {
                _badgesService = badgesService;
            }
    
            public async Task<string> Handle(IHabbo habbo, string[] parameters)
            {
                if (parameters.Length == 0 || string.IsNullOrWhiteSpace(parameters[0])) return "forgot_username";
                if (parameters.Length == 1 || string.IsNullOrWhiteSpace(parameters[1])) return "forgot_badge";
                var username = parameters[0];
                var badgeCode = parameters[1];
                return await _badgesService.GiveBadge(username, badgeCode) ? "given" : "already_owned";
            }
        }


    From this example we can see that the original badge command had a lot of responsibilities, verifying that someone does not have the badge, inserting the badge in to the database etc. Starting with 2.0, all responsibilities are split up in small classes. In this case the IBadgesService is responsible to give a badge. No need to worry about it in the command if someone is online. Simple, clean & elegant code.

    Last edited by The General; 27-01-21 at 03:46 PM.


  2. #2
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,486Posts

    Re: Arcturus Version 2.0 Emulator by The General [C#, .NET, Windows, Linux, Mac]

    Thread approved, good luck.

  3. #3
    Live Ocottish Sverlord Joopie is offline
    LegendRank
    Jun 2010 Join Date
    The NetherlandsLocation
    2,773Posts

    Re: [C#] Arcturus Version 2.0 Emulator by The General [C#, .NET, Windows, Linux, Mac]

    I'm glad to see some .NET development back in the community. I think it's an awesome language that got plagued by bad code in this section. Judging by your command snippet, I think it's a good step in the right direction.

    I'd suggest you use Microsoft's naming convention. For example append all async methods with Async to mark them as being asynchonious. Also read up on best practisches when working with asynchonious methods.

    What are your thoughts about being open source for this project? One of the biggest complains about Arcturus 1.0.

  4. #4
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts

    Re: [C#] Arcturus Version 2.0 Emulator by The General [C#, .NET, Windows, Linux, Mac]

    Quote Originally Posted by Joopie View Post
    I'd suggest you use Microsoft's naming convention. For example append all async methods with Async to mark them as being asynchonious.
    Yeah still not sure about this one. Imo, if you're not doing async work, don't return a Task. Therefor the assumption can be made that anything that returns a Task is async. Its only useful if you have multiple implementations of an interface that could possibly be async but I dont want to define the possible implementation in the interface.

    What are your thoughts about being open source for this project? One of the biggest complains about Arcturus 1.0.
    Arcturus 1.0 was open source. Then renames started. If you tell people if they dont like something and to use something else, they just take that as an approval to decompile & rename your work. We'll slap a new name on it and its something else.

    Nah, people have no respect for eachothers work, its something I was hoping to build in the community in the past. The community doesnt deserve access to the full source code. Morningcrap has shown that nothing good comes out of it. I keep getting daily messages from people who think I am still working on that and I would have to tell them that I do not run that rename.

    Nope, people shot themselves in the foot. No source code from me.

    Hurr durr we'll crack & decompile thats what we do arguments coming in. Well, thats exactly the reason why this community is dead. I dont know in what form this will be released. I am not going to discuss that here, this is a development thread and not a release thread.
    Last edited by The General; 27-01-21 at 04:08 PM.

  5. #5
    Banned Beny. is offline
    BannedRank
    Aug 2009 Join Date
    536Posts

    Re: [C#] Arcturus Version 2.0 Emulator by The General [C#, .NET, Windows, Linux, Mac]

    Quote Originally Posted by The General View Post
    Morningcrap has shown that nothing good comes out of it. I keep getting daily messages from people who think I am still working on that and I would have to tell them that I do not run that rename.

    Nope, people shot themselves in the foot. No source code from me.

    Hurr durr we'll crack & decompile thats what we do arguments coming in. Well, thats exactly the reason why this community is dead.
    Arcturus would have been nothing without Morningstar. It's now the most used Emulator in the scene thanks to the community taking over. There are updates weekly, instead of every 3-6 months, bugs are fixed promptly and there's an active community of 1500+ members for hotel owners to receive support. If thats "nothing good" then you are delusional as fuck.

    Looking at your code snippets, it's returning a string. What is it used for? Also what would happen if the user doesn't exist?



    Quote Originally Posted by The General View Post
    I dont know in what form this will be released. I am not going to discuss that here, this is a development thread and not a release thread.
    Take a read of the section rules. Your project doesn't belong here if you aren't releasing it.
    Last edited by Beny.; 27-01-21 at 06:48 PM.

  6. #6
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts

    Re: [C#] Arcturus Version 2.0 Emulator by The General [C#, .NET, Windows, Linux, Mac]

    Looking at your code snippets, it's returning a string. What is it used for? Also what would happen if the user doesn't exist?
    The command system is currently in a crude implementation and will be refactored in the near future. Right now it just simply returns a status key which is used to automatically resolve the message displayed to the user, room whisper, private chat, alert, bubble alert etc.

    Quote Originally Posted by Beny. View Post

    Take a read of the section rules. Your project doesn't belong here if you aren't releasing it.
    As an ex section moderator, I am fully aware of the Habbo Hotel development rules.
    I never said I wasnt going to release it.

  7. #7
    Grand Master Moogly is offline
    Grand MasterRank
    Feb 2008 Join Date
    Pool LidoLocation
    2,321Posts

    Re: [C#] Arcturus Version 2.0 Emulator by The General [C#, .NET, Windows, Linux, Mac]

    That code snippet is so bad. You're returning a string why exactly??? Have you not heard of other data types? Maybe you should consider taking some basic computer science classes at a local college. Also if you're comparing your code to original Arcturus which is GPL licensed based on several factors I have proven time and time again, you must license this version of it under the GNU GPL as well. The GPL is so toxic that for years Microsoft forbade employees from looking at GPL code because all it takes is a few lines of GPL'd code to poison a project.

  8. #8
    Banned Beny. is offline
    BannedRank
    Aug 2009 Join Date
    536Posts

    Re: [C#] Arcturus Version 2.0 Emulator by The General [C#, .NET, Windows, Linux, Mac]

    Quote Originally Posted by The General View Post
    The command system is currently in a crude implementation and will be refactored in the near future. Right now it just simply returns a status key which is used to automatically resolve the message displayed to the user, room whisper, private chat, alert, bubble alert etc.
    So why are you writing that it's better than Arcturus 1 in OP and then saying here that it needs refactoring already? Just do shit properly to begin with so it doesn't turn out as a failure like before.

  9. #9
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts

    Re: [C#] Arcturus Version 2.0 Emulator by The General [C#, .NET, Windows, Linux, Mac]

    Quote Originally Posted by Beny. View Post
    So why are you writing that it's better than Arcturus 1 in OP and then saying here that it needs refactoring already? Just do shit properly to begin with so it doesn't turn out as a failure like before.
    Oh look, all the professional software engineers appeared! Please post the emulator you wrote from scratch.

    Yes lets go all in and implement all the features in one go. Sure your boss would love to hear that the project will only be able to be used when everything is implemented after 5 years and meanwhile he just has to suck it up that it won't compile. Why bother keeping small features working and extending and improving your code when you can do everything correctly in one go.

    You're saying it as if you're never allowed to touch any of the code you've written and must do it in one go correctly. Sorry to break it to you, but in the real world everything gets refactored all the time due to changing requirements.

    Quote Originally Posted by Moogly View Post
    That code snippet is so bad. You're returning a string why exactly??? Have you not heard of other data types? Maybe you should consider taking some basic computer science classes at a local college. Also if you're comparing your code to original Arcturus which is GPL licensed based on several factors I have proven time and time again, you must license this version of it under the GNU GPL as well. The GPL is so toxic that for years Microsoft forbade employees from looking at GPL code because all it takes is a few lines of GPL'd code to poison a project.
    Yes because GPLv3'ed Java code can be compiled by csc. The original Arcturus source isnt referenced in this project.

  10. #10
    Mr VPS - Cheap VPS Server NOC is offline
    Grand MasterRank
    Sep 2011 Join Date
    Liverpool, UKLocation
    844Posts

    Re: [C#] Arcturus Version 2.0 Emulator by The General [C#, .NET, Windows, Linux, Mac]

    I will be watching the dev, sounds good that .NET will be used for the project. Good luck

  11. #11
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts

    Re: [C#] Arcturus Version 2.0 Emulator by The General [C#, .NET, Windows, Linux, Mac]

    I'll just manually update this thread. If you think you can do it better, then do it without stealing other peoples work. No need to start drama here, go back to your own toxic circles.

    /closed

  12. #12
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts

    Re: [C#] Arcturus Version 2.0 Emulator by The General [C#, .NET, Windows, Linux, Mac]

    Working with bill to make Nitro adhere to the same flash client -> server packets. A lot of emulators just send all the client data upon login. This isnt preferred but as Nitro kind of expects this, proxy-ing nitro to the flash interface doesnt make the client work out of the box. For example nitro expects the server to send the user info upon login while in the Flash client, the client explicitly asks for it using the InfoRetrieve packet.

    Hopefully this gets fixed in Nitro soon so I dont have to do weird hacks.

  13. #13
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts

    Re: [C#] Arcturus Version 2.0 Emulator by The General [C#, .NET, Windows, Linux, Mac]

    So I had not touched this project in 2 months and decided to get back into it seeing that the Habbo flash client isnt dead and they're actually bringing snowstorm back :D

    Couple things that I noticed was the total clusterfuck of message subscriptions which is what I spend the last couple days on working on refactoring.

    For example given an ExampleService which would require some additional dependencies and registers subscriptions on messages would look like something like this:

    Code:
    public class ExampleService : IExampleService
        {
            public ExampleService(IGameServerConnectionRegistry connectionRegistry)
            {
                connectionRegistry.Subscribe<UserUsernameUpdatedNotification>(OnUserUsernameUpdatedNotification);
            }
    
            private Task OnUserUsernameUpdatedNotification(UserUsernameUpdatedNotification payload)
            {
                return DoSomething();
            }
    
            public Task DoSomething()
            {
                return Task.CompletedTask;
            }
        }
    Now, this in itself isnt that bad. It just gets bad when you have a lot of subscriptions as the class file would grow in since quite quickly and any dependecies for those message handlers would also have to be injected.

    I changed this around so that I now use a NotificationHandler for Events / Notifications and RequestHandler for Requests (Requires reply)

    Code:
    public class UserUsernameUpdatedNotificationHandler : NotificationHandler<UserUsernameUpdatedNotification>
        {
            private readonly IExampleService _exampleService;
    
            public UserUsernameUpdatedNotificationHandler(IExampleService exampleService)
            {
                _exampleService = exampleService;
            }
    
            public override Task Handle(UserUsernameUpdatedNotification payload)
            {
                return _exampleService.DoSomething();
            }
        }
    All handlers will be automatically registered. I also have to only inject the dependencies it really needs whereas the services before would get bloated quickly with multiple dependencies.
    The other upside of this is that they're smaller in general, standalone and dont have any dependencies on their own. Its very easy to test them due to the minimal dependencies.

    There is no need to manually register any handlers as they'll be automatically scanned.
    Code:
    services.Scan(scan => scan.FromAssemblies(Assembly.GetAssembly(typeof(CoreModule))).
                    AddClasses(classes => classes.Where(c => c.IsAssignableTo(typeof(IRequestHandler))))
                    .AsImplementedInterfaces()
                    .WithScopedLifetime());

  14. #14
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts

    Re: [C#] Arcturus Version 2.0 Emulator by The General [C#, .NET, Windows, Linux, Mac]

    PLUGINS!

    Who doesnt like them. Adding in custom interaction without having to modify the emulator (hehe). Well I do love them and I know a lot of folks out there love them aswell. Sooo thats why in that spirit I'm trying to make developing plugins as easy as possible. How easy you might wonder? Well... So simple that you dont even need to register anything. No more having to restart your hotel because you forgot to register a command to the commands service.

    With Arcturus, you're actually relatively limited to what you can do in a non reflection way. Yeah you could possibly replace some core services, though anything that might cache the reference to the service created before override might still use the old one. With this plugin system however you can do literally anything. And as I try to keep core services as small as possible, it doesnt take a whole lot of effort to replace the implementation of an interface.

    The following code is subject to change and is definitely not final.

    So to make a plugin, its fairly straight forward. And as I hate configuration files, I like to have everything done in one place: In code.

    Here is an example plugin that just prints "Hello World!" to the command line. How fascinating!

    Code:
        public class BasicPluginDefinition : IPluginDefinition
        {
            public string Name => "Basic Plugin Example";
            public string Description => "Basic Plugin example to demonstrate developing plugins in Sirius";
            public Version Version => new(1, 0);
            public void ConfigureServices(IServiceCollection serviceCollection)
            {
            }
    
            public Type PluginClass() => typeof(BasicPlugin);
        }
    
        public class BasicPlugin : IPlugin
        {
            public BasicPlugin()
            {
                Console.WriteLine("Hello World!");
            }
        }
    As you see, you can use the ConfigureServices to add additional dependency injection registrations if you like. Or REPLACE core services with your own implemention. Everything is dependency injected into the server. Heck you could rewrite the whole emulator as a plugin (hmmm ideas....)

    So given the example, we can easily create a command:

    Code:
        public class CommandPluginDefinition : IPluginDefinition
        {
            // Snip boilerplate as before ^
            public Type PluginClass() => typeof(CommandPlugin);
        }
    
        public class CommandPlugin : IPlugin
        {
            public CommandPlugin()
            {
            }
        }
    
        public class PingCommand : ICommand
        {
            public string Key => "ping";
    
            public Task<CommandResult> Handle(IHabbo habbo, string[] parameters)
            {
                habbo.Alert("Pong!");
                return Task.FromResult(CommandResult.Ok);
            }
        }
    So now when you run :commands, the :ping command is shown and when you type ping, well you probably guessed it, you get a Pong! alert. Breathtaking.




    Anyway, again, you can just inject whatever service you fancy.

    Now this is a basic but already quite powerful plugin system. While Arcturus / Sirus is split up in multiple services that can run standalone, for example multiple servers hosting rooms and a single core entry point, right now plugins are only loaded into the core and not in the room hosting scope yet.

  15. #15
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts

    Re: [C#] Arcturus Version 2.0 Emulator by The General [C#, .NET, Windows, Linux, Mac]

    Updates:

    So lately I've been working on adding a lot more furniture interactions:

    Games
    Freeze & BattleBanzai have been added. I've done my best to make it as closely accurate to Habbo. The only thing missing for banzai is the puck interaction, which will be added later once I get to the ball interaction.

    https://i.gyazo.com/e3c9e4d93a37efa2...023cd1d988.mp4

    Crafting
    The crafting table has been added. And this time it wont lock up after discovering a secret recipe. As always recipes can simply be configured through the database.



    Achievements
    The achievement system has been implemented. A bunch of achievements related to freeze & banzai have also been included.

    Talent Track
    The talent tracking including all achievements, perks & rewards have been added. I know the talent track has been removed from the new client though I think it is useful to give people perks & rewards based on their achievement progress. I wont be adding helpers anytime soon as that feature seems to be gone for good.



    Bubble Notifications
    When you try to stack something invalidly, you get this lovely notification.



    Navigator Improvements
    The navigator now supports saving searches. Also additional categories have been added to the myworld view. When a category has more rooms than the display limit, you can press the view more button option.



    Its now also possible to Like a room. This increases the score of the room.
    Favoriting a room has been added, favorite rooms are now shown under My Favorites in the My World tab.

    Furniture Interactions
    A whole bunch of furniture interactions have been added!

    - Multiheight (Double click to change height)


    - Area Effect Provider (While on top, you have the effect)


    - Effect Provider (Walk up to & interact with & receive effect when walking away)
    https://i.gyazo.com/fff85fcefa4ebe6e...f70b42dd23.mp4

    - Crackable Furniture
    Includes progressing achievement, cracking achievement & public crackables.
    https://i.gyazo.com/0ff0f6a29599e38e...7273c35302.mp4

    Also the effect dependent crackable has been added which requires the avatar to have a specific effect in order to crack the furni.

    - Achievement Gate (Habbolympix London)
    - Costume Gate (Habboween Effects)
    - Crosstrainer, Trampoline & Treadmill (Progress achievement for every 1 minute of use)
    - Hoppers & Costume Hoppers

    Other changes
    - Revamped sitting so its now spitting out the exact same packets like Habbo. Before this sometimes caused avatars to be sitting below or too high of furniture. This also happened on Arcturus 1.0. Especially when chairs were stacked ontop of multiheight interactions.
    - The usage of furniture has been changed so that you can only do an action once every 125ms, or 8 cycles per second. This is the same as on Habbo. This is to prevent spamming of items like switches or causing lag.

  16. #16
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts

    Re: [C#] Arcturus Version 2.0 Emulator by The General [C#, .NET, Windows, Linux, Mac]

    Plugin Showcase

    Previously I demonstrated how you can use the plugin system to add in a command. In this post I'm trying to show the true power of the plugin system. Using a server side C# Blazor application, you're able to use any services from the emulator. In this example I made a page that shows the list of online players and their current room.

    The administration panel is a simple blazor application which is build in a standalone project. By referencing the Sirius Api we can use all services from the emulator in our project. The compiled project is placed in the plugins folder of the emulator after which the emulator will run the blazor application as a plugin. This allows close integration with the emulator, no need for RCON / TCP commands to be send and implemented by the server and you can easily extend this further to add more features.



    Code:
     @Page "/fetchdata"
    
    @using Sirius.Api.Game.User
    @using Sirius.Api.Game.Rooms @Inject IHabboCache HabboCache @Inject IGuestRoomDataRepository GuestRooms
    
    <h1>Players</h1>
    
    <p>View online players</p>
    
    @if (_habbos == null)
    {
        <p><em>Loading...</em></p>
    }
    else
    {
        <table class="table">
            <thead>
                <tr>
                    <th></th>
                    <th>Username</th>
                    <th>Time Online</th>
                    <th>Current Room</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var habbo in _habbos)
                {
                    <tr>
                        <td><img src="https://www.habbo.nl/habbo-imaging/avatarimage?figure=@(habbo.Info.Figure)&headonly=1" /></td>
                        <td>@habbo.Info.Name</td>
                        <td>
                            @{
                                var span = DateTime.Now - UnixTimeToDateTime(habbo.Info.LoginTimestamp);
                                if (span.Hours > 0)
                                    @($"{span.Hours} hours, ")
                                @($"{span.Minutes} minutes")
                            }
                        </td>
                        <td>@{
                                if (habbo.CurrentRoom > 0)
                                {
                                    var room = GuestRooms.Get(habbo.CurrentRoom).Result;
                                    @($"({room.FlatId}): {room.Name}")
                                }
                                else
                                {
                                    @(" - ")
                                }
                            }</td>
                    </tr>
                }
            </tbody>
        </table>
    }
     @code {
        private IHabbo[] _habbos;
    
        protected override void OnInitialized()
        {
            _habbos = HabboCache.OnlineHabbos.Values.ToArray();
        }
    
        private DateTime UnixTimeToDateTime(long unixtime)
        {
            var dateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, System.DateTimeKind.Utc);
            dateTime = dateTime.AddMilliseconds(unixtime).ToLocalTime();
            return dateTime;
        }
    }

  17. #17
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts

    Re: [C#] Arcturus Version 2.0 Emulator by The General [C#, .NET, Windows, Linux, Mac]

    Here is a quick updated about the most recent additions made to the project.

    Added Totem effects


    I had implemented rollers but I did not finish them before. Anyway here is the classic roll bug on Habbo reproduced on Sirius
    https://i.gyazo.com/0e2cd37c6fc93351...41a0e7ac49.mp4

    Added Football
    Kicking:


    Dribble:


    Trapping:


    Dribble + Kick


    Including the achievements


    Rolling downhill:


    And goals + score boards


    Hopefully this satisfies the brazilian football players out there ;)

    Added Banzai Puck
    As the banzai puck has an underlying ball implementation, it was fairly straightforward to add it. When pushed it turns to your teams' color and when it goes over the tiles it will mark them for you.



    Water Patches & Water Items
    The water patches & water items interactions have been added. Water patches give the effect and when you sit on a water item (eg inflatable chair) the effect is removed.


    On Arcturus this is actually bugged and incorrectly implemented resulting in a hard line transition between different types of water patches, example deep & shallow.

    Puzzle Box
    The most popular feature on retros (kidding); the puzzle box has been added. Just simply stand next to it and double click the box in order to push it away.

    Last edited by The General; 11-11-22 at 11:42 AM.

  18. #18
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts

    Re: [C#] Arcturus Version 2.0 Emulator by The General [C#, .NET, Windows, Linux, Mac]

    Small Update!
    BuildersClub has been added and fully integrated! In order to use the floorplan you need an active buildersclub subscription (just like Habbo) or turn off this requirement.
    When placing a BC item to the room, the room gets locked unless you have an active subscription. BC Furni limits can be increased by buying them from the catalog.

    Snowboarding has been added too



    Also I've added a bunch of commands (more to follow!)
    Code:
    Add Kick command.
    Add Pull command
    Add Push command
    Add SitDown command
    Add Super Pull command
    Add Super Push command
    Add eject all command
    Add pickall command
    Add pickallbc command
    Add teleport command
    Added All Around Me Command
    Added Dance All Command
    Added Gaia Info command
    Added Make Dance Command
    Added Make Say Command
    Added Make Shout Command
    Added Make Wave Command
    Added Mute command
    Added Room Alert Command
    Added Room Credits Command
    Added Room Kick Command
    Added Room Points Command
    Added Say All Command
    Added Shout All Command
    Added Summon Command
    Added Wave All Command
    Added unmute command

  19. #19
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts

    Re: [C#] Arcturus Version 2.0 Emulator by The General [C#, .NET, Windows, Linux, Mac]

    Figured I'd post a quick update here:

    Lots of effort has been put into making the API better & easier to use. Some example plugins can be found at: https://github.com/80O/SiriusPlugins

    The example plugins will be updated over time with more examples on using specific interfaces.

    Notably, networking has been optimized by using packet compression between Sirius, Gaia and the gameservers. Also memory footprint has been optimized; by using pre allocated memory buffers, fragmentation is prevented. This slightly increased the idle memory footprint at startup however its significantly more stable in the long run.

    The majority of game services (Catalog, Marketplace, Navigator, Moderation etc etc) have all received additional events which plugins can utilize to hook in additional functionality.

    All projects now have nullable enabled by default. This means that unless its explicitly stated, methods won't return an null object. Read more about it here.

    API has been further improved so more interface implementations won't have to be manually registered. Keep an eye out on the plugin examples, I'll be writing a lot more examples before the release. Preferably I'd like to have an example for the majority of interfaces.

    Changes since last post:
    - Added effects inventory
    - Added featured catalog pages.
    - Added Bot Change Figure Wired Effect
    - Added Bot Talk Wired Effect
    - Added Bot Talk to Avatar Wired Effect
    - Added Bot Give Hand Item Wired Effect
    - Added Bot Teleport Wired Effect
    - Added Bot Move Wired Effect
    - Added Bot Follow Avatar Wired Effect
    - Added Localization (Catalog, Commands, Pet / Bot chatter etc)
    - Added Landingview request a badge.
    - Added name changing.
    - Added flagme command.
    - Added command to toggle diagonal movement modes.
    - Added command logging. Thx @Squidgy
    - Added unload room command.
    - Added Ban Command
    - Added IpBan Command
    - Added Superban Command
    - Added Clones Command
    - Added Eject All Buildersclub Furniture Command.
    - Added Bonus points rewards
    - Added QuickPolls














    Also a live demo has been put up at https://sirius.arcturus.pw It supports the flash client as well as an older version of Nitro. (Still need to update that)


  20. #20
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts
    Been a bit busy the past year but I figured I'd post an update:

    213 commits since last post;

    - Split the API into two; One for the emulator (Sirius) and one for the room instances (Gaia).
    - Updated my local nitro version to the react version. (Pretty cool, thanks @Billsonn)
    - Added Battle Banzai Teleport Tiles
    - Improved API for entities: Entity.IsNextTo(Entity / Furni), Entity.LookAt(Entity / Tile / Furni) Entity.TryPassHandItem(Entity)
    - Improved API for Heightmap: GetRandomTileInSquare(centertile, radius), GetTiles(location, width, length)
    - Changed buy limit from 99 to 100
    - Fixed bunch of random nitro disconnects
    - Added SpawnFurniCommand
    - Gaia rooms are now more modular. Plugins can add services scoped to the room instance.
    - Added trade logging.
    - Replaced all timestamps with DateTime instead of integer unix timestamp
    - Bulk furniture purchasing was a bit slow. Optimized this. < 1ms for 1000 items.
    - Plugins can now instantiate room instances. Could be used for temporary rooms for games.
    - Improved API for sending notifications. (SendAlertNotification, SendBubbleAlert, SendMultiLineAlert, SendInClientLink)
    - Added Coords command.
    - Added missing owner kick exception from Wired Kick From Room Effect
    - Added Apply Wired Snapshot. Button in wired that resets furniture back to their original position.
    - Added Cannon furniture interaction.
    - Removed allow_walk, allow_lay, allow_sit from items_base table. Replaced with posture enum (blocked, walk, sit, lay)
    - Improved networking API to use more concrete generic return type instead of interfaces. This simplifies code.
    - Added missing no permission notifications and checks.
    - Added more API events & hooks.
    - Replaced all Random with Random.Shared
    - Added Recycler
    - Added GiftReceiverNotFound packet.
    - Added ClubGifts to catalog
    - Added a tool to automatically update the catalog.
    - Added a tool to import rooms from Habbo
    - Fixed a glitch where you would sit at the wrong height (sometimes)
    - Added support for list and display modes.
    - Added "Show more results" support to the navigator.
    - Added dynamic navigator filters.
    - Added more categories to navigator (visit history, my favorite rooms, rooms where my friends are etc)
    - Renamed a bunch of packets to match their original flash names.

  21. #21
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts
    I have been busy cleaning up the API and adding in a couple more features. I hope nitro catches up soon though. (@Laynester plz hurry :D)

    50 commits since last post whoohoo!

    Added: API documentation to more classes.
    Added: Acc_housekeeping to the ranks table.
    Added: AveragePrice and OfferCount to MarketplaceService.GetOffer
    Added: BCrypt verify authentication API support
    Added: Camera (Nitro!)
    Added: CatalogPageLayouts static class with hardcoded page layouts
    Added: Check to purchase to verify the page is enabled.
    Added: Discord Bot Plugin
    Added: Fix for Nitros shitty heightmap.
    Added: Hall of Fame
    Added: ItemDefinitionsRepository:GetItemBySpriteId
    Added: Load Rank.Effect and Rank.LogCommands from the database ranks table.
    Added: Load plugins from multiple directories. Configurable from config.json
    Added: PermissionKey class with all key constants.
    Added: Pickup furniture check for permission AccAnyRoomOwner
    Added: Server_statistics table.
    Added: Sorting of categories to the navigator. MyWorld MyRooms are now always at the top.
    Added: Voucher redeem history & redeem limits.
    Added: Websocket WSS SSL support
    Changed: If catalog page is disabled, don't show any items.
    Changed: Inherit perks from lower ranks during loading.
    Changed: Pass extradata to ItemManager.CreateItem
    Changed: Renamed CatalogPage.Rank field to MinRank
    Changed: Replaced Reload.Wait() with IStartable in all services.
    Changed: Updated server info command to include uptime.
    Fixed: A bug in CatalogPageTexts.FromLocalization
    Fixed: Bonus Points not being deducted after getting an item.
    Fixed: Bug in LocalizationService not subscribing to Localization.UpdatedEntry
    Fixed: Deleting catalog page from database using API
    Fixed: Duplicate interaction attaching
    Fixed: Loading plugin dependencies
    Fixed: Populate UserEntity.Rank value

    I've also created a plugin to integrate with Discord + an API for it so it can be reused in other plugins. Besides that I created a plugin to verify your account using a slash command in discord. And I shamefully copied boons marketplace discord thingy



    https://pastebin.com/5RNa6sGF
    Last edited by The General; 11-11-22 at 11:41 AM.

  22. #22
    Gamma Spamma Liam is offline
    Grand MasterRank
    Dec 2011 Join Date
    Down UnderLocation
    2,945Posts
    It's refreshing to see that there's still at least one person still contributing to the HH section.

    Keep the updates rolling out, keep the community alive my friend.

    I've also sent you a F/R on Discord

  23. #23
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts
    (70 commits since last post)

    Added: (Re-)Load TalenTrack after achievements service (re-)load.
    Added: Achievement ACH_BuildersClub
    Added: Achievement ACH_CostumeHopper
    Added: Achievement ACH_EsA (Freeze frozen player)
    Added: Achievement ACH_GameAuthorExperience
    Added: Achievement ACH_GiftReceiver GiftGiver
    Added: Achievement ACH_RbTag
    Added: Achievement ACH_RoomDecoHosting
    Added: Achievement ACH_RoomEntry
    Added: Achievement ACH_snowBoardBuild
    Added: CrackableInventoryProductReward interaction
    Added: Follow / Stalk command.
    Added: ProgressAchievement(userId, achievementName, progress) overload. Schedules achievements progress if the player is offline.
    Added: Set default room wall and floor paint.
    Added: SwitchState Interaction
    Added: VipGate interaction (vip_gate)
    Added: WalkOverTeleport teleport within same room.
    Added: camera publishing + events.
    Added: command aliases option + add / delete alias commands.
    Added: credits command.
    Added: freeze points being given.
    Added: interaction builder for black hole.
    Added: more interactions to InteractionTypes.
    Added: option to disable achievements.
    Added: passing handitem notification
    Added: threadsafe method to change credits / points
    Changed camera_log table structure.
    Changed: Buying walkover teleport now gives a set of linked teleporters instead of 1 teleport.
    Changed: Failed commands are no longer showing in the room.
    Changed: Handle exceptions gracefully in room cycle. Prevents room from crashing.
    Changed: Hide inaccessible catalog pages.
    Changed: Ignored variable replaced with _
    Changed: Improved WalkOverTeleport interaction.
    Changed: Introduced LagWarning event to IRoomSessionService and to IRoomSession
    Changed: Load achievement score for user entities.
    Changed: Load achievements async
    Changed: Made TradingConfigurationLoader startable.
    Changed: Made commands case insensitive.
    Changed: Only kick when walking in door when there is no furniture.
    Changed: Only send achievementprogress when progress is not 0
    Changed: Refactored Achievements RoomComponent.
    Changed: Reuse byte buffers for nitro proxy missing client initiated packets.
    Changed: Small optimization to UserUpdateMotto achievement handling
    Changed: Updated ACH_RoomEntry to only increment once per room.
    Changed: Use new achievementsservice overload to reduce code duplication.
    Fixed: Creating Guilds
    Fixed: QuestsComposer not serializing _openWindow
    Fixed: absolute achievement progress calculate correctly.
    Fixed: bug in picking up furniture not being removed from selected furniture in wired.
    Fixed: friend requests not being send correctly / loaded.
    Fixed: giving respect. Roomid was missing.
    Fixed: load navigator preferences.
    Fixed: roller slide animation for furniture.
    Fixed: sender of whisper not seeing the whisper.
    Fixed: sender of whisper not seeing the whisper.
    Removed: debug console write.
    Removed: some nitro proxy initiated messages. Issues in v1 no longer in v2
    Removed: status update causing rollers to glitch out.
    Removed: text from MOTD
    Renamed: CostumeHopper to CostumeRoomNetworkTeleport to match Habbos definition.
    Renamed: Gate to PrivateRoomDoor to match Habbos definition.
    Renamed: InteractionTypes.GuildFurni to GuildCustomized to match Habbos definition.
    Renamed: NPCs component to EntitiesComponent
    Renamed: OneWayGate to OneWayDoor to match Habbos definition.
    Renamed: Wired Extra to Wired Propagation to match Habbos definition.
    Renamed: interaction types to match Habbos

    Demo hotel has been updated. Thanks for bill, laynester for fixing some things in Nitro. Thanks to RealCosis, Oliver for a couple bug reports.

    (I wont advertise here, if you want to test play, contact me)

    - - - Updated - - -

    Quote Originally Posted by Liam View Post
    It's refreshing to see that there's still at least one person still contributing to the HH section.

    Keep the updates rolling out, keep the community alive my friend.

    I've also sent you a F/R on Discord
    That enough updates for you :D ?

  24. #24
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts
    Improved football

    Sirius (Nitro) vs Habbo:


  25. #25
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts
    Some changes (30 commits in total):

    Added ChatColor command
    Added Disconnect command
    Added Faceless command.
    Added Freeze Bots Command
    Added Freeze Pets Command
    Added Freeze command
    Added Give Rank Command
    Added Habnam Command
    Added Mass Badge Command
    Added Mass Credits Command
    Added Mimic Command
    Added Moonwalk command.
    Added Pinata Interaction
    Added Points Command
    Added Private Chat Area Furniture (Tents)
    Added Room Effect Command
    Added SwitchClothing Interaction.
    Added SwitchClothingTeleport interaction
    Added bots command (:bots)
    Added free option to ICatalogService:PurchaseAsGift
    Added keepalive message.
    Added online users command (:online)
    Added pets command (:pets)
    Changed catalog frontpage_featured to frontpage4
    Fixed stacking helper throwing an error when placing to the room.
    Flipped check for fall and climb limits.
    Save figure changes from furniture



Advertisement