[Submissions] Extending the functionality of any Habbo Emulator

Seriosk

Programmer;
Oct 29, 2016
256
105
Extending the functionality of any Habbo Emulator
Hello. I have decided to start this thread to help new people who don't know the basic concepts of the C# or Java languages, which is what most emulators are coded in for Habbo now.

So what can I do?
Pretty much anything, I can extend the functionality of any emulator in C# or Java, I must say that my knowledge is far more advanced in C# but that doesn't mean I can't write clean, quality code in the Java language for emulators.

Some of the things I can code / extend
  • Logging
  • Configuration
  • Functionality of Nugget packages
  • Commands
  • Features
  • Timers

Pretty much anything, some of the things above are a list of what I have recently coded for other people which is why I mention them. Just ask below and I'll let you know if I can code it or not. I'll try my best to finish it in a timely fashion.
 

Seriosk

Programmer;
Oct 29, 2016
256
105
Sir, please recode Plus' logging system so it's not log4net. Thanks.
I hope you like this, I recoded it in NLog library. Log4net isn't that great, as shown on these benchmarks below
netchart.png


Anyway, here is the code for the new logging..

NLog.config?
Code:
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <targets>
        <target name="coloredConsole" xsi:type="ColoredConsole" useDefaultRowHighlightingRules="false"
        layout="  ${date:format=HH\:mm\:ss} - ${message}" >
            <highlight-row condition="level == LogLevel.Trace" foregroundColor="White" />
            <highlight-row condition="level == LogLevel.Debug" foregroundColor="Cyan" />
            <highlight-row condition="level == LogLevel.Info" foregroundColor="Green" />
            <highlight-row condition="level == LogLevel.Warn" foregroundColor="Yellow" />
            <highlight-row condition="level == LogLevel.Error" foregroundColor="Red" />
            <highlight-row condition="level == LogLevel.Fatal" foregroundColor="Red" />
        </target>

        <target name="traceFile" xsi:type="File"
            layout="[${pad:padding=5:inner=${level:uppercase=true}}] occurred at [${longdate}] in [${logger}]: ${message}"
            fileName="${basedir}/assets/logging/trace.log" keepFileOpen="false" encoding="iso-8859-2" />
          
        <target name="debugFile" xsi:type="File"
            layout="[${pad:padding=5:inner=${level:uppercase=true}}] occurred at [${longdate}] in [${logger}]: ${message}"
            fileName="${basedir}/assets/logging/debug.log" keepFileOpen="false" encoding="iso-8859-2" />
          
        <target name="infoFile" xsi:type="File"
            layout="[${pad:padding=5:inner=${level:uppercase=true}}] occurred at [${longdate}] in [${logger}]: ${message}"
            fileName="${basedir}/assets/logging/info.log" keepFileOpen="false" encoding="iso-8859-2" />
          
        <target name="warnFile" xsi:type="File"
            layout="[${pad:padding=5:inner=${level:uppercase=true}}] occurred at [${longdate}] in [${logger}]: ${message}"
            fileName="${basedir}/assets/logging/warn.log" keepFileOpen="false" encoding="iso-8859-2" />
          
        <target name="errorFile" xsi:type="File"
            layout="[${pad:padding=5:inner=${level:uppercase=true}}] occurred at [${longdate}] in [${logger}]: ${message}"
            fileName="${basedir}/assets/logging/error.log" keepFileOpen="false" encoding="iso-8859-2" />
          
        <target name="fatalFile" xsi:type="File"
            layout="[${pad:padding=5:inner=${level:uppercase=true}}] occurred at [${longdate}] in [${logger}]: ${message}"
            fileName="${basedir}/assets/logging/fatal.log" keepFileOpen="false" encoding="iso-8859-2" />
    </targets>

    <rules>
        <logger name="*" minlevel="Trace" writeTo="coloredConsole" />
        <logger name="*" minlevel="Trace" maxLevel="Trace" writeTo="traceFile" />
        <logger name="*" minlevel="Debug" maxLevel="Debug" writeTo="debugFile" />
        <logger name="*" minlevel="Info" maxLevel="Info" writeTo="infoFile" />
        <logger name="*" minlevel="Warn" maxLevel="Warn" writeTo="warnFile" />
        <logger name="*" minlevel="Error" maxLevel="Error" writeTo="errorFile" />
        <logger name="*" minlevel="Fatal" maxLevel="Fatal" writeTo="fatalFile" />
    </rules>
</nlog>

In your Program.cs, you may want to change that path to where ever you save the nlog.config..
Code:
LogManager.Configuration = new XmlLoggingConfiguration("/nlog/nlog.config");

How to use?, well, each class you want to use it in, simply put the code below:
Code:
private static readonly ILogger Logger = LogManager.GetCurrentClassLogger();

In Plus, it's something like this:
Code:
private static readonly ILog log = LogManager.GetLogger("Plus.SomeNamespaceIdek");

Then, log away?, you may want to change the Log configuration to your liking :p

Usage:
Code:
Logger.Debug("Debug test...");
Logger.Error("Error test...");
Logger.Fatal("Fatal test...");
Logger.Info("Info test...");
Logger.Trace("Trace test...");
Logger.Warn("Warn test...");

Last step you'll need to install the Nuget package for NLog from Nuget Package Manager.
 

yoyok

Member
Apr 24, 2013
197
24
Make the 'buy' catalog color for chat work please, i could not get it work with that tutorial on RZ...
Maybe you can share a better tutorial? Also i saw that the name color does not work on old chat, someone have fixed it for new and old chat. It would be really awesome if you can do this and release it properly with a good tutorial where to add where. ;p
 

LeChuck

New Member
Feb 13, 2017
9
2
What about making a Casino system for Plus emu @Sage ?
Something like this:
:start 21 %username% = command to start the game 21, it will automatically say something like "i have 10 now", "i had 10 but i got a 6 so now i have 16"
:stop = stop at any number like 19, 20 or 21.

If you won it will say "i got 20 and won over Noob"
if you lose "i got over 23 and lost" or "i lost versus Noob2"
 
Last edited:

Zet

New Member
Sep 20, 2016
24
16
Ran into a few users who were in need of Nux. See if you could get that done for them, it'll be great.
 

Zet

New Member
Sep 20, 2016
24
16
@Sage Nux just like same to habbo to the new persons which it's doing tour to new person. Only 3 message Nux I think @Zet ?

Sorry it was quite difficult to understand what you said... but after reading it a few times I finally understand. Nux is the tutorial users get in-game once they've registered as a new user. Very much similar to the way Habbo has it.
 

Seriosk

Programmer;
Oct 29, 2016
256
105
Sorry it was quite difficult to understand what you said... but after reading it a few times I finally understand. Nux is the tutorial users get in-game once they've registered as a new user. Very much similar to the way Habbo has it.
I see, I wouldn't know that because I've never played Habbo, I just develop it. If you PM me a bit more information about it, what you want it to do etc I can code it sure.
 

Users who are viewing this thread

Top